Add ANARCHY-DU and refactor `hydro_properties.c`
This MR does two things:
- Adds ANARCHY-DU, a variant of the ANARCHY scheme with higher (default) thermal diffusion but based on Density-Energy SPH
- Re-factors
hydro_properties.c
. The ANARCHY-DU scheme requires different defaults than the ANARCHY-PU and PressureEnergyMorris schemes so I thought it was time to break these defaults out into a file on their own. Each directory insrc/hydro
now has it's ownsrc/hydro/*/hydro_defaults.h
which contains:- Default parameters for AV, and diffusion,
- The
const_viscosity_beta
value is defined here as it differs for thePlanetary
scheme @jkeger - A new constant,
hydro_props_default_viscosity_alpha_feedback_reset
is made available such that particles can have their AV value reset after a feedback event. For constant AV schemes, this is the same as the default artificial viscosity parameter, but for variable schemes this is set to the maximal AV.
This second change allows a number of #ifdef's throughout the code to be removed and provides a solution to #576 (closed).
I also had to re-factor the Default
scheme to get it to compile with these changes as it used a random constant in const.h
that I removed. Now in that scheme the diffusion alpha is a particle-carried property read from SPH:diffusion_alpha
. Also, the documentation was updated for a number of schemes that was still the same as their parent.
I've tested this on the 1D sod for all schemes, and they all compile and pass this (apart from Default
but that never works anyway...)
I know that this MR touches way too many files, but that was unavoidable given that I was refactoring every scheme.