## MDK: Model Development Kit

MDK, IPSEpro's Model Development Kit, is a programming environment that offers all the capabilities required to define and build new component models and to translate them into a form that can be used by IPSEpro's Process Simulation Environment - PSE.

MDK consists of two functional units: **MDK Model Editor** and **MDK Model Compiler**.

The Model Editor allows the user to design icons that represent the models and to describe their behavior mathematically.

## Model Editor

The Model Editor allows the user to design icons that represent the models and to describe their behavior mathematically. MDK Model Editor makes use of a model description language provided by IPSEpro.

## Model Description Language - MDL

MDK provides a Model Description Language (MDL) to describe models mathematically. MDL is highly intuitive due to the fact that it is based on standard mathematical notations. MDL is closely integrated with MDK's 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"; |

### Important facts about MDL:

- In MDL the user actually writes 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 Model Compiler translates the model descriptions written via the Model Editor in MDL into a binary format that guarantees high performance when a process model is solved in IPSEpro's Process Simulation Environment PSE.

Contact us for testing IPSEpro!