Examples

Demonstrate usage of property models

Package Contents

SimpleLiquidWater

Example for Water.SimpleLiquidWater medium model

IdealGasH2O

IdealGas H20 medium model

WaterIF97

WaterIF97 medium model

MixtureGases

Test gas mixtures

MoistAir

Example for moist air

PsychrometricData

Produces plot data for psychrometric charts

TwoPhaseWater

Extension of the StandardWater package

ReferenceAir

Examples for detailed dry air and moist air medium models

R134a

Examples for R134a

SolveOneNonlinearEquation

Demonstrate how to solve one non-linear algebraic equation in one unknown

Utilities

Functions, connectors and models needed for the media model tests

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Examples

Physical properties for fluids are needed in so many different variants that a library can only provide models for the most common situations. With the following examples we are going to demonstrate how to use the existing packages and functions in Modelica.Media to customize these models for advanced applications. The high level functions try to abstract as much as possible form the fact that different media are based on different variables, e.g., ideal gases need pressure and temperature, while many refrigerants are based on Helmholtz functions of density and temperature, and many water properties are based on pressure and specific enthalpy. Medium properties are needed in control volumes in the dynamic state equations and in many thermodynamic state locations that are independent of the dynamic states of a control volume, e.g., at a wall temperature, an isentropic reference state or at a phase boundary. The general structure of the library is such that:
  • Each medium has a model called BaseProperties. BaseProperties contains the minimum set of medium properties needed in a dynamic control volume model.
  • Each instance of BaseProperties contains a "state" record that is an input to all the functions to compute properties. If these functions need further inputs, like e.g., the molarMass, these are accessible as constants in the package.
  • The simplest way to compute properties at any other reference point is to declare an instance of ThermodynamicState and use that as input to arbitrary property functions.

A small library of generic volume, pipe, pump and ambient models is provided in Modelica.Media.Examples.Tests.Components to demonstrate how fluid components should be implemented that are using Modelica.Media models. This library is also used to test all media models in Modelica.Media.Examples.Tests.MediaTestModels.