OpenTankSimple tank with inlet/outlet ports 
This information is part of the Modelica Standard Library maintained by the Modelica Association.
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.
energyDynamics 
Value: system.energyDynamics Type: Dynamics Description: Formulation of energy balance 

massDynamics 
Value: system.massDynamics Type: Dynamics Description: Formulation of mass balance 
substanceDynamics 
Value: massDynamics Type: Dynamics Description: Formulation of substance balance 
traceDynamics 
Value: massDynamics Type: Dynamics Description: Formulation of trace substance balance 
p_start 
Value: p_ambient Type: AbsolutePressure (Pa) Description: Start value of pressure 
use_T_start 
Value: true Type: Boolean Description: = true, use T_start, otherwise h_start 
T_start 
Value: if use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start) Type: Temperature (K) Description: Start value of temperature 
h_start 
Value: if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_default Type: SpecificEnthalpy (J/kg) Description: Start value of specific enthalpy 
X_start 
Value: Medium.X_default Type: MassFraction[Medium.nX] (kg/kg) Description: Start value of mass fractions m_i/m 
C_start 
Value: Medium.C_default Type: ExtraProperty[Medium.nC] Description: Start value of trace substances 
nPorts 
Value: 0 Type: Integer Description: Number of ports 
use_portsData 
Value: true Type: Boolean Description: = false to neglect pressure loss and kinetic energy 
portsData 
Value: Type: VesselPortsData[if use_portsData then nPorts else 0] Description: Data of inlet/outlet ports 
m_flow_nominal 
Value: if system.use_eps_Re then system.m_flow_nominal else 1e2 * system.m_flow_small Type: MassFlowRate (kg/s) Description: Nominal value for mass flow rates in ports 
m_flow_small 
Value: if system.use_eps_Re then system.eps_m_flow * m_flow_nominal else system.m_flow_small Type: MassFlowRate (kg/s) Description: Regularization range at zero mass flow rate 
use_Re 
Value: system.use_eps_Re Type: Boolean Description: = true, if turbulent region is defined by Re, otherwise by m_flow_small 
use_HeatTransfer 
Value: false Type: Boolean Description: = true to use the HeatTransfer model 
height 
Value: Type: Height (m) Description: Height of tank 
crossArea 
Value: Type: Area (m²) Description: Area of tank 
p_ambient 
Value: system.p_ambient Type: AbsolutePressure (Pa) Description: Tank surface pressure 
T_ambient 
Value: system.T_ambient Type: Temperature (K) Description: Tank surface Temperature 
level_start 
Value: 0.5 * height Type: Height (m) Description: Start value of tank level 
ports 
Type: VesselFluidPorts_b[nPorts] Description: Fluid inlets and outlets 


heatPort 
Type: HeatPort_a 
system 
Type: System Description: System properties 


medium 
Type: BaseProperties 

portsData 
Type: VesselPortsData[if use_portsData then nPorts else 0] Description: Data of inlet/outlet ports 

heatTransfer 
Type: HeatTransfer 
Modelica.Fluid.Examples Model of a pumping system for drinking water 

Modelica.Fluid.Examples Simple model of a heating system 

Modelica.Fluid.Examples.Tanks Demonstrating the usage of SimpleTank 

Modelica.Fluid.Examples.Tanks Two tanks connected with pipes at different heights 

Modelica.Fluid.Examples.Tanks Show the treatment of empty tanks 

Modelica.Fluid.Examples.ControlledTankSystem Demonstrating the controller of a tank filling/emptying system 

Modelica.Fluid.Examples.Explanatory Differences between using one port with and without explicit junction model and two port sensors for fluid temperature measuring 