This function computes the specific enthalpy in two-phase for R1234yf depending on the inputs for absolute pressure and specific entropy. It makes use of cubic spline functions for liquid and vapor specific enthalpy as well as specific entropy.
function hofpsTwoPhase
extends Modelica.Icons.Function;
input Modelica.Units.SI.Pressure p "pressure";
input Modelica.Units.SI.SpecificEntropy s "specific entropy";
output Modelica.Units.SI.SpecificEnthalpy h "specific enthalpy";
end hofpsTwoPhase;