Collection of models that test the media models
This package contains examples that test the media packages in Buildings.Media.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
AirDerivativeCheck | Model that tests the derivative implementation |
AirProperties | Model that tests the implementation of the fluid properties |
AirTemperatureEnthalpyInversion | Model to check computation of h(T) and its inverse |
AirTestImplementation | Model that tests the medium implementation |
WaterDerivativeCheck | Model that tests the derivative implementation |
WaterProperties | Model that tests the implementation of the fluid properties |
WaterTemperatureEnthalpyInversion | Model to check computation of h(T) and its inverse |
WaterTestImplementation | Model that tests the medium implementation |
BaseClasses | Package with base classes for Buildings.Media.Examples |
Model that tests the derivative implementation
This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Model that tests the implementation of the fluid properties
This example checks thermophysical properties of the medium.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Media.Examples.BaseClasses.FluidProperties (Model that tests the implementation of the fluid properties).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | ||
Temperature | TMin | 273.15 - 30 | Minimum temperature for the simulation [K] |
Temperature | TMax | 273.15 + 60 | Maximum temperature for the simulation [K] |
Pressure | p | Medium.p_default | Pressure [Pa] |
MassFraction | X[Medium.nX] | Medium.X_default | Mass fraction [1] |
Type | Name | Description |
---|---|---|
replaceable package Medium |
Model to check computation of h(T) and its inverse
This model tests whether the inversion of temperature and enthalpy is implemented correctly. If T ≠ T(h(T)), the model stops with an error.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Media.Examples.BaseClasses.TestTemperatureEnthalpyInversion (Model to check computation of h(T) and its inverse).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialCondensingGases | ||
Temperature | T0 | 273.15 + 20 | Temperature [K] |
Type | Name | Description |
---|---|---|
replaceable package Medium |
Model that tests the medium implementation
Extends from Modelica.Icons.Example (Icon for runnable examples), Modelica.Media.Examples.Tests.Components.PartialTestModel (Basic test model to test a medium).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model | |
AbsolutePressure | p_start | Medium.p_default | Initial value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Initial value of temperature [K] |
SpecificEnthalpy | h_start | Medium.h_default | Initial value of specific enthalpy [J/kg] |
Real | X_start[Medium.nX] | Medium.X_default | Initial value of mass fractions |
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model |
Model that tests the derivative implementation
This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Model that tests the implementation of the fluid properties
This example checks thermophysical properties of the medium.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Media.Examples.BaseClasses.FluidProperties (Model that tests the implementation of the fluid properties).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | ||
Temperature | TMin | 273.15 | Minimum temperature for the simulation [K] |
Temperature | TMax | 373.15 | Maximum temperature for the simulation [K] |
Pressure | p | Medium.p_default | Pressure [Pa] |
MassFraction | X[Medium.nX] | Medium.X_default | Mass fraction [1] |
Type | Name | Description |
---|---|---|
replaceable package Medium |
Model to check computation of h(T) and its inverse
This model tests whether the inversion of temperature and enthalpy is implemented correctly. If T ≠ T(h(T)), the model stops with an error.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Media.Examples.BaseClasses.TestTemperatureEnthalpyInversion (Model to check computation of h(T) and its inverse).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialCondensingGases | ||
Temperature | T0 | 273.15 + 20 | Temperature [K] |
Type | Name | Description |
---|---|---|
replaceable package Medium |
Model that tests the medium implementation
Extends from Modelica.Icons.Example (Icon for runnable examples), Modelica.Media.Examples.Tests.Components.PartialTestModel (Basic test model to test a medium).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model | |
AbsolutePressure | p_start | Medium.p_default | Initial value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Initial value of temperature [K] |
SpecificEnthalpy | h_start | Medium.h_default | Initial value of specific enthalpy [J/kg] |
Real | X_start[Medium.nX] | Medium.X_default | Initial value of mass fractions |
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model |