Fixes to the cosmo hydro
A bunch of all-around fixes that allow SWIFT to match exactly Gadget-2 on the SamllCosmoVolume hydro test.
This includes:
- Restore the testSymmetry to its old glory.
- Use the correct power of the scale-factor in the term designed to prevent numerical crashes in the Balsara switch.
- Add a Hubble flow term to the Balsara switch in the Minimal & Gadget schemes.
- Add the Hubble flow term to the viscosity SPH equation for the thermodynamic variable in the Gadget and Minimal schemes.
- Document properly that the minimal energy stored in the hydro properties is in the physical frame.
- Use the z=0 critical density when deciding the displacement of particles in space_generate_gas().
- Correct a sign mistake in the displacement of generated gas particles.
Merge request reports
Activity
@jborrow all of these might help with the Santa-Barbara cluster. The last one (imposing the wrong displacement) may be why the effect of the gas on the DM was so large.
Right, sorry, yes, wrong sign. :)
The generation of gas now matches exactly what we do in Gadget-EAGLE. Hopefully that will help. The displacement was incorrect so who knows what the knock-on effects are. Same with the Hubble flow terms in the SPH equations. Both these things affect the overall temperature evolution of the Universe in the Small cosmo volume. They use to yield a mean(log T) about 0.5 dex lower in Gadget than in SWIFT.
added 1 commit
- ae6f5ce2 - Apply the changes to the vectorized version of the Gadget2 scheme as well.
@jwillis could you quickly have a look at the vectorized Gadget scheme here to check that it matches the scalar one? Thanks!
@jborrow there is a fix here to a tiny mistake in the Balsara term. The c/h term designed to prevent crashes due to division by zero used the wrong scale-factor power. Given that the term is small that has probably no effect on the physics but we may as well be consistent across all the schemes.
mentioned in commit 8def1372