This example is interactive. Click the play button on any cell to execute it, or run all cells in sequence.

Process Flowsheet: Mixer → Heater → CSTR

A simple process combining multiple unit operations into a flowsheet:

  1. Mixer — blends a fresh feed stream with a recycle-like second stream
  2. Heater — brings the mixed stream to reactor inlet temperature
  3. CSTR — exothermic first-order reaction A → products with cooling jacket

This demonstrates how PathSim-Chem blocks compose into multi-unit simulations, inspired by the reactor front-end of MiniSim's Cumene Process.

Python
Loading...

System Setup

Fresh feed: 0.05 m³/s at 300 K with 2.0 mol/m³ reactant A
Second stream: 0.05 m³/s at 310 K (simulating a warm recycle)
Heater: 200 kW duty to preheat the mixed stream
CSTR: 1 m³ reactor, first-order Arrhenius kinetics, cooled by a 290 K jacket

Python
Loading...

Wiring the Flowsheet

Feed 1 (F₁, T₁) ─┐
                   ├─ Mixer ─── Heater ─── CSTR ─── Products
Feed 2 (F₂, T₂) ─┘     ↑         ↑          ↑
                         │         Q          T_coolant

Note: The CSTR's internal flow rate F is set at construction. Here the mixer's output flow is used for monitoring, while the CSTR uses its own F=0.1 parameter for residence time.

Python
Loading...
18:18:23 - INFO - LOGGING (log: True)
18:18:23 - INFO - BLOCKS (total: 13, dynamic: 1, static: 12, eventful: 0)
18:18:23 - INFO - GRAPH (nodes: 13, edges: 16, alg. depth: 3, loop depth: 0, runtime: 0.264ms)
18:18:23 - INFO - STARTING -> TRANSIENT (Duration: 100.00s)
18:18:23 - INFO - --------------------   1% | 0.0s<0.3s | 3647.6 it/s
18:18:23 - INFO - ####----------------  20% | 0.1s<0.2s | 4489.2 it/s
18:18:23 - INFO - ########------------  40% | 0.1s<0.1s | 4629.9 it/s
18:18:23 - INFO - ############--------  60% | 0.2s<0.1s | 4859.9 it/s
18:18:23 - INFO - ################----  80% | 0.2s<0.0s | 4233.5 it/s
18:18:23 - INFO - #################### 100% | 0.3s<--:-- | 3668.9 it/s
18:18:23 - INFO - FINISHED -> TRANSIENT (total steps: 1001, successful: 1001, runtime: 276.07 ms)

Results: Temperature Profile Through the Plant

Track the temperature at each stage: after mixing, after heating, and inside the reactor.

Python
Loading...

Steady-State Summary

Python
Loading...
Process Steady State
=============================================
Unit             Flow [m³/s]      T [K]
---------------------------------------------
Fresh feed              0.05      300.0
Second stream           0.05      310.0
Mixer outlet          0.1000     305.00
Heater outlet         0.1000     305.48
CSTR outlet                —     305.46

Reactor C_A = 1.9452 mol/m³ (feed = 2.0 mol/m³)
Conversion = 2.7%

The mixer blends both feeds to an intermediate temperature (~305 K). The heater raises it further. The CSTR then reaches a steady state where the exothermic reaction heat is balanced by cooling jacket removal, and the conversion depends on the residence time and Arrhenius rate.