A lumped fixed-volume gas/liquid separator
Model Description and References
This unit separates the phases of a condensable medium flow. It can operate at fixed temperature (heatPort=false), adiabatically (heatPort=true) or with heat dissipation models with appropriate units connected to the heat port.
Note that all ports have the same pressure, and to achieve physically meaningful results it will most often be necessary to connect them to a valve or other flow resistance unit before flushing to a constant-pressure reservoir.
Two output signals for level and pressure are provided, since these are the values that typically control the output flows.
In case of reverse flow, the feed port's (mid_port) height can be adjusted with feedHeight to set whether it will output liquid or gas depending on the liquid level in the separator.
If the separator runs out of liquid or overflows, the compositions and enthalpy of the liquid viz. the gas outlet will eventually change to the other phase; the transition interval depend on the pipeHeight parameter.
Governing Equations
V_gas = m*medium.beta/medium.d_gas;
V_liq = m*(1 - medium.beta)/medium.d_liq;
level = V_liq/V;
port_top.Xi_outflow = smoothStep(V_gas/V - pipeHeight, medium.X_gas[1:Medium.nXi], medium.X_liq[1:Medium.nXi], pipeHeight);
port_mid.Xi_outflow = smoothStep(V_liq/V - feedHeight, port_top.Xi_outflow, port_bottom.Xi_outflow, pipeHeight);
port_bottom.Xi_outflow = smoothStep(V_liq/V - pipeHeight, medium.X_liq[1:Medium.nXi], medium.X_gas[1:Medium.nXi], pipeHeight);
port_top.h_outflow = smoothStep(V_gas/V - pipeHeight, medium.h_gas, medium.h_liq, pipeHeight);
port_mid.h_outflow = smoothStep(V_liq/V - feedHeight, port_top.h_outflow, port_bottom.h_outflow, pipeHeight);
port_bottom.h_outflow = smoothStep(V_liq/V - pipeHeight, medium.h_liq, medium.h_gas, pipeHeight);
| Quantity | Description |
V_gas | Gas volume |
V_liq | Liquid volume |
port_mid | Two-phase inlet |
port_top | Gas outlet at the top |
port_bottom | Liquid outlet at the bottom |
Parameters
| Name | Type | Unit | Default | Description |
useHeatPort | Boolean | 1 | false | = true, if heatPort is enabled (inherited) |
T | Modelica.Units.SI.Temperature | K | 293.15 | Fixed device temperature if useHeatPort = false (inherited) |
energyDynamics | Modelica.Fluid.Types.Dynamics | - | system.energyDynamics | Formulation of energy balance (inherited) |
massDynamics | Modelica.Fluid.Types.Dynamics | - | Modelica.Fluid.Types.Dynamics.FixedInitial | Formulation of mass balance (inherited) |
substanceDynamics | Modelica.Fluid.Types.Dynamics | - | massDynamics | Formulation of substance balance (inherited) |
traceDynamics | Modelica.Fluid.Types.Dynamics | - | massDynamics | Formulation of trace substance balance (inherited) |
p_start | Medium.AbsolutePressure | Pa | system.p_start | Start value of pressure (inherited) |
use_T_start | Boolean | 1 | true | = true, use T_start, otherwise h_start (inherited) |
T_start | Medium.Temperature | K | if use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start) | Start value of temperature (inherited) |
h_start | Medium.SpecificEnthalpy | J/kg | if use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_default | Start value of specific enthalpy (inherited) |
X_start | Medium.MassFraction[Medium.nX] | 1 | Medium.X_default | Start value of mass fractions m_i/m (inherited) |
C_start | Medium.ExtraProperty[Medium.nC] | - | Medium.C_default | Start value of trace substances (inherited) |
V | Modelica.Units.SI.Volume | m3 | 1E-3 | Separator total volume |
feedHeight | Real | 1 | 0.5 | Relative vertical placement of feed, used for reverse flow |
pipeHeight | Real | 1 | 0.05 | Relative width of the inlet/outlet pipes compared to separator height |
Interfaces and Connections
| Name | Kind | Type | Unit | Description |
port_mid | Connection | Modelica.Fluid.Interfaces.FluidPort_a | Pa; kg/s; J/kg | Two-phase inlet |
level | Output signal | Modelica.Blocks.Interfaces.RealOutput | - | |
p | Output signal | Modelica.Blocks.Interfaces.RealOutput | - | |
port_top | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | Gas outlet at the top |
port_bottom | Connection | Modelica.Fluid.Interfaces.FluidPort_b | Pa; kg/s; J/kg | Liquid outlet at the bottom |
heatPort | Connection | Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | K; W | Conditional heat port |
fluidVolume | Input signal | Modelica.Units.SI.Volume | m3 | Volume |