Commit b27b2a2f authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/biomin_example' into 'master'

Feature/biomin example

See merge request !1784
parents 7a6fd6d4 d90afc08
add_subdirectory(2pinfiltration)
add_subdirectory(1ptracer)
add_subdirectory(biomineralization)
add_subdirectory(shallowwaterfriction)
add_subdirectory(freeflowchannel)
......@@ -74,3 +74,24 @@ You learn how to
<figure><img src="freeflowchannel/img/setup.png" alt="freeflow result"/></figure></td>
</a></td>
</tr></table>
### [:open_file_folder: Example 5: Biomineralization](biomineralization/README.md)
<table><tr><td>
In this example, we simulate microbially-induced calcite precipitation
You learn how to
* solve a reactive transport model including
* biofilm growth
* mineral precipitation and dissolution
* changing porosity and permeability
* use complex fluid and solid systems
* set a complex time loop with checkpoints, reading the check points from a file
* set complex injection boundary conditions, reading the check points from a file
</td>
<td width="20%"><a href="biomineralization/README.md">
<figure><img src="biomineralization/img/pore_scale_w_processes_named.png" alt="biomin result"/></figure></td>
</a></td>
</tr></table>
{
"README.md" : [
"doc/_intro.md"
],
"doc/modelconcept.md" : [
"doc/modelconcept_intro.md"
],
"doc/mainfile.md" : [
"doc/mainfile_intro.md",
"main.cc"
],
"doc/setup.md" : [
"doc/setup_intro.md",
"problem.hh",
"spatialparams.hh",
"properties.hh"
],
"doc/fluidmaterial.md" : [
"doc/fluidmaterial_intro.md",
"material/co2tableslaboratory.hh",
"material/components/suspendedbiomass.hh",
"material/fluidsystems/biominsimplechemistry.hh",
"material/fluidsystems/icpcomplexsalinitybrine.hh"
],
"doc/solidmaterial.md" : [
"doc/solidmaterial_intro.md",
"material/components/biofilm.hh",
"material/solidsystems/biominsolids.hh"
],
"navigation" : {
"mainpage" : "README.md",
"subpages" : [
"doc/modelconcept.md",
"doc/mainfile.md",
"doc/setup.md",
"doc/fluidmaterial.md",
"doc/solidmaterial.md"
],
"subtitles" : [
"Model concept",
"Main file",
"Simulation setup",
"Specific fluid material files",
"Specific solid material files"
]
}
}
dune_symlink_to_source_files(FILES injections_checkpoints.dat injections_type.dat params.input)
# compile MICP simplified chemistry column setup
dune_add_test(NAME example_biomineralization
SOURCES main.cc)
<!-- Important: This file has been automatically generated by generate_example_docs.py. Do not edit this file directly! -->
# Biomineralization
We simulate microbially-induced calcite precipitation in a vertical sand-column.
The problem is considered radially-symmetric so that a one-dimensional problem can be simulated.
__The main points illustrated in this example are__
* solving a reactive transport model including
* biofilm growth
* mineral precipitation and dissolution
* changing porosity and permeability
* using complex fluid and solid systems
* setting a complex time loop with checkpoints, reading the check points from a file
* setting complex injection boundary conditions, reading the check points from a file
__Table of contents__. This description is structured as follows:
[[_TOC_]]
__Result__. The result will look like below.
You see the volume fractions of the solid components after 100000s over the column.
<figure>
<center>
<img src="img/results_volfracs_over_length_100000s.png" alt="Biofilm and calcite volume fractions" width="50%"/>
<figcaption> <b> Fig.1 </b> - Biofilm and calcite volume fractions.</figcaption>
</center>
</figure>
## Problem set-up
A vertical, sand-filled column is biomineralized by repeated injections of various aqueous solutions
from its bottom end. The setup will be explained in more detail in [Part 3: Example Setup](doc/setup.md).
For more information, see the description of _column experiment D1_ in Section 4.2 of [@Hommel2016].
## What is microbially-induced calcite precipitation?
Microbially-induced calcite precipitation (MICP) is an engineering technology for targeted biomineralization.
It can be used in the context of sealing possible leakage pathways of subsurface gas or oil reservoirs as well as other applications.
The governing processes are two-phase multi-component reactive transport including precipitation and dissolution
of calcite, as well as biomass-related processes:
* attachment of biomass to surfaces,
* detachment of biomass from a biofilm,
* growth and decay of biomass.
Additionally, the reduction in porosity and permeability has to be considered.
This results from the presence of the solid phases biofilm and calcite in the pore space.
In subsurface applications, MICP is typically
associated with a reduction of porosity, which, even more importantly, corresponds to a
reduction of permeability.
MICP can be used to alter hydraulic flow conditions, for example, by filling highly permeable pathways such as
fractures, faults, or behind-casing defects in boreholes within a geological
formation, e.g. [@Phillips2013a].
The bacterium $`\textit{S.~pasteurii}`$
expresses the enzyme urease that catalyzes the hydrolysis reaction of
urea (CO(NH<sub>2</sub>)<sub>2</sub>) into ammonia (NH<sub>3</sub>) and carbon
dioxide (CO<sub>2</sub>):
```math
\mathrm{CO(NH_2)_2} + 2\mathrm{H_2O} \xrightarrow{urease}
2\mathrm{NH_{3}} + \mathrm{H_2CO_{3}}.
\tag{1}
```
Aqueous solutions of ammonia become alkaline until the equilibrium of ammonium and ammonia is reached.
Thus, the ureolysis reaction leads to an increase in pH until the pH is equal to the pKa of ammonia.
This shifts the
carbonate balance in an aqueous solution toward higher concentrations of
dissolved carbonate.
Adding calcium to the system results then in the precipitation of calcium carbonate:
```math
\mathrm{CO_{3}^{2-}} + \mathrm{Ca^{2+}} \longrightarrow \mathrm{CaCO_3 \downarrow}.
```
The resulting overall MICP reaction equation is:
```math
\mathrm{CO(NH_2)_2} + 2\mathrm{H_2O} + \mathrm{Ca^{2+}} \xrightarrow{urease}
2\mathrm{NH_{4}^{+}} + \mathrm{CaCO_{3}} \downarrow.
```
In a porous medium, biofilm growth, fluid dynamics,
and reaction rates are strongly interacting.
A pore-scale sketch of the most important processes of MICP is shown
in Fig.2.
<figure>
<center>
<img src="img/pore_scale_w_processes_named.png" alt="Schematic pore-scale sketch of the processes during biomineralization." width="50%"/>
<figcaption> <b> Fig.2 </b> - Schematic pore-scale sketch of the processes during biomineralization.</figcaption>
</center>
</figure>
A major difficulty for practical engineering applications of MICP is the predictive planning of a scenario and its impact.
While the basic chemistry and the flow processes are known, it is mainly the quantitative description
of the influence of the biofilm and the developing precipitates on hydraulic parameters that poses challenges to achieving predictability.
More details on modeling biomineralization are given in [Part 1: Model Concept](doc/modelconcept.md).
# The code documentation
In the following, we take a closer look at the source files for this example.
The setup is rather complex in comparison to the other examples.
We will discuss the different parts of the code in detail subsequently.
```
└── biomineralization/
├── CMakeLists.txt -> build system file
├── main.cc -> main program flow
├── params.input -> runtime parameters
├── injections.dat -> runtime injection strategy input file
├── properties.hh -> compile time settings for the simulation
├── problem.hh -> boundary & initial conditions for the simulation
├── spatialparams.hh -> parameter distributions for the simulation
└── material/ -> components, fluid- and solidsystems
├── components/
│ ├── biofilm.hh
│ └── suspendedbiomass.hh
├── fluidsystems/
│ ├── biominsimplechemistry.hh
│ └── icpcomplexsalinitybrine.hh
├── solidsystems/
│ └── biominsolids.hh
└── co2tableslaboratory.hh
```
In order to define a simulation setup in DuMu<sup>x</sup>, you need to implement compile-time settings,
where you specify the classes and compile-time options that DuMu<sup>x</sup> should use for the simulation.
Moreover, a `Problem` class needs to be implemented, in which the initial and boundary conditions
are specified. Finally, spatially-distributed values for the parameters required by the used model
are implemented in a `SpatialParams` class.
__Part 1__ discusses the mathematical model in more detail.
__Part 2__ takes a close look at the main file.
`main.cc` controlling the simulation, and containing the time loop management,
A special feature of this example, which might be interesting also for non-biomineralization modelers,
is that it uses the class `CheckPointTimeLoop` extensively to set the injections of the various consecutive
biomineralization solution injections based on a separate input file `injections_checkpoints.dat`.
Similar strategies might be useful when simulating experimental setups with boundary conditions changing over time.
__Part 3__ takes a close look at the problem set-up.
`problem.hh` featuring the reactive source and sink terms discussed in the model concept and the time-dependent injection boundary conditions, and
`spatialparams.hh` with the spatially distributed parameters, most importantly the porosity and permeability changing due to the reactions.
A special feature of this example, which might be interesting also for non-biomineralization modelers,
is that `problem.hh`, determines the Neumann boundary condition, more specifically which type of solution is currently injected, (the `injectionType_`) based on a separate input file `injections_type.dat`.
Similar strategies might be useful when simulating experimental setups with boundary conditions changing over time.
__Part 4__ discusses the code concerned with the fluid (files in the folder `material/`),
especially the multi-component fluidsystems.
The CO<sub>2</sub> properties are stored in the CO<sub>2</sub> tables in the subfolder `material` (`co2tableslaboratory.hh`,`co2valueslaboratory.inc`).
__Part 5__ discusses the code concerned with the solid properties (files in the folder `material/`),
especially the multi-component solidsystems and variable solid volume fractions.
[@Ebigbo2012]: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2011WR011714 "Darcy-scale modeling of microbially induced carbonate mineral precipitation in sand columns"
[@Hommel2015]: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1002/2014WR016503 "A revised model for microbially induced calcite precipitation: Improvements and new insights based on recent experiments"
[@Hommel2016]: https://elib.uni-stuttgart.de/handle/11682/8787 "Modelling biogeochemical and mass transport processes in the subsurface: investigation of microbially induced calcite precipitation"
## Part 1: Model concept
| [:arrow_right: Click to continue with part 1 of the documentation](doc/modelconcept.md) |
|---:|
## Part 2: Main file
| [:arrow_right: Click to continue with part 2 of the documentation](doc/mainfile.md) |
|---:|
## Part 3: Simulation setup
| [:arrow_right: Click to continue with part 3 of the documentation](doc/setup.md) |
|---:|
## Part 4: Specific fluid material files
| [:arrow_right: Click to continue with part 4 of the documentation](doc/fluidmaterial.md) |
|---:|
## Part 5: Specific solid material files
| [:arrow_right: Click to continue with part 5 of the documentation](doc/solidmaterial.md) |
|---:|
\ No newline at end of file
# Biomineralization
We simulate microbially-induced calcite precipitation in a vertical sand-column.
The problem is considered radially-symmetric so that a one-dimensional problem can be simulated.
__The main points illustrated in this example are__
* solving a reactive transport model including
* biofilm growth
* mineral precipitation and dissolution
* changing porosity and permeability
* using complex fluid and solid systems
* setting a complex time loop with checkpoints, reading the check points from a file
* setting complex injection boundary conditions, reading the check points from a file
__Table of contents__. This description is structured as follows:
[[_TOC_]]
__Result__. The result will look like below.
You see the volume fractions of the solid components after 100000s over the column.
<figure>
<center>
<img src="img/results_volfracs_over_length_100000s.png" alt="Biofilm and calcite volume fractions" width="50%"/>
<figcaption> <b> Fig.1 </b> - Biofilm and calcite volume fractions.</figcaption>
</center>
</figure>
## Problem set-up
A vertical, sand-filled column is biomineralized by repeated injections of various aqueous solutions
from its bottom end. The setup will be explained in more detail in [Part 3: Example Setup](doc/setup.md).
For more information, see the description of _column experiment D1_ in Section 4.2 of [@Hommel2016].
## What is microbially-induced calcite precipitation?
Microbially-induced calcite precipitation (MICP) is an engineering technology for targeted biomineralization.
It can be used in the context of sealing possible leakage pathways of subsurface gas or oil reservoirs as well as other applications.
The governing processes are two-phase multi-component reactive transport including precipitation and dissolution
of calcite, as well as biomass-related processes:
* attachment of biomass to surfaces,
* detachment of biomass from a biofilm,
* growth and decay of biomass.
Additionally, the reduction in porosity and permeability has to be considered.
This results from the presence of the solid phases biofilm and calcite in the pore space.
In subsurface applications, MICP is typically
associated with a reduction of porosity, which, even more importantly, corresponds to a
reduction of permeability.
MICP can be used to alter hydraulic flow conditions, for example, by filling highly permeable pathways such as
fractures, faults, or behind-casing defects in boreholes within a geological
formation, e.g. [@Phillips2013a].
The bacterium $`\textit{S.~pasteurii}`$
expresses the enzyme urease that catalyzes the hydrolysis reaction of
urea (CO(NH<sub>2</sub>)<sub>2</sub>) into ammonia (NH<sub>3</sub>) and carbon
dioxide (CO<sub>2</sub>):
```math
\mathrm{CO(NH_2)_2} + 2\mathrm{H_2O} \xrightarrow{urease}
2\mathrm{NH_{3}} + \mathrm{H_2CO_{3}}.
\tag{1}
```
Aqueous solutions of ammonia become alkaline until the equilibrium of ammonium and ammonia is reached.
Thus, the ureolysis reaction leads to an increase in pH until the pH is equal to the pKa of ammonia.
This shifts the
carbonate balance in an aqueous solution toward higher concentrations of
dissolved carbonate.
Adding calcium to the system results then in the precipitation of calcium carbonate:
```math
\mathrm{CO_{3}^{2-}} + \mathrm{Ca^{2+}} \longrightarrow \mathrm{CaCO_3 \downarrow}.
```
The resulting overall MICP reaction equation is:
```math
\mathrm{CO(NH_2)_2} + 2\mathrm{H_2O} + \mathrm{Ca^{2+}} \xrightarrow{urease}
2\mathrm{NH_{4}^{+}} + \mathrm{CaCO_{3}} \downarrow.
```
In a porous medium, biofilm growth, fluid dynamics,
and reaction rates are strongly interacting.
A pore-scale sketch of the most important processes of MICP is shown
in Fig.2.
<figure>
<center>
<img src="img/pore_scale_w_processes_named.png" alt="Schematic pore-scale sketch of the processes during biomineralization." width="50%"/>
<figcaption> <b> Fig.2 </b> - Schematic pore-scale sketch of the processes during biomineralization.</figcaption>
</center>
</figure>
A major difficulty for practical engineering applications of MICP is the predictive planning of a scenario and its impact.
While the basic chemistry and the flow processes are known, it is mainly the quantitative description
of the influence of the biofilm and the developing precipitates on hydraulic parameters that poses challenges to achieving predictability.
More details on modeling biomineralization are given in [Part 1: Model Concept](doc/modelconcept.md).
# The code documentation
In the following, we take a closer look at the source files for this example.
The setup is rather complex in comparison to the other examples.
We will discuss the different parts of the code in detail subsequently.
```
└── biomineralization/
├── CMakeLists.txt -> build system file
├── main.cc -> main program flow
├── params.input -> runtime parameters
├── injections.dat -> runtime injection strategy input file
├── properties.hh -> compile time settings for the simulation
├── problem.hh -> boundary & initial conditions for the simulation
├── spatialparams.hh -> parameter distributions for the simulation
└── material/ -> components, fluid- and solidsystems
├── components/
│ ├── biofilm.hh
│ └── suspendedbiomass.hh
├── fluidsystems/
│ ├── biominsimplechemistry.hh
│ └── icpcomplexsalinitybrine.hh
├── solidsystems/
│ └── biominsolids.hh
└── co2tableslaboratory.hh
```
In order to define a simulation setup in DuMu<sup>x</sup>, you need to implement compile-time settings,
where you specify the classes and compile-time options that DuMu<sup>x</sup> should use for the simulation.
Moreover, a `Problem` class needs to be implemented, in which the initial and boundary conditions
are specified. Finally, spatially-distributed values for the parameters required by the used model
are implemented in a `SpatialParams` class.
__Part 1__ discusses the mathematical model in more detail.
__Part 2__ takes a close look at the main file.
`main.cc` controlling the simulation, and containing the time loop management,
A special feature of this example, which might be interesting also for non-biomineralization modelers,
is that it uses the class `CheckPointTimeLoop` extensively to set the injections of the various consecutive
biomineralization solution injections based on a separate input file `injections_checkpoints.dat`.
Similar strategies might be useful when simulating experimental setups with boundary conditions changing over time.
__Part 3__ takes a close look at the problem set-up.
`problem.hh` featuring the reactive source and sink terms discussed in the model concept and the time-dependent injection boundary conditions, and
`spatialparams.hh` with the spatially distributed parameters, most importantly the porosity and permeability changing due to the reactions.
A special feature of this example, which might be interesting also for non-biomineralization modelers,
is that `problem.hh`, determines the Neumann boundary condition, more specifically which type of solution is currently injected, (the `injectionType_`) based on a separate input file `injections_type.dat`.
Similar strategies might be useful when simulating experimental setups with boundary conditions changing over time.
__Part 4__ discusses the code concerned with the fluid (files in the folder `material/`),
especially the multi-component fluidsystems.
The CO<sub>2</sub> properties are stored in the CO<sub>2</sub> tables in the subfolder `material` (`co2tableslaboratory.hh`,`co2valueslaboratory.inc`).
__Part 5__ discusses the code concerned with the solid properties (files in the folder `material/`),
especially the multi-component solidsystems and variable solid volume fractions.
[@Ebigbo2012]: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2011WR011714 "Darcy-scale modeling of microbially induced carbonate mineral precipitation in sand columns"
[@Hommel2015]: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1002/2014WR016503 "A revised model for microbially induced calcite precipitation: Improvements and new insights based on recent experiments"
[@Hommel2016]: https://elib.uni-stuttgart.de/handle/11682/8787 "Modelling biogeochemical and mass transport processes in the subsurface: investigation of microbially induced calcite precipitation"
This diff is collapsed.
# Biomineralization - Fluids
The main idea of biomineralization revolves around
biologically-induced mineral precipitation.
I our example, it is about precipitation of calcite
due to urea hydrolysis.
The resulting overall reaction equation is:
```math
\mathrm{CO(NH_2)_2} + 2\mathrm{H_2O} + \mathrm{Ca^{2+}} \xrightarrow{urease}
2\mathrm{NH_{4}^{+}} + \mathrm{CaCO_{3}} \downarrow.
```
To describe the processes, the minimum set of components is:
water (w), dissolved inorganic carbon (C<sub>tot</sub>),
sodium (Na), chloride (Cl), calcium (Ca), urea (u), glucose as a substrate (s), oxygen (O<sub>2</sub>), and suspended biomass (b),
as well as the solid components biofilm and calcite.
Thus, there are many components involved and keeping track of the components and their interactions,
necessitates a sophisticated handling.
This is why the material folder in this example is both separated from the regular material folder in dumux/dumux/material
and also documented separately.
For further specialization, the overview over the material subfolder is split into solid and fluid, this description considering the fluids.
## Fluids in the folder `material`
As this example is about biomineralization involving many components with complex inteactions, some specific fluid material files are necessary.
A CO_2-Table file provides tabulated CO_2 properties according to @Span1996 in `material/co2tableslaboratory.hh`
In the component subfolder, `material/components/suspendedbiomass.hh` defines the component suspended biomass, which is the mobile form of biomass being transported suspended in the aqueous fluid phase.
In the fluidsystem subfolder, the biomineralization fluidsystem `material/fluidsystems/biominsimplechemistry.hh` as well as
the complex salinity brine adapter `material/fluidsystems/icpcomplexsalinitybrine.hh` can be found.
The biomineralization fluidsystem `material/fluidsystems/biominsimplechemistry.hh`
contains the fluid related properties and the interactions of the components in the fluids.
The complex salinity brine adapter `material/fluidsystems/icpcomplexsalinitybrine.hh`
adapts the brine fluidsystem (dumux/dumux/material/fluidsystems/brine.hh) expecting a single non-aqueous component defining salinity to be reused for biomineralization with three ions (calcium, sodium, chloride) being assumed to contribute to salinity.
The subsequent documentation is structured as follows:
[[_TOC_]]
[@Span1996]: https://aip.scitation.org/doi/abs/10.1063/1.555991 "A new equation of state for carbon dioxide covering the fluid region from the triple-point temperature to 1100 K at pressures up to 800 MPa"
<!-- Important: This file has been automatically generated by generate_example_docs.py. Do not edit this file directly! -->
| [:arrow_left: Back to the main documentation](../README.md) | [:arrow_left: Go back to part 1](modelconcept.md) | [:arrow_right: Continue with part 3](setup.md) |
|---|---|---:|
# Main file
The main file features a time loo with check points to assure the correct timing of the injections matching an experimental setup (see [@Hommel2016], Section 4.2 under the name _column experiment D1_)
The timing of the injections is stored in an additional input file `injections_checkpoints.dat`,
which is read by `main.cc` to set the check points in the time loop.
The number of check points reached is counted and passed on to `problem.hh`, so that `problem.hh` can determine the appropriate injection type.
Additionally, there is an output of the porosity-dependent permeability.
The subsequent file documentation is structured as follows:
[[_TOC_]]
[@Hommel2016]: https://elib.uni-stuttgart.de/handle/11682/8787 "Modelling biogeochemical and mass transport processes in the subsurface: investigation of microbially induced calcite precipitation"
## The main file
This files contains the main program flow for the biomineralization example. Here we can see the programme sequence and how the system is solved using newton's method.
<details open>
<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../main.cc))</summary>
### Included header files
<details>
These are DUNE helper classes related to parallel computations
```cpp
#include <dune/common/parallel/mpihelper.hh>
```
The following headers include functionality related to property definition or retrieval, as well as
the retrieval of input parameters specified in the input file or via the command line.
```cpp
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
```
The follwoing files contain the nonlinear Newtown method, the linear solver and the assembler for the linear system arising from finite volume discretizations (box-scheme, tpfa-approximation, mpfa-approximation)
```cpp
#include <dumux/nonlinear/newtonsolver.hh>
#include <dumux/linear/amgbackend.hh>
#include <dumux/assembly/fvassembler.hh>
#include <dumux/assembly/diffmethod.hh>
#include <dumux/discretization/method.hh>
```
The following class provides a convenient way of writing of dumux simulation results to VTK format.
```cpp
#include <dumux/io/vtkoutputmodule.hh>
```
The gridmanager constructs a grid from the information in the input or grid file. There is a specification for the different supported grid managers.
Many different Dune grid implementations are supported, of which a list can be found
in `gridmanager.hh`.
```cpp
#include <dumux/io/grid/gridmanager_yasp.hh>
```
We include the problem file which defines initial and boundary conditions to describe our example problem
remove #include "problem.hh"
```cpp
#include "properties.hh"
```
</details>
### The main function
We will now discuss the main program flow implemented within the `main` function.
At the beginning of each program using Dune, an instance `Dune::MPIHelper` has to
be created. Moreover, we parse the run-time arguments from the command line and the
input file:
```cpp
int main(int argc, char** argv) try
{
using namespace Dumux;
// initialize MPI, finalize is done automatically on exit
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv);
// parse command line arguments and input file
Parameters::init(argc, argv);
```
For convenience we define the type tag for this problem.
The type tags contain all the properties that are needed to run the simulations.
```cpp
using TypeTag = Properties::TTag::MICPColumnSimpleChemistry;
```
### Step 1: Create the grid
The `GridManager` class creates the grid from information given in the input file.
This can either be a grid file, or in the case of structured grids, one can specify the coordinates
of the corners of the grid and the number of cells to be used to discretize each spatial direction. The latter is the case for this example.
```cpp
GridManager<GetPropType<TypeTag, Properties::Grid>> gridManager;
gridManager.init();
// we compute on the leaf grid view
const auto& leafGridView = gridManager.grid().leafGridView();
```
### Step 2: Setting up the problem
We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables.
We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition.
```cpp
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
auto gridGeometry = std::make_shared<GridGeometry>(leafGridView);
gridGeometry->update();
```
We now instantiate the problem, in which we define the boundary and initial conditions.
```cpp
using Problem = GetPropType<TypeTag, Properties::Problem>;