-
Felix Weinhardt authored
updated README
Felix Weinhardt authoredupdated README
Exercise Mainfiles (DuMuX course)
## Problem set-up
This exercise will make you familiar the program sequence in DuMux and how different levels of complexity can be realized in the main file according to the complexity of your physical problem.
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 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:
- exercise_1p_a: a one-phase incompressible, stationary problem
- exercise_1p_b: a one-phase compressible, stationary problem
- exercise_1p_c: a one-phase compressible, instationary problem
The problem set-up for all three examples is always the same: It is a two dimensional problem and the domain is 1 m
by 1 m
. It is a heterogeneous set-up with a lens in the middle of the domain which has a lower permeability (1\cdot 10^{-12} m^2
compared to 1\cdot 10^{-10} m^2
in the rest of the domain).

In the beginning there is a uniform pressure of 1\cdot 10^5 Pa
in the whole domain. On the top and the bottom border dirichlet boundary conditions are set with a pressure of 1\cdot 10^5 Pa
on top and 2 \cdot 10^5 Pa
on the bottom. At the sides there is no in- or outflow and there are no source terms.
Preparing the exercise
- Navigate to the directory
dumux-course/exercises/exercise-mainfile
Task 1: Getting familiar with the code
Locate all the files you will need for this exercise
- The main file for the 1p incompressible, stationary problem :
exercise_1p_a.cc
- The main file for the 1p compressible, stationary problem :
exercise_1p_b.cc
- The main file for the 1p compressible, instationary problem :
exercise_1p_c.cc
- The shared problem file:
1pproblem.hh
- The shared spatial parameters file:
1pspatialparams.hh
- The input file for the 1p incompressible, stationary problem:
exercise_1p_a.input
- The input file for the 1p compressible, stationary problem:
exercise_1p_b.input
- The input file for the 1p compressible, instationary problem:
exercise_1p_c.input
Please pay special attention to the similarities and differences in the three main files. The first main file is solved linearly and does not need a newton solver or any other nonlinear solver method. The second problem is a nonlinear problem and uses newton's method to solve the system. The third problem is nonlinear and additionally instationary. Therefore a time loop needs to be included in the main file.
The general structure of any main file in DuMux is:
- the specific problem TypeTag is defined for the problem. This example shows the TypeTag for the CompressibleProblem