Skip to content

Commit b969428

Browse files
committed
update docs
1 parent 5f0b77f commit b969428

29 files changed

+2011
-2102
lines changed

README.md

Lines changed: 18 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,12 @@
22

33
# GeoModBox.jl
44
The **Geod**ynamic **Mod**elling Tool**Box** is a julia package mainly used for teaching purposes. The package provides different finite difference, staggered, discretization schemes to numerically solve the governing equations for a two-dimensional geodynamic problem. The governing equations are the conservation equations of
5-
1) [**energy**](/examples/HeatEquation/README.md),
6-
2) [**momentum**](/examples/...),
7-
3) [**mass** and **compositon**](/examples/AdvectionEquation/README.md).
85

9-
The ```GeoModBox.jl``` includes a series of [exercises](/exercises/) and [examples](/examples/) of different geodynamically well defined problems. The exercises are given as Jupyter notebooks for the students to complete. The theoretical background and detailed explenations of the functions is mainly given in the [documentation](https://lukasfuchs.github.io/GeoModBox.jl/).
6+
1) [**energy**](./docs/src/man/DiffMain.md),
7+
2) [**momentum**](./docs/src/man/MomentumMain.md),
8+
3) [**mass** and **compositon**](./docs/src/man/AdvectMain.md).
109

11-
<!-- I will add some question directly here for the time beeing: I would like to add similar informations to this package as I did in my [FDCSGm repository](https://github.com/LukasFuchs/FDCSGm). However, I am not familiar with the doc option in github yet, that's why I added all the information in a README.md file for each module etc. I guess the doc option would be more suitable to add the details and simply add some figures and general information in the README.md. Have you ever worked with doc in github? -->
12-
13-
------------------
14-
------------------
15-
## Staggered Finite Difference
16-
<!--- brief general description of a staggered finite difference scheme
17-
- Energy equation
18-
- Momentum equation
19-
- add Figure of FD-Grid including all variables...
20-
-->
21-
------------------
22-
------------------
23-
## [Energy Conservation Equation](./examples/DiffusionEquation/README.md)
24-
&emsp; In geodynamics, the energy is described by the temperature and needs to be conserved within a closed system. Here, we solve the *temperature conservation equation*, or *temperature equation*, using an operator splitting method, that is, we first solve the *advective* part of the *temperature equation*, followed by the *diffusive* part.
25-
<!-- - General formulation of the energy equation (advection + diffusion term + radiogenic heating)
26-
- Operator splitting
27-
- Solution of the conductive part -->
28-
------------------
29-
### [Heat Diffusion Equation](./examples/DiffusionEquation/1D/README.md)
30-
&emsp; The **GeoModBox** provides different finite difference (**FD**) schemes (e.g., [forward](./src/HeatEquation/ForwardEuler.jl) and [backward](./src/HeatEquation/BackwardEuler.jl) Euler, [Crank-Nicholson approach](./src/HeatEquation/CNA.jl), [ADI](./src/HeatEquation/ADI.jl)) to solve the *diffusive part* of the time-dependent or steady-state *temperature equation* including radioactive heating, in [1-D](./examples/DiffusionEquation/1D/README.md) and [2-D](./examples/DiffusionEquation/2D/README.md). The solvers are located in [src/HeatEquation](./src/HeatEquation/). So far, only *Dirichlet* and *Neumann* thermal boundary conditions are available. Currently, most of the functions assume constant thermal parameters (except for the 1-D solvers).
31-
32-
The examples of solving the *heat diffusion equation* include, amongst others:
33-
- the determination of an [oceanic](./examples/DiffusionEquation/1D/OceanicGeotherm_1D.jl) and [continental](./examples/DiffusionEquation/1D/ContinentalGeotherm_1D.jl) 1-D geotherm profile,
34-
- [a comparison of the different **FD**-schemes applied on a 1-D gaussian temperature anomaly](./examples/DiffusionEquation/1D/Heat_1D_discretization.jl),
35-
- [a 2-D resolution test for each **FD**-scheme using a gaussian temperature anomaly](./examples/DiffusionEquation/2D/Gaussian_Diffusion.jl), and
36-
- [a resolution test for a 2-D poisson problem](./examples/DiffusionEquation/2D/Poisson_ResTest.jl).
37-
38-
For more examples see the [example folder](./examples/DiffusionEquation/). The [exercises](./exercises/) include solving
39-
- the 1-D diffusion equation using the [forward](./exercises/02_1D_Heat_explicit.ipynb) and [backward](./exercises/03_1D_Heat_implicit.ipynb) Euler methods,
40-
- [a 2-D poisson problem](./exercises/04_2D_Diffusion_Stationary.ipynb), and
41-
- a time-dependent temperature distribution within the lithosphere assuming a [plume](./exercises/05_2D_Diffusion_TD_Plume.ipynb) or [sill](./exercises/05_2D_Diffusion_TD_Sill.ipynb).
42-
43-
<!-- #### Numerical Schemes
44-
45-
All numerical schemes methods can be used in the [thermal convection code]() and the [Blankenbach Benchmark]() and are generally available to chose in the code.
46-
------------------ -->
47-
48-
### [Heat Advection Equation](./examples/AdvectionEquation/README.md)
49-
50-
&emsp; To solve the *advective part* of the *temperature equation*, the ```GeoModBox.jl``` provides the following different methods:
51-
- an upwind scheme,
52-
- the staggered -leaped frog scheme,
53-
- a semi-lagrangian advection, and
54-
- passive tracers/markers.
55-
56-
The solvers for a the tracer advection method are located in [./src/Tracers](./src/Tracers/), where the remaining advection routines are located in [./src/AdvectionEquation](./src/AdvectionEquation/). The routines are structured in such a way, that any property, as long as the property is defined on the *centroids* including *ghost nodes* on all boundaries, can be advected with the first **three** advection methods listed above. Using passive tracers, one can so far choose to either advect the temperature or to advect the phases. In case of advecting phases, one can define a certain rheology ($\eta$) or density ($\rho$) associated to each phase. The phase ID is used to interpolate the corresponding property from the tracers to the *centroids*.
57-
58-
&emsp; A key aspect for the advection equation is the conservation of the **amplitude** and the **shape** of an anomaly. Depending on the method, numerical diffusion or interpolation effects lead to strong deviations of the initial anomaly. For more details see [here](./examples/AdvectionEquation/README.md). The ```GeoModBox.jl``` contains several [routines](./src/InitialCondition/2Dini.jl) to setup a certain initial anomaly, either for properties defined on their correspondig grid (i.e., temperature, velocity, or phase) or for tracers advecting (so far) a certain temperature or phase. Within the examples and the exercise one can choose differen initial temperature and velocity conditions.
59-
60-
&emsp; The examples for a two dimensional advection problem include:
61-
- [a 2-D advection, assuming a constant velocity field (e.g., a rigid body rotation)](./examples/AdvectionEquation/2D_Advection.jl), and
62-
- [a resolution test of the same advection example](./examples/AdvectionEquation/2D_Advection_ResolutionTest.jl).
63-
64-
&emsp; The exercises include a:
65-
- [1-D advection of a gaussian or block anomaly](./exercises/06_1D_Advection.ipynb), and
66-
- [a 2-D advection coupled with the solution of the diffusion equation](./exercises/07_2D_Energy_Equation.ipynb).
10+
The ```GeoModBox.jl``` includes a series of [exercises](/exercises/) and [examples](/examples/) of different geodynamically well defined problems. The exercises are given as Jupyter notebooks for the students to complete. The theoretical background and detailed explenations of the examples and functions are mainly given in the [documentation](https://lukasfuchs.github.io/GeoModBox.jl/).
6711

6812
<!--
6913
- Different properties can be advected!
@@ -72,9 +16,8 @@ The solvers for a the tracer advection method are located in [./src/Tracers](./s
7216
#### Staggered Leap Frog (SLF)
7317
#### Semi-Lagrangian
7418
#### Passive Tracers -->
75-
------------------
76-
------------------
77-
## [Momentum Conservation Equation](./examples/StokesEquation/README.md)
19+
20+
<!-- ## [Momentum Conservation Equation](./examples/StokesEquation/README.md) -->
7821

7922
<!--
8023
- Constant viscosity
@@ -85,37 +28,37 @@ The solvers for a the tracer advection method are located in [./src/Tracers](./s
8528
- Defect correction
8629
-->
8730

88-
------------------
89-
------------------
90-
## Code Structure
31+
## Structure
9132

92-
### Initial Conditions
33+
<!-- The ```GeoModBox.jl``` is -->
34+
35+
<!-- ## Initial Conditions -->
9336

9437
<!---
38+
- Set Up, Geometry, Grid, etc.
9539
- IniTemperature, IniVelocity, IniPhase,
9640
- Tracer Initialization
41+
- Solution of Stokes equation, Diffusion equation, Advection Equation,
9742
- ...
9843
-->
9944

100-
### Scaling
45+
<!-- ## Scaling -->
46+
10147

102-
------------------
103-
------------------
104-
## [Benchmarks](./examples/)
48+
## [Benchmarks and Examples](./examples/)
10549

10650
### [Gaussian Temperature Diffusion](./examples/DiffusionEquation/2D/Gaussian_Diffusion.jl)
10751
<img src="./examples/DiffusionEquation/2D/Results/Gaussian_Diffusion_CNA_nx_100_ny_100.gif" alt="drawing" width="600"/> <br>
10852
**Figure 1. Gaussian Diffusion.** Time-dependent, diffusive solution of a 2-D Gaussian temperature anomaly using the [Crank-Nicholson approach](./src/HeatEquation/CNA.jl) in comparison to its analytical solution. Top Left: 2-D temperature field of the numerical solution and isotherms lines of the numerical (solid black) and analytical (dashed yellow) solution. Top Right: Total deviation to the analytical solution. Bottom Left: 1-D y-profile along x=0. Bottom Right: Root Mean Square total devation of the temperature over time.
10953

110-
11154
<img src="./examples/DiffusionEquation/2D/Results/Gaussian_ResTest.png" alt="drawing" width="600"/> <br>
11255
**Figure 2. Resolution test.** Maximum *RMS* $\varepsilon$, maximum, and mean temperature for each **FD**-scheme and multiple resolutions.
11356

11457
### [Rigid-Body-Rotation](./examples/AdvectionEquation/2D_Advection.jl)
11558

116-
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_upwind_100_100_nth_16.gif" alt="drawing" width="300"/>
117-
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_semilag_100_100_nth_16.gif" alt="drawing" width="300"/>
118-
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_tracers_100_100_nth_16.gif" alt="drawing" width="300"/>
59+
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_upwind_100_100_nth_1.gif" alt="drawing" width="300"/>
60+
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_semilag_100_100_nth_1.gif" alt="drawing" width="300"/>
61+
<img src="./examples/AdvectionEquation/Results/2D_advection_circle_RigidBody_tracers_100_100_nth_1.gif" alt="drawing" width="300"/>
11962
<br>
12063

12164
**Figure 3. Rigid-Body-Rotation.** Time-dependent solution of a rotating circular temperature anomaly using the **upwind (first)**, **semi-lagrangian (second)**, and **tracer (third)** method. Within a circular area of our model domain the velocity is set to the velocity of a rigid rotation and outside euqal to zero. The temperature is scaled by the maximum temperature of the anomaly.
@@ -134,9 +77,6 @@ The solvers for a the tracer advection method are located in [./src/Tracers](./s
13477

13578
**Figure 6. Falling Block Benchmark.** Final tracers distribution for specific cases with $\eta_r \ge 0$.
13679

137-
------------------
138-
------------------
139-
14080
<!--
14181
- Blanckenbach
14282
- Channel Flow

docs/make.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,20 @@ makedocs(
1818
"Heat Diffusion Equation" => Any[
1919
"General" => "man/DiffMain.md",
2020
"1D" => "man/DiffOneD.md",
21-
# "2D" => "man/DiffTwoD.md",
21+
"2D" => "man/DiffTwoD.md",
2222
],
2323
# "Advection Equation" => Any[
2424
# "General" => "man/AdvMain.md",
2525
# "1D" => "man/AdvOneD.md",
2626
# "2D" => "man/AdvTwoD.md",
2727
# ],
2828
# "Momentum Equation" => Any[
29-
# "General" => "man/MomMain.md",
30-
# "1D" => "man/MomOneD.md",
31-
# "2D" => "man/MomTwoD.md",
32-
# ]
29+
# "General" => "man/MomentumMain.md",
30+
# "1D" => "man/MomentumOneD.md",
31+
# "2D" => "man/MomentumTwoD.md",
32+
# ],
3333
],
34-
# "Examples" => any[
35-
36-
# ],
34+
# "Examples" => "man/Examples.md",
3735
"List of functions" => "man/listoffunctions.md",
3836
]
3937
)
File renamed without changes.
14.6 KB
Loading
24.9 KB
Loading

docs/src/assets/MomentumGrid.png

99.5 KB
Loading
46.4 KB
Loading
19.6 KB
Loading

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ The exercises include a:
104104

105105
![FBFinalStage](./assets/FallingBlock_FinalStage_tracers.png)
106106

107-
**Figure 6. Falling Block Benchmark.** Final tracers distribution for specific cases with $\eta_r \ge 0$.
107+
**Figure 6. Falling Block Benchmark.** Final tracers distribution for specific cases with $\eta_r \ge 0 $.
108108

109109
------------------

docs/src/man/AdvectMain.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# Advection Equation
1+
# Advection Equation
2+
3+
## (1D)
4+
5+
## (2D)

0 commit comments

Comments
 (0)