Modelica.Media.Examples

Demonstrate usage of property models (currently: simple tests)

Information


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:

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.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

NameDescription
Modelica.Media.Examples.SimpleLiquidWater SimpleLiquidWater Example for Water.SimpleLiquidWater medium model
Modelica.Media.Examples.IdealGasH2O IdealGasH2O IdealGas H20 medium model
Modelica.Media.Examples.WaterIF97 WaterIF97 WaterIF97 medium model
Modelica.Media.Examples.MixtureGases MixtureGases Test gas mixtures
Modelica.Media.Examples.MoistAir MoistAir Ideal gas flue gas model
Modelica.Media.Examples.TwoPhaseWater TwoPhaseWater Extension of the StandardWater package
Modelica.Media.Examples.ReferenceAir ReferenceAir Examples for detailed dry air and moist air medium models
Modelica.Media.Examples.R134a R134a Examples for R134a
Modelica.Media.Examples.TestOnly TestOnly Examples to show the testing of media
Modelica.Media.Examples.Tests Tests Library to test that all media models simulate and fulfill the expected structural properties
Modelica.Media.Examples.SolveOneNonlinearEquation SolveOneNonlinearEquation Demonstrate how to solve one non-linear algebraic equation in one unknown

Modelica.Media.Examples.SimpleLiquidWater Modelica.Media.Examples.SimpleLiquidWater

Example for Water.SimpleLiquidWater medium model

Information



Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VVolume [m3]
H_flow_extConstant enthalpy flow rate into the volume [W]

Modelica.Media.Examples.IdealGasH2O Modelica.Media.Examples.IdealGasH2O

IdealGas H20 medium model

Information


An example for using ideal gas properties and how to compute isentropic enthalpy changes. The function that is implemented is approximate, but usually very good: the second medium record medium2 is given to compare the approximation.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica.Media.Examples.WaterIF97 Modelica.Media.Examples.WaterIF97

WaterIF97 medium model

Information



Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
dVFixed time derivative of volume [m3/s]
m_flow_extFixed mass flow rate into volume [kg/s]
H_flow_extFixed enthalpy flow rate into volume [W]

Modelica.Media.Examples.MixtureGases Modelica.Media.Examples.MixtureGases

Test gas mixtures

Information



Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
VFixed size of volume 1 and volume 2 [m3]
m_flow_extFixed mass flow rate in to volume 1 and in to volume 2 [kg/s]
H_flow_extFixed enthalpy flow rate in to volume and in to volume 2 [W]

Modelica.Media.Examples.MoistAir Modelica.Media.Examples.MoistAir

Ideal gas flue gas model

Information


An example for using ideal gas properties and how to compute isentropic enthalpy changes. The function that is implemented is approximate, but usually very good: the second medium record medium2 is given to compare the approximation.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
MMx[2]Vector of molar masses (consisting of dry air and of steam) [kg/mol]

Automatically generated Mon Sep 23 17:20:53 2013.