Commit 8266849a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

More naming convention improvements in the EAGLE cooling section of the YAML file.

parent b7e1269e
...@@ -208,19 +208,19 @@ implicit problem. A valid section of the YAML file looks like: ...@@ -208,19 +208,19 @@ implicit problem. A valid section of the YAML file looks like:
.. code:: YAML .. code:: YAML
EAGLECooling: EAGLECooling:
dirname: /path/to/the/Wiersma/tables/directory # Absolute or relative path dir_name: /path/to/the/Wiersma/tables/directory # Absolute or relative path
H_reion_z: 11.5 # Redhift of Hydrogen re-ionization H_reion_z: 11.5 # Redhift of Hydrogen re-ionization
He_reion_z_centre: 3.5 # Centre of the Gaussian used for Helium re-ionization He_reion_z_centre: 3.5 # Centre of the Gaussian used for Helium re-ionization
He_reion_z_sigma: 0.5 # Width of the Gaussian used for Helium re-ionization He_reion_z_sigma: 0.5 # Width of the Gaussian used for Helium re-ionization
He_reion_ev_pH: 2.0 # Energy injected in eV per Hydrogen atom for Helium re-ionization. He_reion_eV_p_H: 2.0 # Energy injected in eV per Hydrogen atom for Helium re-ionization.
The optional parameters are: And the optional parameters are:
.. code:: YAML .. code:: YAML
EAGLECooling: EAGLECooling:
CalciumOverSiliconInSolar: 1.0 # (Optional) Value of the Calcium abundance ratio to solar in units of the Silicon ratio to solar. Default value: 1. Ca_over_Si_in_solar: 1.0 # (Optional) Value of the Calcium mass abundance ratio to solar in units of the Silicon ratio to solar. Default value: 1.
SulphurOverSiliconInSolar: 1.0 # (Optional) Value of the Sulphur abundance ratio to solar in units of the Silicon ratio to solar. Default value: 1. S_over_Si_in_solar: 1.0 # (Optional) Value of the Sulphur mass abundance ratio to solar in units of the Silicon ratio to solar. Default value: 1.
newton_integration: 0 # (Optional) Set to 1 to use the Newton-Raphson scheme for the explicit cooling problem. newton_integration: 0 # (Optional) Set to 1 to use the Newton-Raphson scheme for the explicit cooling problem.
......
...@@ -53,11 +53,11 @@ GrackleCooling: ...@@ -53,11 +53,11 @@ GrackleCooling:
ConvergenceLimit: 1e-2 ConvergenceLimit: 1e-2
EAGLECooling: EAGLECooling:
dirname: /cosma5/data/Eagle/BG_Tables/CoolingTables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
he_reion_z_center: 3.5 He_reion_z_center: 3.5
he_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
he_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
EAGLEChemistry: EAGLEChemistry:
InitMetallicity: 0.014 InitMetallicity: 0.014
......
...@@ -28,9 +28,9 @@ EAGLEChemistry: ...@@ -28,9 +28,9 @@ EAGLEChemistry:
InitAbundance_Iron: 1.1032152e-3 InitAbundance_Iron: 1.1032152e-3
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
...@@ -70,8 +70,8 @@ EAGLEChemistry: # Solar abundances ...@@ -70,8 +70,8 @@ EAGLEChemistry: # Solar abundances
InitAbundance_Iron: 1.1032152e-3 InitAbundance_Iron: 1.1032152e-3
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
...@@ -79,9 +79,9 @@ EAGLEChemistry: # Solar abundances ...@@ -79,9 +79,9 @@ EAGLEChemistry: # Solar abundances
InitAbundance_Iron: 1.1032152e-3 InitAbundance_Iron: 1.1032152e-3
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
...@@ -72,8 +72,8 @@ EAGLEChemistry: # Solar abundances ...@@ -72,8 +72,8 @@ EAGLEChemistry: # Solar abundances
InitAbundance_Iron: 1.1032152e-3 InitAbundance_Iron: 1.1032152e-3
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
\ No newline at end of file \ No newline at end of file
...@@ -83,8 +83,8 @@ EAGLEChemistry: # Solar abundances ...@@ -83,8 +83,8 @@ EAGLEChemistry: # Solar abundances
InitAbundance_Iron: 1.1032152e-3 InitAbundance_Iron: 1.1032152e-3
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
\ No newline at end of file
...@@ -72,9 +72,9 @@ EAGLEChemistry: ...@@ -72,9 +72,9 @@ EAGLEChemistry:
InitAbundance_Iron: 0.0 InitAbundance_Iron: 0.0
EAGLECooling: EAGLECooling:
dirname: /cosma5/data/Eagle/BG_Tables/CoolingTables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
he_reion_z_center: 3.5 He_reion_z_centre: 3.5
he_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
he_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
...@@ -68,7 +68,7 @@ EAGLECooling: ...@@ -68,7 +68,7 @@ EAGLECooling:
H_reion_z: 11.5 H_reion_z: 11.5
He_reion_z_centre: 3.5 He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_ev_pH: 2.0 He_reion_eV_p_H: 2.0
# Impose primoridal metallicity # Impose primoridal metallicity
EAGLEChemistry: EAGLEChemistry:
......
...@@ -250,13 +250,14 @@ LambdaCooling: ...@@ -250,13 +250,14 @@ LambdaCooling:
# Parameters of the EAGLE cooling model (Wiersma+08 cooling tables). # Parameters of the EAGLE cooling model (Wiersma+08 cooling tables).
EAGLECooling: EAGLECooling:
dirname: ./coolingtables/ # Location of the Wiersma+08 cooling tables dir_name: ./coolingtables/ # Location of the Wiersma+08 cooling tables
H_reion_z: 8.5 # Redshift of Hydrogen re-ionization H_reion_z: 8.5 # Redshift of Hydrogen re-ionization
He_reion_z_centre: 3.5 # Redshift of the centre of the Helium re-ionization Gaussian He_reion_z_centre: 3.5 # Redshift of the centre of the Helium re-ionization Gaussian
He_reion_z_sigma: 0.5 # Spread in redshift of the Helium re-ionization Gaussian He_reion_z_sigma: 0.5 # Spread in redshift of the Helium re-ionization Gaussian
He_reion_ev_pH: 2.0 # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom He_reion_eV_p_H: 2.0 # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom
CalciumOverSiliconInSolar: 1. # (Optional) Ratio of Ca/Si to use in units of solar. If set to 1, the code uses [Ca/Si] = 0, i.e. Ca/Si = 0.0941736. newton_integration: 0 # (Optional) Set to 1 to use the Newton-Raphson method to solve the xplicit cooling problem.
SulphurOverSiliconInSolar: 1. # (Optional) Ratio of S/Si to use in units of solar. If set to 1, the code uses [S/Si] = 0, i.e. S/Si = 0.6054160. Ca_over_Si_in_solar: 1. # (Optional) Ratio of Ca/Si to use in units of solar. If set to 1, the code uses [Ca/Si] = 0, i.e. Ca/Si = 0.0941736.
S_over_Si_in_solar: 1. # (Optional) Ratio of S/Si to use in units of solar. If set to 1, the code uses [S/Si] = 0, i.e. S/Si = 0.6054160.
# Cooling with Grackle 3.0 # Cooling with Grackle 3.0
GrackleCooling: GrackleCooling:
......
...@@ -738,21 +738,23 @@ void cooling_init_backend(struct swift_params *parameter_file, ...@@ -738,21 +738,23 @@ void cooling_init_backend(struct swift_params *parameter_file,
struct cooling_function_data *cooling) { struct cooling_function_data *cooling) {
/* read some parameters */ /* read some parameters */
parser_get_param_string(parameter_file, "EAGLECooling:dirname", parser_get_param_string(parameter_file, "EAGLECooling:dir_name",
cooling->cooling_table_path); cooling->cooling_table_path);
cooling->H_reion_z = parser_get_param_float( cooling->H_reion_z = parser_get_param_float(
parameter_file, "EAGLECooling:H_reion_z"); parameter_file, "EAGLECooling:H_reion_z");
cooling->Ca_over_Si_ratio_in_solar = parser_get_opt_param_float(
parameter_file, "EAGLECooling::CalciumOverSiliconInSolar", 1.f);
cooling->S_over_Si_ratio_in_solar = parser_get_opt_param_float(
parameter_file, "EAGLECooling::SulphurOverSiliconInSolar", 1.f);
cooling->He_reion_z_centre = cooling->He_reion_z_centre =
parser_get_param_float(parameter_file, "EAGLECooling:He_reion_z_centre"); parser_get_param_float(parameter_file, "EAGLECooling:He_reion_z_centre");
cooling->He_reion_z_sigma = cooling->He_reion_z_sigma =
parser_get_param_float(parameter_file, "EAGLECooling:He_reion_z_sigma"); parser_get_param_float(parameter_file, "EAGLECooling:He_reion_z_sigma");
cooling->He_reion_heat_cgs = cooling->He_reion_heat_cgs =
parser_get_param_float(parameter_file, "EAGLECooling:He_reion_ev_pH"); parser_get_param_float(parameter_file, "EAGLECooling:He_reion_ev_p_H");
/* Optional parameters to correct the abundances */
cooling->Ca_over_Si_ratio_in_solar = parser_get_opt_param_float(
parameter_file, "EAGLECooling:Ca_over_Si_in_solar", 1.f);
cooling->S_over_Si_ratio_in_solar = parser_get_opt_param_float(
parameter_file, "EAGLECooling:S_over_Si_in_solar", 1.f);
/* convert to cgs */ /* convert to cgs */
cooling->He_reion_heat_cgs *= cooling->He_reion_heat_cgs *=
phys_const->const_electron_volt * phys_const->const_electron_volt *
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment