Skip to content
Snippets Groups Projects
Commit ec80cf2b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Give a sensible DM softening also for runs without DM

parent e8a895f8
No related branches found
No related tags found
No related merge requests found
...@@ -31,10 +31,9 @@ SPH: ...@@ -31,10 +31,9 @@ SPH:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.9 theta: 0.7
comoving_softening: 0.001 # Comoving softening length (in internal units). max_physical_baryon_softening: 0.001 # Physical softening length (in internal units).
max_physical_softening: 0.001 # Physical softening length (in internal units).
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
......
...@@ -44,10 +44,9 @@ SPH: ...@@ -44,10 +44,9 @@ SPH:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion) theta: 0.7 # Opening angle (Multipole acceptance criterion)
comoving_baryon_softening: 0.003 # Comoving softening length (in internal units). max_physical_baryon_softening: 0.003 # Physical softening length (in internal units).
max_physical_baryon_softening: 0.003 # Physical softening length (in internal units).
# Parameters for the task scheduling # Parameters for the task scheduling
Scheduler: Scheduler:
......
...@@ -151,6 +151,12 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params, ...@@ -151,6 +151,12 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params,
params, "Gravity:max_physical_baryon_softening"); params, "Gravity:max_physical_baryon_softening");
} }
/* Some gravity models use the DM softening as the one and only softening
length that exists. So, if we don't have DM (e.g. hydro test or planetary
physics), we must have a non-zero epsilon. */
if (!has_DM && has_baryons)
p->epsilon_DM_max_physical = p->epsilon_baryon_max_physical;
p->epsilon_DM_comoving = p->epsilon_DM_max_physical; p->epsilon_DM_comoving = p->epsilon_DM_max_physical;
p->epsilon_baryon_comoving = p->epsilon_baryon_max_physical; p->epsilon_baryon_comoving = p->epsilon_baryon_max_physical;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment