Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ makedocs(
"02 - 1D Heat Diffusion (explicit)" => "man/exercises/02_1D_Heat_explicit.md", # Checked!
"03 - 1D Heat Diffusion (implicit)" => "man/exercises/03_1D_Heat_implicit.md", # Checked!
"04 - 2D Heat Diffusion (stationary)" => "man/exercises/04_2D_Diffusion_Stationary.md", # Checked!
"05 - 2D Heat Diffusion (Plume)" => "man/exercises/05_2D_Diffusion_TD_Plume.md", # Checked!
"05 - 2D Heat Diffusion (Sill)" => "man/exercises/05_2D_Diffusion_TD_Sill.md", # Checked!
"05a - 2D Heat Diffusion (Plume)" => "man/exercises/05_2D_Diffusion_TD_Plume.md", # Checked!
"05b - 2D Heat Diffusion (Sill)" => "man/exercises/05_2D_Diffusion_TD_Sill.md", # Checked!
"06 - 1D Advection" => "man/exercises/06_1D_Advection.md", # Checked!
"07 - 2D Energy Conservation" => "man/exercises/07_2D_Energy_Equation.md", # Checked!
"08 - 1D Stokes" => "man/exercises/08_1D_Stokes.md",
# "09 - 2D Falling Block (steady state)" => "man/exercises/09_2D_Falling_Block.md",
# "10 - 2D Falling Block (time-dep)" => "man/exercises/10_2D_Falling_Block_td.md",
"09 - 2D Falling Block (steady state)" => "man/exercises/09_2D_Falling_Block.md",
"10 - 2D Falling Block (time-dep)" => "man/exercises/10_2D_Falling_Block_td.md",
# "11 - 2D Thermal Convection" => "man/exercises/11_2D_Thermal_Convection.md",
# "12 - 2D Thermal Convection (scaled)" => "man/exercises/12_2D_Thermal_Convection_scaled.md",
# "13 - Blankenbach Benchmark" => "man/exercises/12_Blankenbach_Benchmark.md",
Expand Down
Binary file added docs/src/assets/09_FallingBlock_Instantan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/src/man/Exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ All exercises were performed on a single CPU: *AMD Ryzen 7 7735U with Radeon Gra
| --------------- | ---------------------------------- | ----------------- |
| 1 | Euler Advection | 5.741 |
| 2 | 1-D Heat Diffusion <br/> (explicit) | 1) 9.342 (1.14) <br/> 2) 9.975 (1.087) <br/> 3) 9.616 (1.017) |
| 3 | 1-D Heat Diffusion <br/> (implicit) | 1) 12.641 (1.749) <br/> 2) 13.537 (1.720) <br/> 3) 12.157 (1.731) |
| 4 | 2-D Steady State Heat Equation | 13.471 (2.069) |
| 5a | 2-D Time-dep. Heat Equation (Plume) | 1) Explicit: 18.632 (4.799) <br/> 2) Implicit: 78.201 (60.828) |
| 5b | 2-D Time-dep. Heat Equation (Sill) | 1) Explicit: 17.856 (4.566) <br/> 2) Implicit: 39.626 (22.679) |
| 6 | 1-D Advection Scheme | 1) FTCS: 11.644 (4.019) <br/> 2) Upwind: 11.03 (4.042) <br/> 3) Downwind: 11.465 (3.343) <br/> 4) LAX: 11.272 (3.405) <br/> 5) SLF: 11.312 (3.48) <br/> 6) Semilag: 14.318 (3.604) <br/> 7) Tracers: 15.662 (4.944) |
| 7 | 2-D Energy Equation | 1) Upwind+explicit: 17.468 (2.979) <br/> 2) Upwind+implicit: 31.441 (10.842) <br/> 3) Upwind+CNA: 32.065 (12.222) <br/> 4) Upwind+ADI: 121.665 (99.807) <br/> 5) Upwind+dc: 30.45 (11.401) <br/> 6) SLF+explicit: 22.002 (2.872) <br/> 7) SLF+implicit: 28.751 (8.911) <br/> 8) SLF+CNA: 29.876 (9.28) <br/> 9) SLF+ADI: 120.018 (98.74) <br/> 10) SLF+dc: 28.179 (9.379) <br/> 11) SL+explicit: 22.969 (6.334) <br/> 12) SL+implicit: 30.634 (9.682) <br/> 13) SL+CNA: 32.415 (11.566) <br/> 14) SL+ADI: 133.871 (110.704) <br/> 15) SL+dc: 35.364 (12.301) <br/> 16) Tracers+explicit: 89.499 (65.913) <br/> 17) Tracers+implicit: 108.464 (84.209) <br/> 18) Tracers+CNA: 112.171 (89.219) <br/> 19) Tracers+ADI: 186.71 (161.611) <br/> 20) Tracers+dc: 115.737 (89.089) |
| 8 | 1-D Stokes Equation | 8.489 (0.212) |
| 9 | 2-D Falling Block (steady state) | 20.764 (0.891) |
| 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) |


14 changes: 14 additions & 0 deletions docs/src/man/exercises/09_2D_Falling_Block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# [09 – Falling Block](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/exercises/09_2D_Falling_Block_en.ipynb)

In this exercise, students simulate the motion of a dense block sinking in a viscous fluid under the influence of gravity. The problem is set up in two dimensions with constant viscosity (*isoviscous* case) and *free-slip* velocity boundary conditions on all sides.

The goals of this exercise are to:
- Set up the **2-D model geometry** and define the block phase within the background medium.
- Assign appropriate **physical parameters**, such as viscosity, density contrast, and gravity.
- Implement the **momentum and mass conservation equations** using the finite difference method.
- Assemble and solve the resulting **linear system of equations** for velocities and pressure.
- Visualize the **velocity field** and the interaction between the sinking block and the surrounding viscous medium.

This exercise provides a simple but powerful benchmark problem to validate the Stokes solver and to understand the dynamics of density-driven flow in an isoviscous medium.

![Exercise09](../../assets/09_FallingBlock_Instantan.png)
22 changes: 22 additions & 0 deletions docs/src/man/exercises/10_2D_Falling_Block_td.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# [10 – 2D Falling Block (time-dependent)](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/exercises/10_2D_Falling_Block_td_en.ipynb)

This exercise extends the **falling block problem** to a **time-dependent** case with constant viscosity.
The problem couples the solution of the **momentum conservation equation** (Stokes system) with the **advection equation**, where density (or phase) is transported through the velocity field.

The main objectives are:

1. Setting up the model domain with a dense block embedded in a viscous medium under gravity,
2. Defining **free-slip** velocity boundary conditions on all sides,
3. Assembling the coefficient matrix for the Stokes system (constant viscosity → assembled once),
4. Implementing a **time loop** that in each step:
- Updates the right-hand side with the current density distribution,
- Solves the Stokes system for velocity and pressure,
- Advects density (or phase) using different numerical schemes, including tracers,
- Recomputes the time step and visualizes the solution,
5. Producing an animation of the sinking block over time.

This problem demonstrates how to couple **Stokes flow** with **advection of material properties**, and how the choice of advection scheme affects the evolution of the solution.

![Exercise10](../../assets/10_Falling_block_iso_td_tracers.gif)

**Figure 1.** Time evolution of the sinking block in a viscous medium using the tracer advection method.
Loading
Loading