-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
68,572 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ jobs: | |
version: | ||
- '1.9' | ||
- '1.10' | ||
- '~1.11.0-0' | ||
- 'nightly' | ||
os: | ||
- ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Simple model of a magmatic chamber with a volcano on top | ||
|
||
### Aim | ||
The aim of this tutorial is to show you how to create 3D numerical model setups that can be used as initial setups for other codes. | ||
|
||
### Generating the model | ||
|
||
Lets start with creating a 3D model setup in cartesian coordinates, which uses the `CartData` data structure, with a resolution of $ 128 \times 128 \times 128 $ grid points, inside the domain $\Omega \in [-100,100] \times [-100,100] \times [-110,50]$ km | ||
|
||
```julia | ||
using GeophysicalModelGenerator | ||
|
||
nx,ny,nz = 128, 128, 128 | ||
x = range(-100, 100, nx); | ||
y = range(-100, 100, ny); | ||
z = range(-110, 50, nz); | ||
Grid = CartData(xyz_grid(x,y,z)); | ||
``` | ||
|
||
Now we create an integer array that will hold the `Phases` information (which usually refers to the material or rock type in the simulation) | ||
|
||
```julia | ||
Phases = fill(0, nx, ny, nz); | ||
``` | ||
|
||
And as in the previous tutorials we initialize the temperature field: | ||
```julia | ||
Temp = fill(1350.0, nx,ny,nz); | ||
``` | ||
|
||
For simplicity, we will assume a model with thee horizontal layers with different rheology where later we add the volcano and the magmatic chamber. We use `add_box!` to generate the initial horizontally layered model: | ||
|
||
```julia | ||
lith = LithosphericPhases(Layers=[15 45 100], Phases=[1 2 3]) | ||
add_box!(Phases, Temp, Grid; | ||
xlim=(-100, 100), | ||
ylim=(-400, 400.0), | ||
zlim=(-110.0, 0.0), | ||
phase = lith, | ||
T = HalfspaceCoolingTemp(Age=20) | ||
) | ||
``` | ||
|
||
Then we can add the volcanic shape using `add_volcano!` function. In this case the base of the volcano will be centered at $x_i = (0,0,0)$, with a height of 10 km and a 15 km radius: | ||
```julia | ||
add_volcano!(Phases, Temp, Grid; | ||
volcanic_phase = 1, | ||
center = (0, 0, 0), | ||
height = 10, | ||
radius = 15, | ||
base = 0.0, | ||
background = nothing, | ||
T = HalfspaceCoolingTemp(Age=20) | ||
) | ||
``` | ||
We can also add a magmatic chamber located below the volcano | ||
```julia | ||
add_ellipsoid!(Phases, Temp, Grid; | ||
cen = (0, 0, -40), | ||
axes = (10, 10, 10), | ||
phase = ConstantPhase(4), | ||
) | ||
``` | ||
|
||
where we prescribe a constant temperature of $T=1400^{\circ}C$ | ||
```julia | ||
@. Temp[Phases == 4] = 1400 | ||
Grid = addfield(Grid, (;Phases, Temp)) | ||
``` | ||
|
||
Finally we setup the temperature of the air to $T^{\text{air}}=0^{\circ}C$ | ||
```julia | ||
@. Temp[Phases == 0] = 0 | ||
``` | ||
|
||
```julia | ||
write_paraview(Grid,"VolcanoModel3D"); | ||
``` | ||
|
||
And the resulting image looks like | ||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ASAGI I/O | ||
|
||
[ASAGI](https://github.com/TUM-I5/ASAGI) is a fileformat that is used by codes such as SeisSol or ExaHype. It employs the NetCDF4 data format. | ||
|
||
We can read ASAGI files into GMG, and write GMG datasets to ASAGI format, which makes it straightforward to use GMG to create a model setup or to couple the results of geodynamic simulations (e.g., produced by LaMEM) with codes that support ASAGI. | ||
|
||
```@docs | ||
read_ASAGI | ||
write_ASAGI | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.