Demonstrate usage of property models
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).
Name | Description |
---|---|
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 |
TestOnly | Examples to show the testing of media |
Tests | Library to test that all media models simulate and fulfill the expected structural properties |
Example for Water.SimpleLiquidWater medium model
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
V | Volume [m3] |
H_flow_ext | Constant enthalpy flow rate into the volume [W] |
IdealGas H20 medium model
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).
WaterIF97 medium model
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
dV | Fixed time derivative of volume [m3/s] |
m_flow_ext | Fixed mass flow rate into volume [kg/s] |
H_flow_ext | Fixed enthalpy flow rate into volume [W] |
Test gas mixtures
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
V | Fixed size of volume 1 and volume 2 [m3] |
m_flow_ext | Fixed mass flow rate in to volume 1 and in to volume 2 [kg/s] |
H_flow_ext | Fixed enthalpy flow rate in to volume and in to volume 2 [W] |
Example for moist air
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).
Name | Description |
---|---|
MMx[2] | Vector of molar masses (consisting of dry air and of steam) [kg/mol] |
Produces plot data for psychrometric charts
This model produces psychrometric data from the moist air model in this library to be plotted in charts. The two most common chart varieties are the Mollier Diagram and the Psychrometric Chart. The first is widely used in some European countries while the second is more common in the Anglo-American world. Specific enthalpy is plotted over absolute humidity in the Mollier Diagram, it is the other way round in the Psychrometric Chart.
It must be noted that the relationship of both axis variables is not right-angled, the absolute humidity follows a slope which equals the enthalpy of vaporization at 0 °C. For better reading and in order to reduce the fog region the humidity axis is rotated to obtain a right-angled plot. Both charts usually contain additional information as isochores or auxiliary scales for e.g., heat ratios. Those information are omitted in this model and the charts below. Other important features of psychrometric chart data are that all mass specific variables (like absolute humidity, specific enthalpy etc.) are expressed in terms of kg dry air and that their baseline of 0 enthalpy is found at 0 °C and zero humidity.
Legend: blue - constant specific enthalpy, red - constant temperature, black - constant relative humidity
The model provides data for lines of constant specific enthalpy, temperature and relative humidity in a Mollier Diagram or Psychrometric Chart as they were used for the figures above. For limitations and ranges of validity please refer to the MoistAir package description. Absolute humidity x is increased with time in this model. The specific enthalpies adjusted for plotting are then obtained from:
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
p_const | Pressure [Pa] |
n_T | Number of isotherms |
T_min | Lowest isotherm [K] |
T_step | Temperature step between two isotherms [K] |
n_h | Number of lines with constant specific enthalpy |
h_min | Lowest line of constant enthalpy [J/kg] |
h_step | Enthalpy step between two lines of constant enthalpy [J/kg] |
n_phi | Number of lines with constant relative humidity |
phi_min | Lowest line of constant humidity |
phi_step | Step between two lines of constant humidity |
x_min | Minimum diagram absolute humidity [1] |
x_max | Maximum diagram absolute humidity [1] |
t | Simulation time [s] |