Commit b61fcd03 authored by Josh Borrow's avatar Josh Borrow Committed by Matthieu Schaller
Browse files

Hydro documentation update

parent f384bd3f
......@@ -11,10 +11,22 @@ includes:
+ Pressure-Energy SPH
+ Thermal diffusion following Price (2012)
+ A simplified version of the 'Inviscid SPH' artificial viscosity
(Cullen & Denhen 2010).
(Cullen & Denhen 2010), with a Balsara switch.
More information will be made available in a forthcoming publication.
The simplified version of the 'Inviscid SPH' artificial viscosity calculates
the time differential of the velocity divergence explicitly, using the value
from the previous step. We also use the Balsara switch instead of the improved
neighbour-based limiter from Cullen & Dehnen 2010, to avoid matrix calculations.
To configure with this scheme, use
.. code-block:: bash
./configure --with-hydro=anarchy-pu --with-kernel=quintic-spline --disable-hand-vec
The scheme as-implemented in SWIFT is slightly different to the one
implemented in the original EAGLE code:
......@@ -26,8 +38,88 @@ implemented in the original EAGLE code:
+ Recommended kernel changed from Wendland-C2 (with 100 Ngb) to
Quintic Spline (with ~82 Ngb).
The parameters available for this scheme, and their defaults, are:
.. code-block:: yaml
SPH:
viscosity_alpha: 0.1 # Initial value for the alpha viscosity
viscosity_length: 0.25 # Viscosity decay length (in terms of sound-crossing time)
# These are enforced each time-step
viscosity_alpha_max: 2.0 # Maximal allowed value for the viscosity alpha
viscosity_alpha_min: 0.0 # Minimal allowed value for the viscosity alpha
diffusion_alpha: 0.0 # Initial value for the diffusion alpha
diffusion_beta: 0.01 # Timescale to raise the diffusion coefficient over
# (decay is on the sound-crossing time)
# These are enforced each time-step
diffusion_alpha_max: 1.0
diffusion_alpha_min: 0.0
There is also a compile-time parameter, ``viscosity_beta`` that we set to
3.0. During feedback events, the viscosity is set to the compile-time
``hydro_props_default_viscosity_alpha_feedback_reset = 2.0`` and the
diffusion is set to ``hydro_props_default_diffusion_alpha_feedback_reset =
0.0``. These can be changed in ``src/hydro/AnarchyPU/hydro_parameters.h``.
ANARCHY-DU SPH
==============
This is the new scheme that will be used in EAGLE-XL. This scheme includes:
+ Durier & Dalla Vecchia (2012) time-step limiter
+ Density-Energy SPH
+ Thermal diffusion following Price (2012)
+ A simplified version of the 'Inviscid SPH' artificial viscosity
(Cullen & Dehnen 2010), with a Balsara switch
+ A diffusion limiter, used to prevent energy leakage out of EAGLE
supernovae (Borrow in prep).
More information will be made available in a forthcoming publication.
The simplified version of the 'Inviscid SPH' artificial viscosity calculates
the time differential of the velocity divergence explicitly, using the value
from the previous step. We also use the Balsara switch instead of the improved
neighbour-based limiter from Cullen & Dehnen 2010, to avoid matrix
calculations.
The diffusion limiter is implemented to ensure that the diffusion is turned
ff in very viscous flows and works as follows:
.. code-block:: C
float new_diffusion_alpha = old_diffusion_alpha;
const float viscous_diffusion_limit =
diffusion_alpha_max *
(1.f - maximum_alpha_visc_over_ngb / viscosity_alpha_max);
new_diffusion_alpha = min(new_diffusion_alpha, viscous_diffusion_limit);
The parameters available for this scheme, and their defaults, are:
.. code-block:: yaml
SPH:
viscosity_alpha: 0.1 # Initial value for the alpha viscosity
viscosity_length: 0.25 # Viscosity decay length (in terms of sound-crossing time)
# These are enforced each time-step
viscosity_alpha_max: 2.0 # Maximal allowed value for the viscosity alpha
viscosity_alpha_min: 0.0 # Minimal allowed value for the viscosity alpha
diffusion_alpha: 0.0 # Initial value for the diffusion alpha
diffusion_beta: 0.25 # Timescale to raise the diffusion coefficient over
# (decay is on the sound-crossing time)
# These are enforced each time-step
diffusion_alpha_max: 1.0
diffusion_alpha_min: 0.0
.. code-block:: bash
./configure --with-hydro=anarchy-pu --with-kernel=quintic-spline --disable-hand-vec
There is also a compile-time parameter, ``viscosity_beta`` that we set to
3.0. During feedback events, the viscosity is set to the compile-time
``hydro_props_default_viscosity_alpha_feedback_reset = 2.0`` and the
diffusion is set to ``hydro_props_default_diffusion_alpha_feedback_reset =
0.0``. These can be changed in ``src/hydro/AnarchyPU/hydro_parameters.h``.
......@@ -25,3 +25,6 @@ this at compile-time with the following configuration flags:
.. code-block:: bash
./configure --with-hydro="gizmo-mfm" --with-riemann-solver="hllc"
These schemes should be treated as experimental and not used for production runs.
\ No newline at end of file
......@@ -9,8 +9,8 @@ Pressure-Entropy SPH
:hidden:
:caption: Contents:
A pressure-entropy SPH scheme is available in SWIFT, inspired by Hopkins 2013.
This includes a Monaghan AV scheme and a Balsara switch.
A Pressure-Entropy SPH scheme is available in SWIFT, inspired by Hopkins 2013.
This includes a fixed Monaghan AV scheme and a Balsara switch.
.. code-block:: bash
......@@ -18,6 +18,15 @@ This includes a Monaghan AV scheme and a Balsara switch.
./configure --with-hydro="pressure-entropy"
The parameters available for this scheme, and their defaults, are:
.. code-block:: yaml
SPH:
viscosity_alpha: 0.8 # Fixed value for the alpha viscosity
Pressure-Energy SPH
===================
......@@ -29,8 +38,38 @@ scheme it includes a Monaghan AV scheme and a Balsara switch.
./configure --with-hydro="pressure-energy"
Both of the above schemes use a very simple, fixed artificial viscosity, only
the ``SPH:viscosity_alpha`` parameter has any effect for this scheme. This will
change the strength of the artificial viscosity throughout the simulation, and
has a default of 0.8.
The parameters available for this scheme, and their defaults, are:
.. code-block:: yaml
SPH:
viscosity_alpha: 0.8 # Fixed value for the alpha viscosity
There is a variant of this implementation that includes a Morris & Monaghan
(1997) variable artificial viscosity that aims to reduce disappation away
from strong shocks. This implementation also includes a Balsara switch.
To use this scheme, you should use:
.. code-block:: bash
./configure --with-hydro="pressure-energy-monaghan"
The parameters available for this scheme, and their defaults, are:
.. code-block:: yaml
SPH:
viscosity_alpha: 0.8 # Initial value for the alpha viscosity
viscosity_length: 0.25 # Viscosity decay length (in terms of sound-crossing time)
# These are enforced each time-step
viscosity_alpha_max: 2.0 # Maximal allowed value for the viscosity alpha
viscosity_alpha_min: 0.1 # Minimal allowed value for the viscosity alpha
There is also a compile-time parameter, ``viscosity_beta`` that we set to
3.0. During feedback events, the viscosity is set to the compile-time
``hydro_props_default_viscosity_alpha_feedback_reset = 2.0``. These can be
changed in ``src/hydro/AnarchyPU/hydro_parameters.h``.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment