From eebc68d79b7afe27a6920ae6ed2ed28c31209cfe Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Tue, 6 Sep 2016 13:47:06 +0100 Subject: [PATCH] Use same units in ICs and YAML file. --- examples/CoolingBox/coolingBox.yml | 4 ++-- examples/CoolingBox/makeIC.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/CoolingBox/coolingBox.yml b/examples/CoolingBox/coolingBox.yml index e13de60950..e56f41ab4a 100644 --- a/examples/CoolingBox/coolingBox.yml +++ b/examples/CoolingBox/coolingBox.yml @@ -1,7 +1,7 @@ # Define the system of units to use internally. InternalUnitSystem: UnitMass_in_cgs: 2.0e33 # Solar masses - UnitLength_in_cgs: 3.01e21 # Kilparsecs + UnitLength_in_cgs: 3.0857e21 # Kiloparsecs UnitVelocity_in_cgs: 1.0e5 # Time unit is cooling time UnitCurrent_in_cgs: 1 # Amperes UnitTemp_in_cgs: 1 # Kelvin @@ -9,7 +9,7 @@ InternalUnitSystem: # Parameters governing the time integration TimeIntegration: time_begin: 0. # The starting time of the simulation (in internal units). - time_end: 1.0 # The end time of the simulation (in internal units). + time_end: 1. # The end time of the simulation (in internal units). dt_min: 1e-6 # The minimal time-step size of the simulation (in internal units). dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units). diff --git a/examples/CoolingBox/makeIC.py b/examples/CoolingBox/makeIC.py index f35c9243d4..00314d3ea0 100644 --- a/examples/CoolingBox/makeIC.py +++ b/examples/CoolingBox/makeIC.py @@ -63,9 +63,9 @@ grp.attrs["PeriodicBoundariesOn"] = periodic #Units grp = file.create_group("/Units") -grp.attrs["Unit length in cgs (U_L)"] = 3.08e21 +grp.attrs["Unit length in cgs (U_L)"] = 3.0857e21 grp.attrs["Unit mass in cgs (U_M)"] = 2.0e33 -grp.attrs["Unit time in cgs (U_t)"] = 3.08e16 +grp.attrs["Unit time in cgs (U_t)"] = 3.0857e16 grp.attrs["Unit current in cgs (U_I)"] = 1. grp.attrs["Unit temperature in cgs (U_T)"] = 1. -- GitLab