pyskyfire.thermo.eos.CoolPropEOS¶
- class pyskyfire.thermo.eos.CoolPropEOS(fluid)¶
Bases:
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)"]; }EquationOfStateA real fluid, from CoolProp.
- Parameters:
- fluid
strorFluidorobjectwith.fluid A CoolProp fluid string such as
'Methane', aFluid, or a transport object carrying the string on.fluid(aFluidTransport).
- fluid
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 throughstate_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
stateby an isentropic process top.
- 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 enthalpyds/dp = -1/(rho*T), and a Newton step inln pwith that slope converges in a few steps from far off.
- state_pT(p, T)¶
The state at pressure
pand temperatureT.
- state_ph(p, h)¶
The state at pressure
pand specific enthalpyh.