Skip to content
Snippets Groups Projects
Commit 45bfc03c authored by Josh Borrow's avatar Josh Borrow
Browse files

Added minimal internal energy limit to kick_extra for PU scheme

parent 070e45aa
No related branches found
No related tags found
1 merge request!611Cosmology pressure energy
......@@ -593,6 +593,14 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
}
xp->u_full += p->u_dt * dt_therm;
/* Apply the minimal energy limit */
const float min_energy =
hydro_props->minimal_internal_energy / cosmo->a_factor_internal_energy;
if (xp->u_full < min_energy) {
xp->u_full = min_energy;
p->u_dt = 0.f;
}
/* Compute the sound speed */
const float soundspeed = hydro_get_comoving_soundspeed(p);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment