A framework for implementation-independent simulation models
2006 (English)In: Simulation (San Diego, Calif.), ISSN 0037-5497, Vol. 82, no 9, 563-579 p.Article in journal (Refereed) Published
Mathematical modeling and the simulation of complex physical systems is a central activity in engineering. The models are the result of large investments in time and measurement equipment and therefore need to be used as efficiently as possible. If one and the same model can be run in several simulation environments and in other applications, then the model can be simulated today and tomorrow in the most appropriate environment with respect to user background, the engineering domain at hand, and more. Modern equation-based modeling languages provide this functionality in principle since the models are translated into executable code by separate model compilers. These compilers today generate code for standalone simulation using a fixed interface toward a number of numerical solvers. What is missing is a compiler that can generate customized code for various simulation environments, where the generated code interfaces with other models in the environment through the conventional solution of powerports. Each port holds both input and output variables such as force and velocity. A compiler architecture is proposed in this article. Also, an implementation for a subset of the Modelica language is demonstrated in the case of two widely different simulation environment targets. The model ports are adapted initially to the simulation environment characteristics in terms of the variables part of the ports, and an input-output causality is found for which the model can be solved and that suits the environment. The equation system is optimized, and information such as Jacobians, assignments, and more is generated in the XML format. Finally, code generators specific for each environment are employed that create the final executable code. © 2006 The Society for Modeling and Simulation International.
Place, publisher, year, edition, pages
2006. Vol. 82, no 9, 563-579 p.
Causality, Code generation, Compiler, DAE, Modelica, Simulation, XML
Engineering and Technology
IdentifiersURN: urn:nbn:se:liu:diva-50140DOI: 10.1177/0037549706071902OAI: oai:DiVA.org:liu-50140DiVA: diva2:271036