modelPartialTankUndirected

Partial Tank model for media that are partial gas and incompressible liquid. Supports undirected flows

Information

To complete the partialTank, equations for total tank volume V, centreOfMass, staticHeadInlets, staticHeadOutlets, staticHeadRears and staticHeadFores needs to be provided.

This separation is made to make it easy to implement arbitrary geometries. In this component, medium.p is interpreted as the pressure at the liquid surface.

This Volume is the parent class for Accumulator and Receiver models that separate the two phases and are able to output gas, liquid or two-phase medium, depending on its liquid level and the height of the outlet. Numerical stiffness is handled as in VolumeFlex.

Since there is no formula to compute density_derp_h for this volume, an upper bound has to be set in the parameter density_derp_h_set. Alternativeley the derivative can be taken from the media model for all the media that implement the corresponding formula by setting density_derp_h_from_media=true (default:false).

Beware: This is a new addition to the library. It may be subject to design reconsiderations in future versions

Parameters

TypeNameDefaultDescription
BooleanuseHeatportfalseIf true heatport is added
SI.AreaA1Contact area of volume with medium
SI.CoefficientOfHeatTransferU200Heat transfer coefficient to medium
Medium.AbsolutePressurep_ref1e5Reference pressure of tank when volume is measured
SI.BulkModulusK5e7Bulk modulus of tank (used also for stiffness modulation)
Initialization
Booleaninitialize_pressuretrueIf true: initialize Pressure
Medium.AbsolutePressurep_startMedium.p_defaultInitial Pressure
Booleaninitialize_energyfalseInitialize specific inner energy with temperature or specific enthalpy condition
Medium.TemperatureT_startMedium.T_defaultInitial Temperature
Booleanuse_hstartfalseTrue: specific enthalpy condition instead of Temperature
Medium.SpecificEnthalpyh_startMedium.h_defaultInitial specific enthalpy
Booleaninitialize_XifalseIf true: initialize mass fractions
Medium.MassFraction[Medium.nXi]Xi_0Medium.X_default[1:Medium.nXi]Initial mass fraction
Booleaninitialize_LiquidMasstrueIf true: initialize with mass of the liquid medium component. Initialize_Xi must be false.
SI.MassM_liq_start0Initial mass of the liquid
Advanced
Utilities.Units.InertanceLdropOfCommons.LInertance at inlet and outlet
Medium.MassFlowRatem_flow_assert-dropOfCommons.m_flow_regAssertion threshold for negative massflows
BooleanusePreferredMediumStatesfalseUse medium states instead of the ones differentiated in this component
Medium.MassFlowRatem_flow_regdropOfCommons.m_flow_regRegularization threshold of mass flow rate
SI.LengthoutletTransition0.01Width of band for smooth transition between gas and liquid at outlet
BooleanchaoticLifefalseAllows small gas bubbles to go from inlet through liquid even if staticHead is positive, experimental. Large increase in simulation time.
SI.VolumegasBubbleVolume0.0001Tuning parameter for size of gas bubbles
Advanced › Damping
Realk_volume_dampingdropOfCommons.k_volume_dampingDamping factor multiplicator
General › Geometry
SI.Length[3]tankCenter{0, 0, 0}Position of the tank center
IntegerN_inlets2Number of inlets
IntegerN_outlets2Number of outlets
IntegerN_rears2Number of rears
IntegerN_fores2Number of fores
SI.Length[N_inlets,3]inletPositions{{0, 0, 0} for i in 1:N_inlets}Positions of all inlets
SI.Length[N_outlets,3]outletPositions{{0, 0, 0} for i in 1:N_outlets}Positions of all outlets
SI.Length[N_rears,3]rearPositions{{0, 0, 0} for i in 1:N_rears}Positions of all rears
SI.Length[N_fores,3]forePositions{{0, 0, 0} for i in 1:N_fores}Positions of all fores

Components

TypeNameDefaultDescription
ThermofluidStream.Interfaces.Inlet[N_inlets]inlet
ThermofluidStream.Interfaces.Outlet[N_outlets]outlet
Undirected.Interfaces.Rear[N_rears]rear
Undirected.Interfaces.Fore[N_fores]fore
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPort
Medium.BasePropertiesmedium
SI.VolumeV
SI.VolumeV_liquid
SI.VolumeV_refVolume of the tank at p_ref
SI.MassMV*medium.d
SI.Mass[Medium.nXi]MXiM*medium.Xi
SI.EnergyU_medM*medium.u
SI.HeatFlowRateQ_flow
SI.PowerW_v
SI.Length[3]centreOfMass
SI.Length[N_inlets]staticHeadInletsdistance perpendicular to liquid surface
SI.Length[N_outlets]staticHeadOutletsdistance perpendicular to liquid surface
SI.Length[N_rears]staticHeadRearsdistance perpendicular to liquid surface
SI.Length[N_fores]staticHeadForesdistance perpendicular to liquid surface
SI.Pressure[N_inlets]staticHeadInlets_Pa_relativerelative pressure to liquid surface
SI.Pressure[N_outlets]staticHeadOutlets_Pa_relativerelative pressure to liquid surface
SI.Pressure[N_rears]staticHeadRears_Pa_relativerelative pressure to liquid surface
SI.Pressure[N_fores]staticHeadFores_Pa_relativerelative pressure to liquid surface
Real[3]normAccModelica.Math.Vectors.normalize(acceleration.a)

Contents

NameDescription
MediumMedium model

Revisions

Author: Ingela Lind, M Sc, Ph D, Technical Fellow, Simulation and Thermal Analysis, Vehicle Systems, SAAB Aerosystems, 2024