Skip to content

Commit

Permalink
Issue63 (#69)
Browse files Browse the repository at this point in the history
* address #69 63
  • Loading branch information
cbyrohl authored Aug 8, 2023
1 parent b0fd568 commit 7fd214b
Show file tree
Hide file tree
Showing 10 changed files with 297 additions and 209 deletions.
4 changes: 2 additions & 2 deletions src/scida/configfiles/simulations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ defs:
dataset_type:
series: ArepoSimulation
dataset: ArepoSnapshot
unitfile: units/illustris.yaml
unitfile: units/gadget.yaml
tng_props: &tng_props
code: arepo
suite: TNG
tags: ["simulation"]
illustris_params: &illustris_params
dataset_type:
dataset: ArepoSnapshot
unitfile: units/illustris.yaml
unitfile: units/gadget.yaml

data:
TNG50:
Expand Down
187 changes: 187 additions & 0 deletions src/scida/configfiles/units/gadget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
metadata_unitsystem: cgs
units:
# h: 0.6774 hubble factor, needs to be set by snapshot
# a: 1.0 # scale factor, needs to be set by snapshot
ckpc: a * kpc
code_length: ckpc / h
code_velocity: km / s
code_mass: 1e10 * Msun / h
code_time: 0.978 * Gyr # TODO: recheck. Needed without h for some consistency with TNG, but AREPO docs say /h?
code_pressure: (code_mass / code_length) / code_time^2
fields:
_all:
Coordinates: code_length
GroupID: none
SubhaloID: none
ParticleIDs: none
Masses: code_mass
NumTracers: none
Potential: (km / s)^2 / a
SubfindDensity: code_mass / code_length^3
SubfindHsml: code_length
SubfindVelDisp: km / s
Velocities: km * a^(1/2) / s
TimeStep:
Offsets: "no_units" # "no_units" indicates that no field has units in this group
# only do this for fields that have wrong or no metadata
PartType0:
AllowRefinement: none
CenterOfMass: code_length
Coordinates: code_length
Density: code_mass / code_length^3
ElectronAbundance: dimensionless
StarFormationRate: Msun / yr
EnergyDissipation: 1 / a * (1e10 Msun) / ckpc * (km / s) ^ 3
GFM_AGNRadiation:
units: erg / s / cm ^ 2 * 4 * pi
override: true # set this to override potential disagreeing units from metadata
GFM_CoolingRate: erg * cm^3 / s
GFM_Metallicity:
GFM_Metals:
GFM_MetalsTagged:
GFM_WindDMVelDisp: km / s
GFM_WindHostHaloMass: code_mass
InternalEnergy: (km / s) ^ 2
InternalEnergyOld: (km / s)^2
Machnumber:
MagneticField: (h / a^2) * (code_pressure)^(1/2)
MagneticFieldDivergence: (h^3 / a^2) * code_mass^(1/2) * (km/s) * (ckpc)^(-5/2)
NeutralHydrogenAbundance:
# TODO: Pressure?
SmoothingLength: code_length
SubfindDMDensity: code_mass / code_length^3
Temperature: K
TimebinHydro:
Volume: code_length^3
PartType1:
SubfindDMDensity: code_mass / code_length^3
PartType3:
ParentID: none
TracerID: none
FluidQuantities: # there are multiple units in the same array; cannot do
PartType4:
BirthPos: code_length
BirthVel: a^(1/2) * km / s
GFM_InitialMass: code_mass
GFM_Metallicity:
GFM_Metals:
GFM_MetalsTagged:
GFM_StellarFormationTime: # expressed as signed scale factor
GFM_StellarPhotometrics: # not supported mag for now
StellarHsml:
SubfindDMDensity: code_mass / code_length^3
PartType5:
BH_BPressure: (h^4 / a^4) * (1e10 Msun) * (km / s)^2 / ckpc^3
BH_CumEgyInjection_QM: code_mass * code_length^2 / (code_time / h)^2
BH_CumEgyInjection_RM: code_mass * code_length^2 / (code_time / h)^2
BH_CumMassGrowth_QM: code_mass
BH_CumMassGrowth_RM: code_mass
BH_Density: code_mass / code_length^3
BH_Hsml: code_length
BH_HostHaloMass: code_mass
BH_Mass: code_mass
BH_Mass_bubbles: code_mass
BH_Mass_ini: code_mass
BH_Mdot: code_mass / (code_time / h)
BH_MdotBondi: code_mass / (code_time / h)
BH_MdotEddington: code_mass / (code_time / h)
BH_Pressure: # TODO: metadata cgs factor seems wrong. double check
units: code_mass / code_length / (code_time / h)^2
override: true
BH_Progs:
BH_U: (km / s)^2
HostHaloMass: code_mass
SubfindDMDensity: code_mass / code_length^3
SubfindDensity: code_mass / code_length^3

# no metadata attributes in group catalogs, thus have to add all manually
Group:
GroupBHMass: code_mass
GroupBHMdot: code_mass / (code_time / h)
GroupCM: code_length
GroupContaminationFracByMass: none
GroupContaminationFracByNumPart: none
GroupFirstSub: none
GroupGasMetalFractions:
GroupGasMetallicity:
GroupLen: none
GroupLenType: none
GroupMass: code_mass
GroupMassType: code_mass
GroupNsubs: none
GroupOffsetsType: none # name of field generated by package
GroupOffsetType: none
GroupOrigHaloID: none
GroupPos: code_length
GroupPrimaryZoomTarget: none
GroupSFR: Msun / yr
GroupStarMetalFractions:
GroupStarMetallicity:
GroupVel: km / s / a
GroupWindMass: code_mass
Group_M_Crit200: code_mass
Group_M_Crit500: code_mass
Group_M_Mean200: code_mass
Group_M_TopHat200: code_mass
Group_R_Crit200: code_length
Group_R_Crit500: code_length
Group_R_Mean200: code_length
Group_R_TopHat200: code_length
TracerLengthType: none
TracerOffsetType: none
Subhalo:
SubhaloBHMass: code_mass
SubhaloBHMdot: code_mass / (code_time / h)
SubhaloBfldDisk: (h / a^2) * code_pressure^(1/2)
SubhaloBfldHalo: (h / a^2) * code_pressure^(1/2)
SubhaloCM: code_length
SubhaloFlag: none
SubhaloGasMetalFractions:
SubhaloGasMetalFractionsHalfRad:
SubhaloGasMetalFractionsMaxRad:
SubhaloGasMetalFractionsSfr:
SubhaloGasMetalFractionsSfrWeighted:
SubhaloGasMetallicity:
SubhaloGasMetallicityHalfRad:
SubhaloGasMetallicityMaxRad:
SubhaloGasMetallicitySfr:
SubhaloGasMetallicitySfrWeighted:
SubhaloGrNr: none
SubhaloHalfmassRad: code_length
SubhaloHalfmassRadType: code_length
SubhaloIDMostbound: none
SubhaloLen: none
SubhaloLenType: none
SubhaloMass: code_mass
SubhaloMassInHalfRad: code_mass
SubhaloMassInHalfRadType: code_mass
SubhaloMassInMaxRad: code_mass
SubhaloMassInMaxRadType: code_mass
SubhaloMassInRad: code_mass
SubhaloMassInRadType: code_mass
SubhaloMassType: code_mass
SubhaloOffsetType: none
SubhaloOrigHaloID: none
SubhaloParent: none
SubhaloPos: code_length
SubhaloSFR: Msun / yr
SubhaloSFRinHalfRad: Msun / yr
SubhaloSFRinMaxRad: Msun / yr
SubhaloSFRinRad: Msun / yr
SubhaloSpin: kpc / h * km / s
SubhaloStarMetalFractions:
SubhaloStarMetalFractionsHalfRad:
SubhaloStarMetalFractionsMaxRad:
SubhaloStarMetallicity:
SubhaloStarMetallicityHalfRad:
SubhaloStarMetallicityMaxRad:
SubhaloStellarPhotometrics: "1.0" # for now lets not add unit "mag" (TODO?)
SubhaloStellarPhotometricsMassInRad: code_mass
SubhaloStellarPhotometricsRad: code_length
SubhaloVel: km / s
SubhaloVelDisp: km / s
SubhaloVmax: km / s
SubhaloVmaxRad: code_length
SubhaloWindMass: code_mass
TracerLengthType: none
TracerOffsetType: none
187 changes: 0 additions & 187 deletions src/scida/configfiles/units/illustris.yaml

This file was deleted.

1 change: 1 addition & 0 deletions src/scida/configfiles/units/illustris.yaml
Loading

0 comments on commit 7fd214b

Please sign in to comment.