Skip to content

Commit

Permalink
deploy: 7bd456e
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchengtkc committed Oct 27, 2023
1 parent 7b71972 commit 1d37c58
Show file tree
Hide file tree
Showing 16 changed files with 688 additions and 686 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a64190940d3a43b2eee597cd46ba4744
config: 3ab6e9d269ce3f1cd6a311d6c776704c
tags: 645f666f9bcd5a90fca523b33c5a78b7
14 changes: 7 additions & 7 deletions _sources/apireference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ API Reference

Model
---------------
.. automodule:: temperer.model
.. automodule:: warmth.model
:members:

Model builder
---------------
.. automodule:: temperer.build
.. automodule:: warmth.build
:members:
.. autoclass:: temperer.build.Builder
.. autoclass:: warmth.build.Builder
:members:

Parameters
---------------
.. automodule:: temperer.parameters
.. automodule:: warmth.parameters
:members:

Forward model
---------------
.. automodule:: temperer.forward_modelling
.. automodule:: warmth.forward_modelling
:members:

Simulator
---------------
.. automodule:: temperer.simulator
.. automodule:: warmth.simulator
:members:

Results
---------------
.. automodule:: temperer.postprocessing
.. automodule:: warmth.postprocessing
:members:
2 changes: 1 addition & 1 deletion _sources/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Welcome to Temperer's documentation!
Welcome to warmth's documentation!
====================================


Expand Down
10 changes: 5 additions & 5 deletions _sources/notebooks/Build_within_Python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"import sys\n",
"sys.path.append(\"../\")\n",
"import numpy as np\n",
"import temperer\n",
"from temperer.forward_modelling import Forward_model"
"import warmth\n",
"from warmth.forward_modelling import Forward_model"
]
},
{
Expand All @@ -28,7 +28,7 @@
"metadata": {},
"outputs": [],
"source": [
"model = temperer.Model()"
"model = warmth.Model()"
]
},
{
Expand Down Expand Up @@ -66,7 +66,7 @@
"metadata": {},
"outputs": [],
"source": [
"node =temperer.single_node()\n",
"node =warmth.single_node()\n",
"node.sediments_inputs = node_template\n",
"node.sediments"
]
Expand Down Expand Up @@ -108,7 +108,7 @@
"metadata": {},
"outputs": [],
"source": [
"from temperer.data import haq87\n",
"from warmth.data import haq87\n",
"model.builder.set_eustatic_sea_level(haq87)"
]
},
Expand Down
8 changes: 4 additions & 4 deletions _sources/theory.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# 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.
3D simulations in warmth 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!).
The complete 1D warmth 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](warmth3D/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.
The dolfinx model building and solving is managed by the class [UniformNodeGridFixedSizeMeshModel](warmth3D/fixed_mesh_model.py). The use of this class is demonstrated in [warmth3D_mapA_example.py](tests/warmth3D_mapA_example.py). Note that the NodeGrid class definition in this script should match the definition used in [parallel-1Dsed.py](warmth3D/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).
The test script [warmth3D_mapA_example.py](tests/warmth3D_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](warmth3D/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).
Expand Down
Loading

0 comments on commit 1d37c58

Please sign in to comment.