Modelica.Media.Examples.Tests.Components

Functions, connectors and models needed for the media model tests

Information



Extends from Modelica.Icons.Library (This icon will be removed in future Modelica versions, use Package instead).

Package Content

NameDescription
Modelica.Media.Examples.Tests.Components.FluidPort FluidPort Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)
Modelica.Media.Examples.Tests.Components.FluidPort_a FluidPort_a Fluid connector with filled icon
Modelica.Media.Examples.Tests.Components.FluidPort_b FluidPort_b Fluid connector with outlined icon
Modelica.Media.Examples.Tests.Components.PortVolume PortVolume Fixed volume associated with a port by the finite volume method
Modelica.Media.Examples.Tests.Components.FixedMassFlowRate FixedMassFlowRate Ideal pump that produces a constant mass flow rate from a large reservoir at fixed temperature and mass fraction
Modelica.Media.Examples.Tests.Components.FixedAmbient FixedAmbient Ambient pressure, temperature and mass fraction source
Modelica.Media.Examples.Tests.Components.ShortPipe ShortPipe Simple pressure loss in pipe
PartialTestModel Basic test model to test a medium
PartialTestModel2 Slightly larger test model to test a medium

Modelica.Media.Examples.Tests.Components.FluidPort

Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)

Information



Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
replaceable package MediumMedium model
pPressure in the connection point [Pa]
m_flowMass flow rate from the connection point into the component [kg/s]
hSpecific mixture enthalpy in the connection point [J/kg]
H_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h) [W]
Xi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point [kg/kg]
mXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X) [kg/s]
C[Medium.nC]Properties c_i/m in the connection point
mC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C) [kg/s]

Modelica.Media.Examples.Tests.Components.FluidPort_a Modelica.Media.Examples.Tests.Components.FluidPort_a

Fluid connector with filled icon

Information

Modelica.Media.Examples.Tests.Components.FluidPort_a

Extends from FluidPort (Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)).

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
pPressure in the connection point [Pa]
m_flowMass flow rate from the connection point into the component [kg/s]
hSpecific mixture enthalpy in the connection point [J/kg]
H_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h) [W]
Xi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point [kg/kg]
mXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X) [kg/s]
C[Medium.nC]Properties c_i/m in the connection point
mC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C) [kg/s]

Modelica.Media.Examples.Tests.Components.FluidPort_b Modelica.Media.Examples.Tests.Components.FluidPort_b

Fluid connector with outlined icon

Information



Extends from FluidPort (Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)).

Parameters

NameDescription
replaceable package MediumMedium model

Contents

NameDescription
pPressure in the connection point [Pa]
m_flowMass flow rate from the connection point into the component [kg/s]
hSpecific mixture enthalpy in the connection point [J/kg]
H_flowEnthalpy flow rate into the component (if m_flow > 0, H_flow = m_flow*h) [W]
Xi[Medium.nXi]Independent mixture mass fractions m_i/m in the connection point [kg/kg]
mXi_flow[Medium.nXi]Mass flow rates of the independent substances from the connection point into the component (if m_flow > 0, mX_flow = m_flow*X) [kg/s]
C[Medium.nC]Properties c_i/m in the connection point
mC_flow[Medium.nC]Flow rates of auxiliary properties from the connection point into the component (if m_flow > 0, mC_flow = m_flow*C) [kg/s]

Modelica.Media.Examples.Tests.Components.PortVolume Modelica.Media.Examples.Tests.Components.PortVolume

Fixed volume associated with a port by the finite volume method

Information


This component models the volume of fixed size that is associated with the fluid port to which it is connected. This means that all medium properties inside the volume, are identical to the port medium properties. In particular, the specific enthalpy inside the volume (= medium.h) is always identical to the specific enthalpy in the port (port.h = medium.h). Usually, this model is used when discretizing a component according to the finite volume method into volumes in internal ports that only store energy and mass and into transport elements that just transport energy, mass and momentum between the internal ports without storing these quantities during the transport.

Parameters

NameDescription
replaceable package MediumMedium model
VFixed size of junction volume [m3]
Initial pressure or initial density
use_p_startSelect p_start or d_start
p_startInitial pressure [Pa]
d_startInitial density [kg/m3]
Initial temperature or initial specific enthalpy
use_T_startSelect T_start or h_start
T_startInitial temperature [K]
h_startInitial specific enthalpy [J/kg]
Only for multi-substance flow
X_start[Medium.nX]Initial mass fractions m_i/m [kg/kg]

Connectors

NameDescription
replaceable package MediumMedium model
port 

Modelica.Media.Examples.Tests.Components.FixedMassFlowRate Modelica.Media.Examples.Tests.Components.FixedMassFlowRate

Ideal pump that produces a constant mass flow rate from a large reservoir at fixed temperature and mass fraction

Information



Parameters

NameDescription
m_flowFixed mass flow rate from an infinite reservoir to the fluid port [kg/s]
X_ambient[Medium.nX]Ambient mass fractions m_i/m of reservoir [kg/kg]
replaceable package MediumMedium model
Ambient temperature or ambient specific enthalpy
use_T_ambientSelect T_ambient or h_ambient
T_ambientAmbient temperature [K]
h_ambientAmbient specific enthalpy [J/kg]

Connectors

NameDescription
replaceable package MediumMedium model
port 

Modelica.Media.Examples.Tests.Components.FixedAmbient Modelica.Media.Examples.Tests.Components.FixedAmbient

Ambient pressure, temperature and mass fraction source

Information


Model FixedAmbient_pt defines constant values for ambient conditions:

Note, that ambient temperature and mass fractions have only an effect if the mass flow is from the ambient into the port. If mass is flowing from the port into the ambient, the ambient definitions, with exception of ambient pressure, do not have an effect.

Parameters

NameDescription
replaceable package MediumMedium model
Ambient pressure or ambient density
use_p_ambientSelect p_ambient or d_ambient
p_ambientAmbient pressure [Pa]
d_ambientAmbient density [kg/m3]
Ambient temperature or ambient specific enthalpy
use_T_ambientSelect T_ambient or h_ambient
T_ambientAmbient temperature [K]
h_ambientAmbient specific enthalpy [J/kg]
Only for multi-substance flow
X_ambient[Medium.nX]Ambient mass fractions m_i/m [kg/kg]

Connectors

NameDescription
replaceable package MediumMedium model
port 

Modelica.Media.Examples.Tests.Components.ShortPipe Modelica.Media.Examples.Tests.Components.ShortPipe

Simple pressure loss in pipe

Information


Model ShortPipe defines a simple pipe model with pressure loss due to friction. It is assumed that no mass or energy is stored in the pipe.

Parameters

NameDescription
replaceable package MediumMedium model
dp_nominalNominal pressure drop [Pa]
m_flow_nominalNominal mass flow rate at nominal pressure drop [kg/s]

Connectors

NameDescription
replaceable package MediumMedium model
port_a 
port_b 

Modelica.Media.Examples.Tests.Components.PartialTestModel

Basic test model to test a medium

Information



Parameters

NameDescription
replaceable package MediumMedium model
p_startInitial value of pressure [Pa]
T_startInitial value of temperature [K]
h_startInitial value of specific enthalpy [J/kg]
X_start[Medium.nX]Initial value of mass fractions

Connectors

NameDescription
replaceable package MediumMedium model

Modelica.Media.Examples.Tests.Components.PartialTestModel2

Slightly larger test model to test a medium

Information



Parameters

NameDescription
replaceable package MediumMedium model
p_startInitial value of pressure [Pa]
T_startInitial value of temperature [K]
h_startInitial value of specific enthalpy [J/kg]
X_start[Medium.nX]Initial value of mass fractions

Connectors

NameDescription
replaceable package MediumMedium model

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