Decapodes: A Diagrammatic Tool for Representing, Composing, and Computing Spatialized Partial Differential Equations
Luke Morris, Andrew Baas, Jesus Arias, Maia Gatlin, Evan Patterson, James P. Fairbanks
TL;DR
Decapodes tackles the challenge of building flexible, multi-physics simulators by marrying diagrammatic physics representations with a hypergraph-based computation model and a discrete exterior calculus backend. It formalizes how to compose simpler physics components into complex multiphysics systems and automatically generate solvers from these diagrams, using category-theoretic structures to ensure correct composition and execution. Benchmarks against SU2 on conjugate heat transfer and buoyancy-driven flow demonstrate that the DEC-based solvers reproduce key physical behavior with modest errors, while highlighting runtime costs associated with explicit time stepping. The workflow promises faster, more accessible development of new multiphysics simulators and provides a framework for systematic improvements in solver generation and numerical methods.
Abstract
We present Decapodes, a diagrammatic tool for representing, composing, and solving partial differential equations. Decapodes provides an intuitive diagrammatic representation of the relationships between variables in a system of equations, a method for composing systems of partial differential equations using an operad of wiring diagrams, and an algorithm for deriving solvers using hypergraphs and string diagrams. The string diagrams are in turn compiled into executable programs using the techniques of categorical data migration, graph traversal, and the discrete exterior calculus. The generated solvers produce numerical solutions consistent with state-of-the-art open source tools as demonstrated by benchmark comparisons with SU2. These numerical experiments demonstrate the feasibility of this approach to multiphysics simulation and identify areas requiring further development.
