Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Milestones
Merge Requests
14
Merge Requests
14
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
ec80cf2b
Commit
ec80cf2b
authored
Mar 09, 2020
by
Matthieu Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give a sensible DM softening also for runs without DM
parent
e8a895f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
examples/HydroTests/EvrardCollapse_3D/evrard.yml
examples/HydroTests/EvrardCollapse_3D/evrard.yml
+3
-4
examples/Planetary/EarthImpact/earth_impact.yml
examples/Planetary/EarthImpact/earth_impact.yml
+3
-4
src/gravity_properties.c
src/gravity_properties.c
+6
-0
No files found.
examples/HydroTests/EvrardCollapse_3D/evrard.yml
View file @
ec80cf2b
...
...
@@ -31,10 +31,9 @@ SPH:
# Parameters for the self-gravity scheme
Gravity
:
eta
:
0.025
# Constant dimensionless multiplier for time integration.
theta
:
0.9
comoving_softening
:
0.001
# Comoving softening length (in internal units).
max_physical_softening
:
0.001
# Physical softening length (in internal units).
eta
:
0.025
# Constant dimensionless multiplier for time integration.
theta
:
0.7
max_physical_baryon_softening
:
0.001
# Physical softening length (in internal units).
# Parameters related to the initial conditions
InitialConditions
:
...
...
examples/Planetary/EarthImpact/earth_impact.yml
View file @
ec80cf2b
...
...
@@ -44,10 +44,9 @@ SPH:
# Parameters for the self-gravity scheme
Gravity
:
eta
:
0.025
# Constant dimensionless multiplier for time integration.
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).
eta
:
0.025
# Constant dimensionless multiplier for time integration.
theta
:
0.7
# Opening angle (Multipole acceptance criterion)
max_physical_baryon_softening
:
0.003
# Physical softening length (in internal units).
# Parameters for the task scheduling
Scheduler
:
...
...
src/gravity_properties.c
View file @
ec80cf2b
...
...
@@ -151,6 +151,12 @@ void gravity_props_init(struct gravity_props *p, struct swift_params *params,
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_baryon_comoving
=
p
->
epsilon_baryon_max_physical
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment