Commit a9f21b6a authored by Katharina Heck's avatar Katharina Heck
Browse files

[ff-pm-exercise] new naming conventions and remove deprecations warnings as possible

parent 388ea871
......@@ -15,10 +15,10 @@ Free flow is modeled in the upper subdomain, while the lower subdomain models a
There are three sub folders: `interface` (Exercise 1), `models` (Exercise 2) and `turbulence` (Exercise 3).
The problem-related files for this exercise are:
* Three __main files__ for the three sub-tasks :`exerciseinterfacecouplingffpm.cc`, `exercisemodelscouplingffpm.cc`, `exerciseturbulencecouplingffpm.cc`,
* Three __free flow problem files__: `interfaceffproblem.hh`, `modelsffproblem.hh`, `turbulenceffproblem.hh`
* Three __porous medium flow problem files__: `interfacepmproblem.hh`, `modelspmproblem.hh`, `turbulencepmproblem.hh`
* The __input files__: `exercise_interface_coupling_ff-pm.input`, `exercise_models_coupling_ff-pm.input`, `exercise_turbulence_coupling_ff-pm.input`,
* Three __main files__ for the three sub-tasks :`interface/main.cc`, `models/main.cc`, `turbulence/main.cc`,
* Three __free flow problem files__: `interface/freeflowsubproblem.hh`, `models/freeflowsubproblem.hh`, `turbulence/freeflowsubproblem.hh`
* Three __porous medium flow problem files__: `interface/porousmediumsubproblem.hh`, `models/porousmediumsubproblem.hh`, `turbulence/porousmediumsubproblem.hh`
* The __input files__: `interface/params.input`, `models/parmas.input`, `turbulence/params.input`,
* The __spatial parameters files__: `1pspatialparams.hh`, `2pspatialparams.hh`
......@@ -27,8 +27,8 @@ The same applies for types such as `GridManager`, `FVGridGeometry`, `Problem`, e
Since we use a monolithic coupling scheme, there is only one `Assembler` and one `NewtonSolver`.
The problem files very much look like "regular", uncoupled ones with the exception that they hold a pointer to the `CouplingManager` which allows to evaluate the coupling conditions and to exchange information between the coupled models.
The coupling conditions are realized technically in terms of boundary condition. For instance, in lines 178 and 179
in `ex_interface_ffproblem.hh`, `couplingNeumann` boundary conditions are set, which means that the free flow models evaluates the
The coupling conditions are realized technically in terms of boundary condition. For instance,
in `interface/freeflowsubproblem.hh`, `couplingNeumann` boundary conditions are set, which means that the free flow models evaluates the
mass and momentum fluxes coming from the porous domain and uses these values as boundary conditions at the interface.
Note the certain checks are performed when combining different models, e.g., the fluid system has to be the same for both domains
......@@ -57,7 +57,7 @@ Currently, a velocity profile is set on the upper free flow boundary, which lead
__Task A: Change the flow direction__
Open the file `ex_interface_ffproblem.hh` and navigate to line 148, where the types of boundary condition are set.
Open the file `interface/freeflowsubproblem.hh` and navigate to the part, where the types of boundary condition are set.
Instead of applying a fixed velocity profile at the top of the domain, we want to use fixed pressure boundary conditions
at the left and right side of the free flow domain, while the top represents an impermeable wall.
......@@ -134,10 +134,10 @@ with a Beavers-Joseph-Saffman (BJS) boundary condition for the respective moment
values.setBJS(Indices::momentumXBalanceIdx);
```
at the position where the coupling boundary conditions are set in `ex_interface_ffproblem.hh`.
at the position where the coupling boundary conditions are set in `interface/freeflowsubproblem.hh`.
To check if the simulation behaves as expected, we can compare the velocity profile $`v_x(y)`$ with the analytical solution provided by [Beavers and Joseph (1967)](https://doi.org/10.1017/S0022112067001375).
For doing so, we uncomment line 212 in `ex_interface_coupling_ff-pm.cc`.
For doing so, we uncomment line 212 in `exerciseinterfacecouplingffpm.cc`.
```cpp
stokesVtkWriter.addField(stokesProblem->getAnalyticalVelocityX(), "analyticalV_x");
```
......@@ -148,7 +148,7 @@ the analytical solution of $`v_x`$ on the free flow domain. Play around with the
__Task C: Cange shape of interface__
Now we want to include a non-flat interface between the two domains. We use `dune-subgrid` to construct
two grids for the two domains from one common host grid. Comment out lines 96-106 in `ex_interface_coupling_ff-pm.cc` and comment lines 114-149 in the same file. This will instantiate a host grid and define two helper lambda functions that are used to choose elements from to host grid for the respective sub grid. In the given case,
two grids for the two domains from one common host grid. Comment out lines 96-106 in `exerciseinterfacecouplingffpm.cc` and comment lines 114-149 in the same file. This will instantiate a host grid and define two helper lambda functions that are used to choose elements from to host grid for the respective sub grid. In the given case,
the domain is split in two haves, separated by a sinusoidal interface.
```cpp
......@@ -167,7 +167,7 @@ auto elementSelectorDarcy = [&](const auto& element)
Make sure, that you have uncommented the lines including the grid managers in both problem files
```cpp
#include <dumux/io/grid/subgridmanager.hh>
#include <dumux/io/grid/gridmanager_sub.hh>
```
and do the changes in the respective lines for the `Grid` property.
......@@ -216,7 +216,7 @@ __Task A: Change the model__:
In the first task, the porous-medium model will be changed from a 1p2c system to a 2p2c system.
Although a 2p2c system is plugged in, we still want to simulate the same situation as before, i.e., air with water vapor in both domains.
The following changes have to be made in the porous-medium model (`ex_models_pmproblem.hh`):
The following changes have to be made in the porous-medium model (`models/porousmediumsubproblem.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.
......@@ -314,7 +314,7 @@ All the prepared files can be found in the subfolder `exercise-coupling-ff-pm/tu
__Task A__:
The file `ex_turbulence_ffproblem.hh` is your free flow problem file within this exercise.
The file `freeflowsubproblem.hh` is your free flow problem file within this exercise.
For using the compositional zero equation turbulence model, the following header files need to be included:
```
......@@ -347,7 +347,7 @@ To get all these interactions, you have to call
```cpp
stokesProblem->updateStaticWallProperties();
```
in `ex_turbulence_coupling_ff-pm.cc`.
in `main.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.
......
# executables for ex_interface_coupling_ff-pm
dune_add_test(NAME exercise_interface_coupling_ff-pm
SOURCES exerciseinterfacecouplingffpm.cc)
SOURCES main.cc)
# add tutorial to the common target
add_dependencies(test_exercises exercise_interface_coupling_ff-pm)
......
......@@ -25,6 +25,7 @@
#include <dune/grid/yaspgrid.hh>
// TODO: dumux-course-task
//****** uncomment for the last exercise *****//
// #include <dumux/io/grid/subgridmanager.hh>
......@@ -38,7 +39,7 @@
namespace Dumux
{
template <class TypeTag>
class StokesSubProblem;
class FreeFlowSubProblem;
namespace Properties
{
......@@ -63,6 +64,7 @@ struct Grid<TypeTag, TTag::StokesOneP>
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using TensorGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<Scalar, dim> >;
// TODO: dumux-course-task
//****** comment out for the last exercise *****//
using type = TensorGrid;
......@@ -73,7 +75,7 @@ struct Grid<TypeTag, TTag::StokesOneP>
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::StokesOneP> { using type = Dumux::StokesSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesOneP> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesOneP> { static constexpr bool value = true; };
......@@ -87,7 +89,7 @@ struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesOneP> { static conste
* \brief The free flow sub problem
*/
template <class TypeTag>
class StokesSubProblem : public NavierStokesProblem<TypeTag>
class FreeFlowSubProblem : public NavierStokesProblem<TypeTag>
{
using ParentType = NavierStokesProblem<TypeTag>;
......@@ -112,7 +114,7 @@ class StokesSubProblem : public NavierStokesProblem<TypeTag>
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
public:
StokesSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
FreeFlowSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Stokes"), eps_(1e-6), couplingManager_(couplingManager)
{
deltaP_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.PressureDifference");
......@@ -159,6 +161,8 @@ public:
const auto& globalPos = scvf.dofPosition();
// TODO: dumux-course-task
// change the boundary conditions here as described in the exercise
if(onUpperBoundary_(globalPos))
{
values.setDirichlet(Indices::velocityXIdx);
......
......@@ -46,8 +46,8 @@
#include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh>
#include "interfacepmproblem.hh"
#include "interfaceffproblem.hh"
#include "porousmediumsubproblem.hh"
#include "freeflowsubproblem.hh"
namespace Dumux {
namespace Properties {
......@@ -89,7 +89,7 @@ int main(int argc, char** argv) try
// ******************** comment-out this section for the last exercise **************** //
// TODO: dumux-course-task: comment-out this section for the last exercise **************** //
// create two individual grids (from the given grid file or the input file)
// for both sub-domains
......@@ -110,43 +110,48 @@ int main(int argc, char** argv) try
// ******************** uncomment this section for the last exercise ****************** //
// // use dune-subgrid to create the individual grids
// static constexpr int dim = 2;
// using HostGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, dim> >;
// using HostGridManager = Dumux::GridManager<HostGrid>;
// HostGridManager hostGridManager;
// hostGridManager.init();
// auto& hostGrid = hostGridManager.grid();
//
// struct Params
// {
// double amplitude = getParam<double>("Grid.Amplitude");
// double baseline = getParam<double>("Grid.Baseline");
// double offset = getParam<double>("Grid.Offset");
// double scaling = getParam<double>("Grid.Scaling");
// };
//
// Params params;
//
// auto elementSelectorStokes = [&](const auto& element)
// {
// double interface = params.amplitude * std::sin(( element.geometry().center()[0] -params.offset) / params.scaling * 2.0 * M_PI) + params.baseline;
// return element.geometry().center()[1] > interface;
// };
//
// auto elementSelectorDarcy = [&](const auto& element)
// {
// double interface = params.amplitude * std::sin(( element.geometry().center()[0] - params.offset) / params.scaling * 2.0 * M_PI) + params.baseline;
// return element.geometry().center()[1] < interface;
// };
//
// // subgrid Pointer
// 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();
// const auto& stokesGridView = stokesGridPtr->leafGridView();
// // use dune-subgrid to create the individual grids
// static constexpr int dim = 2;
// using HostGrid = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, dim> >;
// using HostGridManager = Dumux::GridManager<HostGrid>;
// HostGridManager hostGridManager;
// hostGridManager.init();
// auto& hostGrid = hostGridManager.grid();
//
// struct Params
// {
// double amplitude = getParam<double>("Grid.Amplitude");
// double baseline = getParam<double>("Grid.Baseline");
// double offset = getParam<double>("Grid.Offset");
// double scaling = getParam<double>("Grid.Scaling");
// };
//
// Params params;
//
// auto elementSelectorStokes = [&](const auto& element)
// {
// double interface = params.amplitude * std::sin(( element.geometry().center()[0] -params.offset) / params.scaling * 2.0 * M_PI) + params.baseline;
// return element.geometry().center()[1] > interface;
// };
//
// auto elementSelectorDarcy = [&](const auto& element)
// {
// double interface = params.amplitude * std::sin(( element.geometry().center()[0] - params.offset) / params.scaling * 2.0 * M_PI) + params.baseline;
// return element.geometry().center()[1] < interface;
// };
//
// using SubGrid = Dune::SubGrid<dim, HostGrid>;
//
// Dumux::GridManager<SubGrid> subGridManagerStokes;
// Dumux::GridManager<SubGrid> subGridManagerDarcy;
//
// // initialize subgrids
// subGridManagerStokes.init(hostGrid, elementSelectorStokes, "Stokes");
// subGridManagerDarcy.init(hostGrid, elementSelectorDarcy, "Darcy");
//
// // we compute on the leaf grid view
// const auto& darcyGridView = subGridManagerDarcy.grid().leafGridView();
// const auto& stokesGridView = subGridManagerStokes.grid().leafGridView();
// ************************************************************************************ //
......
......@@ -26,6 +26,7 @@
#include <dune/grid/yaspgrid.hh>
// TODO: dumux-course-task
//****** uncomment for the last exercise *****//
// #include <dumux/io/grid/subgridmanager.hh>
......@@ -42,7 +43,7 @@
namespace Dumux
{
template <class TypeTag>
class DarcySubProblem;
class PorousMediumSubProblem;
namespace Properties
{
......@@ -53,7 +54,7 @@ struct DarcyOneP { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyOneP> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyOneP> { using type = Dumux::PorousMediumSubProblem<TypeTag>; };
// the fluid system
template<class TypeTag>
......@@ -90,7 +91,7 @@ struct SpatialParams<TypeTag, TTag::DarcyOneP> {
* \brief The porous medium flow sub problem
*/
template <class TypeTag>
class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
class PorousMediumSubProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -103,6 +104,8 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
......@@ -112,7 +115,7 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
public:
DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
PorousMediumSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Darcy"), eps_(1e-7), couplingManager_(couplingManager)
{}
......@@ -191,6 +194,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
// no-flow everywhere ...
......
# executables for ex_interface_coupling_ff-pm
dune_add_test(NAME exercise_models_coupling_ff-pm
SOURCES exercisemodelscouplingffpm.cc)
SOURCES main.cc)
# add tutorial to the common target
add_dependencies(test_exercises exercise_models_coupling_ff-pm)
......
......@@ -36,7 +36,7 @@
namespace Dumux
{
template <class TypeTag>
class StokesSubProblem;
class FreeFlowSubProblem;
namespace Properties
{
......@@ -67,7 +67,7 @@ struct UseMoles<TypeTag, TTag::StokesNC> { static constexpr bool value = true; }
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::StokesNC> { using type = Dumux::StokesSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesNC> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesNC> { static constexpr bool value = true; };
......@@ -84,7 +84,7 @@ struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesNC> { static constexp
* Horizontal flow from left to right with a parabolic velocity profile.
*/
template <class TypeTag>
class StokesSubProblem : public NavierStokesProblem<TypeTag>
class FreeFlowSubProblem : public NavierStokesProblem<TypeTag>
{
using ParentType = NavierStokesProblem<TypeTag>;
......@@ -113,7 +113,7 @@ class StokesSubProblem : public NavierStokesProblem<TypeTag>
static constexpr bool useMoles = GetPropType<TypeTag, Properties::ModelTraits>::useMoles();
public:
StokesSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
FreeFlowSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Stokes"), eps_(1e-6), couplingManager_(couplingManager)
{
velocity_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.Velocity");
......
......@@ -49,8 +49,8 @@
#include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh>
#include "modelspmproblem.hh"
#include "modelsffproblem.hh"
#include "porousmediumsubproblem.hh"
#include "freeflowsubproblem.hh"
namespace Dumux {
namespace Properties {
......
......@@ -40,7 +40,7 @@
namespace Dumux
{
template <class TypeTag>
class DarcySubProblem;
class PorousMediumSubProblem;
namespace Properties
{
......@@ -51,7 +51,7 @@ struct DarcyOnePNC { using InheritsFrom = std::tuple<OnePNC, CCTpfaModel>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyOnePNC> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyOnePNC> { using type = Dumux::PorousMediumSubProblem<TypeTag>; };
// The fluid system
template<class TypeTag>
......@@ -86,7 +86,7 @@ struct SpatialParams<TypeTag, TTag::DarcyOnePNC> {
} // end namespace Properties
template <class TypeTag>
class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
class PorousMediumSubProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -99,6 +99,8 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
// copy some indices for convenience
using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
......@@ -121,7 +123,7 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using TimeLoopPtr = std::shared_ptr<TimeLoop<Scalar>>;
public:
DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
PorousMediumSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Darcy"), eps_(1e-7), couplingManager_(couplingManager)
{
......@@ -305,6 +307,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
# executables for ex_interface_coupling_ff-pm
dune_add_test(NAME exercise_turbulence_coupling_ff-pm
SOURCES exercise_turbulence_coupling_ff-pm.cc)
SOURCES main.cc)
# add a symlink for each input file
......
......@@ -49,8 +49,8 @@
#include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh>
#include "turbulencepmproblem.hh"
#include "turbulenceffproblem.hh"
#include "porousmediumsubproblem.hh"
#include "freeflowsubproblem.hh"
namespace Dumux {
namespace Properties {
......
......@@ -38,7 +38,7 @@
namespace Dumux
{
template <class TypeTag>
class DarcySubProblem;
class PorousMediumSubProblem;
namespace Properties
{
......@@ -49,7 +49,7 @@ struct DarcyTwoPTwoCNI { using InheritsFrom = std::tuple<TwoPTwoCNI, CCTpfaModel
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = Dumux::DarcySubProblem<TypeTag>; };
struct Problem<TypeTag, TTag::DarcyTwoPTwoCNI> { using type = Dumux::PorousMediumSubProblem<TypeTag>; };
// the fluid system
template<class TypeTag>
......@@ -82,7 +82,7 @@ struct SpatialParams<TypeTag, TTag::DarcyTwoPTwoCNI> {
* \brief The porous medium sub problem
*/
template <class TypeTag>
class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
class PorousMediumSubProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -96,6 +96,8 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using FVGridGeometry = GetPropType<TypeTag, Properties::FVGridGeometry>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
......@@ -119,7 +121,7 @@ class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
using DiffusionCoefficientAveragingType = typename StokesDarcyCouplingOptions::DiffusionCoefficientAveragingType;
public:
DarcySubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
PorousMediumSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Darcy"), eps_(1e-7), couplingManager_(couplingManager)
{
......@@ -227,6 +229,7 @@ public:
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const ElementFluxVariablesCache& elemFluxVarsCache,
const SubControlVolumeFace& scvf) const
{
NumEqVector values(0.0);
......
dune_add_test(NAME exercise_interface_coupling_ff-pm_original
SOURCES exerciseinterfacecouplingffpm.cc
SOURCES main.cc
COMPILE_DEFINITIONS EXNUMBER=0)
dune_add_test(NAME exercise_interface_coupling_ff-pm_a_solution
SOURCES exerciseinterfacecouplingffpm.cc
SOURCES main.cc
COMPILE_DEFINITIONS EXNUMBER=1)
dune_add_test(NAME exercise_interface_coupling_ff-pm_b_solution
SOURCES exerciseinterfacecouplingffpm.cc
SOURCES main.cc
COMPILE_DEFINITIONS EXNUMBER=2)
dune_add_test(NAME exercise_interface_coupling_ff-pm_c_solution
SOURCES exerciseinterfacecouplingffpm.cc
SOURCES main.cc
COMPILE_DEFINITIONS EXNUMBER=3)
......
......@@ -26,7 +26,7 @@
#include <dune/grid/yaspgrid.hh>
#if EXNUMBER >= 3
#include <dumux/io/grid/subgridmanager.hh>
#include <dumux/io/grid/gridmanager_sub.hh>
#endif
#include <dumux/material/fluidsystems/1pliquid.hh>
......@@ -39,7 +39,7 @@
namespace Dumux
{
template <class TypeTag>
class StokesSubProblem;
class FreeFlowSubProblem;
namespace Properties
{
......@@ -74,7 +74,7 @@ struct Grid<TypeTag, TTag::StokesOneP>
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::StokesOneP> { using type = Dumux::StokesSubProblem<TypeTag> ; };
struct Problem<TypeTag, TTag::StokesOneP> { using type = Dumux::FreeFlowSubProblem<TypeTag> ; };
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::StokesOneP> { static constexpr bool value = true; };
......@@ -88,7 +88,7 @@ struct EnableGridVolumeVariablesCache<TypeTag, TTag::StokesOneP> { static conste
* \brief The free flow sub problem
*/
template <class TypeTag>
class StokesSubProblem : public NavierStokesProblem<TypeTag>
class FreeFlowSubProblem : public NavierStokesProblem<TypeTag>
{
using ParentType = NavierStokesProblem<TypeTag>;
......@@ -113,7 +113,7 @@ class StokesSubProblem : public NavierStokesProblem<TypeTag>
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
public:
StokesSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
FreeFlowSubProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry, std::shared_ptr<CouplingManager> couplingManager)
: ParentType(fvGridGeometry, "Stokes"), eps_(1e-6), couplingManager_(couplingManager)
{
deltaP_ = getParamFromGroup<Scalar>(this->paramGroup(), "Problem.PressureDifference");
......
......@@ -47,8 +47,8 @@
#include <dumux/multidomain/boundary/stokesdarcy/couplingmanager.hh>
#include "interfacepmproblem.hh"
#include "interfaceffproblem.hh"
#include "porousmediumsubproblem.hh"
#include "freeflowsubproblem.hh"
namespace Dumux {
namespace Properties {
......@@ -133,13 +133,18 @@ int main(int argc, char** argv) try
return element.geometry().center()[1] < interface;
};
// subgrid Pointer
auto stokesGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorStokes, "Stokes");
auto darcyGridPtr = SubgridManager<HostGrid>::makeGrid(hostGrid, elementSelectorDarcy, "Darcy");