.Modelica.Media.R134a.R134a_ph.dtofpsOnePhase

Information

This function calculates the density and temperature of R134a from absolute pressure and specific entropy in one-phase region. The function calls the fundamental helmholtz equation of Tillner-Roth (1994) 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 entropy difference dels 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. The iteration could fail for liquid states with high pressures.

Interface

function dtofpsOnePhase
  extends Modelica.Icons.Function;
  input AbsolutePressure p "Pressure";
  input SpecificEntropy s "Specific entropy";
  input AbsolutePressure delp "Absolute iteration accuracy";
  input SpecificEntropy dels "Absolute iteration accuracy";
  output Density d "Density";
  output Temperature T "Temperature";
  output Integer error "Error flag: trouble if different from 0";
end dtofpsOnePhase;

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f