Modia is a Julia package to model and simulate physical systems (electrical, mechanical, thermo-dynamical, etc.) described by differential and algebraic equations. A user defines a model on a high level with model components (such as a mechanical body, an electrical resistance, or a pipe) that are physically connected together. A model component is constructed by "expression = expression" equations. The defined model is symbolically processed, JIT compiled and simulated with Sundials IDA solver with the KLU sparse matrix package. By this approach it's possible and convenient to build models with hundred thousands of equations describing the dynamics of a car, an airplane, a power plant, etc. and simulate them. The authors used previous experience from the design of the modeling language Modelica (
www.Modelica.org) to develop Modia.
In the presentation it is shown how a user can build models and simulate physical systems, including mechanical systems and electrical circuits. Furthermore, the design of Modia is sketched: The Modia language is a domain specific extension of Julia using macros. With graph theoretical algorithms, some of them recently developed by the authors, equations are pre-processed (including analytic differentiation if necessary) and transformed into a special form that can be simulated by IDA. Hereby the sparsity structure of the original (Modia) equations, as well as the nature of array equations are kept intact.