Examples and Benchmarks

The GeoModBox.jl provides various one- and two-dimensional examples and benchmark problems for each of the governing equations. The examples demonstrate how to implement different numerical solvers, apply scaling, and evaluate the advantages and limitations of various finite difference schemes.

By clicking on the title of each document page, you will be directed to the corresponding Julia script in the examples directory.

Advection

Heat Diffusion

Stokes Equation

Thermal Convection Models

Thermo-Mechanical Shear Localization

In the following, the runtime for each of the provided examples is listed as a reference.

ExampleTotal Runtime
=== Advection ===
2D_Advection.jl1) Upwind: 173 s
Resolution: 100x1002) SLF: 173 s
3) Semi-lag: 177 s
4) Tracers: 459 s
2DAdvectionResolutionTest.jl1) save_fig = 1: 1.04 h
2) save_fig = -1: 1109 s
=== Heat Diffusion ===
–- 1D –-
ContinentalGeotherm_1D.jl7.22 s
Heat1Ddiscretization.jl3.66 s
OceanicGeotherm_1D.jl691 ms
–- 2D –-
BackwardEuler.jl14.4 s
ForwardEuler.jl5.08 s
Gaussian_Diffusion.jl422 s
Poisson_RestTest.jl23.5 s
Poissonvariablek.jl7.69 s
=== Stokes Equation ===
–- 1D –-
ChannelFlow_1D.jl1.53 s
–- 2D –-
FallingBlockBenchmark_*.jl1) Steady State: 6.33 s (dc: 5.98 s)
2) Time-Dependent
a) Upwind: 114 s (dc: 114 s)
b) SLF: 68.3 s (dc: 68.8 s)
c) Semi-lag: 319 s (dc: 325 s)
d) Tracers: 326 s (dc: 328 s)
FallingBlockConstEta_DC.jl379 ms
FallingBlockVarEta_DC.jl40.3 s
RTI.jl117 s
RTI_GrowthRate.jl46.6 s
RTIGrowthRateResTest_CNC.jl414 s
RTIGrowthRateResTest_CNM.jl1573 s
ViscousInclusion.jl810 ms
VanKekenBenchmark.jl917 s
VanKekenBenchmark_scaled.jl807 s
=== Thermal Convection Models ===
–- Constant Viscosity –-
BottomHeated.jl1541 s
InternallyHeated.jl1518 s
MixedHeated.jl1474 s
–- Variable Viscosity –-
BottomHeated_VarEta.jl3.38 h
Blankenbachvareta.jlRes: 50x50 : 1587.42 s
100x100: 13182.8 s
=== Thermo-mechanical Shear Localization ===
ShearHeatingShearBands.jl1.32 h

Note: In GeoModBox.jl, thermal and kinematic boundary conditions are explicitly implemented within the solvers. The absolute values at ghost nodes are computed based on the values provided in the boundary condition tuple BC. Each tuple specifies the type (either Dirichlet or Neumann) and the corresponding value at each boundary. For the velocity boundary conditions, additional values must be defined in val for the boundary nodes (e.g., BC.val.vxW, BC.val.vxE). Furthermore, if non-zero, these values must be assigned to the initial boundary nodes of the respective velocity fields. For more details on the implementation of the velocity boundary conditions, refer to the documentation.

Note: By default, the results of time-dependent examples in GeoModBox.jl are stored as GIF animations. To visualize solutions at specific time steps without generating a GIF, set the parameter save_fig = 0. In this case, individual plots are not saved, so caution is advised when running problems that require multiple time step iterations.

Note: Some examples use named tuples to define constants and parameters. Alternatively, mutable structures can be used—particularly useful when parameters need to be modified after initialization (e.g., for scaling purposes). A full transition from named tuples to mutable structures is planned for future versions of GeoModBox.jl.