From 81d8d8b833a1ee3fbbe78328ed0bffb4019ba611 Mon Sep 17 00:00:00 2001 From: Martin Schneider Date: Wed, 11 Oct 2017 13:50:22 +0200 Subject: [PATCH 1/5] [ex1] Corrections of ex1 --- tutorial/ex1/README.md | 17 +++++++++-------- tutorial/ex1/injection2pniproblem.hh | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tutorial/ex1/README.md b/tutorial/ex1/README.md index ca823871d5..cac3a86d71 100644 --- a/tutorial/ex1/README.md +++ b/tutorial/ex1/README.md @@ -3,7 +3,7 @@ ## Problem set-up N2 is injected in an aquifer previously saturated with water with an injection rate of 0.001 kg/(s*m$`^2`$). -The aquifer is situated 2700 m below see level and the domain size is 60 m x 40 m. It consists of two layers, a moderately permeable one ($`\Omega_1`$) and a lower permeable one ($`\Omega_2`$). +The aquifer is situated 2700 m below sea level and the domain size is 60 m x 40 m. It consists of two layers, a moderately permeable one ($`\Omega_1`$) and a lower permeable one ($`\Omega_2`$). @@ -32,7 +32,7 @@ Locate all the files you will need for this exercise * Change to the build-directory ```bash -cd ../../build-cmake/tutorial/exercise1 +cd ../../build-cmake/tutorial/ex1 ``` * Compile both executables `exercise1_2p` and `exercise1_2p2c` @@ -62,11 +62,11 @@ In the input file `exercise1.input` you can find the following section ```ini [SpatialParams] -EntryPressureFine = 4.5e4 -EntryPressureCoarse = 1e4 +EntryPressureAquitard = 4.5e4 +EntryPressureAquifer = 1e4 ``` -* Change the values for the fine entry pressure in the input file to a lower value and compare the results with the previous solution. You don't need to recompile the executable. +* Change the values for the aquitard entry pressure in the input file to a lower value and compare the results with the previous solution. You don't need to recompile the executable.


### Task 4: Runtime parameters @@ -117,18 +117,19 @@ cp exercise1_2p.cc exercise1_2pni.cc ``` * In `exercise1_2pni.cc`, include the header `injection2pniproblem.hh` instead of the isothermal problem file `injection2pproblem.hh`. +* In the main routine of `exercise1_2pni.cc`, replace `TTAG(InjectionCCProblem2P)` by `TTAG(InjectionCCProblem2PNI)`. * Add a new executable in `CMakeLists.txt` by adding the lines ```cmake -dune_add_test(NAME injection2pniproblem - SOURCES injection2pniproblem.cc) +dune_add_test(NAME exercise1_2pni + SOURCES exercise1_2pni.cc) ``` * Test that everything compiles without error ```bash make # should rerun cmake -make injection2pniproblem # builds new executable +make exercise1_2pni # builds new executable ```


diff --git a/tutorial/ex1/injection2pniproblem.hh b/tutorial/ex1/injection2pniproblem.hh index f745385184..aaa6a01ac3 100644 --- a/tutorial/ex1/injection2pniproblem.hh +++ b/tutorial/ex1/injection2pniproblem.hh @@ -105,7 +105,7 @@ class InjectionProblem2PNI : public ImplicitPorousMediaProblem /* * TODO:dumux-course-task: * get the temperatureIdx as the index for the primary variable temperature and the - * energyIdx as the index for the energy conservation equation for your convinience. + * energyIdx as the index for the energy conservation equation for your convenience. */ // world dimension @@ -230,7 +230,7 @@ public: /*! * TODO:dumux-course-task: * set a temperature gradient of 0.03 K per m beginning at 283 K here. - * Hint: you can use maxDepth_ and the globalPos similar to the pressure gradient + * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient */ } @@ -287,8 +287,8 @@ public: /*! * TODO:dumux-course-task: * set a temperature gradient of 0.03 K per m beginning at 283 K here. - * Hint: you can use maxDepth_ and the globalPos similar to the pressure gradient - * use globalPos[0] and globalpos[1] to implement the high temperature lens with 380 K + * Hint: you can use aquiferDepth_ and the globalPos similar to the pressure gradient + * use globalPos[0] and globalPos[1] to implement the high temperature lens with 380 K */ } -- GitLab From 3679499d9700ffd9c12b33de7ddb561df7d827ab Mon Sep 17 00:00:00 2001 From: Martin Schneider Date: Wed, 11 Oct 2017 15:48:51 +0200 Subject: [PATCH 2/5] [ex2] Update of ex2 description --- tutorial/ex2/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tutorial/ex2/README.md b/tutorial/ex2/README.md index 5473aaba6b..8d62349c0c 100644 --- a/tutorial/ex2/README.md +++ b/tutorial/ex2/README.md @@ -31,7 +31,7 @@ Locate all the files you will need for this exercise * Change to the build-directory ```bash -cd ../../build-cmake/tutorial/exercise2 +cd ../../build-cmake/tutorial/ex2 ``` * Compile the executable `exercise2` @@ -69,7 +69,7 @@ Note: `MyMaterialLaw` uses the `BrooksCoreyParams` class as parameter input. You const auto pe = params.pe(); ``` -The type (i.e. C++ type) of the material law is set in the file `injection2pspatialparams.hh` by using the DuMuX property system +The type (i.e. C++ type) of the material law is set in the file `injection2p2cspatialparams.hh` by using the DuMuX property system ```c++ SET_PROP(InjectionSpatialParams, MaterialLaw) @@ -115,7 +115,7 @@ A list of parameters that can be set through the input file is given [here](http ### Task 5: Implement your own local residual
-Most types in DuMuX are properties that can be changed just like the material law. In the following task we implement our own 2p2c local residual, i.e. the class that computes the element residual in every Newton step. The file `mylocalresidual.hh` contains a copy of the original local residual class used for the 2p2c model renamed to `template class MyTwoPTwoCLocalResidual`. +Most types in DuMuX are properties that can be changed just like the material law. In the following task we implement our own 2p2c 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 the 2p2c model renamed to `template class MyTwoPTwoCLocalResidual`. * Make DuMuX use this new local residual by inluding the header `mylocalresidual.hh` and setting the corresponding property in the `Property` namespace in the file `injection2p2cproblem.hh` @@ -123,12 +123,12 @@ Most types in DuMuX are properties that can be changed just like the material la // note that every property struct knows about TypeTag SET_PROP(Injection2p2cProblem, LocalResidual) { - using type = MyTwoPTwoCLocalResidualocal; + using type = MyTwoPTwoCLocalResidual; }; // or using the convenience macro SET_TYPE_PROP(Injection2p2cProblem, LocalResidual, - MyTwoPTwoCLocalResidualocal); + MyTwoPTwoCLocalResidual); ``` * Implement an output to the terminal in the constructor of `MyTwoPTwoCLocalResidual` e.g. -- GitLab From 13dbb15f1efcfbf69242bd7daffd3b325f8c0e4f Mon Sep 17 00:00:00 2001 From: Martin Schneider Date: Wed, 11 Oct 2017 15:50:26 +0200 Subject: [PATCH 3/5] [ex1] Update of readme and CMakeLists --- tutorial/ex1/CMakeLists.txt | 6 ++++-- tutorial/ex1/README.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tutorial/ex1/CMakeLists.txt b/tutorial/ex1/CMakeLists.txt index 8f7d6e6d61..b23435c886 100644 --- a/tutorial/ex1/CMakeLists.txt +++ b/tutorial/ex1/CMakeLists.txt @@ -1,10 +1,12 @@ # the immiscible two-phase simulation program dune_add_test(NAME exercise1_2p - SOURCES exercise1_2p.cc) + SOURCES exercise1_2p.cc + COMMAND ./exercise1_2p exercise1.input) # the compositional two-phase simulation program dune_add_test(NAME exercise1_2p2c - SOURCES exercise1_2p2c.cc) + SOURCES exercise1_2p2c.cc + COMMAND ./exercise1_2p2c exercise1.input) # add a symlink for the input file dune_symlink_to_source_files(FILES "exercise1.input") diff --git a/tutorial/ex1/README.md b/tutorial/ex1/README.md index cac3a86d71..4b11282958 100644 --- a/tutorial/ex1/README.md +++ b/tutorial/ex1/README.md @@ -104,7 +104,7 @@ in the `injection2p2cproblem.hh` file and also remember to also set the paramete * Check the influence of that parameter on the simulation result by rerunning the simulation with different injection rates. Remember to also set the parameter totalAreaSpecificInflow in the input file. -Again, you don't need to recompile the program. +Since you have changed your header hile, you have to recompile the program.


### 5. Setting up a new executable (for a non-isothermal simulation) -- GitLab From f19dde2153fbd69cf1fe7e65f19aeac8317a5702 Mon Sep 17 00:00:00 2001 From: Martin Schneider Date: Wed, 11 Oct 2017 16:42:37 +0200 Subject: [PATCH 4/5] [ex4] Update readme --- tutorial/ex4/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tutorial/ex4/README.md b/tutorial/ex4/README.md index de195573c2..df6dd6df76 100644 --- a/tutorial/ex4/README.md +++ b/tutorial/ex4/README.md @@ -19,7 +19,7 @@ workflow to develop code on top of DuMuX. * as name of the new module: `dumux-example` * as module dependencies: `dumux` * a version at your choice - * your email adress + * your email address


### Task 2: Rerun dunecontrol to configure your new project @@ -49,13 +49,13 @@ mkdir appl * Add a new CMakeLists.txt in the folder `appl` with the content ```cmake -// add a new box 1p test +# add a new box 1p test dune_add_test(NAME test_box1p SOURCES test_box1p.cc) - -// link the input file to the build folder + +# link the input file to the build folder dune_symlink_to_source_files(FILES test_box1p.input) - + ``` * Reconfigure your module by running in the topmost directory of your new module @@ -74,7 +74,7 @@ cd appl ```


-### Task 4: Create a new gitlab project +### Task 4: Create a new GitLab project
* Login with your username and password at https://git.iws.uni-stuttgart.de/ @@ -84,6 +84,8 @@ on our GitLab instance as long as it is DuMuX related. * Click the **New project** button +* Specify your project name and click the **Create project** button + * Follow the given instructions for an *existing folder* **Important**: Before executing the `git add .` command, you should add your cmake build folder to `.gitignore`. -- GitLab From d57d4da0b9ae7818acc0584cefff862489f700bb Mon Sep 17 00:00:00 2001 From: Martin Schneider Date: Wed, 11 Oct 2017 16:49:20 +0200 Subject: [PATCH 5/5] [ex1] Minor corrections in readme --- tutorial/ex1/CMakeLists.txt | 6 ++---- tutorial/ex1/README.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tutorial/ex1/CMakeLists.txt b/tutorial/ex1/CMakeLists.txt index b23435c886..8f7d6e6d61 100644 --- a/tutorial/ex1/CMakeLists.txt +++ b/tutorial/ex1/CMakeLists.txt @@ -1,12 +1,10 @@ # the immiscible two-phase simulation program dune_add_test(NAME exercise1_2p - SOURCES exercise1_2p.cc - COMMAND ./exercise1_2p exercise1.input) + SOURCES exercise1_2p.cc) # the compositional two-phase simulation program dune_add_test(NAME exercise1_2p2c - SOURCES exercise1_2p2c.cc - COMMAND ./exercise1_2p2c exercise1.input) + SOURCES exercise1_2p2c.cc) # add a symlink for the input file dune_symlink_to_source_files(FILES "exercise1.input") diff --git a/tutorial/ex1/README.md b/tutorial/ex1/README.md index 4b11282958..1356c91208 100644 --- a/tutorial/ex1/README.md +++ b/tutorial/ex1/README.md @@ -104,7 +104,7 @@ in the `injection2p2cproblem.hh` file and also remember to also set the paramete * Check the influence of that parameter on the simulation result by rerunning the simulation with different injection rates. Remember to also set the parameter totalAreaSpecificInflow in the input file. -Since you have changed your header hile, you have to recompile the program. +Since you have changed your header file, you have to recompile the program.


### 5. Setting up a new executable (for a non-isothermal simulation) -- GitLab