Skip to content
Snippets Groups Projects
Commit 6e5189be authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added the primoridal abundance of Helium to the list of physical constants.

parent 8e65bed1
No related branches found
No related tags found
No related merge requests found
...@@ -126,6 +126,11 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params, ...@@ -126,6 +126,11 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params,
internal_const->const_T_CMB_0 = internal_const->const_T_CMB_0 =
const_T_CMB_0_cgs / const_T_CMB_0_cgs /
units_general_cgs_conversion_factor(us, dimension_temperature); 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);
} }
/** /**
......
...@@ -93,6 +93,9 @@ struct phys_const { ...@@ -93,6 +93,9 @@ struct phys_const {
/*! Temperature of the CMB at present day */ /*! Temperature of the CMB at present day */
double const_T_CMB_0; 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, void phys_const_init(const struct unit_system* us, struct swift_params* params,
......
...@@ -95,4 +95,7 @@ const double const_earth_mass_cgs = 5.9724e27; ...@@ -95,4 +95,7 @@ const double const_earth_mass_cgs = 5.9724e27;
/*! Temperature of the CMB at present day [K] */ /*! Temperature of the CMB at present day [K] */
const double const_T_CMB_0_cgs = 2.7255; 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 */ #endif /* SWIFT_PHYSICAL_CONSTANTS_CGS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment