Skip to content
Snippets Groups Projects
Commit d1eb8dc3 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Update plotSolutions of star formation example and remove the two other examples

parent c9692302
No related branches found
No related tags found
1 merge request!705Star formation following Schaye08
Showing
with 58 additions and 1543 deletions
......@@ -39,6 +39,9 @@ k_in_cgs = 1.38064852e-16
mH_in_cgs = 1.6737236e-24
year_in_cgs = 3600.0 * 24 * 365.0
Msun_in_cgs = 1.98848e33
G_in_cgs = 6.67259e-8
pc_in_cgs = 3.08567758e18
Msun_p_pc2 = Msun_in_cgs / pc_in_cgs**2
# Gemoetry info
boxsize = f["/Header"].attrs["BoxSize"]
......@@ -49,6 +52,9 @@ unit_length_in_cgs = f["/Units"].attrs["Unit length in cgs (U_L)"]
unit_mass_in_cgs = f["/Units"].attrs["Unit mass in cgs (U_M)"]
unit_time_in_cgs = f["/Units"].attrs["Unit time in cgs (U_t)"]
# Calculate Gravitational constant in internal units
G = G_in_cgs * ( unit_length_in_cgs**3 / unit_mass_in_cgs / unit_time_in_cgs**2)**(-1)
# Read parameters of the model
KS_law_slope = float(f["/Parameters"].attrs["SchayeSF:SchmidtLawExponent"])
KS_law_norm = float(f["/Parameters"].attrs["SchayeSF:SchmidtLawCoeff_MSUNpYRpKPC2"])
......@@ -60,7 +66,18 @@ KS_thresh_max_norm = float(f["/Parameters"].attrs["SchayeSF:thresh_max_norm_HpCM
KS_gamma_effective = float(
f["/Parameters"].attrs["EAGLEEntropyFloor:Jeans_gamma_effective"]
)
KS_high_den_thresh = float(f["/Parameters"].attrs["SchayeSF:SchmidtLawHighDens_thresh_HpCM3"])
KS_law_slope_high_den = float(f["/Parameters"].attrs["SchayeSF:SchmidtLawHighDensExponent"])
EAGLE_Z = float(f["/Parameters"].attrs["EAGLEChemistry:init_abundance_metal"])
EAGLEfloor_rho_norm = float(f["/Parameters"].attrs["EAGLEEntropyFloor:Jeans_density_threshold_H_p_cm3"])
EAGLEfloor_T = float(f["/Parameters"].attrs["EAGLEEntropyFloor:Jeans_temperature_norm_K"])
EAGLEfloor_cool_rho = float(f["/Parameters"].attrs["EAGLEEntropyFloor:Cool_density_threshold_H_p_cm3"])
EAGLEfloor_cool_temperature_norm_K = float(f["/Parameters"].attrs["EAGLEEntropyFloor:Cool_temperature_norm_K"])
EAGLEfloor_cool_gamma_effective = float(f["/Parameters"].attrs["EAGLEEntropyFloor:Cool_gamma_effective"])
KS_law_norm_cgs = KS_law_norm * Msun_in_cgs / ( 1e6 * pc_in_cgs**2 * year_in_cgs )
gamma = 5./3.
KS_press_norm = k_in_cgs * EAGLEfloor_T * EAGLEfloor_rho_norm
# Read gas properties
gas_pos = f["/PartType0/Coordinates"][:, :]
......@@ -71,6 +88,11 @@ gas_SFR = f["/PartType0/SFR"][:]
gas_XH = f["/PartType0/ElementAbundance"][:, 0]
gas_Z = f["/PartType0/Metallicity"][:]
gas_hsml = f["/PartType0/SmoothingLength"][:]
gas_sSFR = f["/PartType0/sSFR"][:]
# Read the Star properties
stars_pos = f["/PartType4/Coordinates"][:, :]
stars_BirthDensity = f["/PartType4/BirthDensity"][:]
# Centre the box
gas_pos[:, 0] -= centre[0]
......@@ -90,12 +112,15 @@ gas_nH = gas_rho * unit_mass_in_cgs / unit_length_in_cgs ** 3
gas_nH /= mH_in_cgs
gas_nH *= gas_XH
stars_BirthDensity = gas_rho * unit_mass_in_cgs / unit_length_in_cgs ** 3
stars_BirthDensity /= mH_in_cgs
stars_BirthDensity *= gas_XH
# Equations of state
eos_cool_rho = np.logspace(-5, 5, 1000)
eos_cool_T = eos_cool_rho ** 0.0 * 8000.0
eos_cool_T = EAGLEfloor_cool_temperature_norm_K * eos_cool_rho **( EAGLEfloor_cool_gamma_effective - 1.0 )
eos_Jeans_rho = np.logspace(-1, 5, 1000)
eos_Jeans_T = (eos_Jeans_rho / 10 ** (-1)) ** (1.0 / 3.0) * 8000.0
eos_Jeans_T = EAGLEfloor_T * (eos_Jeans_rho / EAGLEfloor_rho_norm) ** (KS_gamma_effective - 1.0 )
# Plot the phase space diagram
figure()
subplot(111, xscale="log", yscale="log")
......@@ -135,6 +160,36 @@ savefig("rho_SFR.png", dpi=200)
########################################################################3
# Histogram of the birth density
figure()
subplot(111, xscale="linear", yscale="linear")
hist(np.log10(stars_BirthDensity),density=True,bins=100)
xlabel("${\\rm Birth Density}~n_{\\rm H}~[{\\rm cm^{-3}}]$", labelpad=0)
ylabel("Probability", labelpad=-7)
savefig("BirthDensity.png", dpi=200)
# Plot of the specific star formation rate in the galaxy
rhos = 10**np.linspace(-1,np.log10(KS_high_den_thresh),100)
rhoshigh = 10**np.linspace(np.log10(KS_high_den_thresh),5,100)
P_effective = KS_press_norm * ( rhos / EAGLEfloor_rho_norm)**(KS_gamma_effective)
P_norm_high = KS_press_norm * (KS_high_den_thresh / EAGLEfloor_rho_norm)**(KS_gamma_effective)
sSFR = KS_law_norm_cgs * (Msun_p_pc2)**(-KS_law_slope) * (gamma/G_in_cgs * KS_gas_fraction *P_effective)**((KS_law_slope-1.)/2.)
KS_law_norm_high_den_cgs = KS_law_norm_cgs * (Msun_p_pc2)**(-KS_law_slope) * (gamma/G_in_cgs * KS_gas_fraction * P_norm_high)**((KS_law_slope-1.)/2.)
sSFR_high_den = KS_law_norm_high_den_cgs * ((rhoshigh/KS_high_den_thresh)**KS_gamma_effective)**((KS_law_slope_high_den-1)/2.)
figure()
subplot(111)
hist2d(np.log10(gas_nH), np.log10(gas_sSFR), bins=50,range=[[-1.5,5],[-.5,2.5]])
plot(np.log10(rhos),np.log10(sSFR)+np.log10(year_in_cgs)+9.,'k--',label='sSFR low density EAGLE')
plot(np.log10(rhoshigh),np.log10(sSFR_high_den)+np.log10(year_in_cgs)+9.,'k--',label='sSFR high density EAGLE')
xlabel("${\\rm Density}~n_{\\rm H}~[{\\rm cm^{-3}}]$", labelpad=0)
ylabel("${\\rm sSFR}~[{\\rm Gyr^{-1}}]$", labelpad=-7)
savefig("density-sSFR.png", dpi=200)
########################################################################3
# Select gas in a pillow box around the galaxy
mask = (
(gas_pos[:, 0] > -15)
......
#!/usr/bin/env python
import numpy as np
import h5py
import matplotlib.pyplot as plt
# for the moment only use a single snapshot
i = 29
# Load the snapshot
#f = h5py.File('output_%04dcopy.hdf5'%i, 'r')
f = h5py.File('output_%04d.hdf5'%i, 'r')
# Load the stars
starparticle = f['PartType4']
# Load the properties of the stars
coordinates = starparticle['Coordinates'][:,:]
newstarflag = starparticle['NewStarFlag'][:]
boxsize = f['Header'].attrs['BoxSize']
masses_star = starparticle['Masses'][:]
# Load the positions of the star particles and only take
# the new star particles
x = coordinates[:,0] - boxsize[0]/2.
y = coordinates[:,1] - boxsize[1]/2.
r = (x**2 + y**2)**.5
birthdensity = starparticle['BirthDensity'][:]
birthdensity=birthdensity[newstarflag==1]
r_new = r[newstarflag==1]
masses_new = masses_star[newstarflag==1]
# Load the gas particles
gasparticle = f['PartType0']
# Load the properties of the gas particles
coordinates_gas = gasparticle['Coordinates'][:,:]
masses_gas = gasparticle['Masses'][:]
# Load the positions of the gas particles
x_gas = coordinates_gas[:,0] - boxsize[0]/2.
y_gas = coordinates_gas[:,0] - boxsize[1]/2.
r_gas = (x_gas**2 + y_gas**2)**.5
r_array = np.linspace(0,15,100)
area = np.zeros(len(r_array)-1)
SigmaSFR = np.zeros(len(r_array)-1)
Sigmagas = np.zeros(len(r_array)-1)
massSFR_array = np.zeros(len(r_array)-1)
massGAS_array = np.zeros(len(r_array)-1)
for i in range(1,len(r_array)):
area_loop = np.pi*(r_array[i]**2 - r_array[i-1]**2)
mask = (r_new > r_array[i-1]) & (r_new < r_array[i])
mask2 = (r_gas > r_array[i-1]) & (r_gas < r_array[i])
massSFR = np.sum(masses_new[mask])
massSFR_array[i-1] = massSFR
massGAS = np.sum(masses_gas[mask2])
massGAS_array[i-1] = massGAS
#print('%d area=%1.4f, M_SFR=%1.4f, M_gas=%1.4f'%(i,area_loop,massSFR,massGAS))
area[i-1] = area_loop
SigmaSFR[i-1] = massSFR/area_loop
Sigmagas[i-1] = massGAS/area_loop
# Put SF law in correct units
SigmaSFR *= 1e10/0.29e8
Sigmagas *= 1e10/(1e3**2)
SigmaSFR[SigmaSFR==0] = 1e-6
print(Sigmagas)
Sgas_array =np.logspace(-1,3,40)
Delta_Sgas = np.log10(Sgas_array[1]) - np.log10(Sgas_array[0])
SigmaSFR_avg = np.zeros(len(Sgas_array))
Sigmagas_avg = np.zeros(len(Sgas_array))
for i in range(0,len(Sgas_array)):
totgasmass = 0.0
totnewstarmass = 0.0
area_loop = 0.0
for j in range(0,len(Sigmagas)):
#print('%d %1.4e %1.4e %1.4e %1.4e'%(j,Sigmagas[j],Sgas_array[i],10**(-Delta_Sgas),10**(Delta_Sgas)))
if (Sigmagas[j]>Sgas_array[i]*10**(-Delta_Sgas)) and (Sigmagas[j]<Sgas_array[i]*10**(Delta_Sgas)):
totgasmass += massGAS_array[j]
totnewstarmass += massSFR_array[j]
area_loop += area[j]
if area_loop==0.0:
SigmaSFR_avg[i] = 0.0
Sigmagas_avg[i] = 0.0
else:
SigmaSFR_avg[i] = totnewstarmass/area_loop
Sigmagas_avg[i] = totgasmass/area_loop
print(SigmaSFR_avg)
print(Sigmagas_avg)
# Put SF law in correct units
SigmaSFR_avg *= 1e10/0.29e8
Sigmagas_avg *= 1e10/(1e6)
SigmaSFR_avg[SigmaSFR_avg==0]=1e-6
def KS_law(Sgas,n=1.4,A=1.515):
return A*1e-4*(Sgas)**n
Sigmagaslaw = np.logspace(-1,3,100)
SigmaSFRlaw = KS_law(Sigmagaslaw)
Z = 0
ncrit = 10 # g/cm^3
ncrit = 10 # M_sun /pc^2
# plot SF law
plt.loglog(Sigmagas,SigmaSFR,'o',label='Data')
#plt.loglog(Sigmagas_avg,SigmaSFR_avg,'o',label='binned Data')
plt.loglog(Sigmagaslaw, SigmaSFRlaw,'r-.',label='KS law')
#plt.loglog(np.logspace(-1,3,40),1e-5*np.ones(40),'o')
plt.axvline(x=10,linestyle='--', color='r',label='$\Sigma_c = 10$')
plt.xlabel('$\Sigma_{gas}$')
plt.ylabel('$\Sigma_{SFR}$')
plt.legend()
plt.show()
'''
plt.hist(birthdensity,bins=100,range=[0,2.5])
plt.show()
plt.hist(x_gas,bins=100)
plt.show()
plt.hist(r,bins=100)
plt.show()
plt.hist(r_gas,bins=100)
plt.show()
'''
#!/usr/bin/env python3
import numpy as np
import h5py
import matplotlib.pyplot as plt
snaps = 30
SFH = np.zeros(snaps)
for i in range(0,snaps):
f = h5py.File('output_%04d.hdf5'%i, 'r')
header = f["Header"]
time = header.attrs['Time'][0]
print(time)
particles = f["PartType4"]
newstar = particles["NewStarFlag"][:]
SFH[i] = np.sum(newstar)
plt.plot(SFH)
plt.xlabel('Snapshot number')
plt.ylabel('Total number of stars formed')
plt.show()
f = h5py.File('output_%04d.hdf5'%i, 'r')
particles = f["PartType4"]
newstar = particles["NewStarFlag"][:]
Coordinates = particles["Coordinates"][:,:]
x = Coordinates[:,0][newstar==1]
y = Coordinates[:,1][newstar==1]
print(len(x), len(y))
plt.plot(x,y,'.')
plt.show()
This diff is collapsed.
#!/bin/bash
wget https://home.strw.leidenuniv.nl/~nobels/data/starforming_25p.hdf5
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.9891E43 # 10^10 solar masses
UnitLength_in_cgs: 3.08567758E21 # 1 kpc
UnitVelocity_in_cgs: 1E5 # km/s
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the self-gravity scheme
Gravity:
mesh_side_length: 32 # Number of cells along each axis for the periodic gravity mesh.
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion).
comoving_softening: 0.01 # Comoving softening length (in internal units).
max_physical_softening: 0.01 # Physical softening length (in internal units).
# Parameters governing the time integration (Set dt_min and dt_max to the same value for a fixed time-step run.)
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 2. # The end time of the simulation (in internal units).
dt_min: 1e-9 # 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).
# Parameters governing the snapshots
Snapshots:
basename: output # Common part of the name of output files
time_first: 0. # (Optional) Time of the first output if non-cosmological time-integration (in internal units)
delta_time: 0.001 # Time difference between consecutive outputs (in internal units)
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1e-2 # Time between statistics output
time_first: 0. # (Optional) Time of the first stats output if non-cosmological time-integration (in internal units)
# Parameters related to the initial conditions
InitialConditions:
file_name: starforming_25p.hdf5 # The file to read
periodic: 0 # Are we running with periodic ICs?
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
h_tolerance: 1e-4 # (Optional) Relative accuracy of the Netwon-Raphson scheme for the smoothing lengths.
h_max: 10. # (Optional) Maximal allowed smoothing length in internal units. Defaults to FLT_MAX if unspecified.
max_volume_change: 1.4 # (Optional) Maximal allowed change of kernel volume over one time-step.
max_ghost_iterations: 30 # (Optional) Maximal number of iterations allowed to converge towards the smoothing length.
minimal_temperature: 100 # (Optional) Minimal temperature (in internal units) allowed for the gas particles. Value is ignored if set to 0.
H_mass_fraction: 0.755 # (Optional) Hydrogen mass fraction used for initial conversion from temp to internal energy. Default value is derived from the physical constants.
H_ionization_temperature: 1e4 # (Optional) Temperature of the transition from neutral to ionized Hydrogen for primoridal gas.
EAGLECooling:
dir_name: ./coolingtables/ # Location of the Wiersma+08 cooling tables
H_reion_z: 11.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_sigma: 0.5 # Spread in redshift of the Helium re-ionization Gaussian
He_reion_eV_p_H: 2.0 # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom
# Primordial abundances
EAGLEChemistry:
init_abundance_metal: 0.0129 # Inital fraction of particle mass in *all* metals
init_abundance_Hydrogen: 0.7065 # Inital fraction of particle mass in Hydrogen
init_abundance_Helium: 0.2806 # Inital fraction of particle mass in Helium
init_abundance_Carbon: 0.00207 # Inital fraction of particle mass in Carbon
init_abundance_Nitrogen: 0.000836 # Inital fraction of particle mass in Nitrogen
init_abundance_Oxygen: 0.00549 # Inital fraction of particle mass in Oxygen
init_abundance_Neon: 0.00141 # Inital fraction of particle mass in Neon
init_abundance_Magnesium: 0.000591 # Inital fraction of particle mass in Magnesium
init_abundance_Silicon: 0.000683 # Inital fraction of particle mass in Silicon
init_abundance_Iron: 0.0011 # Inital fraction of particle mass in Iron
# Hernquist potential parameters
HernquistPotential:
useabspos: 0 # 0 -> positions based on centre, 1 -> absolute positions
position: [0.,0.,0.] # Location of centre of isothermal potential with respect to centre of the box (if 0) otherwise absolute (if 1) (internal units)
idealizeddisk: 1 # Run with an idealized galaxy disk
M200: 30.0 # M200 of the galaxy disk
h: 0.704 # reduced Hubble constant (value does not specify the used units!)
concentration: 7.1 # concentration of the Halo
diskfraction: 0.040 # Disk mass fraction
bulgefraction: 0.010 # Bulge mass fraction
timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration
epsilon: 0.1 # Softening size (internal units)
# Schaye and Dalla Vecchia 2008 star formation
SchayeSF:
thresh_MinOverDens: 57.7 # The critical density contrast to form stars
thresh_temp: 1e5 # The critical temperature to form stars
fg: 0.25 # The mass fraction in gas
SchmidtLawCoeff_MSUNpYRpKPC2: 1.515e-4 # The normalization of the Kennicutt-Schmidt law
SchmidtLawExponent: 1.4 # The power law of the Kennicutt-Schmidt law
SchmidtLawHighDensExponent: 2.0 # The high density exponent for the Kennicutt-Schmidt law
SchmidtLawHighDens_thresh_HpCM3: 1e3
Schaye2004: 1 # whether to use the metallicity dependent critical star formation of Schaye (2004) (1) or not (0).
thresh_norm_HpCM3: 0.1 # Critical sf normalization to use (is not a normalization when Schaye2004=0, than it is the value.
thresh_max_norm_HpCM3: 10.0 # Maximum norm of the critical sf density
MetDep_Z0: 0.002 # Scale metallicity to use for the equation (not used for Schaye2004=0)
MetDep_SFthresh_Slope: -0.64 # Scaling of the critical density with the metallicity (not used for Schaye2004=0)
thresh_MaxPhysDensOn: 0 # Default is 0.
thresh_MaxOverDens_HpCM3: 1e5 # Density at which the SF law changes
EOS_Jeans_GammaEffective: 1.33333 # The polytropic index
EOS_Jeans_TemperatureNorm_K: 1e5 # No idea how this works
EOS_JEANS_DensityNorm_HpCM3: 0.1 # No idea what the value is.
# Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor:
Jeans_density_threshold_H_p_cm3: 0.1 # Physical density above which the EAGLE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Jeans_over_density_threshold: 10. # Overdensity above which the EAGLE Jeans limiter entropy floor can kick in.
Jeans_temperature_norm_K: 8000 # Temperature of the EAGLE Jeans limiter entropy floor at the density threshold expressed in Kelvin.
Jeans_gamma_effective: 1.3333333 # Slope the of the EAGLE Jeans limiter entropy floor
Cool_density_threshold_H_p_cm3: 1e-5 # Physical density above which the EAGLE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Cool_over_density_threshold: 10. # Overdensity above which the EAGLE Cool limiter entropy floor can kick in.
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
#!/bin/bash
../swift --threads=32 --external-gravity --self-gravity --stars --star-formation --cooling --temperature --hydro isolated_galaxy.yml 2>&1 | tee output.log
#!/bin/bash
wget https://home.strw.leidenuniv.nl/~nobels/data/starforming_intermediate.hdf5
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.9891E43 # 10^10 solar masses
UnitLength_in_cgs: 3.08567758E21 # 1 kpc
UnitVelocity_in_cgs: 1E5 # km/s
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the self-gravity scheme
Gravity:
mesh_side_length: 32 # Number of cells along each axis for the periodic gravity mesh.
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion).
comoving_softening: 0.01 # Comoving softening length (in internal units).
max_physical_softening: 0.01 # Physical softening length (in internal units).
# Parameters governing the time integration (Set dt_min and dt_max to the same value for a fixed time-step run.)
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 0.1 # The end time of the simulation (in internal units).
dt_min: 1e-9 # 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).
# Parameters governing the snapshots
Snapshots:
basename: output # Common part of the name of output files
time_first: 0. # (Optional) Time of the first output if non-cosmological time-integration (in internal units)
delta_time: 0.001 # Time difference between consecutive outputs (in internal units)
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1e-2 # Time between statistics output
time_first: 0. # (Optional) Time of the first stats output if non-cosmological time-integration (in internal units)
# Parameters related to the initial conditions
InitialConditions:
file_name: starforming_intermediate.hdf5 # The file to read
periodic: 0 # Are we running with periodic ICs?
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
h_tolerance: 1e-4 # (Optional) Relative accuracy of the Netwon-Raphson scheme for the smoothing lengths.
h_max: 10. # (Optional) Maximal allowed smoothing length in internal units. Defaults to FLT_MAX if unspecified.
max_volume_change: 1.4 # (Optional) Maximal allowed change of kernel volume over one time-step.
max_ghost_iterations: 30 # (Optional) Maximal number of iterations allowed to converge towards the smoothing length.
minimal_temperature: 100 # (Optional) Minimal temperature (in internal units) allowed for the gas particles. Value is ignored if set to 0.
H_ionization_temperature: 1e4 # (Optional) Temperature of the transition from neutral to ionized Hydrogen for primoridal gas.
EAGLECooling:
dir_name: ../coolingtables/ # Location of the Wiersma+08 cooling tables
H_reion_z: 11.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_sigma: 0.5 # Spread in redshift of the Helium re-ionization Gaussian
He_reion_eV_p_H: 2.0 # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom
# Primordial abundances
EAGLEChemistry:
init_abundance_metal: 0.0129 # Inital fraction of particle mass in *all* metals
init_abundance_Hydrogen: 0.7065 # Inital fraction of particle mass in Hydrogen
init_abundance_Helium: 0.2806 # Inital fraction of particle mass in Helium
init_abundance_Carbon: 0.00207 # Inital fraction of particle mass in Carbon
init_abundance_Nitrogen: 0.000836 # Inital fraction of particle mass in Nitrogen
init_abundance_Oxygen: 0.00549 # Inital fraction of particle mass in Oxygen
init_abundance_Neon: 0.00141 # Inital fraction of particle mass in Neon
init_abundance_Magnesium: 0.000591 # Inital fraction of particle mass in Magnesium
init_abundance_Silicon: 0.000683 # Inital fraction of particle mass in Silicon
init_abundance_Iron: 0.0011 # Inital fraction of particle mass in Iron
# Hernquist potential parameters
HernquistPotential:
useabspos: 0 # 0 -> positions based on centre, 1 -> absolute positions
position: [0.,0.,0.] # Location of centre of isothermal potential with respect to centre of the box (if 0) otherwise absolute (if 1) (internal units)
idealizeddisk: 1 # Run with an idealized galaxy disk
M200: 30.0 # M200 of the galaxy disk
h: 0.704 # reduced Hubble constant (value does not specify the used units!)
concentration: 7.1 # concentration of the Halo
diskfraction: 0.040 # Disk mass fraction
bulgefraction: 0.010 # Bulge mass fraction
timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration
epsilon: 0.01 # Softening size (internal units)
# Schaye and Dalla Vecchia 2008 star formation
SchayeSF:
thresh_MinOverDens: 57.7 # The critical density contrast to form stars
thresh_temp: 1e5 # The critical temperature to form stars
fg: 0.25 # The mass fraction in gas
SchmidtLawCoeff_MSUNpYRpKPC2: 1.515e-4 # The normalization of the Kennicutt-Schmidt law
SchmidtLawExponent: 1.4 # The power law of the Kennicutt-Schmidt law
SchmidtLawHighDensExponent: 2.0 # The high density exponent for the Kennicutt-Schmidt law
SchmidtLawHighDens_thresh_HpCM3: 1e3
Schaye2004: 1 # whether to use the metallicity dependent critical star formation of Schaye (2004) (1) or not (0).
thresh_norm_HpCM3: 0.1 # Critical sf normalization to use (is not a normalization when Schaye2004=0, than it is the value.
thresh_max_norm_HpCM3: 10.0 # Maximum norm of the critical sf density
MetDep_Z0: 0.002 # Scale metallicity to use for the equation (not used for Schaye2004=0)
MetDep_SFthresh_Slope: -0.64 # Scaling of the critical density with the metallicity (not used for Schaye2004=0)
thresh_MaxPhysDensOn: 0 # Default is 0.
thresh_MaxOverDens_HpCM3: 1e5 # Density at which the SF law changes
EOS_Jeans_GammaEffective: 1.3333333 # The polytropic index
EOS_Jeans_TemperatureNorm_K: 1e5 # No idea how this works
EOS_JEANS_DensityNorm_HpCM3: 0.1 # No idea what the value is.
# Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor:
Jeans_density_threshold_H_p_cm3: 0.1 # Physical density above which the EAGLE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Jeans_over_density_threshold: 10. # Overdensity above which the EAGLE Jeans limiter entropy floor can kick in.
Jeans_temperature_norm_K: 8000 # Temperature of the EAGLE Jeans limiter entropy floor at the density threshold expressed in Kelvin.
Jeans_gamma_effective: 1.3333333 # Slope the of the EAGLE Jeans limiter entropy floor
Cool_density_threshold_H_p_cm3: 1e-5 # Physical density above which the EAGLE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Cool_over_density_threshold: 10. # Overdensity above which the EAGLE Cool limiter entropy floor can kick in.
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
#!/bin/bash
if [ ! -e starforming_intermediate.hdf5 ]
then
./getIC.sh
fi
../swift --threads=32 --external-gravity --self-gravity --stars --star-formation --cooling --temperature --hydro isolated_galaxy.yml 2>&1 | tee output.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment