Skip to content

Commit 6781501

Browse files
authored
Merge pull request #100 from LukasFuchs/main
Finalize Blankenbach Benchmark Exercise
2 parents bb2e6b2 + 3700ed1 commit 6781501

14 files changed

+1685
-39
lines changed
12.4 KB
Loading
28.9 KB
Loading
19.3 KB
Loading
21.2 MB
Loading

docs/src/man/Exercises.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ All exercises were performed on a single CPU: *AMD Ryzen 7 7735U with Radeon Gra
3838
| 8 | 1-D Stokes Equation | 8.489 (0.212) |
3939
| 9 | 2-D Falling Block (steady state) | 20.764 (0.891) |
4040
| 10 | 2-D Falling Block (time-dep.) | 1) Upwind: 33.295 (3.68) <br/> 2) SLF: 32.333 (3.629) <br/> 3) SL: 37.537 (3.755) <br/> 4) Tracers: 36.291 (6.12) |
41-
| 11<sup>1</sup> | Thermal Convection (dim) | **Ra = 1e4** (Diff+Adv+Momentum) <br/> 1) Explicit+upwind+direct: 262.912 (1703) <br/> 2) Implicit+upwind+direct: 283.031 (1709) <br/> 3) CNA+upwind+direct: 284.944 (1708) <br/> 4) ADI+upwind+direct: 645.181 (1708) <br/> 5) DC+upwind+direct: 294.1 (1710) <br/> 6) Explicit+SLF+direct: 354.35 (2341) <br/> 7) Implicit+SLF+direct: 382.307 (2345) <br/> 8) CNA+SLF+direct: 386.764 (2344) <br/> 9) ADI+SLF+direct: 892.411 (2344) <br/> 10) DC+SLF+direct: 492.168 (2346) <br/> 11) Explicit+semilag+direct: 334.941 (1743) <br/> 12) Implicit+semilag+direct: 367.501 (1746) <br/> 13) CNA+semilag+direct: 371.289 (1744) <br/> 14) ADI+semilag+direct: 704.852 (1744) <br/> 15) DC+semilag+direct: 390.767 (1749) <br/> 16) Explicit+upwind+DC: 371.091 (1703) <br/> 17) Implicit+upwind+DC: 358.323 (1709) <br/> 18) CNA+upwind+DC: 338.862 (1708) <br/> 19) ADI+upwind+DC: 654.069 (1708) <br/> 20) DC+upwind+DC: 316.456 (1710) <br/> 21) Explicit+SLF+DC: 394.471 (2341) <br/> 22) Implicit+SLF+DC: 417.712 (2345) <br/> 23) CNA+SLF+DC: 412.717 (2344) <br/> 24) ADI+slf+DC: 890.714 (2344) <br/> 25) DC+SLF+DC: 403.217 (2346) <br/> 26) Explicit+semilag+DC: 286.046 (1743) <br/> 27) Implicit+semilag+DC: 295.961 (1746) <br/> 28) CNA+semilag+DC: 288.067 (1744) <br/> 29) ADI+semilag+DC: 671.159 (1744) <br/> 30) DC+semilag+DC: 357.894 (1749) <br/> <br/> **Ra = 1e5** (Diff+Adv+Momentum) <br/> 1) Explicit+semilag+dc: 489.869 (2433) <br/> 2) CNA+semilag+dc: 515.539 (2448) <br/> 3) CNA+upwind+dc: 1327.856 (8000) <br/><br/> **Ra = 1e6** (Diff+Adv+Momentum) <br/> 4) Explicit+semilag+dc: 1280.077 (8000) <br/> 5) CNA+semilag+dc: 1324.29 (8000) <br/> 6) CNA+upwind+dc: 1272.997 (8000) |
42-
| 12 | Thermal Convection (scaled) | **Ra = 1e4** (Diff+Adv+Momentum) <br/> 1) Explicit+upwind+direct: 310.208 (1950) <br/> 2) Implicit+upwind+direct: 333.82 (1957) <br/> 3) CNA+upwind+direct: 331.791 (1955) <br/> 4) ADI+upwind+direct: 739.821 (1955) <br/> 5) DC+upwind+direct: 352.163 (1953) <br/> 6) Explicit+SLF+direct: 437.435 (2704) <br/> 7) Implicit+SLF+direct: 468.642 (2708) <br/> 8) CNA+SLF+direct: 464.97 (2707) <br/> 9) ADI+SLF+direct: 1013.196 (2707) <br/> 10) DC+SLF+direct: 476.063 (2706) <br/> 11) Explicit+semilag+direct: 358.84 (1999) <br/> 12) Implicit+semilag+direct: 341.811 (2002) <br/> 13) CNA+semilag+direct: 384.29 (2000) <br/> 14) ADI+semilag+direct: 754.453 (2000) <br/> 15) DC+semilag+direct: 359.703 (2001) <br/> 16) Explicit+upwind+DC: 683.465 (1950) <br/> 17) Implicit+upwind+DC: 614.899 (1957) <br/> 18) CNA+upwind+DC: 649.386 (1955) <br/> 19) ADI+upwind+DC: 1048.092 (1955) <br/> 20) DC+upwind+DC: 640.199 (1953) <br/> 21) Explicit+SLF+DC: 835.568 (2704) <br/> 22) Implicit+SLF+DC: 862.991 (2708) <br/> 23) CNA+SLF+DC: 868.07 (2707) <br/> 24) ADI+slf+DC: 1402.997 (2707) <br/> 25) DC+SLF+DC: 876.505 (2706) <br/> 26) Explicit+semilag+DC: 613.413 (1999) <br/> 27) Implicit+semilag+DC: 652.126 (2002) <br/> 28) CNA+semilag+DC: 638.264 (2000) <br/> 29) ADI+semilag+DC: 1027.153 (2000) <br/> 30) DC+semilag+DC: 620. 945 (2001) <br/> <br/> **Ra = 1e5** (Diff+Adv+Momentum) <br/> 31) Explicit+semilag+dc: 3502.72 (8000) <br/> 32) CNA+semilag+dc: 3175.01 (8000) <br/> 33) CNA+upwind+dc: 3330.177 (8000) <br/><br/> **Ra = 1e6** (Diff+Adv+Momentum) <br/> 34) Explicit+semilag+dc: 3327.062 (8000) <br/> 35) CNA+semilag+dc: 3387.836 (8000) <br/> 36) CNA+upwind+dc: 3277.684 (8000) <br/> |
41+
| 11<sup>1</sup> | Thermal Convection (dim) <br/> **Resolution: 150x50** | **Ra = 1e4** (Diff+Adv+Momentum) <br/> 1) Explicit+upwind+direct: 262.912 (1703) <br/> 2) Implicit+upwind+direct: 283.031 (1709) <br/> 3) CNA+upwind+direct: 284.944 (1708) <br/> 4) ADI+upwind+direct: 645.181 (1708) <br/> 5) DC+upwind+direct: 294.1 (1710) <br/> 6) Explicit+SLF+direct: 354.35 (2341) <br/> 7) Implicit+SLF+direct: 382.307 (2345) <br/> 8) CNA+SLF+direct: 386.764 (2344) <br/> 9) ADI+SLF+direct: 892.411 (2344) <br/> 10) DC+SLF+direct: 492.168 (2346) <br/> 11) Explicit+semilag+direct: 334.941 (1743) <br/> 12) Implicit+semilag+direct: 367.501 (1746) <br/> 13) CNA+semilag+direct: 371.289 (1744) <br/> 14) ADI+semilag+direct: 704.852 (1744) <br/> 15) DC+semilag+direct: 390.767 (1749) <br/> 16) Explicit+upwind+DC: 371.091 (1703) <br/> 17) Implicit+upwind+DC: 358.323 (1709) <br/> 18) CNA+upwind+DC: 338.862 (1708) <br/> 19) ADI+upwind+DC: 654.069 (1708) <br/> 20) DC+upwind+DC: 316.456 (1710) <br/> 21) Explicit+SLF+DC: 394.471 (2341) <br/> 22) Implicit+SLF+DC: 417.712 (2345) <br/> 23) CNA+SLF+DC: 412.717 (2344) <br/> 24) ADI+slf+DC: 890.714 (2344) <br/> 25) DC+SLF+DC: 403.217 (2346) <br/> 26) Explicit+semilag+DC: 286.046 (1743) <br/> 27) Implicit+semilag+DC: 295.961 (1746) <br/> 28) CNA+semilag+DC: 288.067 (1744) <br/> 29) ADI+semilag+DC: 671.159 (1744) <br/> 30) DC+semilag+DC: 357.894 (1749) <br/> <br/> **Ra = 1e5** (Diff+Adv+Momentum) <br/> 1) Explicit+semilag+dc: 489.869 (2433) <br/> 2) CNA+semilag+dc: 515.539 (2448) <br/> 3) CNA+upwind+dc: 1327.856 (8000) <br/><br/> **Ra = 1e6** (Diff+Adv+Momentum) <br/> 4) Explicit+semilag+dc: 1280.077 (8000) <br/> 5) CNA+semilag+dc: 1324.29 (8000) <br/> 6) CNA+upwind+dc: 1272.997 (8000) |
42+
| 12 | Thermal Convection (scaled) <br/> **Resolution: 150x50** | **Ra = 1e4** (Diff+Adv+Momentum) <br/> 1) Explicit+upwind+direct: 310.208 (1950) <br/> 2) Implicit+upwind+direct: 333.82 (1957) <br/> 3) CNA+upwind+direct: 331.791 (1955) <br/> 4) ADI+upwind+direct: 739.821 (1955) <br/> 5) DC+upwind+direct: 352.163 (1953) <br/> 6) Explicit+SLF+direct: 437.435 (2704) <br/> 7) Implicit+SLF+direct: 468.642 (2708) <br/> 8) CNA+SLF+direct: 464.97 (2707) <br/> 9) ADI+SLF+direct: 1013.196 (2707) <br/> 10) DC+SLF+direct: 476.063 (2706) <br/> 11) Explicit+semilag+direct: 358.84 (1999) <br/> 12) Implicit+semilag+direct: 341.811 (2002) <br/> 13) CNA+semilag+direct: 384.29 (2000) <br/> 14) ADI+semilag+direct: 754.453 (2000) <br/> 15) DC+semilag+direct: 359.703 (2001) <br/> 16) Explicit+upwind+DC: 683.465 (1950) <br/> 17) Implicit+upwind+DC: 614.899 (1957) <br/> 18) CNA+upwind+DC: 649.386 (1955) <br/> 19) ADI+upwind+DC: 1048.092 (1955) <br/> 20) DC+upwind+DC: 640.199 (1953) <br/> 21) Explicit+SLF+DC: 835.568 (2704) <br/> 22) Implicit+SLF+DC: 862.991 (2708) <br/> 23) CNA+SLF+DC: 868.07 (2707) <br/> 24) ADI+slf+DC: 1402.997 (2707) <br/> 25) DC+SLF+DC: 876.505 (2706) <br/> 26) Explicit+semilag+DC: 613.413 (1999) <br/> 27) Implicit+semilag+DC: 652.126 (2002) <br/> 28) CNA+semilag+DC: 638.264 (2000) <br/> 29) ADI+semilag+DC: 1027.153 (2000) <br/> 30) DC+semilag+DC: 620. 945 (2001) <br/> <br/> **Ra = 1e5** (Diff+Adv+Momentum) <br/> 31) Explicit+semilag+dc: 3502.72 (8000) <br/> 32) CNA+semilag+dc: 3175.01 (8000) <br/> 33) CNA+upwind+dc: 3330.177 (8000) <br/><br/> **Ra = 1e6** (Diff+Adv+Momentum) <br/> 34) Explicit+semilag+dc: 3327.062 (8000) <br/> 35) CNA+semilag+dc: 3387.836 (8000) <br/> 36) CNA+upwind+dc: 3277.684 (8000) <br/> |
43+
| 13 | Blankenbach Benchmark | **Resolution: 50x50** <br/><br/> 1) Ra = 1e4: 176.532 (2108) <br/> 2) Ra = 1e5: 213.955 (2406) <br/> 3) Ra = 1e6: 1003.409 (8000) <br/> <br/> **Resolution: 100x100** <br/><br/> 1) Ra = 1e4: 3309.393 (8000) <br/> 2) Ra = 1e5: 3232.410 (5045) <br/> 3) Ra = 1e6: 5008.271 (8000) <br/> |
4344

4445
---
4546

docs/src/man/exercises/11_2D_Thermal_Convection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The results illustrate how increasing the Rayleigh number strengthens convection
2323

2424
![Exercise11a](../../assets/11_ThermalConvection_1.0e6_150_50_lineara_semilag_CNA_dc.gif)
2525

26-
**Figure 1.** Isoviscous, bottom-heated thermal convection for $Ra = 10^6$ with a resolution of 150x50. The initial condition is a linearly increasing temperature profile with an elliptical anomaly at the top. Thermal boundary conditions are fixed temperature at the top and bottom and zero heat flux at the sides. All velocity boundary conditions are free slip. Heat diffusion is solved using the Crank–Nicolson method, the Stokes equation using the defect correction method, and temperature advection with the semi-Lagrangian method. Models run until a steady state is reached or up to a maximum of 8000 iterations.
26+
**Figure 1.** Isoviscous, bottom-heated thermal convection for $Ra = 10^6$ with a resolution of 150x50. The initial condition is a linearly increasing temperature profile with an elliptical anomaly on top. Thermal boundary conditions are fixed temperature at the top and bottom and zero heat flux at the sides. All velocity boundary conditions are free slip. Heat diffusion is solved using the Crank–Nicolson method, the Stokes equation using the defect correction method, and temperature advection with the semi-Lagrangian method. Models run until a steady state is reached or up to a maximum of 8000 iterations.
2727

2828
![Exercise11b](../../assets/11_ThermalConvectionTimeSeries1.0e6_150_50_lineara_semilag_CNA_dc.png)
2929

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# [12 – 2D Thermal Convection (scaled)](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/exercises/12_2D_Thermal_Convection_scaled_en.ipynb)
22

3-
This exercise revisits **2-D thermal convection** in a fully **nondimensional** (scaled) framework. You will define scaling constants, transform the governing equations, and study how the flow depends on the **Rayleigh number**. The setup follows the **Boussinesq approximation** with isoviscous rheology and bottom heating.
3+
This exercise revisits **2-D thermal convection** in a fully **nondimensional** (scaled) framework. You will define scaling constants and transform the governing equations, and study how the flow depends on the **Rayleigh number**. The setup follows the **Boussinesq approximation** with isoviscous rheology and bottom heating.
44

5-
## Objectives
5+
**Objectives**
66

77
1. Define physically motivated **scaling constants** and apply the **nondimensional transformations** to the PDEs.
88
2. Formulate the **dimensionless** energy, momentum, and mass conservation equations (incl. buoyancy term $Ra,T'$).
@@ -11,12 +11,18 @@ This exercise revisits **2-D thermal convection** in a fully **nondimensional**
1111
5. Run and compare models for **$Ra = 10^4, 10^5, 10^6$**; discuss plume/slab scale and flow vigor.
1212
6. Compute diagnostics such as **Nusselt number** and **RMS velocity**; assess approach to steady state.
1313

14-
## Notes for students
14+
As the Rayleigh number increases:
1515

16-
- In the scaled form we assume reference parameters $\eta_0 = 1, g = 1,\kappa = 1,c_p = 1$.
17-
- If $Ra$ is specified, adjust $\eta_0$ accordingly; otherwise compute $Ra$ from the reference set.
18-
- Higher $Ra$ requires **finer grids** to maintain stability and accuracy; balance resolution vs. runtime.
19-
- Keep the documentation for the exercise **brief**: show the key equations, the scaling you used, and a **visualization** (animation or snapshot) of the final temperature/velocity fields.
16+
- **flow velocities** increase,
17+
- **convection becomes more vigorous**, and
18+
- structures such as *slabs* and *plumes* become **finer**.
19+
20+
Therefore, the **grid resolution** must be adjusted accordingly to ensure **numerical stability** and **accuracy**.
21+
22+
> However, higher resolution significantly increases computational cost!
23+
24+
The resolution provided here is sufficient for the Rayleigh numbers listed.
25+
That said, some numerical methods already show **initial inaccuracies**, so in practice a **higher resolution** is often advisable.
2026

2127
![Exercise12a](../../assets/12_ThermalConvection_1.0e6_150_50_lineara_semilag_CNA_dc.gif)
2228

@@ -28,4 +34,4 @@ This exercise revisits **2-D thermal convection** in a fully **nondimensional**
2834

2935
![Exercise12c](../../assets/12_ThermalConvection_iterations_1.0e6_150_50_lineara_semilag_CNA_dc.png)
3036

31-
**Figure 3.** Variation in the root mean square velocity with numerical iterations. Empirically, a tolerance of $10^{-15}$ was chosen to define steady state. Low-$Ra$ cases typically reach steady state in fewer than 3000 iterations.
37+
**Figure 3.** Variation in the root mean square velocity with numerical iterations. Empirically, a tolerance of $3.8^{-3}$ was chosen to define steady state. Low-$Ra$ cases typically reach steady state in fewer than 3000 iterations.

docs/src/man/exercises/12_Blankenbach_Benchmark.md

Whitespace-only changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# [13 – Blankenbach Benchmark](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/exercises/13_Blankenbach_Benchmark_en.ipynb)
2+
3+
This exercise introduces the **Blankenbach benchmark** (Blankenbach et al., 1989), a widely used reference test for validating numerical models of **mantle convection**. The benchmark compares results from different numerical methods by providing reference values for the **steady-state Nusselt number** and **mean velocity** at various Rayleigh numbers.
4+
5+
The setup consists of a **2-D rectangular box** with an aspect ratio of 1:1 (height = length = 1000 km). All boundaries are **free-slip**, while thermal boundary conditions are **fixed temperatures** at the top and bottom and **zero heat flux** along the sides. Density varies linearly with temperature according to the **Boussinesq approximation**.
6+
7+
The main objectives are:
8+
9+
1. Implementing a **steady-state 2-D isoviscous convection model** under the Boussinesq approximation,
10+
2. Computing thermal convection for three different **Rayleigh numbers** ($Ra = 10^4, 10^5, 10^6$),
11+
3. Comparing the computed **Nusselt numbers** and **mean velocities** with the published benchmark values,
12+
4. Performing a **resolution test** to assess the convergence of numerical results, and
13+
5. Discussing deviations and numerical stability at higher Rayleigh numbers.
14+
15+
This benchmark demonstrates how increasing the Rayleigh number strengthens convection, leading to thinner thermal boundary layers and more localized upwellings and downwellings. It also highlights the importance of numerical resolution and stability in high–Rayleigh-number simulations.
16+
17+
![Exercise13a](../../assets/13_Blankenbach_1.00e+06_100_100_lineara.gif)
18+
19+
**Figure 1.** Isoviscous, bottom-heated thermal convection for $Ra = 10^6$ with a resolution of 100×100.
20+
The initial condition is a linearly increasing temperature profile with an elliptical anomaly at the top.
21+
The background color shows the non-dimensional temperature, overlaid by temperature isolines (every 0.05) and centroid velocity vectors. Heat diffusion is solved using the **Crank–Nicolson** method, the Stokes equation using the **defect correction** method, and temperature advection with the **semi-Lagrangian** method.
22+
Models run until a steady state is reached or up to a maximum of 8000 iterations.
23+
24+
![Exercise13b](../../assets/13_BlankenbachBenchmark_TimeSeries_1.00e+06_100_100_lineara.png)
25+
26+
**Figure 2.** Time series of the surface Nusselt number and root-mean-square (RMS) velocity. The steady-state benchmark values are shown as red dashed lines. For details on how these diagnostics are calculated, see the [exercise](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/exercises/13_Blankenbach_Benchmark_en.ipynb).
27+
28+
![Exercise13c](../../assets/13_BlankenbachBenchmark_Profiles_1.00e+06_100_100_lineara.png)
29+
30+
**Figure 3.** Vertical temperature profile at the center of the model domain. Benchmark values for the local maximum and minimum temperatures are shown as black squares.
31+
32+
![Exercise13d](../../assets/13_BlankenbachBenchmark_iterations_1.00e+06_100_100_lineara.png)
33+
34+
**Figure 4.** Variation in root-mean-square velocity with numerical iterations. Empirically, a tolerance of $3.8^{-3}$ was chosen to define steady state. Low-$Ra$ cases typically reach steady state in fewer than 3000 iterations.

exercises/12_2D_Thermal_Convection_scaled.ipynb

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -746,20 +746,17 @@
746746
"source": [
747747
"Nun können wir die Gleichungen in der Zeitschleife lösen. Dabei müssen die folgenden Schritte berücksichtig werden: \n",
748748
"\n",
749-
"1. Berechnung der Zeit\n",
750-
"2. Initialisierung des unbekannten Vektors und der rechten Seite für die Impulserhaltung\n",
749+
"1. Initialisierung des unbekannten Vektors und der rechten Seite für die Impulserhaltung\n",
750+
"2. Berechnung der Zeit\n",
751751
"3. Null Setzung der Geschwindigkeits- und Druckfelder\n",
752-
"4. Aufstellung der Koeffizientenmatrix mit Hilfe von ```Assemblyc```\n",
753-
"5. Aktualisierung der rechten Seite mit Hilfe von ```updaterhs```\n",
754-
"6. Lösen der Impulserhaltung\n",
755-
"7. Update der Geschwindigkeits- und Druckfelder\n",
756-
"8. Bestimmung der Geschwindikeiten auf den *Centroids* \n",
757-
"9. Anpassung der maximalen Zeitschrittlänge\n",
758-
"10. Darstellung der Geschwindigkeit, Temperatur, und Dichte\n",
759-
"11. Lösen der Advektionsgleichung\n",
760-
"12. Lösen der Diffusionsgleichung\n",
761-
"13. Berechnung der statistischen Analysewerte (*Nusselt* Zahl, $V_{RMS}$, etc.)\n",
762-
"14. Aktualisierung der Dichte mit der *Zustandsgleichung*"
752+
"4. Lösen der Impulserhaltung\n",
753+
"5. Update der Geschwindigkeits- und Druckfelder\n",
754+
"6. Bestimmung der Geschwindikeiten auf den *Centroids* \n",
755+
"7. Anpassung der maximalen Zeitschrittlänge\n",
756+
"8. Darstellung der Geschwindigkeit, Temperatur, und Dichte\n",
757+
"9. Lösen der Advektionsgleichung\n",
758+
"10. Lösen der Diffusionsgleichung\n",
759+
"11. Berechnung der statistischen Analysewerte (*Nusselt* Zahl, $V_{RMS}$, etc.)"
763760
]
764761
},
765762
{
@@ -963,7 +960,7 @@
963960
"id": "b0aa5194",
964961
"metadata": {},
965962
"source": [
966-
"Als letztes berechnen wir noch die statistischen Analyseparameter: "
963+
"Im Folgenden werden die jeweiligen Abbildungen und die statistischen Analyseparameter dargestellt und gespeichert."
967964
]
968965
},
969966
{

0 commit comments

Comments
 (0)