Commit ecb93a1b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add the mean molecular weight of neutral and ionised gas to the hydro properties.

parent 4686c6ec
......@@ -119,6 +119,12 @@ void hydro_props_init(struct hydro_props *p,
p->hydrogen_mass_fraction = parser_get_opt_param_double(
params, "SPH:H_mass_fraction", default_H_fraction);
/* Mean molecular mass for neutral gas */
p->mu_neutral = 4. / (1. + 3. * p->hydrogen_mass_fraction);
/* Mean molecular mass for fully ionised gas */
p->mu_ionised = 4. / (8. - 5. * (1. - p->hydrogen_mass_fraction));
/* Read the artificial viscosity parameters from the file, if they exist */
p->viscosity.alpha = parser_get_opt_param_float(
params, "SPH:viscosity_alpha", hydro_props_default_viscosity_alpha);
......
......@@ -84,6 +84,12 @@ struct hydro_props {
/*! Temperature of the neutral to ionized transition of Hydrogen */
float hydrogen_ionization_temperature;
/*! Mean molecular weight below hydrogen ionization temperature */
float mu_neutral;
/*! Mean molecular weight above hydrogen ionization temperature */
float mu_ionised;
/*! Artificial viscosity parameters */
struct {
/*! For the fixed, simple case. Also used to set the initial AV
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment