diff --git a/examples/GEAR/AgoraDisk/agora_disk.yml b/examples/GEAR/AgoraDisk/agora_disk.yml index e85fe1e9a8bf75a4df0451d959f9b4692ebc1d7f..18b9b618026dbc4a4cf26ff046041365990293d7 100644 --- a/examples/GEAR/AgoraDisk/agora_disk.yml +++ b/examples/GEAR/AgoraDisk/agora_disk.yml @@ -88,7 +88,7 @@ GrackleCooling: GEARStarFormation: star_formation_efficiency: 0.01 # star formation efficiency (c_*) maximal_temperature: 1e10 # Upper limit to the temperature of a star forming particle - n_stars_per_particle: 4 + n_stars_per_particle: 1 min_mass_frac: 0.5 GEARPressureFloor: @@ -107,5 +107,5 @@ GEARChemistry: scale_initial_metallicity: 1 Restarts: - delta_hours: 72 # (Optional) decimal hours between dumps of restart files. + delta_hours: 1. # (Optional) decimal hours between dumps of restart files. diff --git a/examples/GEAR/AgoraDisk/plotSolution.py b/examples/GEAR/AgoraDisk/plotSolution.py index b3a831b2d902c901f3e06c968c7fef28d4db3429..c17c67aebae9b0b699fa854a50bb6601893d85ed 100644 --- a/examples/GEAR/AgoraDisk/plotSolution.py +++ b/examples/GEAR/AgoraDisk/plotSolution.py @@ -717,10 +717,10 @@ for time in range(len(times)): pf.add_field(("gas", "metallicity"), function=_metallicity_3, force_override=True, display_name="Metallicity", particle_type=False, take_log=True, units="") elif codes[code] == 'SWIFT': # "Metals" in SWIFT is 10-species field ([:,9] is the total metal fraction), so requires a change in _vector_fields in frontends/gadget/io.py: added ("Metals", 10) def _metallicity_2(field, data): - if len(data[PartType_Gas_to_use, "SmoothedElementAbundances"].shape) == 1: - return data[PartType_Gas_to_use, "SmoothedElementAbundances"] + if len(data[PartType_Gas_to_use, "SmoothedMetalMassFractions"].shape) == 1: + return data[PartType_Gas_to_use, "SmoothedMetalMassFractions"] else: - return data[PartType_Gas_to_use, "SmoothedElementAbundances"][:,9].in_units("") # in_units("") turned out to be crucial!; otherwise code_metallicity will be used and it will mess things up + return data[PartType_Gas_to_use, "SmoothedMetalMassFractions"][:,9].in_units("") # in_units("") turned out to be crucial!; otherwise code_metallicity will be used and it will mess things up # We are creating ("Gas", "Metallicity") here, different from ("Gas", "metallicity") which is auto-generated by yt but doesn't work properly pf.add_field((PartType_Gas_to_use, MetallicityType_to_use), function=_metallicity_2, display_name="Metallicity", particle_type=True, take_log=True, units="") # Also creating smoothed field following an example in yt-project.org/docs/dev/cookbook/calculating_information.html; use hardcoded num_neighbors as in frontends/gadget/fields.py