Instrumentation: transmitters and controllers on the canvas — a PENG-ROBINSON process flowsheet
Field instruments are first-class wireable nodes here, not annotations. A flow transmitter and a pressure transmitter sit in the line, pass their stream through completely unchanged, and report their reading on a signal wire — a distinct edge kind that carries information rather than material — to a controller. In this let-down station the FT reads the 200 mol/s flowing through it and the PT reads the 20 bar downstream of the control valve. Each controller compares its reading against a setpoint and reports the measurement, the setpoint and its output. These two controllers are report-only, deliberately. Neither has an OUTPUT wire, so nothing is written back and the flowsheet solves once — this is the instrumentation and measurement layer on its own. Give a controller an output wire plus an output_param and the same machinery becomes a genuine closed loop: the output is written into the manipulated variable and the flowsheet re-converged through a Wegstein outer loop. Bounded: a signal edge never carries material, so it can never affect a mass or energy balance — which is exactly why a transmitter is safe to insert anywhere in a working flowsheet. The steady-state controller is proportional by default and therefore keeps a genuine offset (it converges the self-consistent operating point, not the setpoint); integral removes that offset. Derivative action needs a time history a single steady-state solve does not have.
192 views 0 forks
- Rigorous PENG-ROBINSON thermodynamics, solved by the same engine every simulation runs on.
- 4 unit operations modeled: FT, CV, PT, 2× PIC.
- Focus areas: Instrumentation, Control, Transmitter, Signal, Automation.
- Thermodynamics
- PENG-ROBINSON
- Components
- methane, ethane
- Unit operations
- FTCVPT2× PIC
Opens in a new tab, loaded straight into the app — no setup.
Read the step-by-step guideReproduce this exact result from Python — the real client.get_example() → run_and_wait() path, not a mockup.
from flowsim.sdk import FlowSimClient
client = FlowSimClient()
example = client.get_example("instrument-loop")
sim = client.create_simulation(example["title"], example["flowsheet"])
result = client.run_and_wait(sim["id"])
print(result["status"]) # "converged"
streams = client.streams(sim["id"])Related models
Pressure-controlled cooling-water header
A distribution header held at pressure by a control valve, rather than a valve with a pressure typed into it. A pressure transmitter reads the header downstream of the distribution line, a controller compares it with the 4.5 bar setpoint, and its output is written back into the valve — the flowsheet is re-converged until the manipulated variable and the measurement agree. What makes it a real loop rather than a tautology is the line between them. The transmitter sits 180 m downstream, so the valve cannot simply be set to the setpoint: it has to sit above it by exactly whatever the line is losing, and the controller has to find that. Solved here, it lands at 462.1 kPa at the valve for 450.0 kPa at the header — a 12.1 kPa line loss it was never told about — in 5 control passes. The controller runs in integral mode, so the steady-state offset a proportional-only controller would leave is driven to zero: the header sits at the setpoint to the last significant figure, not near it. One detail worth copying if you build your own: the pipeline carries an explicit molar_mass. Darcy-Weisbach needs mass density and ThermoPkg.density returns mol/m³, so a line without it inflates its pressure drop by roughly 1/M — about 55x for water. It warns, but the warning is easy to miss, and 12 kPa became 587 kPa while this example was being built. Bounded: steady state, so this finds the operating point a controller settles at, not the transient getting there — no overshoot, no settling time, no derivative action. Those live in the dynamic engine. The consumer splits are fixed fractions, so this demonstrates pressure control, not flow redistribution when a user throttles.
Industrial steam boiler with capacity control
A natural-gas-fired water-tube boiler raising 50 t/h of steam at 42 bar and 400 C, with its three circuits and its capacity control on one flowsheet. Fuel: methane at 3 bar to the windbox. Combustion air / flue gas: an FD fan and a regenerative air preheater feed the burner at 15% excess air; the flame (adiabatic, 2252 K) then gives up its heat to the radiant evaporator, the superheater, the economizer and the air preheater in turn, and leaves the stack at 377 K with 3.0% O₂ dry. Steam: deaerated feedwater is pumped to 48 bar, warmed in the economizer, boiled in the evaporator and separated in the drum; saturated steam is superheated to 672.2 K and 2% is blown down. Capacity control: a steam-flow controller (FIC, integral action) sets the firing rate to hold the steam demand, a ratio station keeps combustion air at 15% excess, and the drum-level balance makes feedwater equal steam plus blowdown. At design it fires 49.92 mol/s of fuel (40.0 MW LHV); the evaporator takes 25.3 MW, the economizer 7.7 MW and the superheater 5.7 MW, for a direct efficiency of 96.7% LHV / 87.1% HHV. The heat-transfer banks are rated by UA, so a change of load redistributes the heat instead of reproducing it: run the sensitivity (70-100% load) and the superheat falls from 673 K to 605 K at 70%. Property method: pr-steam, Peng-Robinson for the gas with IAPWS-95 steam tables for pure water; plain Peng-Robinson puts 18% too little heat in the superheater. Bounds: no radiation or casing loss (a real boiler loses 1-2%, so efficiency reads high, and more so at part load); no dissociation in the flame; the radiant section is a fixed-UA exchanger, which overstates its absorption at deep turndown; no attemperator; and level and ratio control are the steady-state balances, not dynamic loops.
Geothermal flash-steam power plant (~90 MW)
A single-flash geothermal power plant on the IAPWS steam tables. A liquid-dominated geothermal well arrives at 240 °C / 35 bar and flashes across a separator down to 8 bar: about 15% of the brine becomes saturated steam and the rest is reinjected. The steam drives a condensing turbine to a 10 kPa vacuum (82% isentropic, exhaust quality ~0.9 — a real wet-steam expansion), a water-cooled condenser drops it to ~46 °C condensate, and a hotwell pump lifts it for reinjection alongside the brine. It converges to 89.9 MW of turbine shaft power. The separator (flash) pressure is the plant's key design knob: the defaultSensitivity sweeps it, trading a larger steam fraction at low pressure against higher steam enthalpy at high pressure — the flash-pressure optimization every single-flash geothermal plant makes. It runs on the rigorous IAPWS-95 water properties (steam package), and the turbine tracks steam quality into the two-phase dome rather than assuming a dry expansion.
District-heating stratified thermal store (charge and discharge)
A stratified hot-water thermal energy store on a district-heating loop, shown at one operating point in both directions. The charge leg sends 90 °C supply water through the store, which is standing at four layers of 350 / 335 / 320 / 305 K (hottest on top): the water exhausts in contact with the coldest layer and leaves at 305 K, so the whole 85 K drop goes into the store. The discharge leg draws 30 °C network return through the same store and takes it from the hottest layer, leaving at 350 K. That asymmetry is the entire reason to stratify — a fully mixed store holding the same energy would deliver its 328 K average. The blocks report the stored energy above the 300 K floor, the state of charge over the 300-360 K window, the standing loss through an 80 W/K vessel, and the time to full or empty at the current net rate. Honest scope: this is a steady-state picture — the store's layers do not move within a solve, and the two legs are drawn as separate blocks on one store. The transient (how far the thermocline travels over a six-hour charge, and what outlet temperature the morning discharge actually delivers as the hot layers are consumed) is the Thermal energy storage analysis tool.
Data center cooling: 1 MW IT load on warm-water free cooling
A 1 MW data hall cooled the way modern halls are: a warm-water loop — chilled-water supply at 27 °C rather than the legacy 7 °C — picks up the IT heat (10 K rise at 24 kg/s), hands it across a plate exchanger to a condenser-water loop, and an evaporative cooling tower rejects all of it to an 18 °C wet bulb with a 6 K approach. No chiller runs: that is free cooling, and it is only possible because the supply is warm — a 7 °C loop cannot be served by a tower whose water cannot get below the wet bulb plus its approach, which is the whole reason the industry moved to warm-water and ASHRAE's wider allowable envelopes. The tower reports the numbers a data-center operator is judged on: 24.6 mol/s (0.44 kg/s) of evaporation and 32.8 mol/s of makeup water at four cycles of concentration — the water-usage effectiveness (WUE) story. Sweep the IT load and watch the makeup water scale with it. Honest scope: the IT load is a specified duty (no per-rack or airflow model); both loops are drawn open, supply to return, where a plant recirculates with makeup; the tower is a heat and water balance with a Merkel characteristic, not a fill-vendor rating; and a thermal_storage block on the chilled loop would give the ride-through buffer a real hall carries for a chiller or tower trip.
Propane (R-290) heat pump heating a hydronic loop
A single-stage vapor-compression heat pump delivering heat to a space-heating water loop — the same cycle as a refrigerator, read from the hot end. Propane evaporates at 4.7 atm (273 K, an air- or ground-source evaporator at 0 °C), is compressed to 21 atm (condensing at 333 K, 60 °C) and condenses against the heating water in a real two-sided exchanger, so the delivered heat is a water stream you can read: 40 °C return warmed to 58 °C. A small makeup feed and purge close the refrigerant mass balance around the recycle, as in the refrigeration examples. Two numbers define the machine: 74 kW delivered for 21 kW of compressor work, a heating COP of 3.5 — 63% of the Carnot limit for this 60 K lift at the compressor's 0.75 isentropic efficiency. Read COP on the flowsheet as the user variable cop_heating, or sweep the condensing pressure: from 18 to 27 atm the COP falls 3.8 → 3.1 as the lift grows, the trade every heat pump makes between water temperature and electricity. Honest scope: the compressor is a fixed isentropic efficiency, the condenser outlet is a specified subcooling, and there is no defrost, part-load or refrigerant-charge model. Below ~18 atm the specified 326 K condenser outlet sits above saturation and the cycle stops condensing — the sweep starts where the physics does.