Event Handling in the OpenModelica Compiler and Runtime System
2008 (English)Report (Other academic)
This paper gives an introduction and overview of problems and solutions regarding simulating hybrid DAEs (systems of Differential Algebraic Equations) with event-handling, in the context of producing such equations from models in the Modelica language. Iimplementation and measurements are done in the OpenModelica environment. The basic hybrid DAE solution algorithm is presented, followed by a discussion of handling possibly varying structure of the active part of the hybrid DAE, and how to find consistent initial values at start or restart of simulation. The problem of detecting events during continuous-time simulation is dealt with using crossing functions and an algorithm for proper integration with a numerical solver, here DASRT. Event-related aspects of code generation from models are presented, followed by an example showing how the event mechanism works. Finally, preliminary results from translating and simulating two examples models, the bouncing ball and the full wave rectifier, are presented and compared with those from a commercial simulation tool (Dymola), giving identical results.
Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press , 2008. , 21 p.
Technical reports in Computer and Information Science, ISSN 1654-7233 ; 2
Engineering and Technology
IdentifiersURN: urn:nbn:se:liu:diva-12431OAI: oai:DiVA.org:liu-12431DiVA: diva2:67