This package contains base classes that are used to construct the models in Buildings.Media.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).Name | Description |
---|---|
TestTemperatureEnthalpyInversion | Model to check computation of h(T) and its inverse |
h=f(T0)
and
T=g(h)
. It then checks whether T=T0
.
Hence, it checks whether the function T_phX
is
implemented correctly.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | ||
Temperature | T0 | 273.15 + 20 | Temperature [K] |
Type | Name | Description |
---|---|---|
replaceable package Medium |
partial model TestTemperatureEnthalpyInversion "Model to check computation of h(T) and its inverse" replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases; parameter Modelica.SIunits.Temperature T0=273.15+20 "Temperature"; Modelica.SIunits.Temperature T "Temperature"; Modelica.SIunits.SpecificEnthalpy h "Enthalpy"; Medium.MassFraction Xi[:] = Medium.reference_X "Mass fraction"; equation h = Medium.h_pTX(p=101325, T=T0, X=Xi); T = Medium.T_phX(p=101325, h=h, X=Xi); if (time>0.1) then assert(abs(T-T0)<1E-8, "Error in implementation of functions.\n" + " T0 = " + String(T0) + "\n" + " T = " + String(T)); end if;end TestTemperatureEnthalpyInversion;