Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

yt derived field

import yt
from yt.units import dimensions

def _pressure(field, data):
    return (data.ds.gamma - 1.0) * 
          data["density"] * data["thermal_energy"]

yt.add_field(("gas","pressure"), function=_pressure, units="auto",
             dimensions=dimensions.pressure)
Source by yt-project.org #
 
PREVIOUS NEXT
Tagged: #yt #derived #field
ADD COMMENT
Topic
Name
6+7 =