As discussed in the Lecture, there is a famous relation observed in galaxies relating the surface density of gas with the star formation rate. The so called SK relation
You can start from several initial conditions of idealized galaxies:
Preparing the simulation:
OpenGadget3/CoolingSfr as
the tutorial version contains some typos in the cooling part.PERIODIC, NOGRAVITY, LONG_X/Y/Z and all the switches enabled
for MAGNETIC in the Config.sh file.
COOLING and SFR in the Config.sh file and compile the code.
TREECOOL file from the OpenGadget3 directory into your simulation directory.
InitCondFileICFormat 1TimeMax 1TimeBetSnapshot 0.01PeriodicBoundariesOn 0PartAllocFactor 5.5
CoolingOn 1StarformationOn 1SofteningGas 0.02SofteningHalo 0.02SofteningDisk 0.02SofteningBulge 0.02SofteningStars 0.02SofteningGasMaxPhys 0.02SofteningHaloMaxPhys 0.02SofteningDiskMaxPhys 0.02SofteningBulgeMaxPhys 0.02SofteningStarsMaxPhys 0.02UnitLength_in_cm 3.085678e21UnitMass_in_g 1.989e43UnitVelocity_in_cm_per_s 1e5CritPhysDensity 0.MaxSfrTimescale 1.5CritOverDensity 57.7TempSupernova 1.0e8TempClouds 1000.0FactorSN 0.1FactorEVP 1000.0show_galaxy.pro in IDL
show_sk.pro in IDL
ifort -g -traceback -check all -fpe0 -o galaxysetup galaxysetup.f90galaxy.txt,
which is a text version of the “small” galaxy initial conditions)
./galaxysetup
gnuplot grid.plt (to check that the particle positions are set up correctly)
ICFormat 2
galaxies.ic as the initial conditions file
and output as the snapshot file base in the parameter file,
and BoxSize = 1TimeMax = 10, TimeBetSnapshot = 0.1)
ifort -g -traceback -check all -fpe0 -o readsnap readsnap.f90
for file in output_???; do ./readsnap $file >$file.txt; done
gnuplot galaxy.pltxine -l galaxies.mp4
You can additionally switch on the kinetic feedback and see what happens, especially if now a galactic outflow/wind is established.
WINDS in the Config.sh file.
WindEfficiency 2.0
WindFreeTravelMaxTimeFactor 0.025
WindEnergyFraction 0.5
WindFreeTravelDensFac 0.5