Skip to content
Snippets Groups Projects
Commit 43ec3799 authored by Timo Koch's avatar Timo Koch Committed by Dennis Gläser
Browse files

[examples][ff] Reorganise introduction

parent a39afeaa
No related branches found
No related tags found
1 merge request!1933[examples] Move properties to their own header
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"README.md" : [ "README.md" : [
"doc/intro.md", "doc/intro.md",
"problem.hh", "problem.hh",
"main.cc", "main.cc"
"doc/results.md"
] ]
} }
<!-- Important: This file has been automatically generated by generate_example_docs.py. Do not edit this file directly! --> <!-- Important: This file has been automatically generated by generate_example_docs.py. Do not edit this file directly! -->
This example is based on dumux/test/freeflow/navierstokes/channel/2d.
# Freeflow through a channel # Freeflow through a channel
## Problem set-up You learn how to:
This example contains a stationary free flow of a fluid through two parallel solid plates in two dimensions from left to right. The figure below shows the simulation set-up. The fluid flows into the system at the left with a constant velocity of $` v = 1~\frac{\text{m}}{\text{s}} `$. The inflow velocity profile is a block profile. Due to the no-slip, no-flow boundary conditions at the top and bottom plate, the velocity profile gradually assumes a parabolic shape along the channel. At the outlet, the pressure is fixed and a zero velocity gradient in x-direction is assumed. The physical domain, which is modeled is the rectangular domain $`x\in[0,10],~y\in[0,1]`$. * solve a free flow channel problem
* set outflow boundary conditions in the free-flow context
![](./img/setup.png) __Results:__ In this example we will obtain the following stationary velocity profile:
![](./img/velocity.png)
## Folder layout and files
```
└── freeflowchannel/
├── CMakeLists.txt -> build system file
├── main.cc -> main program flow
├── params.input -> runtime parameters
├── properties.hh -> compile time configuration
└── problem.hh -> boundary & initial conditions
```
## Model description ## Mathematical model
The Stokes model without gravitation and without sources or sinks for a stationary, incompressible, laminar, single phase, one-component, isothermal ($`T=10^\circ C`$) flow is considered assuming a Newtonian fluid of constant density $` \varrho = 1~\frac{\text{kg}}{\text{m}^3} `$ and constant kinematic viscosity $` \nu = 1~\frac{\text{m}^2}{\text{s}} `$. The momentum balance The Stokes model without gravitation and without sources or sinks for a stationary, incompressible, laminar, single phase, one-component, isothermal ($`T=10^\circ C`$) flow is considered assuming a Newtonian fluid of constant density $` \varrho = 1~\frac{\text{kg}}{\text{m}^3} `$ and constant kinematic viscosity $` \nu = 1~\frac{\text{m}^2}{\text{s}} `$. The momentum balance
```math ```math
- \nabla\cdot\left(\mu\left(\nabla\boldsymbol{u}+\nabla\boldsymbol{u}^{\text{T}}\right)\right)+ \nabla p = 0 - \nabla\cdot\left(\mu\left(\nabla\boldsymbol{u}+\nabla\boldsymbol{u}^{\text{T}}\right)\right)+ \nabla p = 0
...@@ -18,9 +30,16 @@ with density $`\varrho`$, velocity $`\boldsymbol{u}`$, dynamic viscosity $`\mu ...@@ -18,9 +30,16 @@ with density $`\varrho`$, velocity $`\boldsymbol{u}`$, dynamic viscosity $`\mu
```math ```math
\nabla \cdot \left(\varrho\boldsymbol{u}\right) =0 \nabla \cdot \left(\varrho\boldsymbol{u}\right) =0
``` ```
are discretized using a staggered-grid finite-volume scheme as spatial discretization with pressures and velocity components as primary variables. For details on the discretization scheme, have a look at the dumux [handbook](https://dumux.org/handbook). are discretized using a staggered-grid finite-volume scheme as spatial discretization with pressures and velocity components as primary variables. For details on the discretization scheme, have a look at the Dumux [handbook](https://dumux.org/handbook).
In the following, we take a close look at the files containing the set-up: At first, boundary conditions are set in `problem.hh` for the Navier-Stokes 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. ## Problem set-up
This example contains a stationary free flow of a fluid through two parallel solid plates in two dimensions from left to right. The figure below shows the simulation set-up. The fluid flows into the system at the left with a constant velocity of $` v = 1~\frac{\text{m}}{\text{s}} `$. The inflow velocity profile is a block profile. Due to the no-slip, no-flow boundary conditions at the top and bottom plate, the velocity profile gradually assumes a parabolic shape along the channel. At the outlet, the pressure is fixed and a zero velocity gradient in x-direction is assumed. The physical domain, which is modeled is the rectangular domain $`x\in[0,10],~y\in[0,1]`$.
![](./img/setup.png)
In the following, we take a close look at the files containing the set-up: At first, boundary conditions are set in `problem.hh` for the Navier-Stokes model. Afterwards, we show the different steps for solving the model in the source file `main.cc`.
# Implementation
## The file `problem.hh` ## The file `problem.hh`
...@@ -570,11 +589,3 @@ catch (...) ...@@ -570,11 +589,3 @@ catch (...)
</details> </details>
## Results
This example computes the following stationary velocity profile:
![](./img/velocity.png)
and stationary pressure profile:
![](./img/pressure.png)
This example is based on dumux/test/freeflow/navierstokes/channel/2d.
# Freeflow through a channel # Freeflow through a channel
## Problem set-up You learn how to:
This example contains a stationary free flow of a fluid through two parallel solid plates in two dimensions from left to right. The figure below shows the simulation set-up. The fluid flows into the system at the left with a constant velocity of $` v = 1~\frac{\text{m}}{\text{s}} `$. The inflow velocity profile is a block profile. Due to the no-slip, no-flow boundary conditions at the top and bottom plate, the velocity profile gradually assumes a parabolic shape along the channel. At the outlet, the pressure is fixed and a zero velocity gradient in x-direction is assumed. The physical domain, which is modeled is the rectangular domain $`x\in[0,10],~y\in[0,1]`$. * solve a free flow channel problem
* set outflow boundary conditions in the free-flow context
![](./img/setup.png) __Results:__ In this example we will obtain the following stationary velocity profile:
## Model description ![](./img/velocity.png)
## Folder layout and files
```
└── freeflowchannel/
├── CMakeLists.txt -> build system file
├── main.cc -> main program flow
├── params.input -> runtime parameters
├── properties.hh -> compile time configuration
└── problem.hh -> boundary & initial conditions
```
## Mathematical model
The Stokes model without gravitation and without sources or sinks for a stationary, incompressible, laminar, single phase, one-component, isothermal ($`T=10^\circ C`$) flow is considered assuming a Newtonian fluid of constant density $` \varrho = 1~\frac{\text{kg}}{\text{m}^3} `$ and constant kinematic viscosity $` \nu = 1~\frac{\text{m}^2}{\text{s}} `$. The momentum balance The Stokes model without gravitation and without sources or sinks for a stationary, incompressible, laminar, single phase, one-component, isothermal ($`T=10^\circ C`$) flow is considered assuming a Newtonian fluid of constant density $` \varrho = 1~\frac{\text{kg}}{\text{m}^3} `$ and constant kinematic viscosity $` \nu = 1~\frac{\text{m}^2}{\text{s}} `$. The momentum balance
```math ```math
- \nabla\cdot\left(\mu\left(\nabla\boldsymbol{u}+\nabla\boldsymbol{u}^{\text{T}}\right)\right)+ \nabla p = 0 - \nabla\cdot\left(\mu\left(\nabla\boldsymbol{u}+\nabla\boldsymbol{u}^{\text{T}}\right)\right)+ \nabla p = 0
...@@ -16,6 +28,13 @@ with density $`\varrho`$, velocity $`\boldsymbol{u}`$, dynamic viscosity $`\mu ...@@ -16,6 +28,13 @@ with density $`\varrho`$, velocity $`\boldsymbol{u}`$, dynamic viscosity $`\mu
```math ```math
\nabla \cdot \left(\varrho\boldsymbol{u}\right) =0 \nabla \cdot \left(\varrho\boldsymbol{u}\right) =0
``` ```
are discretized using a staggered-grid finite-volume scheme as spatial discretization with pressures and velocity components as primary variables. For details on the discretization scheme, have a look at the dumux [handbook](https://dumux.org/handbook). are discretized using a staggered-grid finite-volume scheme as spatial discretization with pressures and velocity components as primary variables. For details on the discretization scheme, have a look at the Dumux [handbook](https://dumux.org/handbook).
## Problem set-up
This example contains a stationary free flow of a fluid through two parallel solid plates in two dimensions from left to right. The figure below shows the simulation set-up. The fluid flows into the system at the left with a constant velocity of $` v = 1~\frac{\text{m}}{\text{s}} `$. The inflow velocity profile is a block profile. Due to the no-slip, no-flow boundary conditions at the top and bottom plate, the velocity profile gradually assumes a parabolic shape along the channel. At the outlet, the pressure is fixed and a zero velocity gradient in x-direction is assumed. The physical domain, which is modeled is the rectangular domain $`x\in[0,10],~y\in[0,1]`$.
![](./img/setup.png)
In the following, we take a close look at the files containing the set-up: At first, boundary conditions are set in `problem.hh` for the Navier-Stokes model. Afterwards, we show the different steps for solving the model in the source file `main.cc`.
In the following, we take a close look at the files containing the set-up: At first, boundary conditions are set in `problem.hh` for the Navier-Stokes 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. # Implementation
## Results
This example computes the following stationary velocity profile:
![](./img/velocity.png)
and stationary pressure profile:
![](./img/pressure.png)
examples/freeflowchannel/img/pressure.png

11.6 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment