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 Paper %B SimBuild 2008 %D 2008 %T Using SPARK as a Solver for Modelica %A Michael Wetter %A Philip Haves %A Michael A. Moshier %A Edward F. Sowell %B SimBuild 2008 %C Berkeley, CA, USA %8 07/2008 %G eng %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 %0 Journal Article %J Energy and Buildings %D 2001 %T Efficient Solution Strategies for Building Energy System Simulation %A Edward F. Sowell %A Philip Haves %K building energy systems %K computational efficiency %K graph theory applications %K hvac simulation %K hvacsim+ models %K spark models %XThe efficiencies of methods employed in solution of building simulation models are considered and compared by means of benchmark testing. Direct comparisons between the Simulation Problem Analysis and Research Kernel (SPARK) and the HVACSIM+ programs are presented, as are results for SPARK versus conventional and sparse matrix methods. An indirect comparison between SPARK and the IDA program is carried out by solving one of the benchmark test suite problems using the sparse methods employed in that program. The test suite consisted of two problems chosen to span the range of expected performance advantage. SPARK execution times versus problem size are compared to those obtained with conventional and sparse matrix implementations of these problems. Then, to see if the results of these limiting cases extend to actual problems in building simulation, a detailed control system for a heating, ventilating and air conditioning (HVAC) system is simulated with and without the use of SPARK cut set reduction. Execution times for the reduced and non-reduced SPARK models are compared with those for an HVACSIM+ model of the same system. Results show that the graph-theoretic techniques employed in SPARK offer significant speed advantages over the other methods for significantly reducible problems and that by using sparse methods in combination with graph-theoretic methods even problem portions with little reduction potential can be solved efficiently.

%B Energy and Buildings %V 33 %P 309-317 %8 04/2001 %G eng %2 LBNL-45936 %& 309 %R 10.1016/S0378-7788(00)00113-4 %0 Conference Proceedings %B Building Simulation ’99 %D 1999 %T Numerical Performance of a Graph-Theoretic HVAC Simulation Program %A Edward F. Sowell %A Philip Haves %X The Simulation Problem Analysis and Research Kernel (SPARK) uses graph-theoretic techniques to match equations to variables and build computational graphs, yielding solution sequences indicated by needed data flow. Additionally, the problem graph is decomposed into strongly connected components, thus reducing the size of simultaneous equation sets, and small cut sets are determined, thereby reducing the number of iteration variables needed to solve each equation set. The improvement in computational efficiency produced by this graph theoretic preprocessing depends on the nature of the problem. The paper explores the improvement one might expect in practice in three ways. First, two problems chosen to span the range of performance are studied and some of the factors determining the performance are identified and discussed. The problem selected to exhibit a large improvement consists of a set of sparsely coupled non-linear equations. The problem selected to represent the other end of the performance spectrum is a set of equations obtained by discretizing Laplace's equation in two dimensions, e.g. a heat conduction problem. Execution time versus problem size is compared to that obtained with sparse matrix implementations of the same problems. Then, to see if the results of these somewhat contrived limiting cases extend to actual problems in building simulation, a detailed control system model of a six- zone VAV HVAC system is simulated with and without the use of cut set reduction. Execution times are compared between the reduced and non-reduced SPARK models, and with those from an HVACSIM+ model of the same system. %B Building Simulation ’99 %C Kyoto, Japan %8 09/1999 %G eng %U http://www.ibpsa.org/proceedings/BS1999/BS99_A-05.pdf %0 Conference Proceedings %B EUROSIM’98 %D 1998 %T The application of Problem Reduction Techniques Based on Graph Theory to the Simulation of Non-Linear Continuous Systems %A Philip Haves %A Edward F. Sowell %B EUROSIM’98 %C Manchester, UK %P pp. 203-207 %G eng %0 Conference Proceedings %B System Simulation in Buildings '98 %D 1998 %T Component-Based and Equation-Based Solvers for HVAC Simulation: a Comparison of HVACSIM+ and SPARK %A Philip Haves %A Edward F. Sowell %B System Simulation in Buildings '98 %C Liège, Belgium %8 12/98 %G eng