diff --git a/examples/MoonFormingImpact/README.md b/examples/MoonFormingImpact/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5d4ec5d73d4148dca82e8417279cf4d0f3c2e0cd --- /dev/null +++ b/examples/MoonFormingImpact/README.md @@ -0,0 +1,27 @@ +Canonical Moon-Forming Giant Impact +=================================== + +A version of the canonical moon-forming giant impact of Theia onto the early +Earth (Barr, 2016). Both bodies made of Tillotson iron and granite. + + +Code Setup +---------- + +In `swiftsim/`: + +`$ ./configure --with-hydro=minimal-multi-mat --with-equation-of-state=tillotson \ ` +` --disable-vec --with-kernel=wendland-C2` +`$ make` + +In `swiftsim/examples/MoonFormingImpact/`: + +`$ ./run.sh` + + +To do +----- + +* Get it working! +* Add analysis code +* Make initial conditions available diff --git a/examples/MoonFormingImpact/batch_script.sh b/examples/MoonFormingImpact/batch_script.sh new file mode 100644 index 0000000000000000000000000000000000000000..744fe63484b8ffbc027b0334c5ddadb64502b953 --- /dev/null +++ b/examples/MoonFormingImpact/batch_script.sh @@ -0,0 +1,48 @@ +#!/bin/bash -l + +# ============== +# Batch script for GIHR simulations with HOT +# ============== +#BSUB -L /bin/bash + +# ============== Number of processors (and one MPI rank per node) +#BSUB -n 1 +#BSUB -R "span[ptile=1]" + +# ============== Job name +#BSUB -J SWIFT + +# ============== Output files +#BSUB -oo /cosma5/data/dp004/dc-kege1/gihr_data5/swift/outs_and_errs/swift_%J.out +#BSUB -eo /cosma5/data/dp004/dc-kege1/gihr_data5/swift/outs_and_errs/swift_%J.err + +# ============== Queue +# #BSUB -q bench1 +#BSUB -q cosma +# #BSUB -q cosma5 +# #BSUB -q cosma5-prince + +# ============== Project and user +# #BSUB -P dp004 +#BSUB -P durham +#BSUB -u jacob.kegerreis@durham.ac.uk +#BSUB -N + +# ============== Wall clock time limit +# #BSUB -W 504:00 +#BSUB -W 12:00 +# #BSUB -W 0:30 + +# ============== Ensure that the right MPI module is loaded -- i.e. the same +# module with which the program was compiled. +module purge +module load swift +module load swift/c4/gcc/intelmpi/5.1.3 + +# ============== Run the program +../swift -G -s -t 12 ./moon_forming_impact.yml +# mpirun -np $LSB_DJOB_NUMPROC ../swift_mpi -G -s -t 12 ./moon_forming_impact.yml + + + + diff --git a/examples/MoonFormingImpact/moon_forming_impact.yml b/examples/MoonFormingImpact/moon_forming_impact.yml new file mode 100644 index 0000000000000000000000000000000000000000..f110446584a81fa3e437853a9459ef0663465bb3 --- /dev/null +++ b/examples/MoonFormingImpact/moon_forming_impact.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 + 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: 100000 # The end time of the simulation (in internal units). + dt_min: 0.01 # The minimal time-step size of the simulation (in internal units). + dt_max: 10 # The maximal time-step size of the simulation (in internal units). + +# Parameters governing the snapshots +Snapshots: + # Common part of the name of output files + basename: snapshots/iron_planet_impact + time_first: 0 # Time of the first output (in internal units) + delta_time: 500 # Time difference between consecutive outputs (in internal units) + +# Parameters governing the conserved quantities statistics +Statistics: + delta_time: 500 # 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.2 # Courant-Friedrich-Levy condition for time integration. + +# 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_softening: 0.0025 # Comoving softening length (in internal units). + max_physical_softening: 0.0025 # Physical softening length (in internal units). + +# Parameters related to the initial conditions +InitialConditions: +# file_name: init_cond.hdf5 # The initial conditions file to read + file_name: init_cond_1e5.hdf5 # The initial conditions file to read +# file_name: snapshots/iron_planet_impact_0064.hdf5 # The initial conditions file to read diff --git a/examples/MoonFormingImpact/run.sh b/examples/MoonFormingImpact/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..11018c630f94223408c5066c6751ce8aeabae4e2 --- /dev/null +++ b/examples/MoonFormingImpact/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# Run SWIFT +../swift -G -s moon_forming_impact.yml