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

Changed to using hydro_dimension isntead of 3

parent 12ecf063
No related branches found
No related tags found
1 merge request!540Add Pressure-Energy (P-U) SPH
...@@ -395,7 +395,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( ...@@ -395,7 +395,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
const float soundspeed = gas_soundspeed_from_pressure(p->rho, pressure); const float soundspeed = gas_soundspeed_from_pressure(p->rho, pressure);
/* Compute the "grad h" term */ /* Compute the "grad h" term */
const float common_factor = p->h / (3 * p->density.wcount); const float common_factor = p->h / (hydro_dimension * p->density.wcount);
const float grad_h_term = const float grad_h_term =
(p->density.pressure_bar_dh * common_factor / hydro_gamma_minus_one) / (p->density.pressure_bar_dh * common_factor / hydro_gamma_minus_one) /
(1 + common_factor * p->density.wcount_dh); (1 + common_factor * p->density.wcount_dh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment