Skip to content
Snippets Groups Projects

Clarified cosmology dependence in morris av. Closes #568

Merged Josh Borrow requested to merge fix-cosmology-monaghan-av into master
1 file
+ 6
6
Compare changes
  • Side-by-side
  • Inline
@@ -640,14 +640,14 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
/* Artificial viscosity updates */
/* TODO: Actually work out why this cosmology factor is correct
* and update the SPH / cosmology theory documents. */
/* We perform all of this in physical space. */
const float h_inv_physical = cosmo->a_inv * h_inv;
const float soundspeed_physical = cosmo->a_factor_sound_speed * soundspeed;
/* We divide by a^2 here to make this transform under cosmology the
* same as the velocity (which in SWIFT has an extra 1/a^2 factor.
* See the cosmology theory documents for more information. */
/* Decay rate */
const float inverse_tau =
(hydro_props->viscosity.length * cosmo->a2_inv) * soundspeed * h_inv;
hydro_props->viscosity.length * soundspeed_physical * h_inv_physical;
/* Source term (div v) is already in physical co-ordinates for this scheme */
const float source_term = -1.f * min(p->density.div_v, 0.f);
/* Compute da/dt */
Loading