Commit b9f18d8e authored by Beatrix Becker's avatar Beatrix Becker
Browse files

[exercise-fluidsystem] no numbering

parent 743745be
# executables for exercise part a & b
#part a: 2pproblem
dune_add_test(NAME exercise3_a
SOURCES exercise3.cc
dune_add_test(NAME exercise-fluidsystem_a
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeTwoPTypeTag
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise3_a.input)
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise3_b
SOURCES exercise3.cc
dune_add_test(NAME exercise-fluidsystem_b
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeTwoPTwoCTypeTag
COMPILE_ONLY # for testing purposes, ignore for the exercise
CMD_ARGS exercise3_b.input)
CMD_ARGS exercise-fluidsystem_b.input)
# add tutorial to the common target
add_dependencies(test_exercises exercise3_a exercise3_b)
add_dependencies(test_exercises exercise-fluidsystem_a exercise-fluidsystem_b)
# add symlinks for the input files
add_input_file_links()
......@@ -6,7 +6,7 @@ The aim of this exercise is to get familiar with the _DuMuX_ way of implementing
The domain has a size of 60 x 60 m and contains two low-permeable lenses. Initially, the domain is fully water saturated and the fictitious component is injected through the middle portion of the upper boundary 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 two lateral sides Dirichlet boundary conditions are applied (hydrostatic conditions for the pressure and zero saturation).
![](../extradoc/exercise3_setup.png)
![](../extradoc/exercise-fluidsystem_setup.png)
## Preparing the exercise
......@@ -16,10 +16,10 @@ The domain has a size of 60 x 60 m and contains two low-permeable lenses. Initia
### 1. Getting familiar with the code
Locate all the files you will need for this exercise
* The shared __main file__ : `exercise3.cc`
* The __input file__ for part a: `exercise3_a.input`
* The shared __main file__ : `exercise-fluidsystem.cc`
* The __input file__ for part a: `exercise-fluidsystem_a.input`
* The __problem file__ for part a: `2pproblem.hh`
* The __input file__ for part b: `exercise3_b.input`
* The __input file__ for part b: `exercise-fluidsystem_b.input`
* The __problem file__ for part b: `2p2cproblem.hh`
* The __spatial parameters file__: `spatialparams.hh`
......@@ -145,13 +145,13 @@ In order to execute the program, change to the build directory and compile and e
```bash
cd build-cmake/exercises/exercise-fluidsystem
make exercise3_a
./exercise3_a exercise3_a.input
make exercise-fluidsystem_a
./exercise-fluidsystem_a exercise-fluidsystem_a.input
```
The saturation distribution of the nonwetting phase S$`_n`$ (the phase consisting of our fictitious incompressible component) at the final simulation time should look like this:
![](../extradoc/exercise3_a_solution.png)
![](../extradoc/exercise-fluidsystem_a_solution.png)
### 2.2. Compressible component
......@@ -161,7 +161,7 @@ $`\displaystyle \rho_{MyComp} = \rho_{min} + \frac{ \rho_{max} - \rho_{min} }{ 1
where $`p`$ is the pressure and $`\rho_{min} = 1440 `$, $`\rho_{max} = 1480 `$ and $`k = 5 \cdot 10^{-7} `$. Also, make sure the header is included in the `2pproblem.hh` file by uncommenting line 45. Furthermore, the new component has to be set as a liquid phase in the fluid system, i.e. comment line 90 and uncomment line 91. The density distribution of this phase (rhoN) at the final simulation time should look like this:
![](../extradoc/exercise3_a_solution2.png)
![](../extradoc/exercise-fluidsystem_a_solution2.png)
### 3. Implement a new fluid system
......@@ -200,10 +200,10 @@ In the `fluidsystems/h2omycompressiblecomponent.hh` file, your implemented compr
```c++
// the ficitious component that was created in exercise 3a
#include <tutorial/ex3/components/mycompressiblecomponent.hh>
#include <exercises/exercise-fluidsystem/components/mycompressiblecomponent.hh>
// the binary coefficients corresponding to this fluid system
#include <tutorial/ex3/binarycoefficients/h2omycompressiblecomponent.hh>
#include <exercises/exercise-fluidsystem/binarycoefficients/h2omycompressiblecomponent.hh>
```
__Task__:
......@@ -216,8 +216,8 @@ Implement this dependency in the `density()` method in the fluid system. In orde
```bash
cd build-cmake/exercises/exercise-fluidsystem
make exercise3_b
./exercise3_b exercise3_b.input
make exercise-fluidsystem_b
./exercise-fluidsystem_b exercise-fluidsystem_b.input
```
You will observe an error message and an abortion of the program. This is due to the fact that in order for the constraint solver and other mechanisms in the two-phase two-component model to work, an additional functionality in the component has to be implemented: the model has to know the vapour pressure. As in the previous exercise, check the `dumux/material/components/base.hh` file for this function and implement it into `mycompressiblecomponent.hh`. For the vapour pressure, use a value of $`3900`$ Pa.
......@@ -247,6 +247,6 @@ Change this function such that the the phase of our new component is the wetting
```bash
cd build-cmake/exercises/exercise-fluidsystem
make exercise3_b
./exercise3_b exercise3_b.input
make exercise-fluidsystem_b
./exercise-fluidsystem_b exercise-fluidsystem_b.input
```
......@@ -3,7 +3,7 @@ TEnd = 20000 # duration of the simulation [s]
DtInitial = 10 # initial time step size [s]
[Problem]
Name = exercise3_a # name will be given to e.g. to the vtk result files
Name = exercise-fluidsystem_a # name will be given to e.g. to the vtk result files
[Grid]
UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m]
......
......@@ -3,7 +3,7 @@ TEnd = 20000 # duration of the simulation [s]
DtInitial = 10 # initial time step size [s]
[Problem]
Name = exercise3_b # name will be given to e.g. to the vtk result files
Name = exercise-fluidsystem_b # name will be given to e.g. to the vtk result files
[Grid]
UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m]
......
add_subdirectory(ex1)
add_subdirectory(ex2)
add_subdirectory(ex3)
add_subdirectory(exercise-fluidsystem)
# executables for exercise part a & b
#part a: 2pproblem
dune_add_test(NAME exercise3_a_solution
SOURCES exercise3.cc
dune_add_test(NAME exercise-fluidsystem_a_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeBoxTwoPTypeTag
CMD_ARGS exercise3_a.input)
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise3_b_solution
SOURCES exercise3.cc
dune_add_test(NAME exercise-fluidsystem_b_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseThreeBoxTwoPTwoCTypeTag
CMD_ARGS exercise3_b.input)
CMD_ARGS exercise-fluidsystem_b.input)
# add tutorial to the common target
add_dependencies(test_exercises exercise3_a exercise3_b)
add_dependencies(test_exercises exercise-fluidsystem_a exercise-fluidsystem_b)
# add symlinks for the input files
add_input_file_links()
......@@ -3,7 +3,7 @@ TEnd = 20000 # duration of the simulation [s]
DtInitial = 10 # initial time step size [s]
[Problem]
Name = exercise3_a_solution # name will be given to e.g. to the vtk result files
Name = exercise-fluidsystem_a_solution # name will be given to e.g. to the vtk result files
[Grid]
UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m]
......
......@@ -3,7 +3,7 @@ TEnd = 20000 # duration of the simulation [s]
DtInitial = 10 # initial time step size [s]
[Problem]
Name = exercise3_b_solution # name will be given to e.g. to the vtk result files
Name = exercise-fluidsystem_b_solution # name will be given to e.g. to the vtk result files
[Grid]
UpperRight = 60 60 # x-/y-coordinates of the upper-right corner of the grid [m]
......
......@@ -32,10 +32,10 @@
#include <dumux/material/fluidsystems/base.hh>
// the fictitious component that was created in exercise 3a
#include <exercises/solution/ex3/components/mycompressiblecomponent.hh>
#include <exercises/solution/exercise-fluidsystem/components/mycompressiblecomponent.hh>
// the binary coefficients corresponding to this fluid system
#include <exercises/solution/ex3/binarycoefficients/h2omycompressiblecomponent.hh>
#include <exercises/solution/exercise-fluidsystem/binarycoefficients/h2omycompressiblecomponent.hh>
namespace Dumux {
namespace FluidSystems {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment