+ ## Problem set-up N$`_2`$ is injected in an aquifer previously saturated with water with an injection rate of 0.0001 kg/(s*m$`^2`$). @@ -25,7 +26,7 @@ Locate all the files you will need for this exercise * The shared __spatial parameters file__: `injection2pspatialparams.hh` * The shared __input file__: `params.input` -

+

### Task 2: Compiling and running an executable

@@ -54,7 +55,7 @@ make exercise_basic_2p exercise_basic_2p2c paraview injection-2p2c.pvd ``` -

+

### Task 3: Setting up a new executable (for a non-isothermal simulation)

@@ -76,7 +77,7 @@ make # should rerun cmake make exercise_basic_2pni # builds new executable ``` -

+

### Task 4: Setting up a non-isothermal __2pni__ test problem

@@ -90,7 +91,7 @@ make exercise_basic_2pni # builds new executable __Boundary conditions:__ Dirichlet conditions at the left boundary. For the primary variable 'temperature' use a varying temperature of

$`\displaystyle T(y) = 283~\text{K} + 0.03~\frac{\text{K}}{\text{m}} \cdot \left( d_\text{aquifer} - y \right) `$,

-with the aquifer depth +with the aquifer depth $`\displaystyle d_\text{aquifer}=2700~\text{m}`$. Assign Neumann no-flow for the energy balance to the rest of the boundaries. diff --git a/exercises/exercise-biomineralization/README.md b/exercises/exercise-biomineralization/README.md index 329fc53..c4fe04f 100644 --- a/exercises/exercise-biomineralization/README.md +++ b/exercises/exercise-biomineralization/README.md @@ -1,6 +1,6 @@ # Exercise Biomineralization -The aim of this exercise is to get a first glimpse at 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. +The aim of this exercise is to get a first glimpse at the _DuMu

+

### Task 2: Rerun dunecontrol to configure your new project

@@ -33,7 +33,7 @@ The following command will configure your new module You need to run this command in the folder with content dumux, dumux-course, dune-common, dune-geometry, dune-grid, dune-istl, etc. `

+

### Task 3: Create a new test case within your new DuMuX module

@@ -77,7 +77,7 @@ cd appl ./test_1p_compressible_stationary_tpfa params.input ``` -

+

### Task 4: Create a new GitLab project

diff --git a/exercises/exercise-fluidsystem/README.md b/exercises/exercise-fluidsystem/README.md index df8f82a..0b75933 100644 --- a/exercises/exercise-fluidsystem/README.md +++ b/exercises/exercise-fluidsystem/README.md @@ -1,6 +1,6 @@ # Exercise Fluidsystem -The aim of this exercise is to get familiar with the _DuMuX_ way of implementing new components (fluids) and fluid systems (mixtures). In the scope of this exercise, a new fictitious component is implemented +The aim of this exercise is to get familiar with the _DuMu

+ ## Problem set-up Here we will expand on what we've covered in the basics exercise, and the problem set up will remain the same. @@ -162,10 +163,3 @@ An example of an Unstructured grid is located in the `grid/` folder (`grid_unstr This grid is made up of triangles (simplices of dimension 2). This element type can be set in the grid properties section. * > __Task 5__: Change the grid property element type to include `Dune::simplex` instead of `Dune::cube`. Read in the unstructured grid via the input file and run the simulation. - - - - - - - diff --git a/exercises/exercise-mainfile/README.md b/exercises/exercise-mainfile/README.md index 1630d4d..4164598 100644 --- a/exercises/exercise-mainfile/README.md +++ b/exercises/exercise-mainfile/README.md @@ -1,5 +1,6 @@ # 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. @@ -144,7 +145,7 @@ timeLoop->start(); do timeLoop->finalize(leafGridView.comm()); ``` -

+

### Task 2: Compiling and running an executable

diff --git a/exercises/exercise-properties/README.md b/exercises/exercise-properties/README.md index 8419bf8..cdfef56 100644 --- a/exercises/exercise-properties/README.md +++ b/exercises/exercise-properties/README.md @@ -1,5 +1,6 @@ # Exercise Properties (DuMuX course)

+ ## Problem set-up The problem setup is identical to the two-phase incompressible test from DuMu

+

### Task 2: Compiling and running the program

@@ -48,7 +49,7 @@ Note: Because the input file has the same name as the executable, DuMu

+

### Task 3: Implement a custom local residual

@@ -72,4 +73,3 @@ Simplify the original local residual by using the assumption that only incompres * 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. - diff --git a/exercises/exercise-runtimeparams/README.md b/exercises/exercise-runtimeparams/README.md index 78875fd..cdcb236 100644 --- a/exercises/exercise-runtimeparams/README.md +++ b/exercises/exercise-runtimeparams/README.md @@ -1,5 +1,6 @@ # Exercise Runtime Parameters (DuMuX course)

+ ## Problem set-up Here we will expand on what we've covered in the basics exercise, and the problem set up will remain the same. -- GitLab From 4d5db91fcb249d7b74032988e00e1c5600fb916e Mon Sep 17 00:00:00 2001 From: Farid Mohammadi

+

### Task 3: Analytical differentiation

-In the input file `exercise_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. +In the input file `exercise_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 `exercise1pamain.cc` and the `1pproblem.hh` marked by: +For the incompressible one phase problem, it is also possible to have an analytic solution method. In this case, the epsilon does not play a role anymore, since the derivatives are calculated analytically. To implement that, follow the tips in the `exercise1pamain.cc` and the `1pproblem.hh` marked by: ```c++ -// TODO: dumux-course-task +// TODO: dumux-course-task 3 ``` -For the analytic solution of your immiscible problem you need analytic solutions for the derivatives of the jacobian. For that we have a special local residual, the `OnePIncompressibleLocalResidual` which provides that. You just need to include `incompressiblelocalresidual.hh` in your `1pproblem.hh` and use that instead of the `immisciblelocalresidual.hh` which is used as a standard for all immiscible models. +For the analytic solution of your immiscible problem, you need analytic solutions for the derivatives of the jacobian. For that, we have a special local residual, the `OnePIncompressibleLocalResidual` which provides that. You just need to include `incompressiblelocalresidual.hh` in your `1pproblem.hh` and use that instead of the `immisciblelocalresidual.hh` which is used as a default for all immiscible models. -Additionally you need to set the differentiation method in the main file `exercise1pamain.cc` to analytic. +Additionally, you need to set the differentiation method in the main file `exercise1pamain.cc` to analytic. diff --git a/exercises/exercise-mainfile/exercise1pamain.cc b/exercises/exercise-mainfile/exercise1pamain.cc index 6cfe2dc..40d44ed 100644 --- a/exercises/exercise-mainfile/exercise1pamain.cc +++ b/exercises/exercise-mainfile/exercise1pamain.cc @@ -105,10 +105,10 @@ int main(int argc, char** argv) try using IOFields = GetPropType

### Task 3: Implement a custom local residual

-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

### Task 2: Setting a variable to collect a runtime parameter @@ -65,8 +65,7 @@ values[Indices::conti0EqIdx + FluidSystem::N2Idx]= -1e-4/FluidSystem::molarMass( values[Indices::conti0EqIdx + FluidSystem::H2OIdx] = 0.0; ``` -This parameter may need to change, and if we choose to always change this within the class, -we will need to recompile every time. +This parameter may need to change, and if we choose to always change this within the class, we will need to recompile every time. Instead of hard defining this parameter within the function, we can set a variable to read into our parameter tree via the input file and use this in our function instead. To do this, there are two functions defined in `dumux/dumux/common/parameters.hh`, `getParam()` and `getParamFromGroup()`. They use the following format: diff --git a/exercises/exercise-runtimeparams/problem.hh b/exercises/exercise-runtimeparams/problem.hh index 8cd8dde..922e375 100644 --- a/exercises/exercise-runtimeparams/problem.hh +++ b/exercises/exercise-runtimeparams/problem.hh @@ -131,9 +131,14 @@ public: aquiferDepth_ = getParam