Phase Template: tank-pressurized-drain¶
Pressurize the tank with N₂ and drain under pressure while monitoring
weight. Use this phase to empty a vessel faster than gravity drain
when head pressure is insufficient, or when the downstream line
requires positive-pressure push. The phase closes the inlet for
isolation, stops the agitator, brings headspace up to drain_pressure
via the N₂ blanket PID, opens the outlet, and watches the load-cell
weight to decide when the drain is complete.
Where to find it¶
System endpoint → Equipment Library → Phases → select tank-pressurized-drain.
graph TD
Start([initial]) --> IS[isolate]
IS -->|"NOT inlet.FB"| PR[pressurize]
PR --> PH[pressure_hold]
PH -->|"T >= pressurize_time<br/>AND pressure >= 80% drain_pressure"| OD[open_drain]
OD -->|"outlet.FB"| DR[draining]
DR -->|"weight <= target_weight<br/>AND pressure >= 50% drain_pressure"| CD[close_drain]
CD -->|"NOT outlet.FB"| DP[depressurize]
DP -->|"T >= vent_time"| CS[confirm_safe]
CS -->|"pressure <= drain_pressure<br/>AND NOT outlet.FB"| Done([complete])
See Phases for the diagram conventions.
What you see when it runs¶
| Element | Meaning |
|---|---|
| Active step | isolate, pressurize, pressure_hold, open_drain, draining, close_drain, depressurize, confirm_safe — the chart is strictly linear |
| Shared variables | initial_weight captured on entry for drain tracking |
| PID activity | pressure_controller.SP is written to drain_pressure during pressurize and 0 during depressurize; watch the loop respond |
HMI screenshot pending
An annotated capture of a running tank-pressurized-drain phase
during the draining step will be added here.
Parameters¶
| Parameter | Type | Unit | Range | Default | Required |
|---|---|---|---|---|---|
drain_pressure |
REAL | bar | 0.2-3.0 | — | yes |
target_weight |
REAL | kg | 5-100 | — | yes |
pressurize_time |
TIME | — | 5s-1m |
15s |
no |
vent_time |
TIME | — | 5s-30s |
10s |
no |
TIME parameters take duration strings ("45s", "1m30s", "5m"),
not bare numbers.
Required control modules¶
| Role | Module type | Description |
|---|---|---|
pressure_controller |
analog-control | N₂ blanket pressure controller |
pressure_sensor |
analog-sensor | Tank headspace pressure measurement |
outlet_valve |
discrete-valve | Tank outlet valve (on/off) |
weight_sensor |
analog-sensor | Tank weight (load cell) measurement |
inlet_valve |
discrete-valve | Tank inlet valve — closed as isolation during pressurization |
agitator |
analog-control | Tank agitator — stopped during pressurized drain |
Capability: mixing.
How it works¶
Each scan the SFC engine advances through a strictly linear chart with feedback-gated transitions:
isolatecloses the inlet, stops the agitator, and capturesinitial_weight. Waits forinlet.FB = FALSE.pressurizewritesdrain_pressuretopressure_controller.SP.pressure_holdwaits until both the timer has elapsed AND the actual pressure has reached 80 % of target.open_drainopens the outlet and waits foroutlet.FB = TRUE.drainingholds until the load cell readsPV <= target_weightAND the headspace pressure is still ≥ 50 % of target. The AND guards against a false "drain complete" when a depressurization stalls the flow.close_draincloses the outlet and waits foroutlet.FB = FALSE.depressurizewrites0topressure_controller.SPand holds forvent_time.confirm_safeverifies pressure is at or belowdrain_pressureAND the outlet is confirmed closed beforecomplete.
This is a level-guard phase. The primary termination for drain is the weight sensor, and a timer only backstops it. The multi-step holding, stopping, aborting, and resetting charts walk the vessel through ordered depressurization on every hand-off so the operator never inherits a pressurized, sealed tank.
Pair with hardware-limit alarms on level and pressure, and set a
timeoutSeconds backstop. See
Phases § Level-guard phase.
Used in recipes¶
Try it¶
- HMI endpoint → Batch Execution → + New →
sim-pressurized-drain-m1→ Start - Click into the phase detail and watch the active step advance
- Open Data endpoint → Trends and chart
pressure_sensor.PV,pressure_controller.SP,weight_sensor.PV, andoutlet_valve.CMDon one view - Observe the pressure ramp during
pressure_hold, the weight drop duringdraining, and the pressure bleed duringdepressurize