-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23b10e5
commit 4f386ef
Showing
77 changed files
with
763 additions
and
777 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/FeedbackTables/POPIIsw.h5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/CoolingTables/GEAR/CloudyData_UVB=HM2012_shielded.h5 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/AgoraCosmo/agora_swift.hdf5 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# MUSIC binary | ||
music=~/music/MUSIC | ||
if test -f $music; then | ||
echo "Using the following version of MUSIC $music." | ||
else | ||
echo "MUSIC is not found." | ||
exit | ||
# Get the initial conditions | ||
if [ ! -e agora_swift.hdf5 ] | ||
then | ||
echo "Fetching the initial conditions" | ||
./getIC.sh | ||
fi | ||
|
||
# Grab the cooling and yield tables if they are not present. | ||
|
||
# Get the Grackle cooling table | ||
if [ ! -e CloudyData_UVB=HM2012_shielded.h5 ] | ||
then | ||
echo "Fetching tables..." | ||
../getChemistryTable.sh | ||
../../Cooling/getGrackleCoolingTable.sh | ||
echo "Fetching the Cloudy tables required by Grackle..." | ||
./getGrackleCoolingTable.sh | ||
fi | ||
|
||
|
||
if [ ! -e POPIIsw.h5 ] | ||
then | ||
echo "Fetching the chemistry tables..." | ||
./getChemistryTable.sh | ||
fi | ||
|
||
echo "Generating the initial conditions" | ||
$music music.conf | ||
|
||
echo "Converting the initial conditions into a SWIFT compatible format" | ||
python3 convert_ic.py | ||
|
||
echo "Running SWIFT" | ||
|
||
../../../swift --cooling --feedback --cosmology --limiter --sync --self-gravity --hydro --stars --star-formation --threads=24 agora_cosmo.yml 2>&1 | tee output.log | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import h5py | ||
import numpy as np | ||
|
||
expected_total_mass = 227413100.0 | ||
|
||
f = h5py.File("snapshot_0025.hdf5", "r") | ||
|
||
# get the total stellar mass | ||
mass = f["StarsParticles/Masses"] | ||
total_mass = sum(mass) * 1e10 | ||
|
||
error = np.fabs((expected_total_mass - total_mass) / expected_total_mass) | ||
|
||
if error < 0.01: | ||
print(48 * "!") | ||
print(r"Well done !") | ||
print(r"The stellar mass is %g Msol," % (total_mass)) | ||
print(r"The expected stellar mass is %g Msol" % (expected_total_mass)) | ||
print(r"This represents an error of %d %% !" % (100 * error)) | ||
print(48 * "!") | ||
else: | ||
print(48 * "!") | ||
print(r"Too bad !") | ||
print(r"The stellar mass is %g Msol," % (total_mass)) | ||
print(r"While the expected stellar mass is %g Msol" % (expected_total_mass)) | ||
print(r"This represents an error of %d %% !" % (100 * error)) | ||
print(r"This is beyond the requirements.") | ||
print(48 * "!") |
Oops, something went wrong.