pyskyfire.thermo.eos.CoolPropEOS

class pyskyfire.thermo.eos.CoolPropEOS(fluid)

Bases: EquationOfState

digraph inheritance955c549c7a { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "CoolPropEOS" [URL="CoolPropEOS.html#pyskyfire.thermo.eos.CoolPropEOS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A real fluid, from CoolProp."]; "EquationOfState" -> "CoolPropEOS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "EquationOfState" [URL="EquationOfState.html#pyskyfire.thermo.eos.EquationOfState",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The state lookups a machine design asks of a fluid."]; "ABC" -> "EquationOfState" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

A real fluid, from CoolProp.

Parameters:
fluidstr or Fluid or object with .fluid

A CoolProp fluid string such as 'Methane', a Fluid, or a transport object carrying the string on .fluid (a FluidTransport).

Notes

A (p, T) pair lying on the saturation line doesn’t identify a state: it could be liquid, vapour or anything between. state_pT() reads such a pair as saturated liquid, a millikelvin into the liquid, because a pump inlet drawn from a tank at its own vapour pressure is where this comes up. Give the enthalpy through state_ph() to mean anything else.

__getstate__()
__repr__()
entropy(state: FluidState) → float

Specific entropy of state [J kg⁻¹ K⁻¹].

isentropic(state, p)

The state reached from state by an isentropic process to p.

resolver(p_ref: float) → FluidStateResolver

The state resolver, probed at the first pressure it is asked about.

speed_of_sound(state)

Single-phase speed of sound; NaN inside the dome, where it is not defined.

state_hs(h, s, *, p_guess=1000000.0, tolerance=1e-10)

The state at (h, s).

CoolProp’s own (h, s) flash is used where it answers. It refuses states beyond the equation’s temperature range, though its (p, h) flash still extrapolates there, so where it refuses the pressure is found along the isenthalp instead. At constant enthalpy ds/dp = -1/(rho*T), and a Newton step in ln p with that slope converges in a few steps from far off.

state_pT(p, T)

The state at pressure p and temperature T.

state_ph(p, h)

The state at pressure p and specific enthalpy h.