Buildings.Media.BaseClasses

Package with base models used in the Media library

Information


This package contains base classes that are used to construct the models in
Buildings.Media.

Extends from Modelica.Fluid.Icons.BaseClassLibrary (Icon for library).

Package Content

NameDescription
TestTemperatureEnthalpyInversion Model to check computation of h(T) and its inverse


Buildings.Media.BaseClasses.TestTemperatureEnthalpyInversion

Model to check computation of h(T) and its inverse

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
replaceable package MediumModelica.Media.Interfaces.Pa... 
TemperatureT0273.15 + 20Temperature [K]

Connectors

TypeNameDescription
replaceable package Medium 

Modelica definition

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;

HTML-documentation generated by Dymola Sat Feb 6 17:40:20 2010.