Skip to content
Snippets Groups Projects
Commit 942f357f authored by Jacob Kegerreis's avatar Jacob Kegerreis
Browse files

Update moon example (not a good example anyway...)

parent 19eeded5
No related branches found
No related tags found
1 merge request!545Add support for equations of state related to planetary physics
Canonical Moon-Forming Giant Impact
===================================
A version of the canonical moon-forming giant impact of Theia onto the early
Earth (Canup 2004; Barr 2016). Both bodies made of Tillotson iron and granite.
NOTE: This doesn't really work because the EOS are different to Canup (2004) so
the impactor just glances then flies away!
A version of the canonical moon-forming giant impact of Theia onto the early
Earth (Canup 2004; Barr 2016). Both bodies are here made of a (Tillotson) iron
core and granite mantle. Only ~10,000 particles are used for a quick and crude
simulation.
Code Setup
----------
Setup
-----
In `swiftsim/`:
`$ ./configure --with-hydro=minimal-multi-mat --with-equation-of-state=tillotson \ `
` --disable-vec --with-kernel=wendland-C2`
`$ ./configure --with-hydro=minimal-multi-mat --with-equation-of-state=planetary`
`$ make`
In `swiftsim/examples/MoonFormingImpact/`:
`$ ./get_init_cond.sh`
Run
---
`$ ./run.sh`
Output
------
To do
-----
`$ python plot.py`
`$ mplayer anim.mpg`
* Get it working!
* Add analysis code
* Make initial conditions available
#!/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
# 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
......@@ -11,22 +8,22 @@ InternalUnitSystem:
# 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).
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.001 # The minimal time-step size of the simulation (in internal units).
dt_max: 100 # 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/moon_forming_impact
# basename: snapshots_1e5/moon_forming_impact
time_first: 0 # Time of the first output (in internal units)
delta_time: 500 # Time difference between consecutive outputs (in internal units)
basename: snapshots/moon_forming_impact
time_first: 0 # Time of the first output (in internal units)
delta_time: 100 # Time difference between consecutive outputs (in internal units)
label_delta: 100 # Integer increment between snapshot output labels
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 500 # Time between statistics output
delta_time: 500 # Time between statistics output
# Parameters for the hydrodynamics scheme
SPH:
......@@ -43,6 +40,5 @@ Gravity:
# 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
# The initial conditions file to read
file_name: moon_forming_impact.hdf5
#!/bin/bash
# Run SWIFT
../swift -G -s moon_forming_impact.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment