There are two different ways that models developed in Dymola can be used with other models developed in Simulink. You can either export the Dymola model to Simulink or you can import the Simulink model in to Dymola. These methods enable the powerful component orientated physical modelling capabilities of Dymola to be coupled up to the established control system orientated modelling approach used in Simulink.
This Dymola option enables models developed in Dymola to be compiled as C-Mex S-functions for use in Simulink. This enables the powerful physical modelling capabilities of Dymola to be combined with the controls orientated approach of Simulink.
The first step to enable the generation of an S-function is to add input and output signals to the top-level of the Dymola model. These signals define the information that will be exchanged with the rest of the Simulink model.
Once the model is built, you switch to Simulink and open the Dymola Block library. This contains the Dymola interface block which is simply dragged in to the Simulink model. Double clicking on the block produces a dialog box which enables the user to select the model from Dymola and compile it as an S-function.
This same dialog also allows the user to change the parameters and initial conditions once the model has been compiled. These can be changed without having to re-compile the s-function.