modelTestTemperatureEnthalpyInversion

Model to check computation of h(T) and its inverse with a controlleable tolerance

Information

This model computes h=f(T0) and T=g(h). It then checks whether T=T0. Hence, it checks whether the function T_phX is implemented correctly.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TemperatureT0273.15 + 20Temperature
Realtol1E-8Numerical tolerance

Components

TypeNameDefaultDescription
Modelica.Units.SI.TemperatureTTemperature
Modelica.Units.SI.SpecificEnthalpyhEnthalpy
Medium.MassFraction[:]XiMedium.reference_XMass fraction

Contents

NameDescription
Medium

Revisions

  • November 14, 2022, by Michael Wetter:
    Reformulated if-expression to avoid warning about state event.
    This is for #1657.
  • March 24, 2020 by Kathryn Hinkelman:
    Expanded the assert message to include absolute error value.
  • September 16, 2019 by Yangyang Fu:
    Added a parameter tol to control numerical errors.
  • June 6, 2015 by Michael Wetter:
    Changed Medium base class to avoid a translation error in Dymola 2016 using pedantic mode. This is for #266.
  • February 12, 2015 by Michael Wetter:
    Replaced h_pTX with specificEnthalpy_pTX and T_phX with temperature_phX as the old names are not present in all media.
  • January 21, 2010 by Michael Wetter:
    First implementation.