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".
Ports and Connections
| Port Key | Type | Direction | Interface Name | Display Conditions |
|---|---|---|---|---|
0 | FLUID | input | fluid inlet | always show |
1 | FLUID | output | Fluid outlet | always 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
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Tank Volume [m³] | TankVolume | real | 15 | Effective geometric gas volume for initial inventory and transient charging/withdrawal. |
| Connection Elevation [m] | PortElevation | real | 0 | Shared connection elevation on the network datum, matching connected pipes. Individual port elevations are not modeled. |
| Low-Pressure Protection Limit [MPa(g)] | MinPressure | real | 0 | At 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)] | MaxPressure | real | 150 | At 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
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Heat Transfer Area [m²] | SurfaceArea | real | 35 | Effective area on the coefficient basis; tank-wall thermal storage is not modeled. |
| Overall Heat Transfer Coefficient Mode | HeatTransferCoefficientInputMode | choice | Fixed Value / Time Curve | Fixed or time-dependent overall coefficient for non-isothermal transients. |
| Tank Overall Heat Transfer Coefficient [W/(m²·K)] | HeatTransferRate | real | 0 | Coefficient based on tank area. Zero removes environmental exchange but flow can still change temperature. Fixed mode retains area/environment settings. |
| Overall Coefficient Curve | CurveLibraryHeatTransferCoefficientName | choice | __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 Mode | AmbientTemperatureInputMode | choice | Fixed Value / Time Curve | Choose fixed ambient temperature or a time curve. |
| Ambient Temperature [℃] | AmbientTemperature | real | 25 | Ambient tank temperature for non-isothermal transient heat transfer. |
| Ambient Temperature Curve | CurveLibraryTemperatureName | choice | __UNSELECTED__ | Select a time series for the ambient temperature outside the tank. The series must cover the transient simulation period. |
Gas and Initial Conditions
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Initial Tank Gas | InitialCompositionalFluid | choice | — | Initial tank gas, subsequently updated by port balances and inventory mixing. |
| Initial Tank Gas | InitialSimpleFluid | choice | — | Initial tank gas, subsequently updated by port balances and inventory mixing. |
| Initial Inlet State | InletStatus | choice | Open / Closed | Initial port state. Closing affects only that port; other open ports still flow. Protection closes all, and later Open restores selected ports only. |
| Initial Outlet State | OutletStatus | choice | Open / Closed | Initial 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)] | InitialPressure | real | 10 | Initial gauge pressure: open-port boundary in steady-state, initial inventory in transients. Steady-state does not evolve inventory. |
| Initial Tank Temperature [℃] | InitialTemperature | real | 25 | Initial non-isothermal tank temperature; steady-state uses it for boundaries, transients evolve it with flow/heat. Isothermal uses global temperature. |
Transient Events
| Name | key | Type | Default / Options | Description |
|---|---|---|---|---|
| Port Change Schedule | Events | table | Configure one row at a time | Future actions execute once; start/past events remain informational. Open restores selected ports only; violations keep all closed. |
| Port Change Schedule / Time | Events.time | datetime | 2026-01-01 00:00:00 | Event effective time. |
| Port Change Schedule / Inlet State | Events.InletStatus | choice | Unchanged / Open / Closed | Action at this time. Unchanged preserves actual state, including protected closure, without opening/reset. |
| Port Change Schedule / Outlet State | Events.OutletStatus | choice | Unchanged / Open / Closed | Action 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
- Connect inlet upstream and outlet downstream.
- Enter volume, elevation, and protection.
- Set gas, initial pressure/temperature, and transient heat.
- Set port states and future actions/reopening.
- Check initial pressure inside limits and boundary compatibility.
- 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 be signed port flows in m³/s and local densities. Convert both to positive inward mass flow: , , in kg/s.
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
| Condition | Port relations |
|---|---|
| Steady-state | Each open port imposes initial pressure; network determines flows independently, possibly unequal. Inventory stays initial. |
| Transient | Open ports share current tank pressure. Connection losses/elevation differences are outside scope. |
| Closed/unconnected | Zero 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.