modelPartialLumpedVessel

Lumped volume with a vector of fluid ports and replaceable heat transfer model

Extends from Modelica.Fluid.Interfaces.PartialLumpedVolume (Lumped volume with mass and energy balance).

Information

This base class extends PartialLumpedVolume with a vector of fluid ports and a replaceable wall HeatTransfer model.

The following modeling assumption are made:

  • homogeneous medium, i.e., phase separation is not taken into account,
  • no kinetic energy in the fluid, i.e., kinetic energy dissipates into the internal energy,
  • pressure loss definitions at vessel ports assume incompressible fluid,
  • outflow of ambient media is prevented at each port assuming check valve behavior. If fluidlevel < portsData_height[i] and ports[i].p < vessel_ps_static[i] mass flow at the port is set to 0.

Each port has a (hydraulic) diameter and a height above the bottom of the vessel, which can be configured using the portsData record. Alternatively the impact of port geometries can be neglected with use_portsData=false. This might be useful for early design studies. Note that this means to assume an infinite port diameter at the bottom of the vessel. Pressure drops and heights of the ports as well as kinetic and potential energy fluid entering or leaving the vessel are neglected then.

The following variables need to be defined by an extending model:

  • input fluidVolume, the volume of the fluid in the vessel,
  • vessel_ps_static[nPorts], the static pressures inside the vessel at the height of the corresponding ports, at zero flow velocity, and
  • Wb_flow, work term of the energy balance, e.g., p*der(V) if the volume is not constant or stirrer power.

An extending model should define:

  • parameter vesselArea (default: Modelica.Constants.inf m2), the area of the vessel, to be related to cross flow areas of the ports for the consideration of dynamic pressure effects.

Optionally the fluid level may vary in the vessel, which effects the flow through the ports at configurable portsData_height[nPorts]. This is why an extending model with varying fluid level needs to define:

  • input fluidLevel (default: 0m), the level the fluid in the vessel, and
  • parameter fluidLevel_max (default: 1m), the maximum level that must not be exceeded. Ports at or above fluidLevel_max can only receive inflow.

An extending model should not access the portsData record defined in the configuration dialog, as an access to portsData may fail for use_portsData=false or nPorts=0.

Instead the predefined variables

  • portsData_diameter[nPorts],
  • portsData_height[nPorts],
  • portsData_zeta_in[nPorts], and
  • portsData_zeta_out[nPorts]

should be used if these values are needed.

Parameters

TypeNameDefaultDescription
SI.ReynoldsNumberRe_turbulent100cf. suddenExpansion
Assumptions › Dynamics
Types.DynamicsenergyDynamics (from PartialLumpedVolume)system.energyDynamicsFormulation of energy balance
Types.DynamicsmassDynamics (from PartialLumpedVolume)system.massDynamicsFormulation of mass balance
Types.DynamicssubstanceDynamics (from PartialLumpedVolume)massDynamicsFormulation of substance balance
Types.DynamicstraceDynamics (from PartialLumpedVolume)massDynamicsFormulation of trace substance balance
Initialization
Medium.AbsolutePressurep_start (from PartialLumpedVolume)system.p_startStart value of pressure
Booleanuse_T_start (from PartialLumpedVolume)true= true, use T_start, otherwise h_start
Medium.TemperatureT_start (from PartialLumpedVolume)if use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
Medium.SpecificEnthalpyh_start (from PartialLumpedVolume)if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
Medium.MassFraction[Medium.nX]X_start (from PartialLumpedVolume)Medium.X_defaultStart value of mass fractions m_i/m
Medium.ExtraProperty[Medium.nC]C_start (from PartialLumpedVolume)Medium.C_defaultStart value of trace substances
General › Ports
IntegernPorts0Number of ports
Booleanuse_portsDatatrue= false to neglect pressure loss and kinetic energy
Modelica.Fluid.Vessels.BaseClasses.VesselPortsDataportsDataData of inlet/outlet ports
Advanced › Port properties
Medium.MassFlowRatem_flow_nominalif system.use_eps_Re then system.m_flow_nominal else 1e2*system.m_flow_smallNominal value for mass flow rates in ports
SI.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
Assumptions › Heat transfer
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model

Connectors

TypeNameDefaultDescription
VesselFluidPorts_b[nPorts]portsFluid inlets and outlets
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPort

Components

TypeNameDefaultDescription
Modelica.Fluid.Systemsystem (from PartialLumpedVolume)System properties
SI.VolumefluidVolume (from PartialLumpedVolume)Volume
Medium.BasePropertiesmedium (from PartialLumpedVolume)
SI.EnergyU (from PartialLumpedVolume)Internal energy of fluid
SI.Massm (from PartialLumpedVolume)Mass of fluid
SI.MassmXi (from PartialLumpedVolume)Masses of independent components in the fluid
SI.MassmC (from PartialLumpedVolume)Masses of trace substances in the fluid
Medium.ExtraProperty[Medium.nC]C (from PartialLumpedVolume)Trace substance mixture content
SI.MassFlowRatemb_flow (from PartialLumpedVolume)Mass flows across boundaries
SI.MassFlowRatembXi_flow (from PartialLumpedVolume)Substance mass flows across boundaries
Medium.ExtraPropertyFlowRatembC_flow (from PartialLumpedVolume)Trace substance mass flows across boundaries
SI.EnthalpyFlowRateHb_flow (from PartialLumpedVolume)Enthalpy flow across boundaries or energy source/sink
SI.HeatFlowRateQb_flow (from PartialLumpedVolume)Heat flow across boundaries or energy source/sink
SI.PowerWb_flow (from PartialLumpedVolume)Work flow across boundaries or source term
Medium.EnthalpyFlowRate[nPorts]ports_H_flow
Medium.MassFlowRate[nPorts,Medium.nXi]ports_mXi_flow
Medium.MassFlowRatesum_ports_mXi_flowSubstance mass flows through ports
Medium.ExtraPropertyFlowRate[nPorts,Medium.nC]ports_mC_flow
Medium.ExtraPropertyFlowRatesum_ports_mC_flowTrace substance mass flows through ports
HeatTransferheatTransfer
Medium.DensityportInDensitiesDensities of the fluid at the device boundary
SI.VelocityportVelocitiesVelocities of fluid flow at device boundary
SI.EnergyFlowRateports_E_flowFlow of kinetic and potential energy at device boundary
RealsCurve parameters for port flows vs. port pressures; for further details see, Modelica Tutorial: Ideal switching devices
Realports_penetrationPenetration of port with fluid, depending on fluid level and port diameter
SI.AreaportAreas{Modelica.Constants.pi/4*portsData_diameter[i]^2 for i in 1:nPorts}
Medium.AbsolutePressurevessel_ps_staticStatic pressures inside the vessel at the height of the corresponding ports, zero flow velocity
SI.MassFlowRatem_flow_turbulent

Contents

NameDescription
HeatTransfer

Revisions

  • Jan. 2009 by Rüdiger Franke: extended with
    • portsData record and threat configurable port heights,
    • consideration of kinetic and potential energy of fluid entering or leaving in energy balance
  • Dec. 2008 by Rüdiger Franke: derived from OpenTank, in order to make general use of configurable port diameters