Skip to main content

Two-Port Tank

A finite storage volume installed in series. Ports open independently and can flow simultaneously. Actual inflow/outflow imbalance updates inventory, pressure, and composition over time.

Component Appearance and Location​

Expand Storage Tank in component library on the left and find "Dual Port Jar".

Created with Fabric.js 5.3.0

Ports and Connections​

Port KeyTypeDirectionInterface NameDisplay Conditions
0FLUIDinputfluid inletalways show
1FLUIDoutputFluid outletalways show

Typically connect inlet upstream and outlet downstream. Positive inlet flow enters; positive outlet flow leaves. Negative values reverse each convention. Use a Measurement Instrument for measurements and Port Change Schedule for actions.

Parameter List​

Equipment Specifications

NamekeyTypeDefault / OptionsDescription
Tank Volume [m³]TankVolumereal15Effective geometric gas volume for initial inventory and transient charging/withdrawal.
Connection Elevation [m]PortElevationreal0Shared connection elevation on the network datum, matching connected pipes. Individual port elevations are not modeled.
Low-Pressure Protection Limit [MPa(g)]MinPressurereal0At or below this transient pressure, all ports latch closed. A later Open event after recovery releases only selected ports; violations relatch. This is protection, not a pressure target. Equal limits leave no open interval.
High-Pressure Protection Limit [MPa(g)]MaxPressurereal150At or above this transient pressure, all ports latch closed. A later Open event after recovery restores only selected ports; violations relatch. It does not clamp tank pressure.

Thermal Calculation

NamekeyTypeDefault / OptionsDescription
Heat Transfer Area [m²]SurfaceAreareal35Effective area on the coefficient basis; tank-wall thermal storage is not modeled.
Overall Heat Transfer Coefficient ModeHeatTransferCoefficientInputModechoiceFixed Value / Time CurveFixed or time-dependent overall coefficient for non-isothermal transients.
Tank Overall Heat Transfer Coefficient [W/(m²·K)]HeatTransferRatereal0Coefficient based on tank area. Zero removes environmental exchange but flow can still change temperature. Fixed mode retains area/environment settings.
Overall Coefficient CurveCurveLibraryHeatTransferCoefficientNamechoice__UNSELECTED__Select a time series for the overall heat transfer coefficient. The coefficient applies to this tank's heat transfer area, and the series must cover the transient simulation period.
Ambient Temperature ModeAmbientTemperatureInputModechoiceFixed Value / Time CurveChoose fixed ambient temperature or a time curve.
Ambient Temperature [℃]AmbientTemperaturereal25Ambient tank temperature for non-isothermal transient heat transfer.
Ambient Temperature CurveCurveLibraryTemperatureNamechoice__UNSELECTED__Select a time series for the ambient temperature outside the tank. The series must cover the transient simulation period.

Gas and Initial Conditions

NamekeyTypeDefault / OptionsDescription
Initial Tank GasInitialCompositionalFluidchoice—Initial tank gas, subsequently updated by port balances and inventory mixing.
Initial Tank GasInitialSimpleFluidchoice—Initial tank gas, subsequently updated by port balances and inventory mixing.
Initial Inlet StateInletStatuschoiceOpen / ClosedInitial port state. Closing affects only that port; other open ports still flow. Protection closes all, and later Open restores selected ports only.
Initial Outlet StateOutletStatuschoiceOpen / ClosedInitial port state. Closing affects only that port; other open ports still flow. Protection closes all, and later Open restores selected ports only.
Initial Tank Pressure [MPa(g)]InitialPressurereal10Initial gauge pressure: open-port boundary in steady-state, initial inventory in transients. Steady-state does not evolve inventory.
Initial Tank Temperature [℃]InitialTemperaturereal25Initial non-isothermal tank temperature; steady-state uses it for boundaries, transients evolve it with flow/heat. Isothermal uses global temperature.

Transient Events

NamekeyTypeDefault / OptionsDescription
Port Change ScheduleEventstableConfigure one row at a timeFuture actions execute once; start/past events remain informational. Open restores selected ports only; violations keep all closed.
Port Change Schedule / TimeEvents.timedatetime2026-01-01 00:00:00Event effective time.
Port Change Schedule / Inlet StateEvents.InletStatuschoiceUnchanged / Open / ClosedAction at this time. Unchanged preserves actual state, including protected closure, without opening/reset.
Port Change Schedule / Outlet StateEvents.OutletStatuschoiceUnchanged / Open / ClosedAction at this time. Unchanged preserves actual state, including protected closure, without opening/reset.

Parameter Guidance​

  • Volume/elevation/state. Enter gas volume and shared port elevation datum. Select matching gas and initial gauge pressure. Non-isothermal uses initial temperature; isothermal uses global temperature.
  • Protection. Low/high MPa(g) limits require an open interval; either threshold latches both ports during transient initialization/runtime.
  • Environmental heat transfer. Applies during non-isothermal transients. Use the same area basis for the heat transfer area and overall coefficient. Choose a fixed value or time curve separately for coefficient and ambient temperature. Curves must cover the calculation interval.
  • Actions. Set each initial state. Future rows contain time, inlet, and outlet states (open, closed, unchanged), with at least one action per row. Use one row per time, ordered after start. Initial state uses panel; only later actions execute.

Enter Environmental Curves​

For each input configured as a Time Curve, choose Edit Local Curve to enter time and value pairs on the tank or Reference Curve Database to select a named curve of the same type. Use W/(m²·K) for overall heat transfer coefficient and °C for ambient temperature. Both curves enter the tank energy balance only in non-isothermal transients. Choose a curve source.

Modeling Steps​

  1. Connect inlet upstream and outlet downstream.
  2. Enter volume, elevation, and protection.
  3. Set gas, initial pressure/temperature, and transient heat.
  4. Set port states and future actions/reopening.
  5. Check initial pressure inside limits and boundary compatibility.
  6. Inspect port flow, net mass inflow, pressure, temperature, inventory, composition, and protection.

View Results​

  • Ports. Inspect actual state, MPa(g), °C, standard Nm³/h, and actual m³/h. Unconnected ports show Unconnected, zero flow, and tank-side pressure/temperature.
  • Totals. Total inflow/outflow and net charging use kg/s. Positive transient net flow adds inventory; negative removes it. Steady-state totals describe boundary flows. Standard inventory uses Nm³.
  • Protection/heat. Check both states and whole-tank protection; environmental heat input kW helps interpret isolated temperature changes.

Saved State​

Continuation preserves actual states, protection, and event progress. New initial-field loading retains physical inventory, pressure, temperature, and composition, rebuilds operations from target start/panel states, and rechecks protection.

Professional Theory​

Two-Port Flow and Inventory​

Fixed volume and uniform state follow Supply Tank Inventory and Pressure.

Let qin,qoutq_{\mathrm{in}},q_{\mathrm{out}} be signed port flows in m³/s and ρin,ρout\rho_{\mathrm{in}},\rho_{\mathrm{out}} local densities. Convert both to positive inward mass flow: f0=ρinqinf_0=\rho_{\mathrm{in}}q_{\mathrm{in}}, f1=−ρoutqoutf_1=-\rho_{\mathrm{out}}q_{\mathrm{out}}, in kg/s.

m˙in,tot=∑i=01max⁡(fi,0),m˙out,tot=∑i=01max⁡(−fi,0),dmdt=m˙in,tot−m˙out,tot.\dot m_{\mathrm{in,tot}}=\sum_{i=0}^{1}\max(f_i,0), \qquad \dot m_{\mathrm{out,tot}}=\sum_{i=0}^{1}\max(-f_i,0), \qquad \frac{\mathrm{d}m}{\mathrm{d}t}=\dot m_{\mathrm{in,tot}}-\dot m_{\mathrm{out,tot}}.

The first two terms are total inflow/outflow. Negative outlet flow counts as inflow; negative inlet flow as outflow. Transient mass change is their difference. At fixed temperature/composition, larger volume gives slower pressure change for the same net mass flow.

Shared Pressure and Protection​

ConditionPort relations
Steady-stateEach open port imposes initial pressure; network determines flows independently, possibly unequal. Inventory stays initial.
TransientOpen ports share current tank pressure. Connection losses/elevation differences are outside scope.
Closed/unconnectedZero flow; closed isolates, unconnected is sealed.

At transient initialization/runtime, either limit latches both ports closed. An initial violation keeps specified pressure in a closed field. Independent steady-state only warns and follows panel states.

After pressure returns inside limits, a later explicit Open action releases the latch, opening only specified ports. Unchanged retains the current state. If pressure still violates limits, both close again.

Enthalpy Flow and Mixing​

Non-isothermal transients follow Supply Tank Energy Balance, summing actual port enthalpy flows. Inflow uses network enthalpy; outflow uses tank state. Zero net mass flow can still change energy if enthalpies differ. Environmental heat continues with both closed.

Mixing follows Molar Inventory. Convert each incoming mass flow with its own molar mass. Both outgoing ports use tank composition. Equal inflow/outflow can keep mass stable while composition gradually changes.

Applicability and Limits​

  • Buffer volume. Use transients for inventory, pressure buffering, and composition; steady-state checks connections and initial pressure.
  • Lumped model. Uniform state excludes stratification, local flow, connection resistance, and wall storage.
  • Bidirectional. Add Check Valves for one-way branches.

Common Inspections​

  • Unexpected inventory. Confirm transients and convert local flows with local density before comparing mass.
  • Steady-state conflict. Check both open boundaries against initial tank pressure and wiring/states.
  • Only one reopens. Check explicit actions; Unchanged preserves closure. If neither opens, check pressure.
  • Stable inventory but changing temperature/composition. Check incoming gas/enthalpy and environmental exchange.