.ThermofluidStream.Media.myMedia.R134a.R134a_ph.dtofphOnePhase

Information

This function calculates the density and temperature of R134a from absolute pressure and specific enthalpy 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 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.

Interface

function dtofphOnePhase
  extends Modelica.Icons.Function;
  input AbsolutePressure p "Pressure";
  input SpecificEnthalpy h "Enthalpy";
  input AbsolutePressure delp "Absolute error in p in iteration";
  input SpecificEnthalpy delh "Absolute error in h in iteration";
  output Density d "Density";
  output Temperature T "Temperature";
  output Integer error "1 if did not converged";
end dtofphOnePhase;

Generated at 2024-11-21T19:25:40Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos