1. The Plant Model¶
A training simulator is only as good as the plant behind it. This page explains what a flowsheet needs to behave like a plant in dynamic mode, and walks through the sample separator you will use in the rest of the course.
What you will learn
- How DWSIM's dynamic mode moves material: holdups set pressures, valves set flows
- Which properties each object needs before the OTS can use it
- The layout, controllers, gauges and saved state of the sample plant
Prerequisites
- You have built and solved a steady-state flowsheet before (Beginner track)
- You know what a PID controller and a set point are
How dynamic mode works¶
In steady state, every object computes its outlet from its inlet once. In dynamic mode the flowsheet is integrated in time with a fixed step, and two kinds of objects share the work:
- Holdups (separators, tanks, pumps, heaters, coolers, heat exchangers, reactors) accumulate mass and energy. Their pressure comes from what they hold; they write that pressure to the streams around them.
- Valves turn a pressure difference into a flow through the Kv equation:
W = f(Kv(opening), P1, P2, fluid). The flow they compute is written to the streams on both sides.
A stream between a holdup and a valve therefore has a pressure given by the holdup and a flow given by the valve. Feed and product streams that touch nothing on one side keep the specification you give them: a fixed pressure (a header) or a fixed flow.
flowchart LR
F1[Feed 1<br/>flow fixed] --> FV[FV-001<br/>Kv valve]
FV --> SG[SG-01<br/>separator holdup]
SG -->|gas| PV[PV-001<br/>Kv valve]
SG -->|liquid| LV[LV-001<br/>Kv valve]
PV --> P4[4<br/>1 atm]
LV --> P6[6<br/>1 atm]
What happens where two valves meet
Two valves in series, or valves feeding a mixer or a splitter, leave a stream between them with no holdup to set its pressure. Page 11 covers the pressure-flow network solver that the OTS runs for those cases. The sample plant has none, so nothing changes for it.
What every object needs¶
| Object | Needed for the OTS | Where to set it |
|---|---|---|
| Separator, tank | Volume, Height, an initial content (the holdup is created from the inlet on the first step if empty) | Object editor, Dynamics tab |
| Valve | Kv (or Cv), the opening/Kv relationship, optional actuator time constant and delay; calculation mode Kv (general), Kv (liquid), Kv (gas) or Kv (steam) |
Object editor |
| Pump | Flow Conductance, Volume; Rated Speed and Target Speed so a trip can stop it; optional inertia and motor torque for coast-down | Dynamics tab |
| Heater, cooler | Fixed-duty mode if the operator will set the duty; Volume | Object editor, Dynamics tab |
| PID controller | Controlled variable, manipulated variable (usually a valve opening), gains, set point | Object editor |
| Gauges (analog, digital, level) | The monitored object and property, the units, and the LL / L / H / HH alarm limits | Object editor |
| Material streams | Dynamics specification: Pressure for streams a holdup will govern or for headers, Flow for fixed feeds |
Stream editor, Dynamics section |
| Schedule and integrator | A schedule with an integrator, a step (5 s in the sample), an initial flowsheet state | Dynamics Manager |
Save an initial state
The OTS restores the schedule's initial state every time a session starts fresh. Store one with Dynamics > Store Flowsheet State (or the toolbar button) after the plant has settled, and select it in the schedule. Without it, each run starts wherever the last one ended.
The sample plant¶
Open ots_separator.dwxmz. It is small on purpose: every screen, scenario and trip in the course fits on one page.

| Tag | Object | Role |
|---|---|---|
| 1 | Material stream | Feed header at 5 bar, pressure-specified: air, carbon dioxide, water and methanol at about 274 K, two-phase |
| FV-001 | Valve, Kv (general) | Feed valve, Kv 2.7, 50 % open; the feed flow follows its opening (about 0.08 kg/s) |
| SG-01 | Gas-liquid separator | 1 m³, 2 m tall; holds pressure and level |
| PV-001 | Valve, Kv (gas) | Gas outlet to a 1 atm header (stream 4) |
| LV-001 | Valve, Kv (liquid) | Liquid outlet to a 1 atm header (stream 6) |
| PID-012 | PID controller | Separator pressure (bar) through PV-001 opening; set point 2 bar |
| PID-013 | PID controller | Liquid level (m) through LV-001 opening; set point 0.3 m |
| PIT-001 | Analog gauge | Separator pressure in kPa; alarms LL 100, L 150, H 400, HH 450 |
| LIT-001 | Level gauge | Separator liquid level in m; alarms LL 0.15, L 0.25, H 0.4, HH 0.5 |
| FI-001, FI-002, FI-003 | Digital gauges | Feed, gas and liquid flows in kg/h |
Dynamics setup: schedule schedule1 with integrator 1, step 5 s, initial state a (the plant settled at 2 bar and 0.3 m). Both controllers are reverse acting: an outlet valve opens when its variable is above the set point.
A first dynamic run without the OTS¶
Before the instructor takes over, see the plant move by itself:
- Make sure dynamic mode is on (the Dynamics toolbar toggle).
- Open the Dynamics Manager, check that
schedule1is selected and its initial state isa. - Press the integrator's Run button. Watch PIT-001 and LIT-001 on the flowsheet for a minute of simulated time, then stop.
The level loop is aggressive (Kp 40) and the pressure loop is slow (Kp 4, Ki 0.01). Both are on purpose: they give a trainee something to do.
Preparing your own plant¶
When you bring your own flowsheet to the OTS, go through this list once:
- Solve it in steady state first. A dynamic run needs a consistent starting point.
- Give every holdup a volume and a height. Vessels default to zero volume, which produces immediate pressure spikes.
- Put every control valve in a Kv mode and enter a realistic Kv: the steady-state sizing tool on the valve gives you one.
- Set the stream specifications:
Flowon fixed feeds,Pressureeverywhere else. - Add a gauge for every variable the trainee must see, with alarm limits.
- Run the integrator for a few minutes of simulated time and store the state as the initial state.
- Save the file.
The next page opens the Instructor Station on this plant.