diff --git a/src/physical_constants.c b/src/physical_constants.c index 3936d07f4207263a4c391715ab0a8dd9ded6fa6d..ed25ff1b2be09a04400f98476c78a537e6d8e2bf 100644 --- a/src/physical_constants.c +++ b/src/physical_constants.c @@ -126,6 +126,11 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params, internal_const->const_T_CMB_0 = const_T_CMB_0_cgs / units_general_cgs_conversion_factor(us, dimension_temperature); + + const float dimension_Yp[5] = {0, 0, 0, 0, 0}; /* [ - ] */ + internal_const->const_primordial_He_fraction = + const_primordial_He_fraction_cgs / + units_general_cgs_conversion_factor(us, dimension_Yp); } /** diff --git a/src/physical_constants.h b/src/physical_constants.h index 16628bfd6894699608e167d4b309fa5636209219..a1b5e9c243c54bfd97179364170e8b3bbc36fe4f 100644 --- a/src/physical_constants.h +++ b/src/physical_constants.h @@ -93,6 +93,9 @@ struct phys_const { /*! Temperature of the CMB at present day */ double const_T_CMB_0; + + /*! Primordial Helium fraction */ + double const_primordial_He_fraction; }; void phys_const_init(const struct unit_system* us, struct swift_params* params, diff --git a/src/physical_constants_cgs.h b/src/physical_constants_cgs.h index 40eef2c992e819e01980cbcbd7ea7f05721e93cf..59e36e288e70dabecbdccd86891853b1daa0c5bd 100644 --- a/src/physical_constants_cgs.h +++ b/src/physical_constants_cgs.h @@ -95,4 +95,7 @@ const double const_earth_mass_cgs = 5.9724e27; /*! Temperature of the CMB at present day [K] */ const double const_T_CMB_0_cgs = 2.7255; +/*! Primordial Helium fraction */ +const double const_primordial_He_fraction_cgs = 0.245; + #endif /* SWIFT_PHYSICAL_CONSTANTS_CGS_H */