Newer
Older
The problem setup is identical to the two-phase incompressible test from DuMu<sup>x</sup>.
## Preparing the exercise
* Navigate to the directory `exercise-properties`
_Exercise Properties_ deals with a two-phase immiscible incompressible problem (__2p__). The goal is to learn how to adapt compile-time parameters by employing the _DuMu<sup>x</sup> property system_.
<br><br>
### Task 1: Getting familiar with the code
<hr>
Locate all the files you will need for this exercise
* The __problem file__: `problem.hh`
* The __spatial parameters file__: `spatialparams.hh`
* The __input file__: `exercise_properties.input`
* a custom __local residual__ in: `mylocalresidual.hh`
<hr><br><br>
### Task 2: Compiling and running the program
<hr>
* Change to the build-directory
```bash
cd ../build-cmake/exercises/exercise_properties
```
* Run the problem and inspect the result
```bash
```
Note: Because the input file has the same name as the
executable, DuMu<sup>x</sup> will find it automatically.
<hr>
Types that are properties can be changed on the problem level by using the property system. In the following task we implement our own 2p local residual, i.e. the class that computes the element residual in every Newton iteration. The file `mylocalresidual.hh` contains a copy of the original local residual class used for all immiscible models renamed to `template<class TypeTag> class MyLocalResidual`.
* Make DuMu<sup>x</sup> use this new local residual by including the header `mylocalresidual.hh` and setting the corresponding property in the `Property` namespace in the file `problem.hh`
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::TwoPIncompressible>
Simplify the original local residual by using the assumption that only incompressible fluid phases are present. As a consequence, one can balance phase volume instead of phase mass:
* Eliminate the density from the `computeStorage` and the `computeFlux` methods.
* Adapt the relevant routine in the problem file such that volume instead of mass is injected. The density of the employed NAPL is 1460 kg/m^3 . For a first try, you can use the hardcoded value.
* Generalize your approach by using the component's `liquidDensity(t, p)` function instead of the hardcoded value.