.ClaRa.UsersGuide.GettingStarted

Information

Model Design Principles

For an early introduction to the library concepts see our publication.

When setting up the model of a complex physical system such as a power plant, the first question to be answered is what physical fidelity is needed to cope with the given simulation task. The answer to this question refers to the level of detail necessary for each component and sub-process. The next step is to define the general physical effects to be considered for solving the given task. Finally, the level of physical insight into the considered physical aspects must be chosen. In what follows it will be explained how these three stages guide the model design of the ClaRa library. For illustration the concept will be applied to the well known example of a fluid flow in a pipe.

Levels of Detail

The ClaRa library is intended to contain models at different levels of detail. It is mainly based on two criteria:

The model design of ClaRa has been inspired by these ideas. Moreover, it aims to provide a well balanced combination of readability, modelling ?exibil- ity and avoidance of code duplication. Consequently, each component in the ClaRa library is represented by a family of freely exchangeable models. Every component family is grouped into four levels of detail:

Physical Effects to be Considered

Once the decision for a specific detail group of models is made, the set of required physical effects to be covered by a model may still differ according to the simulation goal. For instance, in a pipe model it might be necessary to resolve the spatial flow properties but unnecessary to analyse sound waves in detail. This is reflected in the complexity of the basic physical equations underlying the model.

Notice that, although the ClaRa library is designed for dynamic simulations, it is still possible to include models, where parts of the basic physical equations correspond to the stationary behaviour of a component. Such models are often favourable with respect to computation time and stability. Their use is appropriate whenever certain aspects of the component dynamics can be neglected compared to the system dynamics under consideration. In the pipe example above this would be manifested by the fact that if only fluid flow properties (temperature profile, flow velocities, etc.) are of interest, sound wave propagation can be neglected, as long as the flow velocity is much less than the speed of sound. Consequently a stationary momentum balance for the fluid would be sufficient in this case.

In order to cope with these different needs, the ClaRa library provides component models at the same level of detail but covering different physical effects. They are distinguished by different self explaining names.

Level of Insight

By now, the fundamental equations of a model are defined by setting its level of detail and the physical effects of consideration. However, these equations declare which physical effects are considered, but not how they are considered. For instance, the pressure loss in a pipe may be modelled using constant nominal values or via correlations taking the flow regime and the fluid states into account. These physical effects are therefore modelled in replaceable models that complete the fundamental equations using predefined interfaces, e.g. the friction term in the momentum balance. By separating the governing model definition from the underlying submodels, the flexibility of the model is enhanced without loosing readability.

Further information can be found on the library's homepage www.claralib.com.


Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos