Modelica is an object-oriented acausal modeling language that is well positioned to become a de-facto standard for expressing models of complex physical systems. To simulate a model expressed in Modelica, it needs to be translated into executable code. For generating run-time efficient code, such a translation needs to employ algebraic formula manipulations. As the SPARK solver has been shown to be competitive for generating such code but currently cannot be used with the Modelica language, we report in this paper how SPARK's symbolic and numerical algorithms can be implemented in OpenModelica, an open-source implementation of a Modelica modeling and simulation environment. We also report benchmark results that show that for our air flow network simulation benchmark, the SPARK solver is competitive with Dymola, which is believed to provide the best solver for Modelica.

%B Proc. of the 3rd SimBuild Conference %C Berkeley, CA, USA %8 08/2008 %G eng %U http://www.ibpsa.us/simbuild2008/technical_sessions/SB08-DOC-TS03-1-Wetter.pdf %2 LBNL-634E %0 Conference Proceedings %B High Performance Computing Symposium of the Advanced Simulation Technologies Conference (Society for Modeling Simulation International) %D 2004 %T Graph-Theoretic Methods in Simulation Using SPARK %A Edward F. Sowell %A Michael A. Moshier %A Philip Haves %A Dimitri Curtil %B High Performance Computing Symposium of the Advanced Simulation Technologies Conference (Society for Modeling Simulation International) %C Arlington, Virginia, USA %8 04/2004 %G eng %0 Conference Proceedings %B High Performance Computing Symposium of the Advanced Simulation Technologies Conference %D 2004 %T Graph-theoretic Methods in Simulation Using SPARK %A Edward F. Sowell %A Michael A. Moshier %A Philip Haves %X This paper deals with simulation modeling of nonlinear, deterministic, continuous systems. It describes how the Simulation Problem Analysis and Research Kernel (SPARK) uses the mathematical graph both to describe models of such systems, and to solve the embodied differential-algebraic equation systems (DAEs). Problems are described declaratively rather than algorithmically, with atomic objects representing individual equations and macro objects representing larger programming entities (submodels) in a smooth hierarchy. Internally, in a preprocessing step, graphs are used to represent the problem at the level of equations and variables rather than procedural, multi-equation blocks. Benefits obtained include models that are without predefined input and output sets, enhancing modeling flexibility and code reusability, and relieving the modeler from manual algorithm development. Moreover, graph algorithms are used for problem decomposition and reduction, greatly reducing solution time for wide classes of problems. After describing the methodology the paper presents results of benchmark tests that quantify performance advantages relative to conventional methods. In a somewhat contrived nonlinear example we show O performance as opposed %B High Performance Computing Symposium of the Advanced Simulation Technologies Conference %S Society for Modeling Simulation International %C Arlington, VA %8 04/2004 %G eng