Batch Process—Combine Physical Models with Statecharts
A batch process is a production method in which materials are handled in defined, finite quantities (batches), typically through multiple steps such as filling, heating, reacting, cooling and draining. Industries such as pharmaceuticals, chemicals and food processing, where precision, consistency and safety are critical, use this type of processing. This example combines models of physical processes—such as fluid flow and heat transfer—with statecharts to manage event-driven actions, effectively mimicking real-world industrial process automation.
To run this example, you'll need
The latest versions of System Modeler and Mathematica.
Please make a selection:
Get afree trial Continue
with download
Create the Fluid Model
We begin by designing a fluid system that replicates the behavior of our target process system. This setup will help us understand and test key process dynamics in a controlled environment. The system consists of three tanks: the reactant tank stores the reactant, the reaction tank is where the process takes place, and the product tank collects the final product. The reaction tank is equipped with a mechanism for heating or cooling, which is controlled via an external input.
Create State Diagram
We then define the event-driven behavior of the system, which starts in an idle state. After 5 seconds, the reaction tank begins filling with reactant. Once the reactant level reaches 9 meters, the heating process is initiated. Heating continues until the temperature inside the tank reaches 300 Kelvin, at which point cooling begins. Cooling proceeds until the temperature drops to 295 Kelvin, after which the reaction tank begins to drain.
Couple State Machine with Fluid Model
The state machine governs the behavior of system components by opening and closing valves, starting and stopping pumps and activating heaters. This hybrid setup of discrete control and physical models effectively replicates real-world industrial process automation.
Wolfram System Modeler
Try
Buy
System Modeler is available in English
and Japanese
on Windows, macOS & Linux »
Questions? Comments? Contact a Wolfram expert »