Package Modelica.​Fluid.​Vessels
Devices for storing fluid

Information

Extends from Modelica.​Icons.​VariantsPackage (Icon for package containing variants).

Package Contents

NameDescription
BaseClassesBase classes used in the Vessels package (only of interest to build new component models)
ClosedVolumeVolume of fixed size, closed to the ambient, with inlet/outlet ports
OpenTankSimple tank with inlet/outlet ports

Model Modelica.​Fluid.​Vessels.​ClosedVolume
Volume of fixed size, closed to the ambient, with inlet/outlet ports

Information

Ideally mixed volume of constant size with two fluid ports and one medium model. The flow properties are computed from the upstream quantities, pressures are equal in both nodes and the medium model if use_portsData=false. Heat transfer through a thermal port is possible, it equals zero if the port remains unconnected. A spherical shape is assumed for the heat transfer area, with V=4/3*pi*r^3, A=4*pi*r^2. Ideal heat transfer is assumed per default; the thermal port temperature is equal to the medium temperature.

If use_portsData=true, the port pressures represent the pressures just after the outlet (or just before the inlet) in the attached pipe. The hydraulic resistances portsData.zeta_in and portsData.zeta_out determine the dissipative pressure drop between volume and port depending on the direction of mass flow. See VesselPortsData and [Idelchik, Handbook of Hydraulic Resistance, 2004].

Extends from Modelica.​Fluid.​Vessels.​BaseClasses.​PartialLumpedVessel (Lumped volume with a vector of fluid ports and replaceable heat transfer model).

Parameters

TypeNameDefaultDescription
DynamicsenergyDynamicssystem.​energyDynamicsFormulation of energy balance
DynamicsmassDynamicssystem.​massDynamicsFormulation of mass balance
final DynamicssubstanceDynamicsmassDynamicsFormulation of substance balance
final DynamicstraceDynamicsmassDynamicsFormulation of trace substance balance
AbsolutePressurep_startsystem.​p_startStart value of pressure
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
MassFractionX_start[Medium.nX]Medium.​X_defaultStart value of mass fractions m_i/m
ExtraPropertyC_start[Medium.nC]Medium.​C_defaultStart value of trace substances
IntegernPorts0Number of ports
Booleanuse_portsDatatrue= false to neglect pressure loss and kinetic energy
VesselPortsDataportsData[if use_portsData then nPorts else 0] Data of inlet/outlet ports
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal value for mass flow rates in ports
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallRegularization range at zero mass flow rate
Booleanuse_Resystem.​use_eps_Re= true, if turbulent region is defined by Re, otherwise by m_flow_small
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model
VolumeV Volume

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheatPort 

Model Modelica.​Fluid.​Vessels.​OpenTank
Simple tank with inlet/outlet ports

Information

Model of a tank that is open to the ambient at the fixed pressure p_ambient.

The vector of connectors ports represents fluid ports at configurable heights, relative to the bottom of tank. Fluid can flow either out of or in to each port.

The following assumptions are made:

The port pressures represent the pressures just after the outlet (or just before the inlet) in the attached pipe. The hydraulic resistances portsData.zeta_in and portsData.zeta_out determine the dissipative pressure drop between tank and port depending on the direction of mass flow. See VesselPortsData and [Idelchik, Handbook of Hydraulic Resistance, 2004].

With the setting use_portsData=false, the port pressure represents the static head at the height of the respective port. The relationship between pressure drop and mass flow rate at the port must then be provided by connected components; Heights of ports as well as kinetic and potential energy of fluid entering or leaving are not taken into account anymore.

Extends from Modelica.​Fluid.​Vessels.​BaseClasses.​PartialLumpedVessel (Lumped volume with a vector of fluid ports and replaceable heat transfer model).

Parameters

TypeNameDefaultDescription
Heightheight Height of tank
AreacrossArea Area of tank
AbsolutePressurep_ambientsystem.​p_ambientTank surface pressure
TemperatureT_ambientsystem.​T_ambientTank surface Temperature
Heightlevel_start0.5 * heightStart value of tank level
DynamicsenergyDynamicssystem.​energyDynamicsFormulation of energy balance
DynamicsmassDynamicssystem.​massDynamicsFormulation of mass balance
final DynamicssubstanceDynamicsmassDynamicsFormulation of substance balance
final DynamicstraceDynamicsmassDynamicsFormulation of trace substance balance
final AbsolutePressurep_startp_ambientStart value of pressure
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
MassFractionX_start[Medium.nX]Medium.​X_defaultStart value of mass fractions m_i/m
ExtraPropertyC_start[Medium.nC]Medium.​C_defaultStart value of trace substances
IntegernPorts0Number of ports
Booleanuse_portsDatatrue= false to neglect pressure loss and kinetic energy
VesselPortsDataportsData[if use_portsData then nPorts else 0] Data of inlet/outlet ports
MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 100 * system.m_flow_smallNominal value for mass flow rates in ports
MassFlowRatem_flow_smallif system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_smallRegularization range at zero mass flow rate
Booleanuse_Resystem.​use_eps_Re= true, if turbulent region is defined by Re, otherwise by m_flow_small
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheatPort