From 75c0c9a8efd8d068f286a8d4bf763a3f26f5c51f Mon Sep 17 00:00:00 2001
From: loikki <loic.hausammann@protonmail.ch>
Date: Mon, 18 Feb 2019 09:51:30 +0100
Subject: [PATCH] Add grackle to the SmallCosmoVolume_cooling example

---
 .../SmallCosmoVolume_cooling/run.sh             |  5 +++++
 .../small_cosmo_volume.yml                      | 17 ++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/run.sh b/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/run.sh
index 5ce9e2bb3b..a7ae9dab54 100755
--- a/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/run.sh
+++ b/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/run.sh
@@ -7,6 +7,11 @@ then
     ./getIC.sh
 fi
 
+if [ ! -e CloudyData_UVB=HM2012.h5 ]
+then
+    ../../Cooling/getCoolingTable.sh 
+fi
+
 if [ ! -e coolingtables ]
 then
     echo "Fetching cooling tables for the small cosmological volume example..."
diff --git a/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/small_cosmo_volume.yml b/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/small_cosmo_volume.yml
index 60046cadc3..9e0fb14c33 100644
--- a/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/small_cosmo_volume.yml
+++ b/examples/SmallCosmoVolume/SmallCosmoVolume_cooling/small_cosmo_volume.yml
@@ -16,7 +16,7 @@ Cosmology:                      # WMAP9 cosmology
 
 # Parameters governing the time integration
 TimeIntegration:
-  dt_min:     1e-6 
+  dt_min:     1e-8
   dt_max:     1e-2 
 
 # Parameters for the self-gravity scheme
@@ -83,3 +83,18 @@ EAGLEChemistry:
   init_abundance_Magnesium: 0.0
   init_abundance_Silicon:   0.0
   init_abundance_Iron:      0.0
+
+# Cooling with Grackle 3.0
+GrackleCooling:
+  CloudyTable: CloudyData_UVB=HM2012.h5 # Name of the Cloudy Table (available on the grackle bitbucket repository)
+  WithUVbackground: 1                   # Enable or not the UV background
+  Redshift: 0                           # Redshift to use (-1 means time based redshift)
+  WithMetalCooling: 1                   # Enable or not the metal cooling
+  ProvideVolumetricHeatingRates: 0      # (optional) User provide volumetric heating rates
+  ProvideSpecificHeatingRates: 0        # (optional) User provide specific heating rates
+  SelfShieldingMethod: 0                # (optional) Grackle (<= 3) or Gear self shielding method
+  MaxSteps: 10000                       # (optional) Max number of step when computing the initial composition
+  ConvergenceLimit: 1e-2                # (optional) Convergence threshold (relative) for initial composition
+
+GearChemistry:
+  InitialMetallicity: 0.01295
-- 
GitLab