Built an MCP server over DWSIM's .NET API with 26 structured tools, so a language model can build flowsheets, set stream and unit-op conditions, and run the solver directly, cutting design iteration from minutes to seconds.
Validated the server on a 46-unit maleic anhydride plant built entirely through the tool calls, converging the mass balance to 80% butane conversion.
Diagnosed a silent thermodynamic failure where Peng-Robinson converged to a physically wrong answer (activity coefficient ~100 for the water/heavy-alkane pair), which looked like a solved flowsheet but wasn't.
Switched the separations section to UNIQUAC while keeping Peng-Robinson for the gas-phase reactor, cutting water carryover from 4.8 to 0.7 mol/s and fixing the mass balance.
REACTION
2 C4H10+7 O2→2 C4H2O3+8 H2O
n-butane + oxygen → maleic anhydride + water
Feed Conditioning // Compressor + Mixer, 285 kPa
S-01: Butane feed
72.0 °C
925 kPa
16,001 kg/h
S-04: Air feed
25.0 °C
101 kPa
253,041 kg/h
S-07: Reactor feed
145.5 °C
285 kPa
269,042 kg/h
Fig. The actual flowsheet inside DWSIM: every unit op, stream, and duty (kW) as built and solved through the MCP server.
Fig. Maleic anhydride flowsheet summary, with the Peng-Robinson/UNIQUAC finding.