Skip to content

IOModule: tank-sim

The simulated I/O module for mix-tank-1. Use this module to run every mix-tank phase and recipe without physical hardware. It hosts the analog and discrete channels needed for the tank's sensors, actuators, and valves, and references the reusable agitated-tank SimulationPreset for its physics model, mapping the preset's generic address names onto this module's tag addresses via spec.simulation.addressMap.

Where to find it

System endpointSetupIO Modules → select tank-sim.

HMI screenshot pending

An annotated capture of the tank-sim detail view will be added here.

What you see

Element Meaning
Channels Per-channel name, direction, signal type, and address
Controller pharma-controller
Protocol simulation
Preset agitated-tank — supplies the behavior list
Address map Binds preset generic names to this module's tag addresses
Behaviors Inherited from the preset (Expr + ValveFeedback). Inline overrides on the IOModule win over the preset; the reference plant uses none.

Channels

Analog: tank temperature, level, headspace pressure, weight, pH, conductivity, agitator command and feedback, temperature-controller command and feedback, N₂ blanket pressure control output.

Discrete: inlet valve drive + feedback, outlet valve drive + feedback, WFI valve drive + feedback.

Properties

Property Value
Controller pharma-controller
Protocol simulation
Address sim://local
Preset agitated-tank (see 05a-simulation-presets.yaml)
Address map Defined on spec.simulation.addressMap
Namespace site-riverbend

How the simulation works

The tank's physics model lives on the agitated-tank SimulationPreset. Each tick the simulation engine evaluates the preset's behaviors (expanded at reconcile time via this IOModule's addressMap):

  1. Level integrates inlet flow (WFI + inlet valve contributions) minus outlet flow, plus measurement noise.
  2. Temperature is a first-order lag toward temp_controller.CMD with a time constant that scales with liquid volume (slower heat response on a full tank).
  3. Headspace pressure integrates the N₂ blanket contribution and vent losses against the liquid level. A full tank has less headspace volume, so pressure responds faster.
  4. pH and conductivity drift toward equilibrium values derived from the dose history (cumulative WFI + inlet volumes).
  5. Weight is level × density with noise — used as the primary termination in tank-pressurized-drain.
  6. ValveFeedback behaviors drive actuator feedback toward the command at a configurable ratePerSec.

Deterministic given a fixed seed.

Used by

  • mix-tank-1 — the unit runtime pod for the mix tank reads every tag the tank's control modules need

Try it

  1. Processriverbendpharma-areasim-cellmix-tank-1
  2. Open the level sensor faceplate and watch PV update scan-to-scan
  3. Start a recipe that uses the tank (e.g. sim-tank-blend-m1) and watch level, weight, pH, and conductivity evolve on trends
  4. Edit the agitated-tank SimulationPreset to change a physics coefficient (e.g., fill rate) and see the change reflected on the next reconcile. Or add an inline spec.simulation.behaviors entry on this IOModule to override a single tag without editing the shared preset.