diff --git a/examples/MoonFormingImpact/README.md b/examples/MoonFormingImpact/README.md index 289578e81b9275662a032326a210e4efc31b36a9..97a84f67c6aeeff4176a1385381f1cfe9e340c91 100644 --- a/examples/MoonFormingImpact/README.md +++ b/examples/MoonFormingImpact/README.md @@ -1,27 +1,34 @@ 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 diff --git a/examples/MoonFormingImpact/batch_script.sh b/examples/MoonFormingImpact/batch_script.sh deleted file mode 100644 index 744fe63484b8ffbc027b0334c5ddadb64502b953..0000000000000000000000000000000000000000 --- a/examples/MoonFormingImpact/batch_script.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/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 index 8b4b6eab0a2889ef7c2c9cda2a37619df35703fe..7d726bc02ba4fb6c8dd02f74907ffc48c3ed9431 100644 --- a/examples/MoonFormingImpact/moon_forming_impact.yml +++ b/examples/MoonFormingImpact/moon_forming_impact.yml @@ -1,8 +1,5 @@ # 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 diff --git a/examples/MoonFormingImpact/run.sh b/examples/MoonFormingImpact/run.sh index 11018c630f94223408c5066c6751ce8aeabae4e2..265ea45a1f93abf0d7640c6cacdbcf58d39fcc44 100755 --- a/examples/MoonFormingImpact/run.sh +++ b/examples/MoonFormingImpact/run.sh @@ -1,4 +1,2 @@ #!/bin/bash - -# Run SWIFT ../swift -G -s moon_forming_impact.yml