Commit e5738a31 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Use the same definition of G, Mpc and M_sun in all the examples.

parent 8810779b
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085e21 # kpc in centimeters UnitLength_in_cgs: 3.08567758e21 # kpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
...@@ -82,8 +82,8 @@ mean_dispersion_time_range = [50, 500] # in Myr = Used if add_mea ...@@ -82,8 +82,8 @@ mean_dispersion_time_range = [50, 500] # in Myr = Used if add_mea
mean_dispersion_density_range = [1e-25, 1e-22]# in g/cm3 = Used if add_mean_fractional_dispersion = 1, for draw_density_DF mean_dispersion_density_range = [1e-25, 1e-22]# in g/cm3 = Used if add_mean_fractional_dispersion = 1, for draw_density_DF
disk_normal_vector = [0., 0., 1.] disk_normal_vector = [0., 0., 1.]
gadget_default_unit_base = {'UnitLength_in_cm' : 3.08568e+21, gadget_default_unit_base = {'UnitLength_in_cm' : 3.08567758e+21,
'UnitMass_in_g' : 1.989e+43, 'UnitMass_in_g' : 1.98848e+43,
'UnitVelocity_in_cm_per_s' : 100000} 'UnitVelocity_in_cm_per_s' : 100000}
color_names = ['red', 'magenta', 'orange', 'gold', 'green', 'cyan', 'blue', 'blueviolet', 'black'] color_names = ['red', 'magenta', 'orange', 'gold', 'green', 'cyan', 'blue', 'blueviolet', 'black']
linestyle_names = ['-'] linestyle_names = ['-']
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.9885e33 # Grams UnitMass_in_cgs: 1.98848e33 # M_sun in grams
UnitLength_in_cgs: 3.0856776e18 # Centimeters UnitLength_in_cgs: 3.08567758e18 # parsec in centimeters
UnitVelocity_in_cgs: 1e5 # Centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in cm/s
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
...@@ -38,11 +38,10 @@ import random ...@@ -38,11 +38,10 @@ import random
# usage: python makeIC.py 1000 # usage: python makeIC.py 1000
# physical constants in cgs # physical constants in cgs
NEWTON_GRAVITY_CGS = 6.672e-8 NEWTON_GRAVITY_CGS = 6.67408e-8
SOLAR_MASS_IN_CGS = 1.9885e33 SOLAR_MASS_IN_CGS = 1.98848e33
PARSEC_IN_CGS = 3.0856776e18 PARSEC_IN_CGS = 3.08567758e18
PROTON_MASS_IN_CGS = 1.6726231e24 YEAR_IN_CGS = 3.15569252e7
YEAR_IN_CGS = 3.154e+7
# choice of units # choice of units
const_unit_length_in_cgs = (PARSEC_IN_CGS) const_unit_length_in_cgs = (PARSEC_IN_CGS)
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.9885e33 # Grams UnitMass_in_cgs: 1.98848e33 # Grams
UnitLength_in_cgs: 3.08567758149e18 # Centimeters UnitLength_in_cgs: 3.08567758e18 # Centimeters
UnitVelocity_in_cgs: 1e5 # Centimeters per second UnitVelocity_in_cgs: 1e5 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.9885e33 # Grams UnitMass_in_cgs: 1.98848e33 # Grams
UnitLength_in_cgs: 3.08567758149e18 # Centimeters UnitLength_in_cgs: 3.08567758e18 # Centimeters
UnitVelocity_in_cgs: 1e5 # Centimeters per second UnitVelocity_in_cgs: 1e5 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
...@@ -54,8 +54,8 @@ fileName = "Disc-Patch.hdf5" ...@@ -54,8 +54,8 @@ fileName = "Disc-Patch.hdf5"
# physical constants in cgs # physical constants in cgs
NEWTON_GRAVITY_CGS = 6.67408e-8 NEWTON_GRAVITY_CGS = 6.67408e-8
SOLAR_MASS_IN_CGS = 1.9885e33 SOLAR_MASS_IN_CGS = 1.98848e33
PARSEC_IN_CGS = 3.08567758149e18 PARSEC_IN_CGS = 3.08567758e18
PROTON_MASS_IN_CGS = 1.672621898e-24 PROTON_MASS_IN_CGS = 1.672621898e-24
BOLTZMANN_IN_CGS = 1.38064852e-16 BOLTZMANN_IN_CGS = 1.38064852e-16
YEAR_IN_CGS = 3.15569252e7 YEAR_IN_CGS = 3.15569252e7
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.9885e33 # Grams UnitMass_in_cgs: 1.98848e33 # Grams
UnitLength_in_cgs: 3.08567758149e18 # Centimeters UnitLength_in_cgs: 3.08567758e18 # Centimeters
UnitVelocity_in_cgs: 1e5 # Centimeters per second UnitVelocity_in_cgs: 1e5 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
...@@ -55,8 +55,8 @@ fileName = "Disc-Patch.hdf5" ...@@ -55,8 +55,8 @@ fileName = "Disc-Patch.hdf5"
# physical constants in cgs # physical constants in cgs
NEWTON_GRAVITY_CGS = 6.67408e-8 NEWTON_GRAVITY_CGS = 6.67408e-8
SOLAR_MASS_IN_CGS = 1.9885e33 SOLAR_MASS_IN_CGS = 1.98848e33
PARSEC_IN_CGS = 3.08567758149e18 PARSEC_IN_CGS = 3.08567758e18
PROTON_MASS_IN_CGS = 1.672621898e-24 PROTON_MASS_IN_CGS = 1.672621898e-24
BOLTZMANN_IN_CGS = 1.38064852e-16 BOLTZMANN_IN_CGS = 1.38064852e-16
YEAR_IN_CGS = 3.15569252e7 YEAR_IN_CGS = 3.15569252e7
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.989e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.085678e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.98848e33 # M_sun UnitMass_in_cgs: 1.98848e33 # M_sun
UnitLength_in_cgs: 3.0856776e21 # kpc UnitLength_in_cgs: 3.08567758e21 # kpc
UnitVelocity_in_cgs: 1e5 # km/s UnitVelocity_in_cgs: 1e5 # km/s
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
......
...@@ -29,7 +29,7 @@ import random ...@@ -29,7 +29,7 @@ import random
# physical constants in cgs # physical constants in cgs
NEWTON_GRAVITY_CGS = 6.67408e-8 NEWTON_GRAVITY_CGS = 6.67408e-8
SOLAR_MASS_IN_CGS = 1.98848e33 SOLAR_MASS_IN_CGS = 1.98848e33
PARSEC_IN_CGS = 3.0856776e18 PARSEC_IN_CGS = 3.08567758e18
# choice of units # choice of units
const_unit_length_in_cgs = (1000*PARSEC_IN_CGS) const_unit_length_in_cgs = (1000*PARSEC_IN_CGS)
......
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