diff --git a/src/hydro_properties.c b/src/hydro_properties.c index 2b1cd42055c66768e943241c75298e53e0bf75a8..85f88d418bd46354f7a1cd3dd89b0e77b556b7d9 100644 --- a/src/hydro_properties.c +++ b/src/hydro_properties.c @@ -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); diff --git a/src/hydro_properties.h b/src/hydro_properties.h index b45b93192e7db7b1bdca49557f8563322f09aae9..5ee6a22d2cf1c22f99e50a9254ef323d333d2a10 100644 --- a/src/hydro_properties.h +++ b/src/hydro_properties.h @@ -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