From 3d19d147a92a6973a2a58d6d16d73e3d798750b5 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Wed, 6 Jul 2016 19:23:38 +0300 Subject: [PATCH] The multitype test-case should be part of master --- .gitignore | 1 + examples/MultiTypes/multiTypes.yml | 47 ++++++++++++++++++++++++++++++ examples/MultiTypes/run.sh | 10 +++++++ 3 files changed, 58 insertions(+) create mode 100644 examples/MultiTypes/multiTypes.yml create mode 100755 examples/MultiTypes/run.sh diff --git a/.gitignore b/.gitignore index 8288ecfeb5..9d0c3e8218 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ examples/*.xmf examples/used_parameters.yml examples/energy.txt examples/*/*.xmf +examples/*/*.dat examples/*/*.hdf5 examples/*/used_parameters.yml examples/*/energy.txt diff --git a/examples/MultiTypes/multiTypes.yml b/examples/MultiTypes/multiTypes.yml new file mode 100644 index 0000000000..a1ff19f98e --- /dev/null +++ b/examples/MultiTypes/multiTypes.yml @@ -0,0 +1,47 @@ +# 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 + +# Parameters governing the time integration +TimeIntegration: + time_begin: 0. # The starting time of the simulation (in internal units). + time_end: 1. # 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: 1e-2 # The maximal time-step size of the simulation (in internal units). + +# Parameters governing the snapshots +Snapshots: + basename: multiTypes # Common part of the name of output files + time_first: 0. # Time of the first output (in internal units) + delta_time: 0.01 # Time difference between consecutive outputs (in internal units) + 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 + +# Parameters governing the conserved quantities statistics +Statistics: + delta_time: 1e-2 # 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. + max_smoothing_length: 0.1 # Maximal smoothing length allowed (in internal units). + CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. + +# Parameters related to the initial conditions +InitialConditions: + file_name: ./multiTypes.hdf5 # The file to read + +# External potential parameters +PointMass: + position_x: 50. # location of external point mass in internal units + position_y: 50. + position_z: 50. + mass: 1e10 # mass of external point mass in internal units diff --git a/examples/MultiTypes/run.sh b/examples/MultiTypes/run.sh new file mode 100755 index 0000000000..92bef44217 --- /dev/null +++ b/examples/MultiTypes/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Generate the initial conditions if they are not present. +if [ ! -e multiTypes.hdf5 ] +then + echo "Generating initial conditions for the multitype box example..." + python makeIC.py 50 60 +fi + +../swift -s -t 16 multiTypes.yml -- GitLab