Commit 81904ad0 authored by Theresa Schollenberger's avatar Theresa Schollenberger
Browse files

[exercise-basic] rename files in README and CMakeLists

parent 89a1b32a
# the immiscible two-phase simulation program
dune_add_test(NAME exercise1_2p
SOURCES exercise1_2p.cc
CMD_ARGS exercise1.input)
dune_add_test(NAME exercise_basic_2p
SOURCES exercise_basic_2p.cc
CMD_ARGS exercise_basic.input)
# the compositional two-phase two-component simulation program
dune_add_test(NAME exercise1_2p2c
SOURCES exercise1_2p2c.cc
CMD_ARGS exercise1.input)
dune_add_test(NAME exercise_basic_2p2c
SOURCES exercise_basic_2p2c.cc
CMD_ARGS exercise_basic.input)
# here, add the two-phase non-isothermal simulation program
# add tutorial to the common target
add_dependencies(test_exercises exercise1_2p exercise1_2p2c)
add_dependencies(test_exercises exercise_basic_2p exercise_basic_2p2c)
# add a symlink for the input file
dune_symlink_to_source_files(FILES "exercise1.input")
dune_symlink_to_source_files(FILES "exercise_basic.input")
......@@ -11,19 +11,19 @@ The aquifer is situated 2700 m below sea level and the domain size is 60 m x 40
* Navigate to the directory `dumux-course/exercises/exercise-basic`
The first exercise deals with two problems: a two-phase immiscible problem (__2p__) and a two-phase compositional problem (__2p2c__). They both set up the same scenario with the difference that the 2p2c assumes a miscible fluid state for the two fluids (water and gaseous N$`_2`$) and the 2p model assumes an immiscible fluid state.
This exercise deals with two problems: a two-phase immiscible problem (__2p__) and a two-phase compositional problem (__2p2c__). They both set up the same scenario with the difference that the 2p2c assumes a miscible fluid state for the two fluids (water and gaseous N$`_2`$) and the 2p model assumes an immiscible fluid state.
<br><br>
### Task 1: Getting familiar with the code
<hr>
Locate all the files you will need for this exercise
* The __main file__ for the __2p__ problem : `exercise1_2p.cc`
* The __main file__ for the __2p2c__ problem : `exercise1_2p2c.cc`
* The __main file__ for the __2p__ problem : `exercise_basic_2p.cc`
* The __main file__ for the __2p2c__ problem : `exercise_basic_2p2c.cc`
* The __problem file__ for the __2p__ problem: `injection2pproblem.hh`
* The __problem file__ for the __2p2c__ problem: `injection2p2cproblem.hh`
* The shared __spatial parameters file__: `injection2pspatialparams.hh`
* The shared __input file__: `exercise1.input`
* The shared __input file__: `exercise_basic.input`
<hr><br><br>
### Task 2: Compiling and running an executable
......@@ -35,17 +35,17 @@ Locate all the files you will need for this exercise
cd ../../build-cmake/exercises/exercise-basic
```
* Compile both executables `exercise1_2p` and `exercise1_2p2c`
* Compile both executables `exercise_basic_2p` and `exercise_basic_2p2c`
```bash
make exercise1_2p exercise1_2p2c
make exercise_basic_2p exercise_basic_2p2c
```
* Execute the two problems and inspect the result
```bash
./exercise1_2p exercise1.input
./exercise1_2p2c exercise1.input
./exercise_basic_2p exercise_basic.input
./exercise_basic_2p2c exercise_basic.input
```
* you can look at the results with paraview
......@@ -58,23 +58,23 @@ paraview injection-2p2c.pvd
### Task 3: Setting up a new executable (for a non-isothermal simulation)
<hr>
* Copy the main file `exercise1_2p.cc` and rename it to `exercise1_2pni.cc`
* In `exercise1_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise1_2pni.cc`, change `Injection2pCCTypeTag` to `Injection2pNICCTypeTag` in the line `using TypeTag = TTAG(Injection2pCCTypeTag);`
* Copy the main file `exercise_basic_2p.cc` and rename it to `exercise_basic_2pni.cc`
* In `exercise_basic_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise_basic_2pni.cc`, change `Injection2pCCTypeTag` to `Injection2pNICCTypeTag` in the line `using TypeTag = TTAG(Injection2pCCTypeTag);`
* Add a new executable in `CMakeLists.txt` by adding the lines
```cmake
# the two-phase non-isothermal simulation program
dune_add_test(NAME exercise1_2pni
SOURCES exercise1_2pni.cc
CMD_ARGS exercise1.input)
dune_add_test(NAME exercise_basic_2pni
SOURCES exercise_basic_2pni.cc
CMD_ARGS exercise_basic.input)
```
* Test that everything compiles without error
```bash
make # should rerun cmake
make exercise1_2pni # builds new executable
make exercise_basic_2pni # builds new executable
```
<hr><br><br>
......@@ -95,4 +95,4 @@ make exercise1_2pni # builds new executable
<img src="https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/raw/master/exercises/extradoc/exercise1_nonisothermal.png" width="800">
The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `exercise1.input`, you just need to _uncomment_ them.
The non-isothermal model requires additional parameters like the thermal conductivity of the solid component. They are already implemented and set in `exercise_basic.input`, you just need to _uncomment_ them.
add_subdirectory(ex1)
add_subdirectory(ex2)
add_subdirectory(exercise-basic)
# the immiscible two-phase simulation program
#dune_add_test(NAME exercise1_2p_solution
# SOURCES exercise1_2p_solution.cc
# CMD_ARGS exercise1.input)
# the compositional two-phase two-component simulation program
dune_add_test(NAME exercise1_2p2c_solution
SOURCES exercise1_2p2c.cc
CMD_ARGS exercise1.input)
# the two-phase non-isothermal simulation program
dune_add_test(NAME exercise1_2pni_solution
SOURCES exercise1_2pni_solution.cc
CMD_ARGS exercise1.input)
dune_add_test(NAME exercise_basic_2pni
SOURCES exercise_basic_2pni.cc
CMD_ARGS exercise_basic.input)
# add tutorial to the common target
add_dependencies(test_exercises exercise1_2p2c_solution exercise1_2pni_solution)
add_dependencies(test_exercises exercise_basic_2pni)
# add a symlink for the input file
dune_symlink_to_source_files(FILES "exercise1.input")
dune_symlink_to_source_files(FILES "exercise_basic.input")
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