Add DWSIM dynamic events and inspect transients
Discover property ids, apply a timed inlet-flow step, preview the transient, and interpret dynamic-run results.
1. Discover the event property
dwsim_dynamics_properties(
flowsheet_id=...,
tag="Inlet",
filter="Mass Flow"
)In the qualified case, PROP_MS_2 was the overall inlet mass-flow property and its display unit was kg/h. Read the current value and units before constructing an event.
2. Add a timed step
dwsim_dynamics_event(
flowsheet_id=...,
action="add",
schedule="inlet-step",
tag="Inlet",
property="PROP_MS_2",
value=7200,
units="kg/h",
at_s=300,
transition="step",
description="Double inlet mass flow"
)The initial monitored value was 3600 kg/h. The event changed it to 7200 kg/h at 300 s.
3. Run from a stored baseline
dwsim_dynamics_check(flowsheet_id=..., schedule="inlet-step")
→ dwsim_dynamics_run(flowsheet_id=..., schedule="inlet-step", wait=true)The qualified run completed with 121 recorded steps, no run errors, and a tank-level increase from about 0.0010 m to 0.9037 m.
4. Preview only the data you need
dwsim_dynamics_series(
run_id=...,
variables=["T1 Liquid Level", "Inlet Mass Flow"],
max_points=35
)The decimated preview showed the mass-flow step after 300 s and a corresponding increase in the slope of tank level. Use dwsim_dynamics_export when you need the complete time series.
5. Use analysis and diagnostics deliberately
dwsim_dynamics_analyze reports transient metrics such as overshoot, rise time, settling time, and error integrals. dwsim_dynamics_diagnose is intended for solver failures, divergence, oscillation, saturation, overly large integration steps, and reversed controller action.
Warning
A successful event/run path does not qualify PID tuning or every dynamic unit model. SDAI's current qualification covers the Water tank transient and timed inlet-flow event only.