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
- 1-D continental geotherm
- Comparison of FD schemes on a Gaussian anomaly
- 1-D oceanic geotherm
- 2-D Gaussian anomaly using iterative backward Euler solver
- 2-D Gaussian anomaly using iterative forward Euler solver
- 2-D resolution test with Gaussian anomaly
- 2-D Poisson equation resolution test
- 2-D Poisson equation with variable thermal properties
Stokes Equation
- 1D channel flow with constant and depth-dependent viscosity
- 2D falling block benchmark (direct or defect correction)
- 2D falling block with constant or variable viscosity (defect correction)
- 2D Rayleigh–Taylor instability
- 2D Rayleigh–Taylor instability growth-rate benchmark and resolution test
- Van Keken Benchmark
- 2D Viscous Inclusion Benchmark
- Bottom heated, isoviscous thermal convection
- Internally heated, isoviscous thermal convection
- Mixed heated, isoviscous thermal convection
- Bottom heated, temperature-dependent viscosity
- Blankenbach benchmark; variable viscosity
Thermo-Mechanical Shear Localization
In the following, the runtime for each of the provided examples is listed as a reference.
| Example | Total Runtime |
|---|---|
| === Advection === | |
| 2D_Advection.jl | 1) Upwind: 173 s |
| Resolution: 100x100 | 2) SLF: 173 s |
| 3) Semi-lag: 177 s | |
| 4) Tracers: 459 s | |
| 2DAdvectionResolutionTest.jl | 1) save_fig = 1: 1.04 h |
| 2) save_fig = -1: 1109 s | |
| === Heat Diffusion === | |
| –- 1D –- | |
| ContinentalGeotherm_1D.jl | 7.22 s |
| Heat1Ddiscretization.jl | 3.66 s |
| OceanicGeotherm_1D.jl | 691 ms |
| –- 2D –- | |
| BackwardEuler.jl | 14.4 s |
| ForwardEuler.jl | 5.08 s |
| Gaussian_Diffusion.jl | 422 s |
| Poisson_RestTest.jl | 23.5 s |
| Poissonvariablek.jl | 7.69 s |
| === Stokes Equation === | |
| –- 1D –- | |
| ChannelFlow_1D.jl | 1.53 s |
| –- 2D –- | |
| FallingBlockBenchmark_*.jl | 1) 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.jl | 379 ms |
| FallingBlockVarEta_DC.jl | 40.3 s |
| RTI.jl | 117 s |
| RTI_GrowthRate.jl | 46.6 s |
| RTIGrowthRateResTest_CNC.jl | 414 s |
| RTIGrowthRateResTest_CNM.jl | 1573 s |
| ViscousInclusion.jl | 810 ms |
| VanKekenBenchmark.jl | 917 s |
| VanKekenBenchmark_scaled.jl | 807 s |
| === Thermal Convection Models === | |
| –- Constant Viscosity –- | |
| BottomHeated.jl | 1541 s |
| InternallyHeated.jl | 1518 s |
| MixedHeated.jl | 1474 s |
| –- Variable Viscosity –- | |
| BottomHeated_VarEta.jl | 3.38 h |
| Blankenbachvareta.jl | Res: 50x50 : 1587.42 s |
| 100x100: 13182.8 s | |
| === Thermo-mechanical Shear Localization === | |
| ShearHeatingShearBands.jl | 1.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 tupleBC. Each tuple specifies thetype(either Dirichlet or Neumann) and the correspondingvalue at each boundary. For the velocity boundary conditions, additional values must be defined invalfor 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.jlare stored as GIF animations. To visualize solutions at specific time steps without generating a GIF, set the parametersave_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.