diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index f8643cc5..5f363b29 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-28T15:11:29","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-28T17:02:22","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 59bdbfa8..1a289df4 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,2 +1,2 @@ -Library Reference · Decapodes.jl

Library Reference

Decapodes

Decapodes.SpherePointType
SpherePoint{T}(p)

a point in spherical coordinates, intended as a wrapper around Point3 from GeometryBasics.

source
Decapodes.TangentBasisMethod
tb(w)

Take a linear combinations of the tangent vectors at the base point. Use this to get a vector tangent to the sphere in the coordinate system of the base point. If the base point is in spherical coordinates, this is the identity, if the base point is in cartesian coordinates, it returns the tangent vector in cartesian coordinates.

source
Decapodes.gensimMethod
function gensim(d::AbstractNamedDecapode; dimension::Int=2)

Generate a simulation function from the given Decapode. The returned function can then be combined with a mesh and a function describing function mappings to return a simulator to be passed to solve.

source
+Library Reference · Decapodes.jl

Library Reference

Decapodes

Decapodes.SpherePointType
SpherePoint{T}(p)

a point in spherical coordinates, intended as a wrapper around Point3 from GeometryBasics.

source
Decapodes.TangentBasisMethod
tb(w)

Take a linear combinations of the tangent vectors at the base point. Use this to get a vector tangent to the sphere in the coordinate system of the base point. If the base point is in spherical coordinates, this is the identity, if the base point is in cartesian coordinates, it returns the tangent vector in cartesian coordinates.

source
Decapodes.gensimMethod
function gensim(d::AbstractNamedDecapode; dimension::Int=2)

Generate a simulation function from the given Decapode. The returned function can then be combined with a mesh and a function describing function mappings to return a simulator to be passed to solve.

source
diff --git a/dev/ascii/index.html b/dev/ascii/index.html index 4880eda1..a205bac4 100644 --- a/dev/ascii/index.html +++ b/dev/ascii/index.html @@ -1,2 +1,2 @@ -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. ∇⋅

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
+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. ∇⋅

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
diff --git a/dev/bc_debug/index.html b/dev/bc_debug/index.html index 17886792..834f171b 100644 --- a/dev/bc_debug/index.html +++ b/dev/bc_debug/index.html @@ -345,4 +345,4 @@ # 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"

+end
"diff_adv_right.gif"

diff --git a/dev/budyko_sellers_halfar/index.html b/dev/budyko_sellers_halfar/index.html index 8c2f2b4c..69583cf5 100644 --- a/dev/budyko_sellers_halfar/index.html +++ b/dev/budyko_sellers_halfar/index.html @@ -253,4 +253,4 @@ record(fig, "budyko_sellers_halfar_h.gif", range(0.0, tₑ; length=frames); framerate = 15) do t lines!(fig[1,1], map(x -> x[1], point(s′)), soln(t).halfar_h) end -end
"budyko_sellers_halfar_h.gif"

BSH_Temperature

BSH_IceHeight

+end
"budyko_sellers_halfar_h.gif"

BSH_Temperature

BSH_IceHeight

diff --git a/dev/canon/index.html b/dev/canon/index.html index e9244a3b..1164291d 100644 --- a/dev/canon/index.html +++ b/dev/canon/index.html @@ -3,33 +3,33 @@ (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.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
+ϕ == k(d₀(C))
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

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

Mohamed Eq. 10, N2

Source

Model

𝐮::Form1
               
 (P, 𝑝ᵈ)::Form0
               
@@ -39,7 +39,7 @@
               
 𝑝ᵈ == P + half * i(𝐮, 𝐮)
               
-𝐮̇ == μ * (∘(d, ⋆, d, ⋆))(𝐮) + negone * (⋆₁⁻¹)(𝐮 ∧₁₀ₚᵈ (⋆)(d(𝐮))) + d(𝑝ᵈ)
source
Decapodes.Canon.Physics.momentumConstant

Momentum

Source

Model

(f, b)::Form0
+𝐮̇ == μ * (∘(d, ⋆, d, ⋆))(𝐮) + negone * (⋆₁⁻¹)(𝐮 ∧₁₀ₚᵈ (⋆)(d(𝐮))) + d(𝑝ᵈ)
source
Decapodes.Canon.Physics.momentumConstant

Momentum

Source

Model

(f, b)::Form0
               
 (v, V, g, Fᵥ, uˢ, v_up)::Form1
               
@@ -51,7 +51,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}
               
@@ -61,7 +61,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
               
@@ -69,7 +69,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
               
@@ -81,7 +81,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
               
@@ -99,13 +99,13 @@
               
 ρ_up == (∘(⋆, d, ⋆))(-1 * (ρ ∧₀₁ q))
               
-ρ̇ == ∂ρ(ρ_up)
source
Decapodes.Canon.Physics.schroedingerConstant

Schoedinger

Source

The evolution of the wave function over time.

Model

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

Schoedinger

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
               
@@ -113,7 +113,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
               
@@ -129,7 +129,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{X}
+∂ₜ(V) == V̇
source
Decapodes.Canon.Chemistry.brusselatorConstant

Brusselator

Source

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

Model

(U, V)::Form0{X}
               
 (U2V, One)::Form0{X}
               
@@ -147,33 +147,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
               
@@ -189,36 +189,36 @@
               
 Ṫ == ∂_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
+A == avg₀₁(5.8282 * 10 ^ (-0.236Tₛ) * 1.65e7)source diff --git a/dev/cism/index.html b/dev/cism/index.html index d9a7190e..cf57be75 100644 --- a/dev/cism/index.html +++ b/dev/cism/index.html @@ -209,13 +209,13 @@ b = @benchmarkable solve(prob, Tsit5()) c = run(b)
BenchmarkTools.Trial: 261 samples with 1 evaluation.
- Range (minmax):  17.812 ms48.226 ms   GC (min … max): 0.00% … 14.73%
- Time  (median):     18.162 ms               GC (median):    0.00%
- Time  (mean ± σ):   19.028 ms ±  2.738 ms   GC (mean ± σ):  2.24% ±  4.07%
+ Range (minmax):  17.827 ms37.792 ms   GC (min … max): 0.00% … 5.14%
+ Time  (median):     18.100 ms               GC (median):    0.00%
+ Time  (mean ± σ):   18.988 ms ±  2.370 ms   GC (mean ± σ):  2.17% ± 4.09%
 
-  ▅█    ▂▂                                                
-  ███▁▄▁▁▁▇███▄▆▅▁▁▁▁▁▄▄▅▄▅▄▁▅▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▅▁▁▅ ▅
-  17.8 ms      Histogram: log(frequency) by time      28.3 ms <
+  ▅█       ▂▁                                                 
+  ██▆▄▁▁▁███▇▅▆▄▆▁▄▁▄▄▄▄▁▁▁▄▁▁▁▁▅▁▁▁▄▁▅▁▁▁▁▁▁▁▄▁▁▁▁▅▁▁▁▁▁▁▆ ▅
+  17.8 ms      Histogram: log(frequency) by time      28.4 ms <
 
  Memory estimate: 26.46 MiB, allocs estimate: 2114.
# Save the solution information to a file.
 @save "ice_dynamics2D.jld2" soln

We recall that these dynamics are of the "shallow slope" and "shallow ice" approximations. So, at the edge of our parabolic dome of ice, we expect increased error as the slope increases. On the interior of the dome, we expect the dynamics to match more closely that given by the analytic model. We will see that the CISM results likewise accumulate error in the same neighborhood.

"Halfar Small Ice Approximation Quote"

# Plot the final conditions
@@ -278,4 +278,4 @@
   record(fig, "ice_dynamics_cism.gif", range(0.0, tₑ; length=frames); framerate = 30) do t
     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 during a hackathon.

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.

+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 during a hackathon.

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.

diff --git a/dev/equations/index.html b/dev/equations/index.html index e04e8c57..e9d763ad 100644 --- a/dev/equations/index.html +++ b/dev/equations/index.html @@ -970,4 +970,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.

+'/>

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.

diff --git a/dev/grigoriev/index.html b/dev/grigoriev/index.html index 985ddada..bc8b4c9c 100644 --- a/dev/grigoriev/index.html +++ b/dev/grigoriev/index.html @@ -193,4 +193,4 @@ time[] = t end end -save_dynamics("grigoriev.gif")
"grigoriev.gif"

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

+save_dynamics("grigoriev.gif")
"grigoriev.gif"

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

diff --git a/dev/ice_dynamics.gif b/dev/ice_dynamics.gif index 34a1a6ab..aee60ef9 100644 Binary files a/dev/ice_dynamics.gif and b/dev/ice_dynamics.gif differ diff --git a/dev/ice_dynamics/0c0ba1dd.png b/dev/ice_dynamics/0c0ba1dd.png deleted file mode 100644 index 51176cb6..00000000 Binary files a/dev/ice_dynamics/0c0ba1dd.png and /dev/null differ diff --git a/dev/ice_dynamics/0cd1427e.png b/dev/ice_dynamics/0cd1427e.png deleted file mode 100644 index d405f14d..00000000 Binary files a/dev/ice_dynamics/0cd1427e.png and /dev/null differ diff --git a/dev/ice_dynamics/b2ad3fa0.png b/dev/ice_dynamics/b2ad3fa0.png new file mode 100644 index 00000000..bf9dd7c6 Binary files /dev/null and b/dev/ice_dynamics/b2ad3fa0.png differ diff --git a/dev/ice_dynamics/dcb8013b.png b/dev/ice_dynamics/dcb8013b.png new file mode 100644 index 00000000..1ae686bf Binary files /dev/null and b/dev/ice_dynamics/dcb8013b.png differ diff --git a/dev/ice_dynamics/index.html b/dev/ice_dynamics/index.html index 3dd6fd28..ba4fb07c 100644 --- a/dev/ice_dynamics/index.html +++ b/dev/ice_dynamics/index.html @@ -301,7 +301,7 @@ end
"ice_dynamics2D.gif"

IceDynamics2D

2-Manifold in 3D

We note that just because our physics is happening on a 2-manifold, (a surface), this doesn't restrict us to the 2D plane. In fact, we can "embed" our 2-manifold in 3D space to simulate a glacial sheets spread across the globe.

s′ = loadmesh(Icosphere(3, 10_000))
 s = EmbeddedDeltaDualComplex2D{Bool, Float64, Point3D}(s′)
 subdivide_duals!(s, Barycenter())
-wireframe(s)
Example block output
n = 3
+wireframe(s)
Example block output
n = 3
 ρ = 910
 g = 9.8
 A = 1e-16
@@ -317,7 +317,7 @@
 ax = LScene(fig[1,1], scenekw=(lights=[],))
 msh = CairoMakie.mesh!(ax, s′, color=h₀, colormap=:jet)
 Colorbar(fig[1,2], msh)
-fig
Example block output
u₀ = ComponentArray(dynamics_h=h₀)
+fig
Example block output
u₀ = ComponentArray(dynamics_h=h₀)
 
 constants_and_parameters = (
   n = n,
@@ -351,4 +351,4 @@
   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

+end
"ice_dynamics2D_sphere.gif"

IceDynamics2DSphere

diff --git a/dev/ice_dynamics2D_sphere.gif b/dev/ice_dynamics2D_sphere.gif index b3744c75..e4ebbf08 100644 Binary files a/dev/ice_dynamics2D_sphere.gif and b/dev/ice_dynamics2D_sphere.gif differ diff --git a/dev/index.html b/dev/index.html index 8bf3e4d0..fcbe9d0f 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 simulatable 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.

Grigoriev Ice Cap Dynamics

NOTE

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!

Getting started

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

NOTE

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 simulatable 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.

Grigoriev Ice Cap Dynamics

NOTE

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!

Getting started

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

NOTE

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/index.html b/dev/klausmeier/index.html index c18e510f..7f523051 100644 --- a/dev/klausmeier/index.html +++ b/dev/klausmeier/index.html @@ -365,4 +365,4 @@ time[] = t 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.

+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.

diff --git a/dev/nhs/index.html b/dev/nhs/index.html index d77cb28e..d39d987c 100644 --- a/dev/nhs/index.html +++ b/dev/nhs/index.html @@ -628,4 +628,4 @@ time[] = t end end -save_speed(false)
"speed.gif"

Vorticity

Speed

+save_speed(false)
"speed.gif"

Vorticity

Speed

diff --git a/dev/overview/index.html b/dev/overview/index.html index c81792da..d250538a 100644 --- a/dev/overview/index.html +++ b/dev/overview/index.html @@ -791,4 +791,4 @@ # 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"

```

+end
"diff_adv.gif"

```

diff --git a/dev/poiseuille/index.html b/dev/poiseuille/index.html index e4fab860..f681a32b 100644 --- a/dev/poiseuille/index.html +++ b/dev/poiseuille/index.html @@ -322,4 +322,4 @@ ComponentVector{Float64}(q = [3.229362018659291e13, -4.4685304924377445e13, 1.0014092632828035e13, 2.2834088276778594e12, 9.403502228976639e10, 1.4825473826853013e8, 373.8634401164856, 6.748007171994456, 6.6042640031841255, 6.922786733820605, 6.6829572669112, 6.945403323059754, 6.711137618204396, 6.656096082264105, 6.479123002819498, 6.147464654651846, 6.039361831653792, 5.6521478183729394, 6.154271690686454], ρ = [5.0, 4.830200898521725e28, -1.8534412189088976e28, -3.5561970013599265e27, -1.4087121553692516e26, -2.2174718843308503e23, -5.4945482749183546e17, -3.492932710488087e6, 147.24610690703432, 56.36699131399747, 74.77129872544127, 19.02091967888934, 7.773620537454371, 24.816711099028957, -7.713715579416296, 9.350784798692635, -41.205540068909954, -6.373736972480156, -107.83102822687177, 5.0]) ComponentVector{Float64}(q = [6.191992507394705e13, -8.567979424049697e13, 1.9201063923323504e13, 4.3782178252160254e12, 1.8030315315600098e11, 2.8426426848218614e8, 710.8746080616181, 6.748007174123632, 6.604264003184105, 6.922786733820603, 6.682957266911191, 6.945403323059743, 6.711137618204406, 6.656096082264093, 6.479123002819502, 6.147464654651834, 6.0393618316538, 5.652147818372922, 6.154271690686492], ρ = [5.0, 1.7757938426905157e29, -6.814063376444455e28, -1.3074140954487203e28, -5.179044153438138e26, -8.152399905268033e23, -2.0200371105361587e18, -1.2631584523233224e7, 147.2461061913548, 56.36699131400445, 74.77129872544576, 19.020919678896387, 7.77362053745385, 24.816711099030634, -7.713715579414645, 9.350784798695937, -41.20554006890849, -6.373736972474428, -107.83102822687196, 5.0]) ComponentVector{Float64}(q = [1.1872271742208814e14, -1.6427891326322578e14, 3.681533018120626e13, 8.394614772117885e12, 3.4570584996538104e11, 5.450366177513396e8, 1357.0292842418091, 6.748007178150859, 6.6042640031840945, 6.922786733820602, 6.6829572669111865, 6.945403323059738, 6.711137618204411, 6.656096082264087, 6.479123002819504, 6.147464654651828, 6.039361831653803, 5.652147818372913, 6.154271690686511], ρ = [5.0, 6.528288582778251e29, -2.5050302052818274e29, -4.806400555751653e28, -1.9039538266899406e27, -2.9970381735307163e24, -7.426191586687182e18, -4.6034136041072555e7, 147.2461048352682, 56.3669913140081, 74.7712987254481, 19.020919678900064, 7.773620537453578, 24.816711099031508, -7.713715579413784, 9.350784798697658, -41.20554006890773, -6.37373697247144, -107.83102822687206, 5.0]) - ComponentVector{Float64}(q = [2.2763124383665466e14, -3.14977741197434e14, 7.058732804821097e13, 1.6095290300619385e13, 6.628339915924113e11, 1.0450178891610495e9, 2595.9077082757617, 6.748007185817237, 6.604264003184089, 6.922786733820601, 6.682957266911184, 6.945403323059735, 6.711137618204414, 6.656096082264084, 6.479123002819505, 6.147464654651825, 6.039361831653805, 5.652147818372908, 6.154271690686521], ρ = [5.0, 2.3999125809047874e30, -9.208927315306011e29, -1.7669165534657745e29, -6.999265863648581e27, -1.1017634310287478e25, -2.7299973773030162e19, -1.6845665050515872e8, 147.24610225132864, 56.366991314009994, 74.77129872544933, 19.020919678901983, 7.773620537453436, 24.816711099031963, -7.713715579413335, 9.350784798698557, -41.20554006890733, -6.3737369724698825, -107.83102822687212, 5.0])

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

+ ComponentVector{Float64}(q = [2.2763124383665466e14, -3.14977741197434e14, 7.058732804821097e13, 1.6095290300619385e13, 6.628339915924113e11, 1.0450178891610495e9, 2595.9077082757617, 6.748007185817237, 6.604264003184089, 6.922786733820601, 6.682957266911184, 6.945403323059735, 6.711137618204414, 6.656096082264084, 6.479123002819505, 6.147464654651825, 6.039361831653805, 5.652147818372908, 6.154271690686521], ρ = [5.0, 2.3999125809047874e30, -9.208927315306011e29, -1.7669165534657745e29, -6.999265863648581e27, -1.1017634310287478e25, -2.7299973773030162e19, -1.6845665050515872e8, 147.24610225132864, 56.366991314009994, 74.77129872544933, 19.020919678901983, 7.773620537453436, 24.816711099031963, -7.713715579413335, 9.350784798698557, -41.20554006890733, -6.3737369724698825, -107.83102822687212, 5.0])

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

diff --git a/dev/speed.gif b/dev/speed.gif index 5b030147..06be698e 100644 Binary files a/dev/speed.gif and b/dev/speed.gif differ diff --git a/dev/vorticity.gif b/dev/vorticity.gif index 54b625c7..1b64717f 100644 Binary files a/dev/vorticity.gif and b/dev/vorticity.gif differ