From aafdfdb7ed906203e86c2dcc143747aa13997f54 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 11 Dec 2024 19:23:45 +0000 Subject: [PATCH] build based on b030b92 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 4 +- dev/ascii/index.html | 2 +- dev/bc/bc_debug/index.html | 4 +- dev/bsh/budyko_sellers_halfar/index.html | 4 +- dev/canon/index.html | 64 ++++++++++++------------ dev/ch/cahn-hilliard/index.html | 4 +- dev/cism/cism/index.html | 16 +++--- dev/ebm_melt/ebm_melt/index.html | 2 +- dev/equations/equations/index.html | 2 +- dev/grigoriev/grigoriev/index.html | 4 +- dev/halmo/halmo/index.html | 2 +- dev/harmonics/harmonics/index.html | 2 +- dev/ice_dynamics/ice_dynamics/index.html | 4 +- dev/index.html | 2 +- dev/klausmeier/klausmeier/index.html | 2 +- dev/meshes/meshes/index.html | 2 +- dev/navier_stokes/ns/index.html | 2 +- dev/nhs/nhs_lite/index.html | 2 +- dev/overview/overview/index.html | 4 +- dev/poiseuille/poiseuille/index.html | 2 +- 21 files changed, 66 insertions(+), 66 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 4f6d8ff2..1cc6fc5e 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-11T18:34:04","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-11T19:22:46","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 7261f3fa..ebca369e 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,3 +1,3 @@ -Library Reference · Decapodes.jl

Library Reference

Decapodes

Decapodes.compileMethod
compile(d::SummationDecapode, inputs::Vector{Symbol}, inplace_dec_ops::Set{Symbol}, dimension::Int, stateeltype::DataType, code_target::AbstractGenerationTarget, preallocate::Bool)

Function that compiles the computation body. d is the input Decapode, inputs is a vector of state variables and literals, inplace_dec_ops is a collection of all DEC operator symbols that can use special in-place methods, dimension is the dimension of the problem (usually 1 or 2), stateeltype is the type of the state elements (usually Float32 or Float64), code_target determines what architecture the code is compiled for (either CPU or CUDA), and preallocate which is set to true by default and determines if intermediate results can be preallocated..

source
Decapodes.compile_envMethod
compile_env(d::SummationDecapode, basic_dec_ops::Vector{Symbol}, contracted_ops::Vector{Symbol}, code_target::AbstractGenerationTarget)

Emit code to define functions given operator Symbols.

Default operations return a tuple of an in-place and an out-of-place function. User-defined operations return an out-of-place function.

source
Decapodes.gensimMethod
gensim(user_d::SummationDecapode, input_vars::Vector{Symbol}; dimension::Int=2, stateeltype::DataType = Float64, code_target::AbstractGenerationTarget = CPUTarget(), preallocate::Bool = true)

Generates the entire code body for the simulation function. The returned simulation function can then be combined with a mesh, provided by CombinatorialSpaces, and a function describing symbol to operator mappings to return a simulator that can be used to solve the represented equations given initial conditions.

Arguments:

user_d: The user passed Decapode for which simulation code will be generated. (This is not modified)

input_vars is the collection of variables whose values are known at the beginning of the simulation. (Defaults to all state variables and literals in the Decapode)

Keyword arguments:

dimension: The dimension of the problem. (Defaults to 2)(Must be 1 or 2)

stateeltype: The element type of the state forms. (Defaults to Float64)(Must be Float32 or Float64)

code_target: The intended architecture target for the generated code. (Defaults to CPUTarget())(Use CUDATarget() for NVIDIA CUDA GPUs)

preallocate: Enables(true)/disables(false) pre-allocated caches for intermediate computations. Some functions, such as those that determine Jacobian sparsity patterns, or perform auto-differentiation, may require this to be disabled. (Defaults to true)

contract: Enables(true)/disables(false) pre-computation of matrix-matrix multiplications for chains of such operators. This feature can interfere with certain auto-differentiation methods, in which case this can be disabled. (Defaults to true)

multigrid: Enables multigrid methods during code generation. If true, then the function produced by gensim will expect a PrimalGeometricMapSeries. (Defaults to false)

source
[ Info: Page built in 3 seconds.
-[ Info: This page was last built at 2024-12-11T18:14:19.441.
+Library Reference · Decapodes.jl

Library Reference

Decapodes

Decapodes.compileMethod
compile(d::SummationDecapode, inputs::Vector{Symbol}, inplace_dec_ops::Set{Symbol}, dimension::Int, stateeltype::DataType, code_target::AbstractGenerationTarget, preallocate::Bool)

Function that compiles the computation body. d is the input Decapode, inputs is a vector of state variables and literals, inplace_dec_ops is a collection of all DEC operator symbols that can use special in-place methods, dimension is the dimension of the problem (usually 1 or 2), stateeltype is the type of the state elements (usually Float32 or Float64), code_target determines what architecture the code is compiled for (either CPU or CUDA), and preallocate which is set to true by default and determines if intermediate results can be preallocated..

source
Decapodes.compile_envMethod
compile_env(d::SummationDecapode, basic_dec_ops::Vector{Symbol}, contracted_ops::Vector{Symbol}, code_target::AbstractGenerationTarget)

Emit code to define functions given operator Symbols.

Default operations return a tuple of an in-place and an out-of-place function. User-defined operations return an out-of-place function.

source
Decapodes.gensimMethod
gensim(user_d::SummationDecapode, input_vars::Vector{Symbol}; dimension::Int=2, stateeltype::DataType = Float64, code_target::AbstractGenerationTarget = CPUTarget(), preallocate::Bool = true)

Generates the entire code body for the simulation function. The returned simulation function can then be combined with a mesh, provided by CombinatorialSpaces, and a function describing symbol to operator mappings to return a simulator that can be used to solve the represented equations given initial conditions.

Arguments:

user_d: The user passed Decapode for which simulation code will be generated. (This is not modified)

input_vars is the collection of variables whose values are known at the beginning of the simulation. (Defaults to all state variables and literals in the Decapode)

Keyword arguments:

dimension: The dimension of the problem. (Defaults to 2)(Must be 1 or 2)

stateeltype: The element type of the state forms. (Defaults to Float64)(Must be Float32 or Float64)

code_target: The intended architecture target for the generated code. (Defaults to CPUTarget())(Use CUDATarget() for NVIDIA CUDA GPUs)

preallocate: Enables(true)/disables(false) pre-allocated caches for intermediate computations. Some functions, such as those that determine Jacobian sparsity patterns, or perform auto-differentiation, may require this to be disabled. (Defaults to true)

contract: Enables(true)/disables(false) pre-computation of matrix-matrix multiplications for chains of such operators. This feature can interfere with certain auto-differentiation methods, in which case this can be disabled. (Defaults to true)

multigrid: Enables multigrid methods during code generation. If true, then the function produced by gensim will expect a PrimalGeometricMapSeries. (Defaults to false)

source
[ Info: Page built in 3 seconds.
+[ Info: This page was last built at 2024-12-11T19:03:09.339.
diff --git a/dev/ascii/index.html b/dev/ascii/index.html index 902b74ae..c464a49b 100644 --- a/dev/ascii/index.html +++ b/dev/ascii/index.html @@ -1,3 +1,3 @@ ASCII Operators · Decapodes.jl

ASCII and Vector Calculus Operators

Some users may have trouble entering unicode characters like ⋆ or ∂ in their development environment. So, we offer the following ASCII equivalents. Further, some users may like to use vector calculus symbols instead of exterior calculus symbols where possible. We offer support for such symbols as well.

ASCII Equivalents

UnicodeASCIIMeaning
∂ₜdtderivative w.r.t. time
starHodge star, generalizing transpose
Δlapllaplacian
wedgewedge product, generalizing the cross product
⋆⁻¹star_invHodge star, generalizing transpose
∘(⋆,d,⋆)divdivergence, a.k.a. ∇⋅
avg₀₁avg_01average values stored on endpoints of edges

Vector Calculus Equivalents

VecDECHow to enter
graddgrad
div∘(⋆,d,⋆)div
curl∘(d,⋆)curl
d\nabla
∇ᵈ∘(⋆,d,⋆)\nabla \<tab\> \^d \<tab\>
∇x∘(d,⋆)\nabla \<tab\> x
adv(X,Y)∘(⋆,d,⋆)(X∧Y)adv
[ Info: Page built in 0 seconds.
-[ Info: This page was last built at 2024-12-11T18:14:19.653.
+[ Info: This page was last built at 2024-12-11T19:03:09.545. diff --git a/dev/bc/bc_debug/index.html b/dev/bc/bc_debug/index.html index f583a8b9..861bafec 100644 --- a/dev/bc/bc_debug/index.html +++ b/dev/bc/bc_debug/index.html @@ -340,5 +340,5 @@ # Animation record(fig, "diff_adv_right.gif", range(0.0, 100.0; length=150); framerate = 30) do t pmsh.color = sol(t).C -end
"diff_adv_right.gif"

Diffusion-Advection result and your first BC Decapode!

[ Info: Page built in 118 seconds.
-[ Info: This page was last built at 2024-12-11T18:16:17.749.
+end
"diff_adv_right.gif"

Diffusion-Advection result and your first BC Decapode!

[ Info: Page built in 119 seconds.
+[ Info: This page was last built at 2024-12-11T19:05:08.120.
diff --git a/dev/bsh/budyko_sellers_halfar/index.html b/dev/bsh/budyko_sellers_halfar/index.html index cf0c8ab4..a3faaae6 100644 --- a/dev/bsh/budyko_sellers_halfar/index.html +++ b/dev/bsh/budyko_sellers_halfar/index.html @@ -522,5 +522,5 @@ ┌ Warning: Attempting to store Main.var"#25#34". │ JLD2 only stores functions by name. │ This may not be useful for anonymous functions. -└ @ JLD2 ~/.julia/packages/JLD2/NKGUi/src/data/writing_datatypes.jl:447

Visualize

Quickly examine the final conditions for temperature:

lines(map(x -> x[1], point(s)), soln(tₑ).Tₛ)
Example block output

Quickly examine the final conditions for ice height:

lines(map(x -> x[1], point(s)), soln(tₑ).halfar_dynamics_h)
Example block output

BSH_Temperature

BSH_IceHeight

[ Info: Page built in 55 seconds.
-[ Info: This page was last built at 2024-12-11T18:17:12.811.
+└ @ JLD2 ~/.julia/packages/JLD2/NKGUi/src/data/writing_datatypes.jl:447

Visualize

Quickly examine the final conditions for temperature:

lines(map(x -> x[1], point(s)), soln(tₑ).Tₛ)
Example block output

Quickly examine the final conditions for ice height:

lines(map(x -> x[1], point(s)), soln(tₑ).halfar_dynamics_h)
Example block output

BSH_Temperature

BSH_IceHeight

[ Info: Page built in 54 seconds.
+[ Info: This page was last built at 2024-12-11T19:06:02.394.
diff --git a/dev/canon/index.html b/dev/canon/index.html index 17a5d452..8e7d991a 100644 --- a/dev/canon/index.html +++ b/dev/canon/index.html @@ -3,37 +3,37 @@ (D, cosϕᵖ, cosϕᵈ)::Constant -HT == (D ./ cosϕᵖ) .* (⋆)(d(cosϕᵈ .* (⋆)(d(Tₛ))))source
Decapodes.Canon.Physics.:outgoing_longwave_radiationConstant

Outgoing Longwave Radiation

Source

Model

(Tₛ, OLR)::Form0
+HT == (D ./ cosϕᵖ) .* (⋆)(d(cosϕᵈ .* (⋆)(d(Tₛ))))
source
Decapodes.Canon.Physics.:outgoing_longwave_radiationConstant

Outgoing Longwave Radiation

Source

Model

(Tₛ, OLR)::Form0
               
 (A, B)::Constant
               
-OLR == A .+ B .* Tₛ
source
Decapodes.Canon.Physics.absorbed_shortwave_radiationConstant

Absorbed Shortwave Radiation

Source

The proportion of light reflected by a surface is the albedo. The absorbed shortwave radiation is the complement of this quantity.

Model

(Q, ASR)::Form0
+OLR == A .+ B .* Tₛ
source
Decapodes.Canon.Physics.absorbed_shortwave_radiationConstant

Absorbed Shortwave Radiation

Source

The proportion of light reflected by a surface is the albedo. The absorbed shortwave radiation is the complement of this quantity.

Model

(Q, ASR)::Form0
               
 α::Constant
               
-ASR == (1 .- α) .* Q
source
Decapodes.Canon.Physics.advectionConstant

Advection

Source

Advection refers to the transport of a bulk along a vector field.

Model

C::Form0
+ASR == (1 .- α) .* Q
source
Decapodes.Canon.Physics.advectionConstant

Advection

Source

Advection refers to the transport of a bulk along a vector field.

Model

C::Form0
               
 (ϕ, V)::Form1
               
-ϕ == C ∧₀₁ V
source
Decapodes.Canon.Physics.ficks_lawConstant

Ficks Law

Source

Equation for diffusion first stated by Adolf Fick. The diffusion flux is proportional to the concentration gradient.

Model

C::Form0
+ϕ == C ∧₀₁ V
source
Decapodes.Canon.Physics.ficks_lawConstant

Ficks Law

Source

Equation for diffusion first stated by Adolf Fick. The diffusion flux is proportional to the concentration gradient.

Model

C::Form0
               
 ϕ::Form1
               
-ϕ == k(d₀(C))
source
Decapodes.Canon.Physics.iceblockingwaterConstant

IceBlockingWater

Source

Model

h::Form0
+ϕ == k(d₀(C))
source
Decapodes.Canon.Physics.iceblockingwaterConstant

IceBlockingWater

Source

Model

h::Form0
               
 (𝐮, w)::DualForm1
               
-w == (1 - σ(h)) ∧ᵖᵈ₀₁ 𝐮
source
Decapodes.Canon.Physics.jko_schemeConstant

Jordan-Kinderlehrer-Otto

Source

Jordan, R., Kinderlehrer, D., & Otto, F. (1998). The Variational Formulation of the Fokker–Planck Equation. In SIAM Journal on Mathematical Analysis (Vol. 29, Issue 1, pp. 1–17). Society for Industrial & Applied Mathematics (SIAM). https://doi.org/10.1137/s0036141096303359

Model

(ρ, Ψ)::Form0
+w == (1 - σ(h)) ∧ᵖᵈ₀₁ 𝐮
source
Decapodes.Canon.Physics.jko_schemeConstant

Jordan-Kinderlehrer-Otto

Source

Jordan, R., Kinderlehrer, D., & Otto, F. (1998). The Variational Formulation of the Fokker–Planck Equation. In SIAM Journal on Mathematical Analysis (Vol. 29, Issue 1, pp. 1–17). Society for Industrial & Applied Mathematics (SIAM). https://doi.org/10.1137/s0036141096303359

Model

(ρ, Ψ)::Form0
               
 β⁻¹::Constant
               
-∂ₜ(ρ) == (∘(⋆, d, ⋆))(d(Ψ) ∧ ρ) + β⁻¹ * Δ(ρ)
source
Decapodes.Canon.Physics.lieConstant

Lie

Source

Model

C::Form0
+∂ₜ(ρ) == (∘(⋆, d, ⋆))(d(Ψ) ∧ ρ) + β⁻¹ * Δ(ρ)
source
Decapodes.Canon.Physics.lieConstant

Lie

Source

Model

C::Form0
               
 V::Form1
               
 dX::Form1
               
-V == ((⋆) ∘ (⋆))(C ∧ dX)
source
Decapodes.Canon.Physics.mohamed_flowConstant

Mohamed Eq. 10, N2

Source

Model

(𝐮, w)::DualForm1
+V == ((⋆) ∘ (⋆))(C ∧ dX)
source
Decapodes.Canon.Physics.mohamed_flowConstant

Mohamed Eq. 10, N2

Source

Model

(𝐮, w)::DualForm1
               
 (P, 𝑝ᵈ)::DualForm0
               
@@ -41,7 +41,7 @@
               
 𝑝ᵈ == P + 0.5 * ι₁₁(w, w)
               
-∂ₜ(𝐮) == μ * (∘(d, ⋆, d, ⋆))(w) + -1 * (⋆₁⁻¹)(w ∧ᵈᵖ₁₀ (⋆)(d(w))) + d(𝑝ᵈ)
source
Decapodes.Canon.Physics.momentumConstant

Momentum

Source

Model

(f, b)::Form0
+∂ₜ(𝐮) == μ * (∘(d, ⋆, d, ⋆))(w) + -1 * (⋆₁⁻¹)(w ∧ᵈᵖ₁₀ (⋆)(d(w))) + d(𝑝ᵈ)
source
Decapodes.Canon.Physics.momentumConstant

Momentum

Source

Model

(f, b)::Form0
               
 (v, V, g, Fᵥ, uˢ, v_up)::Form1
               
@@ -53,7 +53,7 @@
               
 v_up == (((((((-1 * L(v, v) - L(V, v)) - L(v, V)) - f ∧ v) - (∘(⋆, d, ⋆))(uˢ) ∧ v) - d(p)) + b ∧ g) - (∘(⋆, d, ⋆))(τ)) + uˢ̇ + Fᵥ
               
-uˢ̇ == force(U)
source
Decapodes.Canon.Physics.navier_stokesConstant

Navier-Stokes

Source

Partial differential equations which describe the motion of viscous fluid surfaces.

Model

(V, V̇, G)::Form1{X}
+uˢ̇ == force(U)
source
Decapodes.Canon.Physics.navier_stokesConstant

Navier-Stokes

Source

Partial differential equations which describe the motion of viscous fluid surfaces.

Model

(V, V̇, G)::Form1{X}
               
 (ρ, ṗ, p)::Form0{X}
               
@@ -63,7 +63,7 @@
               
 ṗ == neg₀((⋆₀⁻¹)(L₀(V, (⋆₀)(p))))
               
-∂ₜ(p) == ṗ
source
Decapodes.Canon.Physics.oscillatorConstant

Oscillator

Source

Equation governing the motion of an object whose acceleration is negatively-proportional to its position.

Model

X::Form0
+∂ₜ(p) == ṗ
source
Decapodes.Canon.Physics.oscillatorConstant

Oscillator

Source

Equation governing the motion of an object whose acceleration is negatively-proportional to its position.

Model

X::Form0
               
 V::Form0
               
@@ -71,7 +71,7 @@
               
 ∂ₜ(X) == V
               
-∂ₜ(V) == -k * X
source
Decapodes.Canon.Physics.poiseuilleConstant

Poiseuille

Source

A relation between the pressure drop in an incompressible and Newtownian fluid in laminar flow flowing through a long cylindrical pipe.

Model

P::Form0
+∂ₜ(V) == -k * X
source
Decapodes.Canon.Physics.poiseuilleConstant

Poiseuille

Source

A relation between the pressure drop in an incompressible and Newtownian fluid in laminar flow flowing through a long cylindrical pipe.

Model

P::Form0
               
 q::Form1
               
@@ -83,7 +83,7 @@
               
 ∂ₜ(q) == q̇
               
-q̇ == μ̃ * ∂q(Δq) + ∇P + R * q
source
Decapodes.Canon.Physics.poiseuille_densityConstant

Poiseuille Density

Source

Model

q::Form1
+q̇ == μ̃ * ∂q(Δq) + ∇P + R * q
source
Decapodes.Canon.Physics.poiseuille_densityConstant

Poiseuille Density

Source

Model

q::Form1
               
 (P, ρ)::Form0
               
@@ -101,13 +101,13 @@
               
 ρ_up == (∘(⋆, d, ⋆))(-1 * (ρ ∧₀₁ q))
               
-ρ̇ == ∂ρ(ρ_up)
source
Decapodes.Canon.Physics.schroedingerConstant

Schroedinger

Source

The evolution of the wave function over time.

Model

(i, h, m)::Constant
+ρ̇ == ∂ρ(ρ_up)
source
Decapodes.Canon.Physics.schroedingerConstant

Schroedinger

Source

The evolution of the wave function over time.

Model

(i, h, m)::Constant
               
 V::Parameter
               
 Ψ::Form0
               
-∂ₜ(Ψ) == (((-1 * h ^ 2) / (2m)) * Δ(Ψ) + V * Ψ) / (i * h)
source
Decapodes.Canon.Physics.superpositionConstant

Superposition

Source

Model

(C, Ċ)::Form0
+∂ₜ(Ψ) == (((-1 * h ^ 2) / (2m)) * Δ(Ψ) + V * Ψ) / (i * h)
source
Decapodes.Canon.Physics.superpositionConstant

Superposition

Source

Model

(C, Ċ)::Form0
               
 (ϕ, ϕ₁, ϕ₂)::Form1
               
@@ -115,7 +115,7 @@
               
 Ċ == (⋆₀⁻¹)(dual_d₁((⋆₁)(ϕ)))
               
-∂ₜ(C) == Ċ
source

Chemistry

Decapodes.Canon.Chemistry.GrayScottConstant

Gray-Scott

Source

A model of reaction-diffusion

Model

(U, V)::Form0
+∂ₜ(C) == Ċ
source

Chemistry

Decapodes.Canon.Chemistry.GrayScottConstant

Gray-Scott

Source

A model of reaction-diffusion

Model

(U, V)::Form0
               
 UV2::Form0
               
@@ -131,7 +131,7 @@
               
 ∂ₜ(U) == U̇
               
-∂ₜ(V) == V̇
source
Decapodes.Canon.Chemistry.brusselatorConstant

Brusselator

Source

A model of reaction-diffusion for an oscillatory chemical system.

Model

(U, V)::Form0
+∂ₜ(V) == V̇
source
Decapodes.Canon.Chemistry.brusselatorConstant

Brusselator

Source

A model of reaction-diffusion for an oscillatory chemical system.

Model

(U, V)::Form0
               
 U2V::Form0
               
@@ -149,33 +149,33 @@
               
 ∂ₜ(U) == U̇
               
-∂ₜ(V) == V̇
source

Biology

Decapodes.Canon.Biology.kealyConstant

Kealy

Source

Model

(n, w)::DualForm0
+∂ₜ(V) == V̇
source

Biology

Decapodes.Canon.Biology.kealyConstant

Kealy

Source

Model

(n, w)::DualForm0
               
 dX::Form1
               
 (a, ν)::Constant
               
-∂ₜ(w) == ((a - w) - w * n ^ 2) + ν * Δ(w)
source
Decapodes.Canon.Biology.klausmeier_2aConstant

Klausmeier (Eq. 2a)

Source

Klausmeier, CA. “Regular and irregular patterns in semiarid vegetation.” Science (New York, N.Y.) vol. 284,5421 (1999): 1826-8. doi:10.1126/science.284.5421.1826

Model

(n, w)::DualForm0
+∂ₜ(w) == ((a - w) - w * n ^ 2) + ν * Δ(w)
source
Decapodes.Canon.Biology.klausmeier_2aConstant

Klausmeier (Eq. 2a)

Source

Klausmeier, CA. “Regular and irregular patterns in semiarid vegetation.” Science (New York, N.Y.) vol. 284,5421 (1999): 1826-8. doi:10.1126/science.284.5421.1826

Model

(n, w)::DualForm0
               
 dX::Form1
               
 (a, ν)::Constant
               
-∂ₜ(w) == ((a - w) - w * n ^ 2) + ν * ℒ(dX, w)
source
Decapodes.Canon.Biology.klausmeier_2bConstant

Klausmeier (Eq. 2b)

Source

ibid.

Model

(n, w)::DualForm0
+∂ₜ(w) == ((a - w) - w * n ^ 2) + ν * ℒ(dX, w)
source
Decapodes.Canon.Biology.klausmeier_2bConstant

Klausmeier (Eq. 2b)

Source

ibid.

Model

(n, w)::DualForm0
               
 m::Constant
               
-∂ₜ(n) == (w * n ^ 2 - m * n) + Δ(n)
source
Decapodes.Canon.Biology.lejeuneConstant

Lejeune

Source

Lejeune, O., & Tlidi, M. (1999). A Model for the Explanation of Vegetation Stripes (Tiger Bush). Journal of Vegetation Science, 10(2), 201–208. https://doi.org/10.2307/3237141

Model

ρ::Form0
+∂ₜ(n) == (w * n ^ 2 - m * n) + Δ(n)
source
Decapodes.Canon.Biology.lejeuneConstant

Lejeune

Source

Lejeune, O., & Tlidi, M. (1999). A Model for the Explanation of Vegetation Stripes (Tiger Bush). Journal of Vegetation Science, 10(2), 201–208. https://doi.org/10.2307/3237141

Model

ρ::Form0
               
 (μ, Λ, L)::Constant
               
-∂ₜ(ρ) == (ρ * (((1 - μ) + (Λ - 1) * ρ) - ρ * ρ) + 0.5 * (L * L - ρ) * Δ(ρ)) - 0.125 * ρ * Δ(ρ) * Δ(ρ)
source
Decapodes.Canon.Biology.turing_continuous_ringConstant

Turing Continuous Ring

Source

Model

(X, Y)::Form0
+∂ₜ(ρ) == (ρ * (((1 - μ) + (Λ - 1) * ρ) - ρ * ρ) + 0.5 * (L * L - ρ) * Δ(ρ)) - 0.125 * ρ * Δ(ρ) * Δ(ρ)
source
Decapodes.Canon.Biology.turing_continuous_ringConstant

Turing Continuous Ring

Source

Model

(X, Y)::Form0
               
 (μ, ν, a, b, c, d)::Constant
               
 ∂ₜ(X) == a * X + b * Y + μ * Δ(X)
               
-∂ₜ(Y) == c * X + d * Y + ν * Δ(X)
source

Environment

Decapodes.Canon.Environment.boundary_conditionsConstant

Boundary Conditions

Source

Model

(S, T)::Form0
+∂ₜ(Y) == c * X + d * Y + ν * Δ(X)
source

Environment

Decapodes.Canon.Environment.boundary_conditionsConstant

Boundary Conditions

Source

Model

(S, T)::Form0
               
 (Ṡ, T_up)::Form0
               
@@ -191,37 +191,37 @@
               
 Ṫ == ∂_spatial(T_up)
               
-v̇ == ∂_noslip(v_up)
source
Decapodes.Canon.Environment.energy_balanceConstant

Energy balance

Source

energy balance equation from Budyko Sellers

Model

(Tₛ, ASR, OLR, HT)::Form0
+v̇ == ∂_noslip(v_up)
source
Decapodes.Canon.Environment.energy_balanceConstant

Energy balance

Source

energy balance equation from Budyko Sellers

Model

(Tₛ, ASR, OLR, HT)::Form0
               
 C::Constant
               
 Tₛ̇ == ∂ₜ(Tₛ)
               
-Tₛ̇ == ((ASR - OLR) + HT) ./ C
source
Decapodes.Canon.Environment.equation_of_stateConstant

Equation of State

Source

Model

(b, T, S)::Form0
+Tₛ̇ == ((ASR - OLR) + HT) ./ C
source
Decapodes.Canon.Environment.equation_of_stateConstant

Equation of State

Source

Model

(b, T, S)::Form0
               
 (g, α, β)::Constant
               
-b == g * (α * T - β * S)
source
Decapodes.Canon.Environment.glenConstant

Glens Law

Source

Nye, J. F. (1957). The Distribution of Stress and Velocity in Glaciers and Ice-Sheets. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, 239(1216), 113–133. http://www.jstor.org/stable/100184

Model

Γ::Form1
+b == g * (α * T - β * S)
source
Decapodes.Canon.Environment.glenConstant

Glens Law

Source

Nye, J. F. (1957). The Distribution of Stress and Velocity in Glaciers and Ice-Sheets. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences, 239(1216), 113–133. http://www.jstor.org/stable/100184

Model

Γ::Form1
               
 (A, ρ, g, n)::Constant
               
-Γ == (2 / (n + 2)) * A * (ρ * g) ^ n
source
Decapodes.Canon.Environment.halfar_eq2Constant

Halfar (Eq. 2)

Source

Halfar, P. (1981), On the dynamics of the ice sheets, J. Geophys. Res., 86(C11), 11065–11072, doi:10.1029/JC086iC11p11065

Model

h::Form0
+Γ == (2 / (n + 2)) * A * (ρ * g) ^ n
source
Decapodes.Canon.Environment.halfar_eq2Constant

Halfar (Eq. 2)

Source

Halfar, P. (1981), On the dynamics of the ice sheets, J. Geophys. Res., 86(C11), 11065–11072, doi:10.1029/JC086iC11p11065

Model

h::Form0
               
 Γ::Form1
               
 n::Constant
               
-∂ₜ(h) == (∘(⋆, d, ⋆))(((Γ * d(h)) ∧ mag(♯(d(h))) ^ (n - 1)) ∧ h ^ (n + 2))
source
Decapodes.Canon.Environment.insolationConstant

Insolation

Source

Model

Q::Form0
+∂ₜ(h) == (∘(⋆, d, ⋆))(((Γ * d(h)) ∧ mag(♯(d(h))) ^ (n - 1)) ∧ h ^ (n + 2))
source
Decapodes.Canon.Environment.insolationConstant

Insolation

Source

Model

Q::Form0
               
 cosϕᵖ::Constant
               
-Q == 450cosϕᵖ
source
Decapodes.Canon.Environment.tracerConstant

Tracer

Source

Model

(c, C, F, c_up)::Form0
+Q == 450cosϕᵖ
source
Decapodes.Canon.Environment.tracerConstant

Tracer

Source

Model

(c, C, F, c_up)::Form0
               
 (v, V, q)::Form1
               
-c_up == (((-1 * (⋆)(L(v, (⋆)(c))) - (⋆)(L(V, (⋆)(c)))) - (⋆)(L(v, (⋆)(C)))) - (∘(⋆, d, ⋆))(q)) + F
source
Decapodes.Canon.Environment.warmingConstant

Warming

Source

Model

Tₛ::Form0
+c_up == (((-1 * (⋆)(L(v, (⋆)(c))) - (⋆)(L(V, (⋆)(c)))) - (⋆)(L(v, (⋆)(C)))) - (∘(⋆, d, ⋆))(q)) + F
source
Decapodes.Canon.Environment.warmingConstant

Warming

Source

Model

Tₛ::Form0
               
 A::Form1
               
-A == avg₀₁(5.8282 * 10 ^ (-0.236Tₛ) * 1.65e7)
source
[ Info: Page built in 0 seconds.
-[ Info: This page was last built at 2024-12-11T18:17:12.867.
+A == avg₀₁(5.8282 * 10 ^ (-0.236Tₛ) * 1.65e7)source
[ Info: Page built in 0 seconds.
+[ Info: This page was last built at 2024-12-11T19:06:02.450.
diff --git a/dev/ch/cahn-hilliard/index.html b/dev/ch/cahn-hilliard/index.html index fad34678..6ce2c744 100644 --- a/dev/ch/cahn-hilliard/index.html +++ b/dev/ch/cahn-hilliard/index.html @@ -31,5 +31,5 @@ fₘ = sim(sd, nothing, DiagonalHodge());
(::Main.var"#f#5"{PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, SparseArrays.SparseMatrixCSC{Float64, Int32}}) (generic function with 1 method)

Getting the Solution

Now that everything is set up and ready, we can solve the equation. We run the simulation for 200 time units to see the long-term evolution of the fluid. Note we only save the solution at intervals of 0.1 time units in order to reduce the memory-footprint of the solve.

tₑ = 200
 prob = ODEProblem(fₘ, u₀, (0, tₑ), constants)
 soln = solve(prob, Tsit5(), saveat=0.1);
-soln.retcode
ReturnCode.Success = 1

And we can see the result as a gif.

"CahnHilliardRes"

[ Info: Page built in 199 seconds.
-[ Info: This page was last built at 2024-12-11T18:20:31.438.
+soln.retcode
ReturnCode.Success = 1

And we can see the result as a gif.

"CahnHilliardRes"

[ Info: Page built in 196 seconds.
+[ Info: This page was last built at 2024-12-11T19:09:18.821.
diff --git a/dev/cism/cism/index.html b/dev/cism/cism/index.html index c624c255..5ed6ca7d 100644 --- a/dev/cism/cism/index.html +++ b/dev/cism/cism/index.html @@ -204,14 +204,14 @@ [ Info: Done

We can benchmark the compiled simulation with @benchmarkable. This macro runs many samples of the simulation function so we get an accurate estimate of the simulation time. The simulation time is quite fast compared to the CISM benchmarks. These results are run automatically via GitHub Actions as part of our docs build, which is not optimized for numerical simulations.

# Time the simulation
 
 b = @benchmarkable solve(prob, Tsit5(), saveat=0.1)
-c = run(b)
BenchmarkTools.Trial: 156 samples with 1 evaluation.
- Range (minmax):  27.082 ms65.367 ms   GC (min … max):  0.00% … 39.05%
- Time  (median):     31.201 ms               GC (median):    12.26%
- Time  (mean ± σ):   31.660 ms ±  4.650 ms   GC (mean ± σ):  10.95% ±  5.52%
+c = run(b)
BenchmarkTools.Trial: 157 samples with 1 evaluation.
+ Range (minmax):  26.769 ms63.029 ms   GC (min … max):  0.00% … 6.41%
+ Time  (median):     30.978 ms               GC (median):    12.33%
+ Time  (mean ± σ):   31.361 ms ±  4.507 ms   GC (mean ± σ):  10.93% ± 5.60%
 
-  ▄        ▇                                                 
-  █▄▄▁▁▁▁▁▆█▄▁▁▄▁▄▁▁▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▆▁▁▄▁▁▁▄ ▄
-  27.1 ms      Histogram: log(frequency) by time        51 ms <
+  ▃▂       ▂█                                                
+  ██▁▁▁▁▁▁▄██▄▆▄▁▄▁▁▄▁▁▁▁▁▁▁▁▁▁▁▁▄▁▁▁▁▄▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▁▄ ▄
+  26.8 ms      Histogram: log(frequency) by time      49.5 ms <
 
  Memory estimate: 71.29 MiB, allocs estimate: 11083.

Here we save the solution information to a file.

@save "ice_dynamics2D.jld2" soln
┌ Warning: Attempting to store Main.var"#10#13"{Main.var"#8#11"}.
 │ JLD2 only stores functions by name.
@@ -306,4 +306,4 @@
     msh.color = soln(t).dynamics_h
   end
 end
"ice_dynamics_cism.gif"

"Ice Dynamics

For comparison's sake, we paste the results produced by CISM below. We observe that the error likewise accumulates around the edge of the dome, with more accurate predictions on the interior. We note that our simulation produces slight over-estimates on the interior, but there are further strategies that one can employ to increase accuracy, such as tweaking the error tolerance of the solver, and so on.

Not that since the DEC is based on triangulated meshes, the "resolution" of the CISM benchmark and the Decapodes implementation cannot be directly compared. An advantage of the DEC is that we do not need to operate on uniform grids. For example, you could construct a mesh that is finer along the dome edge, where you need more resolution, and coarser as you are farther away from the reach of the ice.

CISM Results

We saw in this document how to create performant and accurate simulations in the Decapodes framework, and compared against the CISM library . Although we do not expect to be both more performant and accurate compared to every hand-crafted simulation, Decapodes makes up for this difference in terms of development time, flexibility, and composition. For example, the original implementation of the Decapodes shallow ice model took place over a couple of afternoons.

Since Decapodes targets high-level representations of physics, it is uniquely suited to incorporating knowledge from subject matter experts to increase simulation accuracy. This process does not require an ice dynamics expert to edit physics equations that have already been weaved into solver code.

Further improvements to the Decapodes library are made continuously. We are creating implementations of DEC operators that are constructed and execute faster. And we are in the beginning stages of 3D simulations using the DEC.

[ Info: Page built in 33 seconds.
-[ Info: This page was last built at 2024-12-11T18:21:04.920.
+[ Info: This page was last built at 2024-12-11T19:09:51.652. diff --git a/dev/ebm_melt/ebm_melt/index.html b/dev/ebm_melt/ebm_melt/index.html index 9233c625..a737c1c4 100644 --- a/dev/ebm_melt/ebm_melt/index.html +++ b/dev/ebm_melt/ebm_melt/index.html @@ -575,4 +575,4 @@ update_cam!(ax.scene, Vec3f(0,0,0.8), Vec3f(0,0,0), Vec3f(0, 1, 1)) msh = mesh!(ax, s_plots, color=soln.u[end].h, colorrange=extrema(soln.u[begin].h), colormap=Reverse(:redsblues)) Colorbar(f[1,2], msh) -fExample block output
Process(`rm piomas20c.heff.1901.2010.v1.0.nc`, ProcessExited(0))
+fExample block output
Process(`rm piomas20c.heff.1901.2010.v1.0.nc`, ProcessExited(0))
diff --git a/dev/equations/equations/index.html b/dev/equations/equations/index.html index 48b1aa3d..3e5eb24e 100644 --- a/dev/equations/equations/index.html +++ b/dev/equations/equations/index.html @@ -992,4 +992,4 @@ '/>

Often you will have a linear material where you are scaling by a constant, and a nonlinear version of that material where that scaling is replaced by a generic nonlinear function. This is why we allow Decapodes to represent both of these types of equations.

[ Info: Page built in 2 seconds.
-[ Info: This page was last built at 2024-12-11T18:29:43.898.
+[ Info: This page was last built at 2024-12-11T19:18:28.706. diff --git a/dev/grigoriev/grigoriev/index.html b/dev/grigoriev/grigoriev/index.html index f473906c..41174898 100644 --- a/dev/grigoriev/grigoriev/index.html +++ b/dev/grigoriev/grigoriev/index.html @@ -151,5 +151,5 @@ ┌ Warning: Attempting to store SciMLBase.ODEFunction{true, SciMLBase.AutoSpecialize, Main.var"#f#14"{PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.FixedSizeDiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, SparseArrays.SparseMatrixCSC{Float64, Int32}, SparseArrays.SparseMatrixCSC{Int8, Int32}, Main.var"#6#8", Decapodes.var"#37#38"{SparseArrays.SparseMatrixCSC{Float64, Int32}}, Main.var"#7#9"{SparseArrays.SparseMatrixCSC{GeometryBasics.Point{3, Float64}, Int64}}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}. │ JLD2 only stores functions by name. │ This may not be useful for anonymous functions. -└ @ JLD2 ~/.julia/packages/JLD2/NKGUi/src/data/writing_datatypes.jl:447

Results and Discussion

We observe the usual Halfar model phenomena of ice "melting". Note that since the "shallow slope" approximation does not hold on the boundaries (due to the so-called "ice cliffs" described in the Van Tricht et al. paper), we do not expect the "creep" effect to be physical in this region of the domain. Rather, the Halfar model's predictive power is tuned for the interiors of ice caps and glaciers. Note that we also assume here that the bedrock that the ice rests on is flat. We may in further documents demonstrate how to use topographic data from Digital Elevation Models to inform the elevation of points in the mesh itself.

Grigoriev_ICs

Grigoriev_FCs

Grigoriev_Dynamics

[ Info: Page built in 40 seconds.
-[ Info: This page was last built at 2024-12-11T18:30:23.866.
+└ @ JLD2 ~/.julia/packages/JLD2/NKGUi/src/data/writing_datatypes.jl:447

Results and Discussion

We observe the usual Halfar model phenomena of ice "melting". Note that since the "shallow slope" approximation does not hold on the boundaries (due to the so-called "ice cliffs" described in the Van Tricht et al. paper), we do not expect the "creep" effect to be physical in this region of the domain. Rather, the Halfar model's predictive power is tuned for the interiors of ice caps and glaciers. Note that we also assume here that the bedrock that the ice rests on is flat. We may in further documents demonstrate how to use topographic data from Digital Elevation Models to inform the elevation of points in the mesh itself.

Grigoriev_ICs

Grigoriev_FCs

Grigoriev_Dynamics

[ Info: Page built in 39 seconds.
+[ Info: This page was last built at 2024-12-11T19:19:07.822.
diff --git a/dev/halmo/halmo/index.html b/dev/halmo/halmo/index.html index c0f1467e..3cdcb3e9 100644 --- a/dev/halmo/halmo/index.html +++ b/dev/halmo/halmo/index.html @@ -337,4 +337,4 @@ msh.color = soln(t).ice_thickness end end
"halmo_ice.gif"

HalfarMohamedIce

[ Info: Page built in 40 seconds.
-[ Info: This page was last built at 2024-12-11T18:31:03.868.
+[ Info: This page was last built at 2024-12-11T19:19:47.565. diff --git a/dev/harmonics/harmonics/index.html b/dev/harmonics/harmonics/index.html index fdf48a92..d5c508d8 100644 --- a/dev/harmonics/harmonics/index.html +++ b/dev/harmonics/harmonics/index.html @@ -90,4 +90,4 @@ x̂ = x .- sum(x)./length(x) norm(x̂) stats -norm(Δ0*(x) - b) +norm(Δ0*(x) - b) diff --git a/dev/ice_dynamics/ice_dynamics/index.html b/dev/ice_dynamics/ice_dynamics/index.html index bcb7fae2..886aa6ef 100644 --- a/dev/ice_dynamics/ice_dynamics/index.html +++ b/dev/ice_dynamics/ice_dynamics/index.html @@ -380,5 +380,5 @@ record(fig, "ice_dynamics2D_sphere.gif", range(0.0, tₑ/64; length=frames); framerate = 20) do t msh.color = soln(t).dynamics_h end -end
"ice_dynamics2D_sphere.gif"

IceDynamics2DSphere

[ Info: Page built in 55 seconds.
-[ Info: This page was last built at 2024-12-11T18:32:01.727.
+end
"ice_dynamics2D_sphere.gif"

IceDynamics2DSphere

[ Info: Page built in 54 seconds.
+[ Info: This page was last built at 2024-12-11T19:20:45.380.
diff --git a/dev/index.html b/dev/index.html index 035a1662..0f45ba0a 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Decapodes.jl · Decapodes.jl

Decapodes.jl

Decapodes.jl is a framework for developing, composing, and simulating physical systems.

Decapodes.jl is the synthesis of Applied Category Theory (ACT) techniques for formalizing and composing physics equations, and Discrete Exterior Calculus (DEC) techniques for formalizing differential operators. CombinatorialSpaces.jl hosts tools for discretizing space and defining DEC operators on simplicial complexes, and DiagrammaticEquations.jl hosts tooling for representing the equations as formal ACT diagrams. This repository combines these two packages, compiling diagrams down to runnable simulation code.

By combining the power of ACT and the DEC, we seek to improve the scientific computing workflow. Decapodes simulations are hierarchically composable, generalize over any type of manifold, and are performant and accurate with a declarative domain specific language (DSL) that is human-readable.

Getting started

Walkthroughs creating, composing, and solving Decapodes are available in the side-bar of this documentation page. Further example scripts are available in the examples folder of the Decapodes.jl GitHub repo, and will be added to this documentation site soon.

Under Active Development

This library is currently under active development, and so is not yet at a point where a constant API/behavior can be assumed. That being said, if this project looks interesting/relevant please contact us and let us know!

+Decapodes.jl · Decapodes.jl

Decapodes.jl

Decapodes.jl is a framework for developing, composing, and simulating physical systems.

Decapodes.jl is the synthesis of Applied Category Theory (ACT) techniques for formalizing and composing physics equations, and Discrete Exterior Calculus (DEC) techniques for formalizing differential operators. CombinatorialSpaces.jl hosts tools for discretizing space and defining DEC operators on simplicial complexes, and DiagrammaticEquations.jl hosts tooling for representing the equations as formal ACT diagrams. This repository combines these two packages, compiling diagrams down to runnable simulation code.

By combining the power of ACT and the DEC, we seek to improve the scientific computing workflow. Decapodes simulations are hierarchically composable, generalize over any type of manifold, and are performant and accurate with a declarative domain specific language (DSL) that is human-readable.

Getting started

Walkthroughs creating, composing, and solving Decapodes are available in the side-bar of this documentation page. Further example scripts are available in the examples folder of the Decapodes.jl GitHub repo, and will be added to this documentation site soon.

Under Active Development

This library is currently under active development, and so is not yet at a point where a constant API/behavior can be assumed. That being said, if this project looks interesting/relevant please contact us and let us know!

diff --git a/dev/klausmeier/klausmeier/index.html b/dev/klausmeier/klausmeier/index.html index 1085c4ed..153f92ab 100644 --- a/dev/klausmeier/klausmeier/index.html +++ b/dev/klausmeier/klausmeier/index.html @@ -158,4 +158,4 @@ end end save_dynamics(:N, 20, "klausmeier.gif")
"klausmeier.gif"

Klausmeier

We can observe a few interesting phenomena that we wanted to capture:

Conclusion

Due to the ease of composition of Decapodes, representing the Klausmeier model opens up many areas for future work. For example, we can now compose these dynamics with a model of temperature dynamics informed by the Budyko-Sellers model. We can take advantage of the fact that the Lie derivative generalizes partial derivatives, and model the flow of water according to any vector field. Or, we can extend this model by composing it with a model that can recreate the so-called "leopard pattern" of vegetation, such as an "Interaction-Dispersion" model of vegetation dynamics given by Lejeune et al[4].

References

[1] W. A. Macfadyen, “Vegetation Patterns in the Semi-Desert Plains of British Somaliland,” The Geographical Journal, vol. 116, no. 4/6, p. 199, Oct. 1950, doi: 10.2307/1789384.

[2] C. A. Klausmeier, “Regular and Irregular Patterns in Semiarid Vegetation,” Science, vol. 284, no. 5421, pp. 1826–1828, Jun. 1999, doi: 10.1126/science.284.5421.1826.

[3] W. A. Macfadyen, “Soil and Vegetation in British Somaliland,” Nature, vol. 165, no. 4186, Art. no. 4186, Jan. 1950, doi: 10.1038/165121a0.

[4] O. Lejeune and M. Tlidi, “A Model for the Explanation of Vegetation Stripes (Tiger Bush),” Journal of Vegetation Science, vol. 10, no. 2, pp. 201–208, 1999, doi: 10.2307/3237141.

[ Info: Page built in 30 seconds.
-[ Info: This page was last built at 2024-12-11T18:32:32.525.
+[ Info: This page was last built at 2024-12-11T19:21:16.027. diff --git a/dev/meshes/meshes/index.html b/dev/meshes/meshes/index.html index 0a533bbc..7a1825fd 100644 --- a/dev/meshes/meshes/index.html +++ b/dev/meshes/meshes/index.html @@ -1,2 +1,2 @@ -Meshes · Decapodes.jl
+Meshes · Decapodes.jl
diff --git a/dev/navier_stokes/ns/index.html b/dev/navier_stokes/ns/index.html index 6030d6a0..f5a8f912 100644 --- a/dev/navier_stokes/ns/index.html +++ b/dev/navier_stokes/ns/index.html @@ -23,4 +23,4 @@ ∂ₜ(d𝐮) == (-1) * ∘(♭♯, ⋆₁, d̃₁)(∧ᵈᵖ₁₀(𝐮, ⋆(d𝐮))) end

With this formulation, we achieve these numerical results:

Rotating point vortices

Repelling Taylor vortices

Phenominological Assessment

These scenarios are used to test that a simulator achieves the correct phenomenology. In the rotating point vortices case, we are looking for periodicity in the solution for vorticity. As the vortices advect around the sphere, they return to their original locations. This can be seen on the azimuthal profile. The original formulation does not exhibit this phenomenon, since it is unstable, but the corrected formulation does.

We can visualize the distribution of vorticity at the $\theta = 0.4$ latitude. The difference between the distributions at $t=0$ and $t=12$ is accumulated error.

Azimuthal profile

[ Info: Page built in 0 seconds.
-[ Info: This page was last built at 2024-12-11T18:32:32.575.
+[ Info: This page was last built at 2024-12-11T19:21:16.077. diff --git a/dev/nhs/nhs_lite/index.html b/dev/nhs/nhs_lite/index.html index af44007d..ad3b4b33 100644 --- a/dev/nhs/nhs_lite/index.html +++ b/dev/nhs/nhs_lite/index.html @@ -505,4 +505,4 @@ s = EmbeddedDeltaSet2D("torus.obj") sd = EmbeddedDeltaDualComplex2D{Bool,Float64,Point3D}(s) subdivide_duals!(sd, Barycenter())

"NHS_torus"

Results

In the DEC, vorticity is encoded with d⋆, and speed can be encoded with norm ♯. We can use our operators from CombinatorialSpaces.jl to create our GIFs.

Vorticity

Speed

[ Info: Page built in 8 seconds.
-[ Info: This page was last built at 2024-12-11T18:32:40.544.
+[ Info: This page was last built at 2024-12-11T19:21:24.184. diff --git a/dev/overview/overview/index.html b/dev/overview/overview/index.html index 6997b827..6787b003 100644 --- a/dev/overview/overview/index.html +++ b/dev/overview/overview/index.html @@ -788,5 +788,5 @@ # Animation record(fig, "diff_adv.gif", range(0.0, 100.0; length=150); framerate = 30) do t pmsh.color = sol(t).C[point_map] -end
"diff_adv.gif"

Your first composed Decapode!

[ Info: Page built in 40 seconds.
-[ Info: This page was last built at 2024-12-11T18:33:20.073.
+end
"diff_adv.gif"

Your first composed Decapode!

[ Info: Page built in 39 seconds.
+[ Info: This page was last built at 2024-12-11T19:22:03.663.
diff --git a/dev/poiseuille/poiseuille/index.html b/dev/poiseuille/poiseuille/index.html index f1b44e85..df973836 100644 --- a/dev/poiseuille/poiseuille/index.html +++ b/dev/poiseuille/poiseuille/index.html @@ -314,4 +314,4 @@ ComponentVector{Float64}(q = [6.1920127883135164e13, -8.568007487148114e13, 1.9201126813454332e13, 4.378232165394925e12, 1.8030374371124078e11, 2.8426519954607034e8, 710.8769150994917, 6.748007174036271, 6.60426400300304, 6.922786733469125, 6.682957266215476, 6.945403324312223, 6.7111376191740355, 6.656096080521041, 6.479123002928333, 6.147464655239918, 6.0393618314981845, 5.652147818805783, 6.154271691684817], ρ = [5.0, 1.7758054753548302e29, -6.8141080132203945e28, -1.3074226599053273e28, -5.179078079719823e26, -8.152453309063853e23, -2.0200503431610353e18, -1.2631666518743517e7, 147.24610626456547, 56.36699150835656, 74.77129907634759, 19.020919411453633, 7.7736198102141625, 24.816711506008275, -7.713715102650178, 9.350784612594685, -41.20554002070084, -6.373736847235397, -107.83102825931032, 5.0]) ComponentVector{Float64}(q = [1.1872311497086327e14, -1.6427946335913153e14, 3.681545345912436e13, 8.394642881892475e12, 3.4570700757818317e11, 5.450384428328904e8, 1357.033806521059, 6.748007178063511, 6.6042640030030295, 6.922786733469124, 6.682957266215472, 6.945403324312218, 6.711137619174041, 6.656096080521035, 6.479123002928334, 6.1474646552399115, 6.039361831498188, 5.6521478188057745, 6.154271691684836], ρ = [5.0, 6.528332303732435e29, -2.5050469818549493e29, -4.806432744956543e28, -1.9039665777619965e27, -2.997058245157065e24, -7.426241321036376e18, -4.60344428676951e7, 147.24610490847428, 56.36699150836021, 74.77129907634993, 19.02091941145731, 7.773619810213891, 24.81671150600915, -7.713715102649317, 9.350784612596406, -41.20554002070008, -6.373736847232409, -107.83102825931041, 5.0]) ComponentVector{Float64}(q = [2.2763198293694738e14, -3.1497876390476056e14, 7.058755723957314e13, 1.609534256072918e13, 6.628361437609381e11, 1.0450212822498903e9, 2595.9161158413563, 6.748007185729912, 6.604264003003024, 6.922786733469123, 6.682957266215469, 6.945403324312215, 6.7111376191740435, 6.656096080521032, 6.479123002928335, 6.147464655239908, 6.03936183149819, 5.65214781880577, 6.154271691684846], ρ = [5.0, 2.3999281654352328e30, -9.208987116154255e29, -1.7669280274524022e29, -6.999311315417555e27, -1.101770585650097e25, -2.730015105335222e19, -1.6845774169172958e8, 147.24610232452667, 56.366991508362105, 74.77129907635116, 19.02091941145923, 7.773619810213749, 24.816711506009604, -7.713715102648868, 9.350784612597305, -41.20554002069968, -6.373736847230851, -107.83102825931047, 5.0])

Notice that the solution contains both a vector of flows and a vector of pressures.

[ Info: Page built in 18 seconds.
-[ Info: This page was last built at 2024-12-11T18:33:38.033.
+[ Info: This page was last built at 2024-12-11T19:22:21.767.