From 167172c96dd603191ad0df7d2150a2717f21d7d1 Mon Sep 17 00:00:00 2001 From: Josh Borrow <joshua.borrow@durham.ac.uk> Date: Tue, 15 May 2018 13:27:24 +0100 Subject: [PATCH] Added extra factor of gamma in the soundspeed --- src/hydro/PressureEnergy/hydro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hydro/PressureEnergy/hydro.h b/src/hydro/PressureEnergy/hydro.h index 68137d860f..2671ac9954 100644 --- a/src/hydro/PressureEnergy/hydro.h +++ b/src/hydro/PressureEnergy/hydro.h @@ -153,7 +153,7 @@ hydro_get_comoving_soundspeed(const struct part *restrict p) { /* Compute the sound speed -- see theory section for justification */ /* IDEAL GAS ONLY -- P-U does not work with generic EoS. */ - const float square_rooted = sqrtf(p->rho / p->pressure_bar); + const float square_rooted = sqrtf(hydro_gamma * p->rho / p->pressure_bar); return p->u * hydro_gamma_minus_one * square_rooted; } -- GitLab