N$`_2`$ is injected in an aquifer previously saturated with water with an injection rate of 0.0001 kg/(s*m$`^2`$).
The aquifer is situated 2700 m below sea level and the domain size is 60 m x 40 m. It consists of two layers, a moderately permeable one ($`\Omega_1`$) and a lower permeable one ($`\Omega_2`$).
* Navigate to the directory `dumux-course/exercises/exercise-basic`
_Exercise 1_deals with two problems: a two-phase immiscible problem (__2p__) and a two-phase compositional problem (__2p2c__). They both set up the same scenario with the difference that the 2p2c assumes a miscible fluid state for the two fluids (water and gaseous N$`_2`$) and the 2p model assumes an immiscible fluid state.
This exercise deals with two problems: a two-phase immiscible problem (__2p__) and a two-phase compositional problem (__2p2c__). They both set up the same scenario with the difference that the 2p2c assumes a miscible fluid state for the two fluids (water and gaseous N$`_2`$) and the 2p model assumes an immiscible fluid state.
<br><br>
### Task 1: Getting familiar with the code
<hr>
Locate all the files you will need for this exercise
* The __main file__ for the __2p__ problem : `exercise1_2p.cc`
* The __main file__ for the __2p2c__ problem : `exercise1_2p2c.cc`
* The __main file__ for the __2p__ problem : `exercise_basic_2p.cc`
* The __main file__ for the __2p2c__ problem : `exercise_basic_2p2c.cc`
* The __problem file__ for the __2p__ problem: `injection2pproblem.hh`
* The __problem file__ for the __2p2c__ problem: `injection2p2cproblem.hh`
* The shared __spatial parameters file__: `injection2pspatialparams.hh`
* The shared __input file__: `exercise1.input`
* The shared __input file__: `exercise_basic.input`
<hr><br><br>
### Task 2: Compiling and running an executable
...
...
@@ -32,20 +32,20 @@ Locate all the files you will need for this exercise
* Change to the build-directory
```bash
cd ../../build-cmake/tutorial/ex1
cd ../../build-cmake/exercises/exercise-basic
```
* Compile both executables `exercise1_2p` and `exercise1_2p2c`
* Compile both executables `exercise_basic_2p` and `exercise_basic_2p2c`
```bash
make exercise1_2p exercise1_2p2c
make exercise_basic_2p exercise_basic_2p2c
```
* Execute the two problems and inspect the result
```bash
./exercise1_2p exercise1.input
./exercise1_2p2c exercise1.input
./exercise_basic_2p exercise_basic.input
./exercise_basic_2p2c exercise_basic.input
```
* you can look at the results with paraview
...
...
@@ -55,83 +55,30 @@ paraview injection-2p2c.pvd
```
<hr><br><br>
### Task 3: Changing input parameters
### Task 3: Setting up a new executable (for a non-isothermal simulation)
<hr>
In the input file `exercise1.input` you can find the following section
```ini
[SpatialParams]
EntryPressureAquitard=4.5e4
EntryPressureAquifer=1e4
```
* Change the values for the aquitard entry pressure in the input file to a lower value and compare the results with the previous solution. You don't need to recompile the executable.
<hr><br><br>
### Task 4: Runtime parameters
<hr>
The injection rate is currently hard-coded in `injection2p2cproblem.hh` to $`1e-4 kg/(s m^2)`$.
```c++
// set the Neumann values for the Nitrogen component balance
`<TYPE>`,`<GROUPNAME>`,`<PARAMNAME>` by what is appropriate for your case:
*`<TYPE>` is the type of the parameter to read
*`<GROUPNAME>` is the group in the input file
*`<PARAMNAME>` is the name of the parameter in the input file
Note that due to the way the macro works, the names are specified as plain text within the "quotation marks".`<GROUPNAME>` and `<PARAMNAME>` need to be separated by a dot (.).
Follow the instructions given as a
```c++
// TODO: dumux-course-task
```
in the `injection2p2cproblem.hh` file and also remember to also set the parameter totalAreaSpecificInflow in the input file.
* Check the influence of that parameter on the simulation result by rerunning the simulation with different injection rates. Remember to also set the parameter totalAreaSpecificInflow in the input file.
Since you have changed your header file, you have to recompile the program.
<hr><br><br>
### 5. Setting up a new executable (for a non-isothermal simulation)
<hr>
* Copy the main file `exercise1_2p.cc` and rename it to `exercise1_2pni.cc`
* In `exercise1_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise1_2pni.cc`, change `Injection2pCCTypeTag` to `Injection2pNICCTypeTag` in the line `using TypeTag = TTAG(Injection2pCCTypeTag);`
* Copy the main file `exercise_basic_2p.cc` and rename it to `exercise_basic_2pni.cc`
* In `exercise_basic_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise_basic_2pni.cc`, change `Injection2pCCTypeTag` to `Injection2pNICCTypeTag` in the line `using TypeTag = TTAG(Injection2pCCTypeTag);`
* Add a new executable in `CMakeLists.txt` by adding the lines
```cmake
# the two-phase non-isothermal simulation program
dune_add_test(NAME exercise1_2pni
SOURCES exercise1_2pni.cc
CMD_ARGS exercise1.input)
dune_add_test(NAME exercise_basic_2pni
SOURCES exercise_basic_2pni.cc
CMD_ARGS exercise_basic.input)
```
* Test that everything compiles without error
```bash
make # should rerun cmake
make exercise1_2pni # builds new executable
make exercise_basic_2pni # builds new executable
```
<hr><br><br>
### 6. Setting up a non-isothermal __2pni__ test problem
### Task 4: Setting up a non-isothermal __2pni__ test problem
<hr>
* Open the file `injection2pniproblem.hh`. It is a copy of the `injection2pproblem.hh` with some useful comments on how to implement a non-isothermal model. Look for comments containing
...
...
@@ -146,6 +93,6 @@ make exercise1_2pni # builds new executable
__Initial conditions:__ The same temperature gradient as in the boundary conditions with an additional lens (with position: 20 < x < 30, 5 < y < 35), which has an initial temperature of 380 K.
The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `exercise1.input`, you just need to _uncomment_ them.
The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `exercise_basic.input`, you just need to _uncomment_ them.
The aim of this exercise is to a first glimpse with the _DuMuX_ way of implementing mineralization and reaction processes. In the scope of this exercise, the setting of boundary conditions is revisited and a new reaction term is implemented.
## Problem set-up
The domain has a size of 20 x 15 m and contains a sealing aquitard in the middle. The aquitard is interrupted by a "fault zone" and thereby connects the upper (drinking water) aquifer and the lower CO2-storage aquifer. Initially, the domain is fully water saturated and biofilm is present in the lower CO2-storage aquifer. Calcium and urea are injected in the upper drinking water aquifer by means of a Neumann boundary condition. The remaining parts of the upper and the entire lower boundary are Neumann no-flow while on the right side a Dirichlet boundary conditions is applied (according to the initial values).
Disclaimer: Please note, that this is not a realistic scenario. One does not want to store gaseous CO2 in such a subcritical setting.

## Preparing the exercise
* Navigate to the directory `dumux-course/exercises/exercise-biomineralization`