Fluid
The Fluid
object is a discrete packet of information passed from one component to another.
It has no methods and does not act on other objects.
Its primary properties are pressure, temperature, and flowrate, and these are specified on initialization. Its secondary properties (density, viscosity, enthalpy) come from lookup tables created for a particular fluid composition.
Property | Unit | Default | Notes |
---|---|---|---|
pressure | Pressure | - | Defined with physical-quantities npm package |
temperature | Temperature | - | Defined with physical-quantities npm package |
flowrate | Flowrate | - | Defined with physical-quantities npm package |
density | kg/m3 | - | number |
viscosity | Pa.s | - | number |
enthalpy | - | number |
Two input files are used to find the secondary properties. One details the phase envelope of the fluid and the other specifies the density, viscosity, and enthalpy of the fluid at each pressure/temperature combination in a range of possible values. Secondary fluid properties are then determined by interpolating the data points nearest the specified pressure and temperature.
phaseEnvelope.csv
fluidPropertiesLookup.csv