Show the leaderboard, simulation GIFs, and/ or Decapode diagrams by selecting options at the top menu.

What is a Decapode?

The Diffusion DecapodeA Decapode multiphysics diagram encoding diffusion

A Decapode is a diagram of a system of multiphysics equations. That's all you need to know to start if you are a physicist looking to model fluid flow, or a chemist looking to model the reaction of some chemical species. However, people familiar with graph theory can understand these as something like directed acyclic graphs (DAGs), where nodes are physical quantities, and edges are operators that relate them. People familiar with category theory will suspect that diagram carries a connotation of composability of morphisms. That is, an arrow from A to B, and an arrow from B to C, can be understood as an arrow from A to C in its own right. People even more familiar with category theory can understand these as copresheaves from some category acting like a database schema. Or, as people familiar with Catlab.jl will understand them, as a certain type of Acset.

What makes constructing Decapodes fast?

Constructing Decapodes is fast because you specify them exactly how you write your PDEs written in the Discrete Exterior Calculus.

For example, we can write the equations for the Brusselator reaction like so:


 # Here, we declare our variables.

 (U, V)::Form0       # State variables.
 (U2V, One)::Form0   # Named intermediate variables.
 (U̇, V̇)::Form0       # Tangent variables.
 (γ, β, α)::Constant # Scalars.
 F::Parameter        # Time-varying parameter.

 # These equations relate our physical quantities.

 U2V == (U .* U) .* V

 U̇ == One + U2V - (γ * U) + (α * Δ(U)) + F
 V̇ == (β * U) - U2V + (α * Δ(U))

 # These equations specify the derivatives with
 # respect to time of our state variables.

 ∂ₜ(U) == U̇
 ∂ₜ(V) == V̇

Constructing complex multiphysics systems from simpler, component systems is fast because we use the technique of operadic composition. That is, we can construct complex multiphysics systems by declaring variables which are shared between components:

A climate model composition patternA composition diagram involving a Budyko-Sellers component, a melting component, a warming component, and a Halfar ice dynamics component.

Rather than slowing us down, having formal descriptions of multiphysics diagrams enables us to develop models more quickly by providing all the information that you need to encode your multiphysics upfront.

What makes Decapodes simulations fast?

Decapodes' operators are implemented as matrix-vector multiplications or kernel operations. This is a property of the Discrete Exterior Calculus. Compounding on this, the auto-generated simulations consist of performant Julia code, and interface nicely with Julia packages like DifferentialEquations.jl:


 CahnHilliard = @decapode begin
   C::Form0
   (D, γ)::Constant
   ∂ₜ(C) == D * Δ(C.^3 - C - γ * Δ(C))
 end
 
 sim = evalsim(CahnHilliard)
 f = sim(sd, nothing);
 
 # u₀ contains initial conditions.
 prob = ODEProblem(f, u₀, (0, 200), constants)
 soln = solve(prob, Tsit5());
 

What makes Decapodes accurate?

Decapodes are written in the Discrete Exterior Calculus (DEC). In the DEC, discrete operators obey the same useful laws that they obey in the continuous case. One is that the exterior derivative, d, exhibits the property that dd = 0. This is sometimes called mimesis.

What makes Decapodes iterable?

Decapodes are written in an embedded domain-specific language (eDSL). You do not have to worry about time spent in developing a simulator for your new model because Decapodes.jl will automatically generate the simulation code for you! This allows an applied scientist to iterate through the scientific method: creating a hypothesis model and then seek to validate (or invalidate) it quickly.

Furthermore, a Decapodes simulation generalizes over any well-constructed mesh. Once you define your physics, you can run your automatically-generated simulation on the plane, the sphere, the teapot, and so on.

What is the Decapodes Leader Board?

I created the Decapodes Leader Board (DLB) as a hobby project to keep track of models that we built. However, we soon recognized that the DLB captured the essence of a new workflow that the Decapodes project enables. We emphasize the speed in which accurate simulations for novel models can be created. Of course, modelers are interested in having good models, so we always make sure that our physics are well-formed, but as developers, we want this modeling process to be as efficient as possible. We want it to be so efficient, that one could in fact "race" their friends in building them!

This "leaderboard" is somewhat similar to the NASA CCMC CME Scoreboard, where community members compete to predict CMEs accurately, using pre-built models.

What does Decapodes stand for?

Discrete Exterior Calculus Applied to Partial and Ordinary Differential EquationS