Simulation Notes Europe, Volume 24(1), April 2014

PDE Modeling with Modelica via FMI Import of HiFlow3 C++ Components

Simulation Notes Europe SNE 24(1), 2014, 11-20
DOI: 10.11128/sne.24.tn.10223

Abstract

Despite an urgent need and desire in academia as well as in industry for modeling Partial Differential Equations (PDEs) using the increasingly popular Modelica modeling and simulation language, there is limited support for this available at the moment. In this work, we propose a solution based on importing PDE models with PDE solvers implemented using the general-purpose parallel finite element library HiFlow3 as models into the Modelica environment using the standard Functional Mock-up Interface. In contrast to methods based on language extensions or automatic semidiscretizations in space, this approach requires no change to the language, and enables the use of specialized PDE solvers. Furthermore, it allows for full flexibility in the choice of geometry, model parameters, and space discretization between simulation runs without recompilation needed. This makes it possible to exploit advanced features of the PDE solver, such as adaptive mesh refinement, and to build complex multi-physics simulations by coupling different models, of both PDE and DAE type, in a straightforward manner using Modelica. We illustrate our method with an example that couples a Modelica Proportional-Integral-Derivative controller to a PDE solver for the unsteady heat equation in a 3D domain.