Assimulo - a Python package for solving differential equations with interface to equation based languages
Christian Andersson, Claus F¨ uhrer Johan ˚ Akesson
LCCC workshop Lund September 2012
Lund University / Modelon AB, 2012 1
Assimulo - a Python package for solving differential equations with - - PowerPoint PPT Presentation
Assimulo - a Python package for solving differential equations with interface to equation based languages Christian Andersson, Claus F uhrer Johan Akesson LCCC workshop Lund September 2012 Lund University / Modelon AB, 2012 1 Lets
Christian Andersson, Claus F¨ uhrer Johan ˚ Akesson
Lund University / Modelon AB, 2012 1
Lund University / Modelon AB, 2012 2
◮ highly complex models ◮ high robustness standards ◮ high documentation standards ◮ long life cycle
◮ a few, low scale test models ◮ lab standard quality (validation of concept) ◮ good analyzed algorithms, poor code documentation ◮ short life cycle, often coupled on individual career steps.
Lund University / Modelon AB, 2012 3
Lund University / Modelon AB, 2012 4
◮ Give the academic world access to complex models −
◮ Give the industrial world access to a variety of ODE/DAE
◮ Give students in scientific computing an intuitive access to
Modeling Software Export using an
Import into an open simulation environment
Dymola Simpack SimulationX JModelica.org etc...
Functional Mock-up Interface (FMI) PyFMI together with Assimulo Lund University / Modelon AB, 2012 5
◮ Model interface The equations are evaluated and the model interaction
◮ Model description The variable information of the model is contained in
◮ Additional data Model data, such as tables and maps may also exists.
Lund University / Modelon AB, 2012 6
◮ Open-source language ◮ Interpreted ◮ Object-oriented ◮ Many freely available packages
◮ NumPy ◮ SciPy ◮ Matplotlib ◮ Cython
◮ Highly flexible for interfacing to
◮ Ideal in teaching.
Lund University / Modelon AB, 2012 7
◮ problems formulated as first or second order ordinary
◮ problems formulated as implicit ordinary differential equations
Lund University / Modelon AB, 2012 8
◮ Explicit hybrid ODEs
◮ Implicit hybrid ODEs (also called DAEs)
◮ Mechanical systems in second order explicit ODE form
◮ Mechanical systems in (overdetermined) implicit ODE form
◮ Delay (retarded) differential equations.
Lund University / Modelon AB, 2012 9
◮ IDA - Multistep method for DAEs ◮ CVode - Multistep methods for ODEs ◮ ODASSL - Multistep methods for overdetermined DAEs ◮ RADAU5 - Runge–Kutta method for DAEs ◮ GLIMDA - General linear methods methods for DAEs ◮ and we are working on a ”solver museum” (oldest code in
Lund University / Modelon AB, 2012 10
Problem Solver
Implicit ODE Explicit ODE IDA CVODE GLIMDA ODASSL DOPRI5 RODAS LSODAR RADAU5 RADAU5 Explicit ODE (2nd order)
GGL
Implicit ODE Overdetermined Newmark HHT-alpha methods
Functional Mock-up Unit
ASSIMULO
Lund University / Modelon AB, 2012 11
Lund University / Modelon AB, 2012 12
Lund University / Modelon AB, 2012 13
Lund University / Modelon AB, 2012 14
Lund University / Modelon AB, 2012 15
◮ Are there discontinuities? ◮ State/Time events? ◮ Are there linear components? ◮ What are differential, what are algebraic variables? (”loop
◮ Derivatives?
Lund University / Modelon AB, 2012 16
M e t r i c s t
42 Compiler N u m e r i c s u p p
t Sparsity structure
(Sorry G¨
Lund University / Modelon AB, 2012 17
◮ Would like to stimulate to open the FMI for a wider range of
◮ Continue to expand the solvers available in Assimulo
◮ Work on the museum. ◮ Introduce problem formulation for delay differential equations ◮ Generalize solvers for discontinuity handling
◮ Potentials of language/compiler aided numerics. ◮ Automatic differentiation: a separate tool or an integrated
Lund University / Modelon AB, 2012 18
◮ Assimulo www.assimulo.org ◮ PyFMI www.pyfmi.org
Lund University / Modelon AB, 2012 19