March 13th, 2011 by Neil Roberts
Component orientated modelling provides a convienent method of clicking on components to bring up a dialog of parameters to control that components behaviour. As model size and component count increases however, it is often more desirable to collate information from several different places so that data can be controlled in a central place. Often you know what ‘component’ parameters will change regularly and which are constant such that they become ‘model’ parameters. In Dymola, component parameters can be propagated easily to a central dialog box to control the overall model behaviour. This is similar to the ‘Reference Objects’ menu in GT-POWER.
To do this graphically, all parameters dialog boxes have a arrow on the right hand side with additional options for that parameter. To use these component variables into model variables, click ‘propagate’. A series of tabbed dialog boxes allow effective creation of the Modelica code to create these as well as a translation window that will update to show the code being generated from the dialogs. Declaration tab provides dialog boxes for parameter name and type (Boolean, Interger etc) as well as a default value. Type Prefix tab allows property settings as well as declaration of causality. The annotations tab allows effective design of the dialog windows into groups and tabs for logical grouping of similar paramters as well as ‘enabling’ parameters when various Boolean or Type parameters are selected. This will enable editing of paramters when these conditions are met clarifying if a parameter is used in that system configuration.
To control models effectively Dymola also allows referencing of paramters to control dependant objects. To achieve this, click on the arrow to the right of the parameter dialog box and select ‘Insert Compoent Reference’. This allows reference of all parameters within that model level and allow sub-models. Parameters declared as protected should not be referecenced – this will display a warning of illegal modelica code when the model is translated. These can also be structured within conditional statements to ensure model behaviour. Editing multiple components in Dymola is also possible for editing of components that share common parameters by holding shift, selecting the components, right clicking and select parameters. The parameters are then common across all of these components.
Combination of all these features allow models to be constructed in a way that is both friendly and intuitive to use.