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
| Type | Name | Default | Description |
|---|---|---|---|
| Nozzles config | |||
| Modelica.Units.SI.Height | inletL | 0 | inlet height over lowest internal point of the vessel |
| Modelica.Units.SI.Height | outletL | 0 | outlet height over lowest internal point of the vessel |
| Modelica.Units.SI.Height | overflowL | 0 | overflow height over lowest internal point of the vessel |
| Modelica.Units.SI.Height | ventOutL | 0 | overflow height over lowest internal point of the vessel |
| Boolean | useVentIn | false | |
| Operations | |||
| Modelica.Units.SI.ThermalConductance | lgConductance | 0 | thermal conductange at the liquid-gas interface |
| Initialization | |||
| SI.Volume | vesselVolume | 1.0 | total volume of the vessel |
| SI.Volume | initialLiquidVolume | 1.0 | initial volume of liquid in the vessel |
| SI.Mass | initialLiquidMass | initialLiquidVolume*MediumL.density(MediumL.setState_pTX(initialP, initialT)) | initial vessel liquid mass |
| SI.Mass | initialGasMass | (vesselVolume - initialLiquidVolume)*MediumG.density(MediumG.setState_pTX(initialP, initialT)) | initial vessel gas mass |
| SI.Temperature | initialT | 298 | initial temperature of the vessel liquid |
| SI.AbsolutePressure | initialP | 101325 | initial vessel pressure in the gas phase |
| Modelica.Units.SI.Energy | initialLiquidEnthalpy | initialLiquidMass*MediumL.specificEnthalpy(MediumL.setState_pTX(initialP, initialT)) | |
| Modelica.Units.SI.Energy | initialGasEnthalpy | initialGasMass*MediumG.specificEnthalpy(MediumG.setState_pTX(initialP, initialT)) | |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FreeFluids.Interfaces.FluidPortA | Inlet | ||
| FreeFluids.Interfaces.FluidPortB | Outlet | ||
| FreeFluids.Interfaces.FluidPortB | Overflow | ||
| FreeFluids.Interfaces.FluidPortA | VentIn | ||
| FreeFluids.Interfaces.FluidPortB | VentOut |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Volume | LiquidV | volume of liquid in the vessel | |
| Modelica.Units.SI.Height | LiquidL | level of liquid in the vessel | |
| Modelica.Units.SI.Volume | ViTotal | total internal volume | |
| SI.AbsolutePressure | P | vessel pressure at the gas phase | |
| SI.Temperature | Tl | liquid temperature, considered uniform | |
| SI.Temperature | Tg | gas temperature, considered uniform | |
| MediumL.ThermodynamicState | StateL | thermodynamic state of the liquid phase | |
| MediumG.ThermodynamicState | StateG | thermodynamic state of the gas medium | |
| MediumL.SpecificEnthalpy | Hl | specific enthalpy of the liquid in the tank | |
| Modelica.Units.SI.Energy | LiquidEnthalpy | total enthalpy of the liquid | |
| MediumL.SpecificEnthalpy | Hg | specific enthalpy of the gas in the tank | |
| Modelica.Units.SI.Energy | GasEnthalpy | total enthalpy of the gas | |
| MediumL.Density | RhoL | density of the liquid phase | |
| MediumG.Density | RhoG | density of the gas phase | |
| Modelica.Units.SI.Volume | GasV | volume of gas phase in the vessel | |
| Modelica.Units.SI.Mass | LiquidMass | liquid mass in the vessel | |
| Modelica.Units.SI.Mass | GasMass | gas mass in the vessel |
Contents
| Name | Description |
|---|---|