Commit 75a7073a authored by Katharina Heck's avatar Katharina Heck
Browse files

[feature] add numeric epsilon in exercise mainfile

parent 0d081acb
......@@ -6,7 +6,7 @@ This exercise will make you familiar the program sequence in DuMux and how diffe
In order to do so, there are three examples of one phase flow problems. Two examples (a and b) are stationary problems and the third example (c) is an instationary problem.
The stationary examples differ in the fluidssystems they are using which means they differ in the fluid properties (e.g. density, thermal conductivity etc). The first problem (a) uses an incompressible fluid which means that the density does not change when pressure changes. This makes is possible to solve the system linearly. The second problem uses a compressible fluid, that means the density is a function of pressure and we need to use a nonlinear solver.
The stationary examples differ in the fluidssystems they are using which means they differ in the fluid properties (e.g. density, thermal conductivity etc). The first problem (a) uses an incompressible fluid which means that the density does not change when pressure changes. This makes it possible to solve the system linearly. The second problem uses a compressible fluid, that means the density is a function of pressure and we need to use a nonlinear solver.
To summarize the problems differ in:
* exercise1_1p_a: a one-phase incompressible, stationary problem
......@@ -170,13 +170,15 @@ make exercise1_1p_a exercise1_1p_b exercise1_1p_c
```bash
paraview injection-1p_a.pvd
```
<!-- ``` -->
<hr><br><br>
### Task 3: Analytical differentiation
<hr>
For the incompressible one phase problem it is possible to also have an analytic solution method. To implement that follow the directions in the `exercise1_1p_a.cc` and the `1pproblem.hh` marked by:
In the input file `exercise1_1p_a.input` you will see that there is a variable BaseEpsilon. This defines the base for the epsilon used in the numeric differentiation. If that value is too small, you will see that the solution of the numeric differentiation is not correct. Change that value to $`1 \cdot 10^{-15}`$ and have a look at the solution.
For the incompressible one phase problem it is possible to also have an analytic solution method. Then the epsilon does not play a role anymore since the derivatives are calculated analytically. To implement that follow the directions in the `exercise1_1p_a.cc` and the `1pproblem.hh` marked by:
```c++
// TODO: dumux-course-task
......
......@@ -15,3 +15,4 @@ PermeabilityLens = 1e-12 # [m^2]
[Assembly.NumericDifference]
PriVarMagnitude = 1e5
BaseEpsilon = 1e-10
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