Skip to content

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 endpointEquipment LibraryPhases → select tank-pressurized-drain.

graph TD
    Start([initial]) --> IS[isolate]
    IS -->|"NOT inlet.FB"| PR[pressurize]
    PR --> PH[pressure_hold]
    PH -->|"T &gt;= pressurize_time<br/>AND pressure &gt;= 80% drain_pressure"| OD[open_drain]
    OD -->|"outlet.FB"| DR[draining]
    DR -->|"weight &lt;= target_weight<br/>AND pressure &gt;= 50% drain_pressure"| CD[close_drain]
    CD -->|"NOT outlet.FB"| DP[depressurize]
    DP -->|"T &gt;= vent_time"| CS[confirm_safe]
    CS -->|"pressure &lt;= 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:

  1. isolate closes the inlet, stops the agitator, and captures initial_weight. Waits for inlet.FB = FALSE.
  2. pressurize writes drain_pressure to pressure_controller.SP.
  3. pressure_hold waits until both the timer has elapsed AND the actual pressure has reached 80 % of target.
  4. open_drain opens the outlet and waits for outlet.FB = TRUE.
  5. draining holds until the load cell reads PV <= target_weight AND the headspace pressure is still ≥ 50 % of target. The AND guards against a false "drain complete" when a depressurization stalls the flow.
  6. close_drain closes the outlet and waits for outlet.FB = FALSE.
  7. depressurize writes 0 to pressure_controller.SP and holds for vent_time.
  8. confirm_safe verifies pressure is at or below drain_pressure AND the outlet is confirmed closed before complete.

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

  1. HMI endpointBatch Execution+ Newsim-pressurized-drain-m1Start
  2. Click into the phase detail and watch the active step advance
  3. Open Data endpointTrends and chart pressure_sensor.PV, pressure_controller.SP, weight_sensor.PV, and outlet_valve.CMD on one view
  4. Observe the pressure ramp during pressure_hold, the weight drop during draining, and the pressure bleed during depressurize