Skip to content
Snippets Groups Projects
Commit 438b8856 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Add the mean density to the cosmology

parent 3fd4bc2f
Branches
Tags
1 merge request!825EAGLE star formation: Change the over density criteria
...@@ -190,6 +190,9 @@ void cosmology_update(struct cosmology *c, const struct phys_const *phys_const, ...@@ -190,6 +190,9 @@ void cosmology_update(struct cosmology *c, const struct phys_const *phys_const,
c->critical_density = c->critical_density =
3. * c->H * c->H / (8. * M_PI * phys_const->const_newton_G); 3. * c->H * c->H / (8. * M_PI * phys_const->const_newton_G);
/* Mean density */
c->mean_density = c->critical_density_0 * a3_inv;
/* Time-step conversion factor */ /* Time-step conversion factor */
c->time_step_factor = c->H; c->time_step_factor = c->H;
...@@ -583,6 +586,7 @@ void cosmology_init_no_cosmo(struct cosmology *c) { ...@@ -583,6 +586,7 @@ void cosmology_init_no_cosmo(struct cosmology *c) {
c->critical_density = 0.; c->critical_density = 0.;
c->critical_density_0 = 0.; c->critical_density_0 = 0.;
c->mean_density = 0.;
c->time_step_factor = 1.; c->time_step_factor = 1.;
... ...
......
...@@ -78,6 +78,9 @@ struct cosmology { ...@@ -78,6 +78,9 @@ struct cosmology {
/*! The critical density at redshift 0 (in internal physical units) */ /*! The critical density at redshift 0 (in internal physical units) */
double critical_density_0; double critical_density_0;
/*! The mean density at the current redshift (in internal physical units) */
double mean_density;
/*! Conversion factor from internal time-step size to cosmological step */ /*! Conversion factor from internal time-step size to cosmological step */
double time_step_factor; double time_step_factor;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment