[yt-dev] Field units from code to code

Nathan Goldbaum goldbaum at ucolick.org
Wed Mar 28 13:47:47 PDT 2012

Hi all,

On IRC today we noticed that Orion defines its ThermalEnergy field per unit volume but Enzo and FLASH define ThermalEnergy per unit mass.  Is this a problem?  Since yt defaults to the Enzo field names, should we try to make sure that all fields are defined using the same units as in Enzo?  Is there a convention for how different codes should define derived fields that are aliased to Enzo fields?

One problem for this particular example is that the Pressure field is defined in terms of ThermalEnergy in universal_fields.py so the units of ThermalEnergy become important if a user merely wants the gas pressure in the simulation.

One possible solution for this issue would be the units overhaul we're planning. If all fields are associated with a unit object, we can simply query the units to ensure that units are taken care of correctly and code-to-code comparisons aren't sensitive to the units chosen for fields in the frontend.

Personally, I think it would be best if we could make sure that all of the fields aliased to Enzo fields have the same units.

Nathan Goldbaum
Graduate Student
Astronomy & Astrophysics, UCSC
goldbaum at ucolick.org

More information about the yt-dev mailing list