modelExpansionTank_1Port
Extends from TRANSFORM.Fluid.Interfaces.Records.Medium_fluid.
Information
Liquid tank under a cover gas at pressure p_surface, with one port at its bottom. The port pressure is p_surface plus the liquid head over level + dheight, where dheight is any height between the tank bottom and the port.
When the port connects directly to a component that holds a pressure (a volume, or a pipe end that exposes its state), that pressure ties the tank's level and temperature to it, and a tool keeps only some of them as states. With a free start (massDynamics=DynamicFreeInitial), the tank may then start from the other component's start pressure instead of its own start values. Start the tank with massDynamics=FixedInitial and that component with massDynamics=DynamicFreeInitial, or join the two through a flow resistance.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Area | A | Cross-sectional area | |
| SI.Volume | V0 | 0 | Volume at zero level |
| Real | g_n | Modelica.Constants.g_n | |
| SI.Length | dheight | 0 | Elevation change in addition to liquid level (e.g., pipe connected to port) |
| Advanced | |||
| Boolean | allowFlowReversal | true | = true to allow flow reversal, false restricts to design direction |
| Initialization | |||
| SI.Pressure | p_start | 1e5 | |
| SI.Length | level_start | Start level | |
| Boolean | use_T_start | true | |
| SI.Temperature | T_start | 293.15 | |
| SI.SpecificEnthalpy | h_start | Medium.specificEnthalpy_pTX(p_start, T_start, X_start) | |
| Advanced › Dynamics | |||
| Dynamics | massDynamics | Dynamics.DynamicFreeInitial | Formulation of mass balances |
| Dynamics | traceDynamics | massDynamics | Formulation of trace substance balances |
| Initialization › Start Value: Species Mass Fraction | |||
| SI.MassFraction[Medium.nX] | X_start | Medium.X_default | Mass fraction |
| Initialization › Start Value: Trace Substances | |||
| SItf.ExtraProperty[Medium.nC] | C_start | fill(0, Medium.nC) | Mass-Specific value |
| Advanced › Heat Transfer | |||
| Boolean | use_HeatPort | false | =true to toggle heat port |
| Advanced › Trace Mass Transfer | |||
| Boolean | use_TraceMassPort | false | =true to toggle trace mass port |
| Real[Medium.nC] | MMs | fill(1, Medium.nC) | Conversion from fluid mass-specific value to moles (e.g., molar mass [kg/mol] or Avogadro's number [atoms/mol]) |
| Visualization | |||
| Boolean | showName | true | = true to show the component name on the icon |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| TRANSFORM.Fluid.Interfaces.FluidPort_State | port | Fluid connector a (positive design flow direction is into port) | |
| HeatAndMassTransfer.Interfaces.HeatPort_State | heatPort | ||
| HeatAndMassTransfer.Interfaces.MolePort_State | traceMassPort |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Pressure | p_surface | p_start | Liquid surface/gas pressure |
| Medium.ThermodynamicState | state_liquid | Thermodynamic state of the liquid | |
| SI.Length | level | Liquid level | |
| SI.Volume | V | Liquid volume | |
| SI.Mass | m | Liquid mass | |
| SI.InternalEnergy | U | Liquid internal energy | |
| Medium.SpecificEnthalpy | h | Liquid specific enthalpy | |
| Medium.AbsolutePressure | p | Bottom pressure | |
| SI.Mass[Medium.nXi] | mXi | Species mass | |
| SItf.ExtraPropertyExtrinsic[Medium.nC] | mC | Trace substance extrinsic value | |
| SI.MassFraction[Medium.nXi] | Xi | Structurally independent mass fractions | |
| SItf.ExtraProperty[Medium.nC] | C | Trace substance mass-specific value | |
| SI.MassFlowRate[Medium.nXi] | mXib | Species mass flow rates source/sinks within volumes | |
| SItf.ExtraPropertyFlowRate[Medium.nC] | mCb | Trace flow rate source/sinks within volumes (e.g., chemical reactions, external convection) | |
| SI.HeatFlowRate | Q_gen | 0 | Internal heat generation |
| SItf.ExtraPropertyFlowRate[Medium.nC] | mC_gen | fill(0, Medium.nC) | Internal trace mass generation |