Commit 5eb4d4f6 authored by Katharina Heck's avatar Katharina Heck
Browse files

[cleanup][examples] rename names in cmake list to example for both

examples and cleanup filenames and wording
parent 7b29f2bd
......@@ -7,7 +7,7 @@ dune_add_test(NAME example_1ptracer
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_1ptracer_transport-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_1ptracer-00010.vtu
${CMAKE_CURRENT_BINARY_DIR}/example_1ptracer-00010.vtu
${CMAKE_SOURCE_DIR}/test/references/test_1ptracer_pressure-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/1p.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/example_1ptracer params.input -Problem.Name example_1ptracer")
......@@ -47,7 +47,7 @@ D^\kappa_\text{pm}= \phi \tau D^\kappa
The primary variable of this model is the mass fraction $`X^\kappa`$. We apply the same spatial discretization as in the single pahse model and use the implicit Euler method for time discretization. For more information, have a look at the dumux handbook.
In the following, we take a close look at the files containing the setup: At first, boundary conditions and spatially distributed parameters are set in `problem_1p.hh` and `spatialparams_1p.hh`, respectively, for the single phase model and subsequently in `problem_tracer.hh` and `spatialparams_tracer.hh` for the tracer model. Afterwards, we show the different steps for solving the model in the source file `main.cc`. At the end, we show some simulation results.
In the following, we take a close look at the files containing the set-up: At first, boundary conditions and spatially distributed parameters are set in `problem_1p.hh` and `spatialparams_1p.hh`, respectively, for the single phase model and subsequently in `problem_tracer.hh` and `spatialparams_tracer.hh` for the tracer model. Afterwards, we show the different steps for solving the model in the source file `main.cc`. At the end, we show some simulation results.
## The file `spatialparams_1p.hh`
......@@ -740,7 +740,7 @@ We leave the namespace Dumux here.
## The file `main.cc`
We look now at the main file for the tracer problem. We setup two problems in this file and solve them sequentially, first the 1p problem and afterwards the tracer problem. The result of the 1p problem is the pressure distribution in the problem domain. We use it to calculate the volume fluxes, which act as an input for the tracer problem. Based on this volume fluxes, we calculate the transport of a tracer in the following tracer problem.
We look now at the main file for the tracer problem. We set up two problems in this file and solve them sequentially, first the 1p problem and afterwards the tracer problem. The result of the 1p problem is the pressure distribution in the problem domain. We use it to calculate the volume fluxes, which act as an input for the tracer problem. Based on this volume fluxes, we calculate the transport of a tracer in the following tracer problem.
### Includes
```cpp
#include <config.h>
......@@ -831,9 +831,9 @@ We compute on the leaf grid view.
```cpp
const auto& leafGridView = gridManager.grid().leafGridView();
```
### Setup and solving of the 1p problem
In the following section, we setup and solve the 1p problem. As the result of this problem, we obtain the pressure distribution in the problem domain.
#### Setup
### Set-up and solving of the 1p problem
In the following section, we set up and solve the 1p problem. As the result of this problem, we obtain the pressure distribution in the problem domain.
#### Set-up
We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables.
We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition.
```cpp
......@@ -965,8 +965,8 @@ We calculate the volume flux for every subcontrolvolume face, which is not on a
}
```
### Setup and solving of the tracer problem
#### Setup
### Set-up and solving of the tracer problem
#### Set-up
Similar to the 1p problem, we first create and initialize the problem.
```cpp
using TracerProblem = GetPropType<TracerTypeTag, Properties::Problem>;
......@@ -1128,6 +1128,6 @@ The 1p-model calculated a stationary pressure distribution. It is shown in the f
The random permeability distribution generates the velocity profile shown in the left plot of the next figure. The image in the middle illustrates the tracer distribution after 2500s and the image on the right after 5000s.
| ![](img/velocityProfile.png)| ![](img/tracer_2500.png) | ![](img/tracer_5000.png)|
| ![](img/velocityprofile.png)| ![](img/tracer_2500.png) | ![](img/tracer_5000.png)|
|:---:|:---:|:---:|
| velocity profile| tracer concentration after 2500s | tracer concentration after 5000s |
......@@ -5,8 +5,8 @@ This tutorial was copied from dumux/test/porousmediumflow/tracer/1ptracer.
## Problem set-up
This example contains a contaminant transported by a base groundwater flow in a randomly distributed permeability field. The figure below shows the simulation set-up. The permeability values range between 6.12e-15 and 1.5 e-7 $`m^2`$. A pressure gradient between the top an the bottom boundary leads to a groundwater flux from the bottom to the top. Neumann no-flow boundaries are assigned to the left and right boundary. Initially, there is a contaminant concentration at the bottom of the domain.
![](./img/setup.png)
![](./img/set-up.png)
## Model description
Two different models are applied to simulate the system: In a first step, the groundwater velocity is evaluated under stationary conditions. Therefore the single phase model is applied.
In a second step, the contaminant gets transported based on the groundwater velocity field. It is assumed, that the dissolved contaminant does not affect density and viscosity of the groundwater and thus, it is handled as a tracer by the tracer model. The tracer model is then solved instationarily.
......@@ -47,4 +47,4 @@ D^\kappa_\text{pm}= \phi \tau D^\kappa
The primary variable of this model is the mass fraction $`X^\kappa`$. We apply the same spatial discretization as in the single pahse model and use the implicit Euler method for time discretization. For more information, have a look at the dumux handbook.
In the following, we take a close look at the files containing the setup: At first, boundary conditions and spatially distributed parameters are set in `problem_1p.hh` and `spatialparams_1p.hh`, respectively, for the single phase model and subsequently in `problem_tracer.hh` and `spatialparams_tracer.hh` for the tracer model. Afterwards, we show the different steps for solving the model in the source file `main.cc`. At the end, we show some simulation results.
In the following, we take a close look at the files containing the set-up: At first, boundary conditions and spatially distributed parameters are set in `problem_1p.hh` and `spatialparams_1p.hh`, respectively, for the single phase model and subsequently in `problem_tracer.hh` and `spatialparams_tracer.hh` for the tracer model. Afterwards, we show the different steps for solving the model in the source file `main.cc`. At the end, we show some simulation results.
......@@ -6,6 +6,6 @@ The 1p-model calculated a stationary pressure distribution. It is shown in the f
The random permeability distribution generates the velocity profile shown in the left plot of the next figure. The image in the middle illustrates the tracer distribution after 2500s and the image on the right after 5000s.
| ![](img/velocityProfile.png)| ![](img/tracer_2500.png) | ![](img/tracer_5000.png)|
| ![](img/velocityprofile.png)| ![](img/tracer_2500.png) | ![](img/tracer_5000.png)|
|:---:|:---:|:---:|
| velocity profile| tracer concentration after 2500s | tracer concentration after 5000s |
......@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
// We look now at the main file for the tracer problem. We setup two problems in this file and solve them sequentially, first the 1p problem and afterwards the tracer problem. The result of the 1p problem is the pressure distribution in the problem domain. We use it to calculate the volume fluxes, which act as an input for the tracer problem. Based on this volume fluxes, we calculate the transport of a tracer in the following tracer problem.
// We look now at the main file for the tracer problem. We set up two problems in this file and solve them sequentially, first the 1p problem and afterwards the tracer problem. The result of the 1p problem is the pressure distribution in the problem domain. We use it to calculate the volume fluxes, which act as an input for the tracer problem. Based on this volume fluxes, we calculate the transport of a tracer in the following tracer problem.
// ### Includes
#include <config.h>
......@@ -82,9 +82,9 @@ int main(int argc, char** argv) try
// We compute on the leaf grid view.
const auto& leafGridView = gridManager.grid().leafGridView();
// ### Setup and solving of the 1p problem
// In the following section, we setup and solve the 1p problem. As the result of this problem, we obtain the pressure distribution in the problem domain.
// #### Setup
// ### Set-up and solving of the 1p problem
// In the following section, we set up and solve the 1p problem. As the result of this problem, we obtain the pressure distribution in the problem domain.
// #### Set-up
// We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables.
// We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition.
using FVGridGeometry = GetPropType<OnePTypeTag, Properties::FVGridGeometry>;
......@@ -202,8 +202,8 @@ int main(int argc, char** argv) try
}
// ### Setup and solving of the tracer problem
// #### Setup
// ### Set-up and solving of the tracer problem
// #### Set-up
// Similar to the 1p problem, we first create and initialize the problem.
using TracerProblem = GetPropType<TracerTypeTag, Properties::Problem>;
auto tracerProblem = std::make_shared<TracerProblem>(fvGridGeometry);
......
......@@ -2,12 +2,12 @@ dune_symlink_to_source_files(FILES "params.input")
dune_symlink_to_source_files(FILES "initialsolutioncc.txt")
# using tpfa and point source
dune_add_test(NAME test_2p_pointsource_adaptive
dune_add_test(NAME example_2p_pointsource_adaptive
LABELS porousmediumflow 2p
SOURCES main.cc
CMAKE_GUARD dune-alugrid_FOUND
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/example-2padaptive-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_2p_pointsource_adaptive-00007.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_2p_pointsource_adaptive params.input -Problem.Name test_2p_pointsource_adaptive")
${CMAKE_CURRENT_BINARY_DIR}/example_2p_pointsource_adaptive-00007.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/example_2p_pointsource_adaptive params.input -Problem.Name example_2p_pointsource_adaptive")
......@@ -639,9 +639,9 @@ we compute on the leaf grid view
```cpp
const auto& leafGridView = gridManager.grid().leafGridView();
```
### Setup and solving of the problem
### Set-up and solving of the problem
#### Setup
#### Set-up
We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables.
We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition.
......
......@@ -96,9 +96,9 @@ int main(int argc, char** argv) try
// we compute on the leaf grid view
const auto& leafGridView = gridManager.grid().leafGridView();
// ### Setup and solving of the problem
// ### Set-up and solving of the problem
//
// #### Setup
// #### Set-up
// We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables.
//
// We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition.
......
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