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
| Type | Name | Default | Description |
| Modelica.Units.SI.Temperature | T0 | 273.15 + 20 | Temperature |
| Real | tol | 1E-8 | Numerical tolerance |
Components
| Type | Name | Default | Description |
| Modelica.Units.SI.Temperature | T | | Temperature |
| Modelica.Units.SI.SpecificEnthalpy | h | | Enthalpy |
| Medium.MassFraction[:] | Xi | Medium.reference_X | Mass fraction |
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.