-
Notifications
You must be signed in to change notification settings - Fork 12
Runtime Parameters: Units
Related options: COMOVING
Parameters described on this page: OPT__UNIT, UNIT_L, UNIT_M, UNIT_T, UNIT_V, UNIT_D
Other related parameters: NEWTON_G, ELBDM_MASS, ELBDM_PLANCK_CONST
Parameters below are shown in the format: Name
(Valid Values) [Default Value]
-
- Description: Enable code units. One must also set exactly three units among UNIT_L, UNIT_M, UNIT_T, UNIT_V, UNIT_D (unless the compilation option COMOVING is adopted; see Units in Cosmological Simulations for details). See also Unit Consistency.
- Restriction: It will be turned on automatically when enabling the compilation option COMOVING.
-
- Description: Length unit in CGS.
- Restriction: It will be overwritten when enabling the compilation option COMOVING. See Units in Cosmological Simulations for details.
-
- Description: Mass unit in CGS.
- Restriction: It will be overwritten when enabling the compilation option COMOVING. See Units in Cosmological Simulations for details.
-
- Description: Time unit in CGS.
- Restriction: It will be overwritten when enabling the compilation option COMOVING. See Units in Cosmological Simulations for details.
-
- Description: Velocity unit in CGS.
- Restriction: It will be overwritten when enabling the compilation option COMOVING. See Units in Cosmological Simulations for details.
-
- Description: Mass density unit in CGS.
- Restriction: It will be overwritten when enabling the compilation option COMOVING. See Units in Cosmological Simulations for details.
When enabling units (i.e., OPT__UNIT=1), all input values (e.g., runtime parameters, refinement thresholds, and initial conditions) must be set consistently with the adopted unit system unless otherwise specified. All input physical constants (e.g., NEWTON_G, ELBDM_MASS, and ELBDM_PLANCK_CONST) will be reset automatically to conform to the adopted unit system.
The code does not distinguish external and internal units; In other words, all internal variables in the code should also conform to the same unit system (except for the predefined physical constants).
Some physical constants in CGS units are predefined in the header
include/PhysicalConstant.h
with the prefix Const_
. They can be
useful for unit conversion.
For example, to convert particle velocity vel_code
from code units
to km/s, one can use vel_kms = vel_code*UNIT_V*Const_s/Const_km;
.
When enabling COMOVING, the unit system is currently fixed as follows.
- UNIT_L = h-1 Mpc, where h=HUBBLE0 is the dimensionless Hubble constant.
- UNIT_T = H0-1, where H0 = 100 h km s-1 Mpc-1 is the Hubble constant.
- UNIT_D = ρm0 = 3Ωm0H02 / 8πG, where ρm0 is the present matter density, Ωm0=OMEGA_M0 is the present matter density parameter, and G is the gravitational constant.
Getting Started
User Guide
- Installation
- Running the Code
- Adding New Simulations
- Runtime Parameters
- MPI and OpenMP
- GPU
- Physics Modules
- Outputs
- Simulation Logs
- Data Analysis
- In Situ Python Analysis
- Test Problems
- Troubleshooting
Advanced Topics
Developer Guide