MDK Module
MDK, IPSEpro’s Model Development Kit, offers all capabilities that are required to define new models and to translate them into a form that can be used by PSE. MDK consists out of two functional units: the Model Editor, and the Model Compiler.
The model editor allows the user to design icons that represent the models and to describe the model behavior mathematically.
Model Description Language
MDK provides a model description language (MDL) to describe models mathematically. MDL is intuitive since it is based on standard mathematical notations. It is closely integrated with the user interface.
Simple MDL Code Sample
f1: feed.mass = drain.mass;
f2: time_s/3600 = time_h;
f3: if abs(dt_in/dt_out) >=1.2 || abs(dt_out/dt_in) >=1.2 then
q_trans*ln(dt_in/dt_out)/(dt_in-dt_out) = htc_area
else q_trans*2.0/(dt_in+dt_out) = htc_area;
t1: test (mass >=0.0) warning "mass flow negative";
It is necessary to notice several important facts:
- In MDL the user actually writes the equation, not assignments like in traditional programming languages. Therefore it is permitted to use expressions on the left hand side.
- The sequence how the equations are written is irrelevant for the actual solution process. PSE’s solver determines the optimum solution sequence independently and according to the actual process model.
- It is allowed to use conditional statements inside an equation.
- In the example above “t1″ is a test condition. If this condition is not satisfied at the end of a solution process, PSE issues a warning
Model Compiler
MDK’s model compiler translates the model descriptions into a binary format that guarantees high performance when a process model is solved in PSE.
