functiondtofpsOnePhase
Inverse iteration in one phase region (d,T) = f(p,s)
Extends from Modelica.Icons.Function.
Information
This function calculates the density and temperature of R1234yf from absolute pressure and specific enthalpy in one-phase region. The function calls the fundamental helmholtz equation of Richter et al (2011) which is requiring density and temperature for input. Thus, a newton iteration is performed to determine density and temperature. The newton iteration stops if the inputs for pressure difference delp and specific enthalpy difference delh are larger than the actual differences derived from the newton iteration.
Restrictions
The function shall only be used for one-phase inputs since the fundamental equation is not valid for two-phase states.Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | pressure | |
| SpecificEntropy | s | specific entropy | |
| AbsolutePressure | delp | iteration accuracy | |
| SpecificEntropy | dels | iteration accuracy |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Density | d | density | |
| Temperature | T | temperature (K) | |
| Integer | error | error flag: trouble if different from 0 |