Skip to content

Commit

Permalink
deploy: a9ee20b
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchengtkc committed Oct 27, 2023
1 parent 9ee54fb commit 40aece1
Show file tree
Hide file tree
Showing 7 changed files with 266 additions and 218 deletions.
20 changes: 19 additions & 1 deletion _sources/theory.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Background theory
# Background theory


3D simulations in temperer are under active development. Currently, yhey are based on a uniform reactangular grid of 1D nodes (defined in a NodeGrid data structure). The sediment inputs, horizons are present day, are provided as .gri files, which are read into a SedimentStack class.

### Pre-requisite: grid of 1D node simulation
The complete 1D temperer simulation is run for some of the 1D nodes. For other 1D nodes the subsidence, beta factor, and crustal thickness are interpolated. The 1D simulations can be run using the script [parallel-1Dsed.py](temperer3D/parallel-1Dsed.py). Results for each node are pickled to a separate file (this is to be improved!).

### 3D heat equation simulation using dolfinx
The 3D simulation performs a series of heat equation solves, regularly updating the mesh positions from the 1D nodes. The equations are solved using the PETSc solver from the dolfinx package (part of the FeNiCs project). The compute mesh is built by defining hexahedra for every rectangle of 1D nodes and for every layer (i.e. each sediment, the crust, the lithosphere, and the aesthenosphere), which are then subdivided into tetrahedra.

The dolfinx model building and solving is managed by the class [UniformNodeGridFixedSizeMeshModel](temperer3D/fixed_mesh_model.py). The use of this class is demonstrated in [temperer3D_mapA_example.py](tests/temperer3D_mapA_example.py). Note that the NodeGrid class definition in this script should match the definition used in [parallel-1Dsed.py](temperer3D/parallel-1Dsed.py) to compute the 1D solutions. This script writes the results (mesh positions and function values) at every 1M years in xdmf format for visualization in ParaView.

### RESQML output
The test script [temperer3D_mapA_example.py](tests/temperer3D_mapA_example.py) further demonstrates writing the unstructured grid (with properties) in RESQML format, as a pair of .epc and .h5 files. The RESQML I/O functions are in a separate file, [resqpy_helpers.py](temperer3D/resqpy_helpers.py), and require a modified version of the resqpy library. To visualise RESQML data in ParaView, a 3rd-party plug-in can be installed, see [fespp](https://github.com/F2I-Consulting/fespp).

### 3D dependencies
The dolfinx package is Linux-only(?) and has to be compiled from source or installed using apt-get. The resqpy dependency can be installed with pip, but, for now, some writing of properties on unstructured grids requires a change in resqpy that is not yet merged. The other dependencies xtgeo and meshio can be installed using pip (requirements file is to be added).

8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ <h1>Welcome to Temperer’s documentation!<a class="headerlink" href="#welcome-t
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="theory.html">Background theory</a></li>
<li class="toctree-l1"><a class="reference internal" href="theory.html">Background theory</a><ul>
<li class="toctree-l2"><a class="reference internal" href="theory.html#pre-requisite-grid-of-1d-node-simulation">Pre-requisite: grid of 1D node simulation</a></li>
<li class="toctree-l2"><a class="reference internal" href="theory.html#d-heat-equation-simulation-using-dolfinx">3D heat equation simulation using dolfinx</a></li>
<li class="toctree-l2"><a class="reference internal" href="theory.html#resqml-output">RESQML output</a></li>
<li class="toctree-l2"><a class="reference internal" href="theory.html#d-dependencies">3D dependencies</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="example.html">Example</a><ul>
<li class="toctree-l2"><a class="reference internal" href="notebooks/Build_within_Python.html">Build 1D model</a></li>
</ul>
Expand Down
12 changes: 6 additions & 6 deletions notebooks/Build_within_Python.html

Large diffs are not rendered by default.

Loading

0 comments on commit 40aece1

Please sign in to comment.