Table of Contents
Fetching ...

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.

Decapodes: A Diagrammatic Tool for Representing, Composing, and Computing Spatialized Partial Differential Equations

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.
Paper Structure (26 sections, 12 equations, 28 figures, 3 tables, 2 algorithms)

This paper contains 26 sections, 12 equations, 28 figures, 3 tables, 2 algorithms.

Figures (28)

  • Figure 1: A snapshot of the Decapodes workflow.
  • Figure 2: This recreation of Diagram FLU6-12 tonti_mathematical_2013 from Tonti's 2013 work provides a graphical representation of the Navier-Stokes equations. Nodes labeled as $\square$ do not have relevance to the physics, but are necessary to represent the geometric layout of nodes, which encodes whether quantities are in primal or dual space and time. One equation is shared between two distinct edges, and some are color-coded with dashed arrows.
  • Figure 3: The theory of two-dimensional vector calculus includes the traditional operators of multivariate calculus (\ref{['fig:diff_theory']}). $\mathbb{R}_\Gamma$ and $\mathbb{R}^2_\Gamma$ are the spaces of scalar and vector fields over a domain $\Gamma \subseteq \mathbb{R}^2$. The operators $\nabla, \nabla\cdot, \nabla\times$ are the gradient, divergence, and curl, while $f$ and $k$ represent pointwise functions applied everywhere over $\Gamma$. These operators provide a language in which to express models such as the diffusion equation (\ref{['fig:diff_diagram']}). Variables and operators in the model are typed with spaces and maps in the theory.
  • Figure 4: The four physical components used to define the advection diffusion system. The components are (a) Fick's law, (b) advection of a scalar field along a vector field, (c) conservation of mass, and (d) linear superposition of flux.
  • Figure 5: An undirected wiring diagram describing how to connect physical principles of diffusion, advection, flux superposition, and mass conservation to create a composite advection-diffusion system (\ref{['fig:pattern']}) as given by Patterson et al. patterson2022diagrammatic. This pattern can be applied to the component physics systems in Fig \ref{['fig:components']} to create the composite advection-diffusion system (\ref{['fig:adv_diff_composition']}). Note that the operation relating $T$ and $\phi_2$ is the wedge product parameterized by some fixed vector field $V$, similar to a parameterized Lie derivative.
  • ...and 23 more figures