modelVesselFlow

Information

It contains the equations for tracking the liquid and gas mass contained in the vessel and their thermodynamic properties, considering a complete mixing situation.
Declares inlet-outlet ports, for both gas and liquid.
The mass and enthalpy of the liquid and gas phases are calculated separately. For the mass the restriction that both phases must fill the vessel volume is introduced.
For enthalpy, the parameter lgConductance governs the enthalpy transfer between the two phases.
The model is initialized at initialLiquidMass, initialGasMass, initialP and initialT. In fact, initialT is just used in the calculation of initialLiquidEnthalpy, and initialGasEnthalpy.
InitialLiquidMass and initalGasMass are calculated from initialLiquidVolume and vesselVolume.
As the vessel volume can be unknown you can run the model with a vessel volume higher than the initialLiquidVolume, read the vessel volume from the result of the simulation, and run again the model with the real vessel volume.

Parameters

TypeNameDefaultDescription
Nozzles config
Modelica.Units.SI.HeightinletL0inlet height over lowest internal point of the vessel
Modelica.Units.SI.HeightoutletL0outlet height over lowest internal point of the vessel
Modelica.Units.SI.HeightoverflowL0overflow height over lowest internal point of the vessel
Modelica.Units.SI.HeightventOutL0overflow height over lowest internal point of the vessel
BooleanuseVentInfalse
Operations
Modelica.Units.SI.ThermalConductancelgConductance0thermal conductange at the liquid-gas interface
Initialization
SI.VolumevesselVolume1.0total volume of the vessel
SI.VolumeinitialLiquidVolume1.0initial volume of liquid in the vessel
SI.MassinitialLiquidMassinitialLiquidVolume*MediumL.density(MediumL.setState_pTX(initialP, initialT))initial vessel liquid mass
SI.MassinitialGasMass(vesselVolume - initialLiquidVolume)*MediumG.density(MediumG.setState_pTX(initialP, initialT))initial vessel gas mass
SI.TemperatureinitialT298initial temperature of the vessel liquid
SI.AbsolutePressureinitialP101325initial vessel pressure in the gas phase
Modelica.Units.SI.EnergyinitialLiquidEnthalpyinitialLiquidMass*MediumL.specificEnthalpy(MediumL.setState_pTX(initialP, initialT))
Modelica.Units.SI.EnergyinitialGasEnthalpyinitialGasMass*MediumG.specificEnthalpy(MediumG.setState_pTX(initialP, initialT))

Connectors

TypeNameDefaultDescription
FreeFluids.Interfaces.FluidPortAInlet
FreeFluids.Interfaces.FluidPortBOutlet
FreeFluids.Interfaces.FluidPortBOverflow
FreeFluids.Interfaces.FluidPortAVentIn
FreeFluids.Interfaces.FluidPortBVentOut

Components

TypeNameDefaultDescription
Modelica.Units.SI.VolumeLiquidVvolume of liquid in the vessel
Modelica.Units.SI.HeightLiquidLlevel of liquid in the vessel
Modelica.Units.SI.VolumeViTotaltotal internal volume
SI.AbsolutePressurePvessel pressure at the gas phase
SI.TemperatureTlliquid temperature, considered uniform
SI.TemperatureTggas temperature, considered uniform
MediumL.ThermodynamicStateStateLthermodynamic state of the liquid phase
MediumG.ThermodynamicStateStateGthermodynamic state of the gas medium
MediumL.SpecificEnthalpyHlspecific enthalpy of the liquid in the tank
Modelica.Units.SI.EnergyLiquidEnthalpytotal enthalpy of the liquid
MediumL.SpecificEnthalpyHgspecific enthalpy of the gas in the tank
Modelica.Units.SI.EnergyGasEnthalpytotal enthalpy of the gas
MediumL.DensityRhoLdensity of the liquid phase
MediumG.DensityRhoGdensity of the gas phase
Modelica.Units.SI.VolumeGasVvolume of gas phase in the vessel
Modelica.Units.SI.MassLiquidMassliquid mass in the vessel
Modelica.Units.SI.MassGasMassgas mass in the vessel

Contents

NameDescription
MediumL
MediumG