Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
963af85e
Commit
963af85e
authored
Apr 25, 2018
by
Jacob Kegerreis
Browse files
Debugging new hydro
parent
7d88bfd4
Changes
5
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
963af85e
...
...
@@ -779,7 +779,7 @@ fi
# Hydro scheme.
AC_ARG_WITH([hydro],
[AS_HELP_STRING([--with-hydro=<scheme>],
[Hydro dynamics to use @<:@gadget2, minimal, hopkins, default, gizmo, shadowfax, minimal-multi-mat debug default: gadget2@:>@]
[Hydro dynamics to use @<:@gadget2, minimal, hopkins, default, gizmo, shadowfax, minimal-multi-mat
,
debug default: gadget2@:>@]
)],
[with_hydro="$withval"],
[with_hydro="gadget2"]
...
...
@@ -986,7 +986,7 @@ case "$with_cooling" in
grackle)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [0], [Grackle chemistry network, mode 0])
;;
;;
grackle1)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [1], [Grackle chemistry network, mode 1])
...
...
@@ -994,11 +994,11 @@ case "$with_cooling" in
grackle2)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [2], [Grackle chemistry network, mode 2])
;;
;;
grackle3)
AC_DEFINE([COOLING_GRACKLE], [1], [Cooling via the grackle library])
AC_DEFINE([COOLING_GRACKLE_MODE], [3], [Grackle chemistry network, mode 3])
;;
;;
EAGLE)
AC_DEFINE([COOLING_EAGLE], [1], [Cooling following the EAGLE model])
;;
...
...
examples/IronPlanetImpact/README.md
View file @
963af85e
...
...
@@ -4,3 +4,9 @@ Iron Earths Giant Impact
This is a first test of the planetary equations of state, colliding two Earth-
mass planets made of Tillotson iron.
Code Setup
----------
$ ./configure --with-hydro=minimal-multi-mat --with-equation-of-state=tillotson --disable-vec
$ make
examples/IronPlanetImpact/iron_planet_impact.yml
View file @
963af85e
# Define the system of units to use internally.
InternalUnitSystem
:
UnitMass_in_cgs
:
1
# Grams
UnitLength_in_cgs
:
1
# Centimeters
UnitVelocity_in_cgs
:
1
# Centimeters per second
UnitCurrent_in_cgs
:
1
# Amperes
UnitTemp_in_cgs
:
1
# Kelvin
UnitMass_in_cgs
:
5.9724e27
# Grams
UnitLength_in_cgs
:
6.371e8
# Centimeters
UnitVelocity_in_cgs
:
6.371e8
# Centimeters per second
UnitCurrent_in_cgs
:
1
# Amperes
UnitTemp_in_cgs
:
1
# Kelvin
# Parameters governing the time integration
TimeIntegration
:
time_begin
:
0
.
# The starting time of the simulation (in internal units).
time_end
:
50
# The end time of the simulation (in internal units).
dt_min
:
1e-6
# The minimal time-step size of the simulation (in internal units).
dt_max
:
1
e-3
# The maximal time-step size of the simulation (in internal units).
time_begin
:
0
# The starting time of the simulation (in internal units).
time_end
:
100000
# The end time of the simulation (in internal units).
dt_min
:
0.1
# The minimal time-step size of the simulation (in internal units).
dt_max
:
1
0
# The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots
:
basename
:
iron_planet_impact
# Common part of the name of output files
time_first
:
0.
# Time of the first output (in internal units)
delta_time
:
0.2
# Time difference between consecutive outputs (in internal units)
basename
:
iron_planet_impact
# Common part of the name of output files
time_first
:
0
# Time of the first output (in internal units)
delta_time
:
1000
# Time difference between consecutive outputs (in internal units)
# Parameters governing the conserved quantities statistics
Statistics
:
delta_time
:
1e-2
# Time between statistics output
delta_time
:
1000
# Time between statistics output
# Parameters for the hydrodynamics scheme
SPH
:
resolution_eta
:
1.2348
# Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours
:
0.1
# The tolerance for the targetted number of neighbours.
CFL_condition
:
0.1
# Courant-Friedrich-Levy condition for time integration.
resolution_eta
:
1.2348
# Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours
:
0.1
# The tolerance for the targetted number of neighbours.
CFL_condition
:
0.2
# Courant-Friedrich-Levy condition for time integration.
# Parameters for the self-gravity scheme
Gravity
:
theta
:
0.7
# Opening angle (Multipole acceptance criterion)
max_physical_softening
:
0.0024
# Physical softening length (in internal units).
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
initial_conditions.hdf5
# The file to read
shift_x
:
0.
# A shift to apply to all particles read from the ICs (in internal units).
shift_y
:
0.
shift_z
:
0.
# External potential parameters
PointMassPotential
:
position_x
:
5.
# location of external point mass in internal units
position_y
:
5.
# here just take this to be the centre of the ring
position_z
:
5.
mass
:
1.498351e7
# mass of external point mass in internal units
timestep_mult
:
0.03
# controls time step
softening
:
0.05
file_name
:
init_cond.hdf5
# The initial conditions file to read
shift_x
:
0
# A shift to apply to all particles read from the ICs (in internal units).
shift_y
:
0
shift_z
:
0
src/hydro/MinimalMultiMat/hydro_part.h
View file @
963af85e
...
...
@@ -34,6 +34,7 @@
#include
"chemistry_struct.h"
#include
"cooling_struct.h"
#include
"equation_of_state.h"
// For enum material_id
/**
* @brief Particle fields not needed during the SPH loops over neighbours.
...
...
@@ -104,7 +105,7 @@ struct part {
float
rho
;
/*! Material identifier flag (integer) */
material_id
mat_id
;
enum
material_id
mat_id
;
/* Store density/force specific stuff. */
union
{
...
...
src/part.h
View file @
963af85e
...
...
@@ -62,6 +62,9 @@
#include
"./hydro/Shadowswift/hydro_part.h"
#define hydro_need_extra_init_loop 0
#define EXTRA_HYDRO_LOOP
#elif defined(MINIMAL_MULTI_MAT_SPH)
#include
"./hydro/MinimalMultiMat/hydro_part.h"
#define hydro_need_extra_init_loop 0
#else
#error "Invalid choice of SPH variant"
#endif
...
...
Write
Preview
Supports
Markdown
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