Adaptive softening for the gas
Implements adaptive softening for the gas when using the Wendland-C2 kernel (i.e. the kernel used in the gravity solver). Equations taken straight from https://ui.adsabs.harvard.edu/abs/2007MNRAS.374.1347P/abstract but with the terms altered for the Wendland kernel.
Changes:
- Add new config option to activate the adaptive softening (
--with-adaptive-softening
), - The gravity scheme uses the gas'
h
asepsilon
- A min and max can be applied via the gravity section of the parameter file.
- The gravity loops and initial comms are taking place after the hydro ghost.
- The hydro scheme (SPH only) includes extra momentum terms accounting for the change in softening.
- the "baryon softening" constants given in the parameter files then only apply to stars and BHs.
Todo:
-
Same for the other hydro schemes. -
Document the new behaviour in the RTD. -
Update the unit tests and tools.c
Closes #879 (closed).
Edited by Matthieu Schaller