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

Prevent the use of the EAGLE entropy floor with the Cool limiter at a higher...

Prevent the use of the EAGLE entropy floor with the Cool limiter at a higher density than the Jeans one.
parent 4825fd5d
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,9 @@ low-density high-metallicity particles to cool below the warm phase because
of over-cooling induced by the absence of metal diffusion. This limit plays
only a small role in practice. The second limit, labelled as ``Jeans``, is
used to prevent the fragmentation of high-density gas into clumps that
cannot be resolved by the solver. The two limits are sketched on the
following figure. An additional over-density criterion is applied to
prevent gas not collapsed into structures from being affected.
cannot be resolved by the coupled hydro+gravity solver. The two limits are
sketched on the following figure. An additional over-density criterion is
applied to prevent gas not collapsed into structures from being affected.
.. figure:: EAGLE_entropy_floor.svg
:width: 400px
......@@ -69,6 +69,9 @@ EAGLE run, that section of the parameter file reads:
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
Note that the model only makes sense if the ``Cool`` threshold is at a lower
density than the ``Jeans`` threshold.
.. _EAGLE_chemical_tracers:
Chemical tracers
......
......@@ -168,6 +168,17 @@ static INLINE void entropy_floor_init(struct entropy_floor_properties *props,
props->Cool_gamma_effective =
parser_get_param_float(params, "EAGLEEntropyFloor:Cool_gamma_effective");
/* Cross-check that the input makes sense */
if (props->Cool_density_threshold_H_p_cm3 >=
props->Jeans_density_threshold_H_p_cm3) {
error(
"Invalid values for the entrop floor density thresholds. The 'Jeans' "
"threshold (%e cm^-3) should be at a higher density than the 'Cool' "
"threshold (%e cm^-3)",
props->Jeans_density_threshold_H_p_cm3,
props->Cool_density_threshold_H_p_cm3);
}
/* Initial Hydrogen abundance (mass fraction) */
const double X_H = hydro_props->hydrogen_mass_fraction;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment