Declarative, Multi-physics Simulation Between Applications via Constraint Hypergraphs
John Morris, Abhishek Indupally, Satchit Ramnath, Gregory Mocko, John WagnerAbstract
To avoid the blind spots and brittleness of imperatively simulating a physical system, modelers often turn to declarative methods that can autonomously execute a model. Such solvers rely on a model structure that allows procedures for transforming inputs to outputs to be automatically discovered. However, the model structures used for traditional declarative solvers are insular, in that they are often isolated to specific modeling domain. Furthermore, these specific model types are unable to be understood by the advanced computing applications required to simulate complex systems. Here we provide a general purpose modeling framework that can integrate software functionalities into the declarative simulation of a model, offering for the first time the ability to define a multi-physics, multi-scale system independent of its eventual simulation. This is accomplished by representing a system as a constraint hypergraph. System models are deconstructed into state variables and relationships in the graph. The APIs of external tools are integrated into the model as inter-variable functions. By encoding these functionalities in the graph, a solver is able to autonomously arrange these relations into executable simulation processes, enabling fully declarative simulation. This is demonstrated by integrating the capabilities of three software platforms together into a single model of a crankshaft from a piston engine: solid geometry (Onshape), structural mechanics (Ansys Mechanical), and kinematic analysis (MATLAB). The result is a holistic modeling framework that allows for flexible simulation of a complex system, integrates directly with otherwise sequestered platforms, and reveals cross-cutting interactions between system elements.