TutorialVersion 10.2.9
DWSIM MCP steady-state quickstart
Build and solve a small Water → Mixer flowsheet through the upstream MCP server.
Steady-state sequence
text
dwsim_flowsheet_create
→ dwsim_thermo_add_compounds
→ dwsim_thermo_set_property_package
→ dwsim_stream_add_material
→ dwsim_unitop_add
→ dwsim_unitop_connect
→ dwsim_flowsheet_check
→ dwsim_solve_run
→ dwsim_stream_get_results
→ dwsim_flowsheet_close1. Create the flowsheet and thermodynamics
text
dwsim_flowsheet_create(name="Water mixer smoke")
→ dwsim_thermo_add_compounds(flowsheet_id=..., names=["Water"])
→ dwsim_thermo_set_property_package(flowsheet_id=..., name="Steam Tables (IAPWS-IF97)")Use dwsim_thermo_list_property_packages when selecting a model. Property-package names are exact display strings.
2. Create Feed and Product
text
dwsim_stream_add_material(
flowsheet_id=...,
name="Feed",
temperature_K=298.15,
pressure_Pa=101325,
mass_flow_kg_s=1.0,
composition={"Water": 1.0}
)
dwsim_stream_add_material(flowsheet_id=..., name="Product")3. Add and connect the Mixer
text
dwsim_unitop_add(flowsheet_id=..., type="Mixer", name="M1")
dwsim_unitop_connect(
flowsheet_id=...,
unitop="M1",
feed_stream="Feed",
feed_port=0,
product_stream="Product",
product_port=0
)4. Check, solve, and inspect
text
dwsim_flowsheet_check(flowsheet_id=...)
→ dwsim_solve_run(flowsheet_id=..., timeout_s=30)
→ dwsim_stream_get_results(flowsheet_id=..., name="Product")The qualified case returned ready: true with no blockers, solve ok: true with zero errors, and Product at about 298.15 K, 101325 Pa, and 1.0 kg/s.
5. Close the flowsheet
text
dwsim_flowsheet_close(flowsheet_id=...)Close flowsheets when the client no longer needs them so the server can release associated resources.