Commit a738c4d0 authored by Ned Coltman's avatar Ned Coltman

Merge branch 'fix/turbulence-exercise' into 'master'

[fix][pm-ff] fix inheritance from ransproblem

See merge request !72
parents e3a2cb3c 504f2209
Pipeline #1027 passed with stage
in 25 seconds
......@@ -218,7 +218,7 @@ Although a 2p2c system is plugged in, we still want to simulate the same situati
The following changes have to be made in the porous-medium model (`ex_models_pmproblem.hh`):
* Include the 2pnc model: include the respective headers and inherit from the new model `TwoPNC`
* Exchange the spatial parameters for the 1-phase system by those for a 2-phase system (hint: two occurrences).
* Since two phases are involved now, we do not need to use the OnePAdapter anymore. Change to property of the FluidSystem such that `H2OAir` is used directly.
* Since two phases are involved now, we do not need to use the OnePAdapter anymore. Change to property of the FluidSystem such that `H2OAir` is used directly.
Afterwards, set the `transportCompIdx` to `Indices::switchIdx`.
One big difference between the 1p and 2p model is, that the primary variables for which
......@@ -318,12 +318,12 @@ The file `ex_turbulence_ffproblem.hh` is your free flow problem file within this
For using the compositional zero equation turbulence model, the following header files need to be included:
```
#include <dumux/freeflow/compositional/zeroeqncmodel.hh>
#include <dumux/freeflow/rans/zeroeq/problem.hh>
#include <dumux/freeflow/rans/problem.hh>
```
The includes for the NavierStokesNC model and the NavierStokesProblem are no longer needed and can be removed.
Make sure your free flow problem inherits from the correct parent type:
* Change the entry in the `StokesZeroEq` definition accordingly (non-isothermal zero equation model)
* Change the entry in the `StokesZeroEq` definition accordingly (non-isothermal zero equation model, ZeroEqNCNI)
* Adapt the inheritance of the problem class (hint: two occurrences)
Take a look into the two headers included above to see how the correct TypeTag and the Problem class the inherit from are called.
......@@ -342,17 +342,17 @@ bool isOnWallAtPos(const GlobalPosition& globalPos) const
In addition, especially for the zero-equation models, any element in the free-flow domain interacts with the walls,
e.g. this defines the wall distance which is needed to calculate the eddy viscosity.
To get all these interactions, you have to call
To get all these interactions, you have to call
```cpp
stokesProblem->updateStaticWallProperties()
stokesProblem->updateStaticWallProperties();
```
in `ex_turbulence_coupling_ff-pm.cc`.
However, there is also a solution-dependent component of these interactions, e.g. for a correct
damping of the eddy viscosity toward the wall, the velocity gradient at the wall and inside the
cells is needed.
These dynamic interactions are to be updated by calling
These dynamic interactions are to be updated by calling
```cpp
stokesProblem->updateDynamicWallProperties(stokesSol)
stokesProblem->updateDynamicWallProperties(stokesSol);
```
in the time loop (after `// update dynamic wall properties`).
......
......@@ -141,8 +141,8 @@ int main(int argc, char** argv) try
// };
//
// // subgrid Pointer
// auto stokesGridPtr = SubgridGridCreator<HostGrid>::makeGrid(hostGrid, elementSelectorStokes, "Stokes");
// auto darcyGridPtr = SubgridGridCreator<HostGrid>::makeGrid(hostGrid, elementSelectorDarcy, "Darcy");
// auto stokesGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorStokes, "Stokes");
// auto darcyGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorDarcy, "Darcy");
//
// // we compute on the leaf grid view
// const auto& darcyGridView = darcyGridPtr->leafGridView();
......
......@@ -26,7 +26,7 @@
#include <dune/grid/yaspgrid.hh>
//****** uncomment for the last exercise *****//
// #include <dumux/io/grid/subgridgridcreator.hh>
// #include <dumux/io/grid/subgridmanager.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/simpleh2o.hh>
......
......@@ -27,7 +27,7 @@
#include <dune/grid/yaspgrid.hh>
//****** uncomment for the last exercise *****//
// #include <dumux/io/grid/subgridgridcreator.hh>
// #include <dumux/io/grid/subgridmanager.hh>
#include <dumux/discretization/cctpfa.hh>
......
......@@ -134,8 +134,8 @@ int main(int argc, char** argv) try
};
// subgrid Pointer
auto stokesGridPtr = SubgridGridCreator<HostGrid>::makeGrid(hostGrid, elementSelectorStokes, "Stokes");
auto darcyGridPtr = SubgridGridCreator<HostGrid>::makeGrid(hostGrid, elementSelectorDarcy, "Darcy");
auto stokesGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorStokes, "Stokes");
auto darcyGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorDarcy, "Darcy");
// we compute on the leaf grid view
const auto& darcyGridView = darcyGridPtr->leafGridView();
......
......@@ -26,7 +26,7 @@
#include <dune/grid/yaspgrid.hh>
#if EXNUMBER >= 3
#include <dumux/io/grid/subgridgridcreator.hh>
#include <dumux/io/grid/subgridmanager.hh>
#endif
#include <dumux/material/fluidsystems/1pliquid.hh>
......
......@@ -27,7 +27,7 @@
#include <dune/grid/yaspgrid.hh>
#if EXNUMBER >= 3
#include <dumux/io/grid/subgridgridcreator.hh>
#include <dumux/io/grid/subgridmanager.hh>
#endif
#include <dumux/discretization/cctpfa.hh>
......
......@@ -31,7 +31,7 @@
#if EXNUMBER >= 1
#include <dumux/freeflow/compositional/zeroeqncmodel.hh>
#include <dumux/freeflow/rans/zeroeq/problem.hh>
#include <dumux/freeflow/rans/problem.hh>
#else
#include <dumux/freeflow/compositional/navierstokesncmodel.hh>
#include <dumux/freeflow/navierstokes/problem.hh>
......@@ -90,9 +90,9 @@ struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesZeroEq> { static cons
*/
template <class TypeTag>
#if EXNUMBER >= 1
class FreeFlowSubProblem : public ZeroEqProblem<TypeTag>
class FreeFlowSubProblem : public RANSProblem<TypeTag>
{
using ParentType = ZeroEqProblem<TypeTag>;
using ParentType = RANSProblem<TypeTag>;
#else
class FreeFlowSubProblem : public NavierStokesProblem<TypeTag>
{
......
Markdown is supported
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