diff --git a/test/freeflow/navierstokes/angeli/main.cc b/test/freeflow/navierstokes/angeli/main.cc index 9f0ce7fe6caea870e025eb12a6c293c91935ff99..d13d56d99615fa969fd59448f96be5bec69a9ec8 100644 --- a/test/freeflow/navierstokes/angeli/main.cc +++ b/test/freeflow/navierstokes/angeli/main.cc @@ -91,8 +91,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); @@ -104,6 +103,7 @@ int main(int argc, char** argv) auto massProblem = std::make_shared<MassProblem>(massGridGeometry, couplingManager); // get some time loop parameters + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using Scalar = typename Traits::Scalar; const auto tStart = getParam<Scalar>("TimeLoop.TStart", 0.0); const auto tEnd = getParam<Scalar>("TimeLoop.TEnd"); diff --git a/test/freeflow/navierstokes/angeli/problem.hh b/test/freeflow/navierstokes/angeli/problem.hh index 1ba164afb3d0c85dade4ddddc9e47fecac13e8f8..d66187dfdede5eb9a52ec4434fd2b7fe2c97ba31 100644 --- a/test/freeflow/navierstokes/angeli/problem.hh +++ b/test/freeflow/navierstokes/angeli/problem.hh @@ -32,7 +32,6 @@ #include <dumux/common/properties.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> namespace Dumux { @@ -45,10 +44,10 @@ namespace Dumux { * The velocities and pressures decay exponentially. The Dirichlet boundary conditions are * time-dependent and consistent with the analytical solution. */ -template <class TypeTag> -class AngeliTestProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class AngeliTestProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = typename ParentType::BoundaryTypes; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/angeli/properties.hh b/test/freeflow/navierstokes/angeli/properties.hh index 4874fcde23e8d722e87f5b34f7a70b07764350e6..727570a518f2bf0ca3a06a5ef3975d8586a69684 100644 --- a/test/freeflow/navierstokes/angeli/properties.hh +++ b/test/freeflow/navierstokes/angeli/properties.hh @@ -29,6 +29,8 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/multidomain/traits.hh> #include <dumux/discretization/fcstaggered.hh> #include <dumux/discretization/cctpfa.hh> @@ -36,7 +38,7 @@ #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include "problem.hh" @@ -65,7 +67,12 @@ struct Grid<TypeTag, TTag::AngeliTest> { using type = Dune::YaspGrid<2, Dune::Eq // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::AngeliTest> { using type = Dumux::AngeliTestProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::AngeliTestMomentum> +{ using type = AngeliTestProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::AngeliTestMass> +{ using type = AngeliTestProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::AngeliTest> { static constexpr bool value = true; }; @@ -81,7 +88,7 @@ struct CouplingManager<TypeTag, TTag::AngeliTest> private: using Traits = MultiDomainTraits<TTag::AngeliTestMomentum, TTag::AngeliTestMass>; public: - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/channel/1d/main.cc b/test/freeflow/navierstokes/channel/1d/main.cc index 1ec180bc5e715c8cfa7d9636b6f60e6fe90f7008..a17cc4da6a3c9ff491b9730b81cb4e094c055145 100644 --- a/test/freeflow/navierstokes/channel/1d/main.cc +++ b/test/freeflow/navierstokes/channel/1d/main.cc @@ -40,7 +40,6 @@ #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> #include <dumux/multidomain/newtonsolver.hh> #include <dumux/freeflow/navierstokes/velocityoutput.hh> @@ -86,8 +85,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problem (initial and boundary conditions) @@ -99,6 +97,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/channel/1d/problem.hh b/test/freeflow/navierstokes/channel/1d/problem.hh index e2b1dc972aff01ae923dc384b7182024319edcd9..5d36638230c0f9f842d3a9e635b4eb9ae70dbfbc 100644 --- a/test/freeflow/navierstokes/channel/1d/problem.hh +++ b/test/freeflow/navierstokes/channel/1d/problem.hh @@ -31,7 +31,6 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> namespace Dumux { @@ -39,10 +38,10 @@ namespace Dumux { * \ingroup NavierStokesTests * \brief Test for the 1-D Navier-Stokes model with an analytical solution. */ -template <class TypeTag> -class NavierStokesAnalyticProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class NavierStokesAnalyticProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/channel/1d/properties.hh b/test/freeflow/navierstokes/channel/1d/properties.hh index ce8b3f187d9b72d5a0265c9fceed812f114d8d29..473a55bec8965419332e3be9c7d3e98e3d60749d 100644 --- a/test/freeflow/navierstokes/channel/1d/properties.hh +++ b/test/freeflow/navierstokes/channel/1d/properties.hh @@ -31,11 +31,13 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/multidomain/traits.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include "problem.hh" @@ -62,7 +64,12 @@ struct Grid<TypeTag, TTag::NavierStokesAnalytic> { using type = Dune::YaspGrid<1 // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::NavierStokesAnalytic> { using type = Dumux::NavierStokesAnalyticProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::NavierStokesAnalyticMomentum> +{ using type = NavierStokesAnalyticProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::NavierStokesAnalyticMass> +{ using type = NavierStokesAnalyticProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::NavierStokesAnalytic> { static constexpr bool value = true; }; @@ -78,7 +85,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::NavierStokesAnalytic> { using Traits = MultiDomainTraits<TTag::NavierStokesAnalyticMomentum, TTag::NavierStokesAnalyticMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/channel/2d/main.cc b/test/freeflow/navierstokes/channel/2d/main.cc index 23d0b0187713283e0052cf5581f00202fabea14c..8d33f25d7622d1a3178a81ba6b8c993b993d0338 100644 --- a/test/freeflow/navierstokes/channel/2d/main.cc +++ b/test/freeflow/navierstokes/channel/2d/main.cc @@ -91,8 +91,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problem (boundary conditions) @@ -114,6 +113,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/channel/2d/problem.hh b/test/freeflow/navierstokes/channel/2d/problem.hh index ac8bf4144ca14f3df69d71f6cad66b8019173061..9436521b0bd032f4d08ab48485975be04b0883b3 100644 --- a/test/freeflow/navierstokes/channel/2d/problem.hh +++ b/test/freeflow/navierstokes/channel/2d/problem.hh @@ -30,7 +30,6 @@ #include <dumux/common/timeloop.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/freeflow/navierstokes/momentum/fluxhelper.hh> #include <dumux/freeflow/navierstokes/scalarfluxhelper.hh> @@ -49,10 +48,10 @@ namespace Dumux { * For the non-isothermal test, water of increased temperature is injected at the inlet * while the walls are fully isolating. */ -template <class TypeTag> -class ChannelTestProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class ChannelTestProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = typename ParentType::BoundaryTypes; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/channel/2d/properties.hh b/test/freeflow/navierstokes/channel/2d/properties.hh index 944f2fe302fc1f83ab1cd45cd4b1110f0b40edfc..c631b9b2abe91ab755ec1d43c0a5cdd3a9c3a82e 100644 --- a/test/freeflow/navierstokes/channel/2d/properties.hh +++ b/test/freeflow/navierstokes/channel/2d/properties.hh @@ -31,12 +31,14 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/multidomain/traits.hh> #include "problem.hh" @@ -56,8 +58,12 @@ struct ChannelTestMass { using InheritsFrom = std::tuple<ChannelTest, NavierStok // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::ChannelTest> -{ using type = ChannelTestProblem<TypeTag>; }; +struct Problem<TypeTag, TTag::ChannelTestMomentum> +{ using type = ChannelTestProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::ChannelTestMass> +{ using type = ChannelTestProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; // the fluid system template<class TypeTag> @@ -93,7 +99,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::ChannelTest> { using Traits = MultiDomainTraits<TTag::ChannelTestMomentum, TTag::ChannelTestMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/channel/3d/main.cc b/test/freeflow/navierstokes/channel/3d/main.cc index a01eb6b32212d62dd6580ab1a4811ca29bf75e1c..0ace80a0c7f696a1e8ed5fd92f08bffb7de47777 100644 --- a/test/freeflow/navierstokes/channel/3d/main.cc +++ b/test/freeflow/navierstokes/channel/3d/main.cc @@ -112,8 +112,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problems (boundary conditions) @@ -125,6 +124,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/channel/3d/problem.hh b/test/freeflow/navierstokes/channel/3d/problem.hh index 7a4a5c21487700aea3468b13017a9e71268e5a6e..966b5b385d382d58f1aebc0bd2c8e9eda4d76e8f 100644 --- a/test/freeflow/navierstokes/channel/3d/problem.hh +++ b/test/freeflow/navierstokes/channel/3d/problem.hh @@ -33,7 +33,6 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/freeflow/navierstokes/momentum/fluxhelper.hh> #include <dumux/freeflow/navierstokes/scalarfluxhelper.hh> #include <dumux/freeflow/navierstokes/mass/1p/advectiveflux.hh> @@ -51,10 +50,10 @@ namespace Dumux { * For sake of efficiency, the 3D problem can be reduced to a two-dimensional one by including * an additional wall friction term to the momentum balance (Flekkoy et al., 1995 \cite flekkoy1995a). */ -template <class TypeTag> -class ThreeDChannelTestProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class ThreeDChannelTestProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = typename ParentType::BoundaryTypes; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/channel/3d/properties.hh b/test/freeflow/navierstokes/channel/3d/properties.hh index a9e0182192867546c414b433faaba95ec3cb007c..9e156518b2772bdb0b0d54a84afd857a22c4f075 100644 --- a/test/freeflow/navierstokes/channel/3d/properties.hh +++ b/test/freeflow/navierstokes/channel/3d/properties.hh @@ -40,10 +40,12 @@ #include <dumux/discretization/fcstaggered.hh> #include <dumux/discretization/cctpfa.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/multidomain/traits.hh> #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/1pliquid.hh> @@ -94,7 +96,12 @@ struct SpatialParams<TypeTag, TTag::ThreeDChannelTest> // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::ThreeDChannelTest> { using type = ThreeDChannelTestProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::ThreeDChannelTestMomentum> +{ using type = ThreeDChannelTestProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::ThreeDChannelTestMass> +{ using type = ThreeDChannelTestProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::ThreeDChannelTest> { static constexpr bool value = ENABLECACHING; }; @@ -107,7 +114,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::ThreeDChannelTest> { using Traits = MultiDomainTraits<TTag::ThreeDChannelTestMomentum, TTag::ThreeDChannelTestMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/channel/3d_nonuniform/main.cc b/test/freeflow/navierstokes/channel/3d_nonuniform/main.cc index 72c08bc0843bcd3a84167f89e307d0bda655fd83..f5e6919581a66cf235a3fc72d23369838c1d2563 100644 --- a/test/freeflow/navierstokes/channel/3d_nonuniform/main.cc +++ b/test/freeflow/navierstokes/channel/3d_nonuniform/main.cc @@ -87,8 +87,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = FreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problems (boundary conditions) @@ -100,6 +99,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/channel/pipe/main.cc b/test/freeflow/navierstokes/channel/pipe/main.cc index 1a3b5ce67a0eab6777d1f12171b7638527b55dc9..45ef3105b5ac303bcbcc83bcf2c8c3ad390a9a64 100644 --- a/test/freeflow/navierstokes/channel/pipe/main.cc +++ b/test/freeflow/navierstokes/channel/pipe/main.cc @@ -40,7 +40,6 @@ #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> #include <dumux/multidomain/newtonsolver.hh> #include <dumux/freeflow/navierstokes/velocityoutput.hh> @@ -80,8 +79,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(gridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); @@ -95,6 +93,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; momentumProblem->applyInitialSolution(x[momentumIdx]); diff --git a/test/freeflow/navierstokes/channel/pipe/momentum/problem.hh b/test/freeflow/navierstokes/channel/pipe/momentum/problem.hh index 646bf09b49ea9eb57764b435fbd0860a72286968..3533a0616cc58088be6f3a0994ad8c666a65aac2 100644 --- a/test/freeflow/navierstokes/channel/pipe/momentum/problem.hh +++ b/test/freeflow/navierstokes/channel/pipe/momentum/problem.hh @@ -23,7 +23,7 @@ #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> -#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> namespace Dumux { /*! @@ -32,9 +32,9 @@ namespace Dumux { * Simulation of a radially-symmetric pipe flow with circular cross-section */ template <class TypeTag> -class FreeFlowPipeProblem : public NavierStokesProblem<TypeTag> +class FreeFlowPipeProblem : public NavierStokesMomentumProblem<TypeTag> { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = NavierStokesMomentumProblem<TypeTag>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; diff --git a/test/freeflow/navierstokes/channel/pipe/problem.hh b/test/freeflow/navierstokes/channel/pipe/problem.hh index aa4fd0bb7de2e725fd08b68322613cffac80614d..97bd7fbfa5610c5335d03402132535f6c1ecb361 100644 --- a/test/freeflow/navierstokes/channel/pipe/problem.hh +++ b/test/freeflow/navierstokes/channel/pipe/problem.hh @@ -23,7 +23,6 @@ #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> -#include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/freeflow/navierstokes/momentum/fluxhelper.hh> #include <dumux/freeflow/navierstokes/scalarfluxhelper.hh> #include <dumux/freeflow/navierstokes/mass/1p/advectiveflux.hh> @@ -34,10 +33,10 @@ namespace Dumux { * \brief Freeflow problem for pipe flow * Simulation of a radially-symmetric pipe flow with circular cross-section */ -template <class TypeTag> -class FreeFlowPipeProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class FreeFlowPipeProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; diff --git a/test/freeflow/navierstokes/channel/pipe/properties.hh b/test/freeflow/navierstokes/channel/pipe/properties.hh index 4f9fd0f915b9df4d71d89c70f456f8768413c25a..9b242318d108839cf99a2050bbf54d335fd8f18e 100644 --- a/test/freeflow/navierstokes/channel/pipe/properties.hh +++ b/test/freeflow/navierstokes/channel/pipe/properties.hh @@ -29,6 +29,8 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/discretization/fcstaggered.hh> #include <dumux/discretization/cctpfa.hh> @@ -36,7 +38,7 @@ #include <dumux/material/fluidsystems/1pliquid.hh> #include <dumux/material/components/constant.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/multidomain/traits.hh> #include "problem.hh" @@ -65,8 +67,12 @@ struct Grid<TypeTag, TTag::PipeFlow> // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::PipeFlow> -{ using type = FreeFlowPipeProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::PipeFlowMomentum> +{ using type = FreeFlowPipeProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::PipeFlowMass> +{ using type = FreeFlowPipeProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::PipeFlow> { static constexpr bool value = true; }; @@ -107,7 +113,7 @@ struct CouplingManager<TypeTag, TTag::PipeFlow> private: using Traits = MultiDomainTraits<TTag::PipeFlowMomentum, TTag::PipeFlowMass>; public: - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index 5630023704f3719500a8693cc24d4fd20777a90c..46b1252152880d4f56f1291eb82447ddde68c164 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -40,7 +40,6 @@ #include <dumux/multidomain/fvassembler.hh> #include <dumux/multidomain/traits.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> #include <dumux/multidomain/newtonsolver.hh> #include <dumux/freeflow/navierstokes/velocityoutput.hh> @@ -87,8 +86,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // mass-momentum coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problems (boundary conditions) @@ -101,6 +99,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/donea/properties.hh b/test/freeflow/navierstokes/donea/properties.hh index 52ffa22a27bbc3c2d4d8bc553393c0eebb2bed56..e2c90a4fc2bc3c0ca1b5d20d4166a54f0962986d 100644 --- a/test/freeflow/navierstokes/donea/properties.hh +++ b/test/freeflow/navierstokes/donea/properties.hh @@ -42,7 +42,7 @@ #include <dumux/freeflow/navierstokes/momentum/problem.hh> #include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/multidomain/traits.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/1pliquid.hh> @@ -92,7 +92,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::DoneaTest> { using Traits = MultiDomainTraits<TTag::DoneaTestMomentum, TTag::DoneaTestMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/kovasznay/problem.hh b/test/freeflow/navierstokes/kovasznay/problem.hh index c323d490f590b02b9d782b3952c54c627d6ee853..4d45903fbc55f78848cd192ae570e1beb8a3af42 100644 --- a/test/freeflow/navierstokes/kovasznay/problem.hh +++ b/test/freeflow/navierstokes/kovasznay/problem.hh @@ -30,7 +30,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/staggered/problem.hh> namespace Dumux { @@ -43,9 +43,9 @@ namespace Dumux { * and is chosen in a way such that an exact solution is available. */ template <class TypeTag> -class KovasznayTestProblem : public NavierStokesProblem<TypeTag> +class KovasznayTestProblem : public NavierStokesStaggeredProblem<TypeTag> { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = NavierStokesStaggeredProblem<TypeTag>; using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/periodic/main.cc b/test/freeflow/navierstokes/periodic/main.cc index 03ac976b2d0a9e11256a9e8fcb79e7c36a138195..bbfade1112e6b62b3fdf5f720a91f3179dfa6ddb 100644 --- a/test/freeflow/navierstokes/periodic/main.cc +++ b/test/freeflow/navierstokes/periodic/main.cc @@ -85,8 +85,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problem (boundary conditions) @@ -98,6 +97,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokes/periodic/problem.hh b/test/freeflow/navierstokes/periodic/problem.hh index 2aebd8a7b92fc139cce547fca9e2fae61fb5ef2b..841b154f03bd51a61dcdfed5cdf8e7f62db9ac3d 100644 --- a/test/freeflow/navierstokes/periodic/problem.hh +++ b/test/freeflow/navierstokes/periodic/problem.hh @@ -27,7 +27,6 @@ #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> -#include <dumux/freeflow/navierstokes/problem.hh> namespace Dumux { @@ -38,10 +37,10 @@ namespace Dumux { * A two-dimensional Navier-Stokes flow with a periodicity in one direction * is considered. */ -template <class TypeTag> -class PeriodicTestProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class PeriodicTestProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = typename ParentType::BoundaryTypes; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using FVElementGeometry = typename GridGeometry::LocalView; diff --git a/test/freeflow/navierstokes/periodic/properties.hh b/test/freeflow/navierstokes/periodic/properties.hh index 7bb135b868468eef599c81b6cc7e864f58ce0bdc..6588d2e337cee76b307cf8d868eb59de342b2003 100644 --- a/test/freeflow/navierstokes/periodic/properties.hh +++ b/test/freeflow/navierstokes/periodic/properties.hh @@ -33,8 +33,10 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/multidomain/traits.hh> #include <dumux/discretization/fcstaggered.hh> @@ -66,7 +68,12 @@ struct Grid<TypeTag, TTag::PeriodicTest> { using type = Dune::SPGrid<double, 2>; // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::PeriodicTest> { using type = PeriodicTestProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::PeriodicTestMomentum> +{ using type = PeriodicTestProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::PeriodicTestMass> +{ using type = PeriodicTestProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::PeriodicTest> { static constexpr bool value = true; }; @@ -79,7 +86,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::PeriodicTest> { using Traits = MultiDomainTraits<TTag::PeriodicTestMomentum, TTag::PeriodicTestMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 199d984b1fc813598868c73e4fd2b40cac2063ec..2b261b0786166c18e508a43cb264f71195fe0f78 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -116,8 +116,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = StaggeredFreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // get some time loop parameters @@ -139,6 +138,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; momentumProblem->applyInitialSolution(x[momentumIdx]); diff --git a/test/freeflow/navierstokes/sincos/problem.hh b/test/freeflow/navierstokes/sincos/problem.hh index 6c15b959924d7578350a1e26753429b509a188d4..a8daceca6177b521604101430cbfb17352062340 100644 --- a/test/freeflow/navierstokes/sincos/problem.hh +++ b/test/freeflow/navierstokes/sincos/problem.hh @@ -30,7 +30,6 @@ #include <dumux/common/properties.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> namespace Dumux { @@ -43,10 +42,10 @@ namespace Dumux { * For the instationary case, the velocities and pressures are periodical in time. The Dirichlet boundary conditions are * consistent with the analytical solution and in the instationary case time-dependent. */ -template <class TypeTag> -class SincosTestProblem : public NavierStokesProblem<TypeTag> +template <class TypeTag, class BaseProblem> +class SincosTestProblem : public BaseProblem { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = BaseProblem; using BoundaryTypes = typename ParentType::BoundaryTypes; using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; diff --git a/test/freeflow/navierstokes/sincos/properties.hh b/test/freeflow/navierstokes/sincos/properties.hh index 8810efed5f343da89d56bfdc24d9fc68f0bb0689..4f4ecddd5e0a771f91989573bd83ed1282100313 100644 --- a/test/freeflow/navierstokes/sincos/properties.hh +++ b/test/freeflow/navierstokes/sincos/properties.hh @@ -28,6 +28,8 @@ #include <dumux/freeflow/navierstokes/momentum/model.hh> #include <dumux/freeflow/navierstokes/mass/1p/model.hh> +#include <dumux/freeflow/navierstokes/momentum/problem.hh> +#include <dumux/freeflow/navierstokes/mass/problem.hh> #include <dumux/discretization/fcstaggered.hh> #include <dumux/discretization/cctpfa.hh> @@ -35,7 +37,7 @@ #include <dumux/material/components/constant.hh> #include <dumux/material/fluidsystems/1pliquid.hh> -#include <dumux/multidomain/staggeredfreeflow/couplingmanager.hh> +#include <dumux/multidomain/freeflow/couplingmanager.hh> #include <dumux/multidomain/traits.hh> #include "problem.hh" @@ -64,7 +66,12 @@ struct Grid<TypeTag, TTag::SincosTest> { using type = Dune::YaspGrid<2, Dune::Eq // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::SincosTest> { using type = SincosTestProblem<TypeTag> ; }; +struct Problem<TypeTag, TTag::SincosTestMomentum> +{ using type = SincosTestProblem<TypeTag, Dumux::NavierStokesMomentumProblem<TypeTag>>; }; + +template<class TypeTag> +struct Problem<TypeTag, TTag::SincosTestMass> +{ using type = SincosTestProblem<TypeTag, Dumux::NavierStokesMassProblem<TypeTag>>; }; template<class TypeTag> struct EnableGridGeometryCache<TypeTag, TTag::SincosTest> { static constexpr bool value = true; }; @@ -77,7 +84,7 @@ template<class TypeTag> struct CouplingManager<TypeTag, TTag::SincosTest> { using Traits = MultiDomainTraits<TTag::SincosTestMomentum, TTag::SincosTestMass>; - using type = StaggeredFreeFlowCouplingManager<Traits>; + using type = FreeFlowCouplingManager<Traits>; }; } // end namespace Dumux::Properties diff --git a/test/freeflow/navierstokes/unstructured/main.cc b/test/freeflow/navierstokes/unstructured/main.cc index 5273655e25e7f3e69e9aef758252a94af9d7aeb3..521b79b4da857beece5367cfc036565a0a3c3fd1 100644 --- a/test/freeflow/navierstokes/unstructured/main.cc +++ b/test/freeflow/navierstokes/unstructured/main.cc @@ -85,8 +85,7 @@ int main(int argc, char** argv) auto massGridGeometry = std::make_shared<MassGridGeometry>(leafGridView); // the coupling manager - using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; - using CouplingManager = FreeFlowCouplingManager<Traits>; + using CouplingManager = GetPropType<MomentumTypeTag, Properties::CouplingManager>; auto couplingManager = std::make_shared<CouplingManager>(); // the problems (boundary conditions) @@ -98,6 +97,7 @@ int main(int argc, char** argv) // the solution vector constexpr auto momentumIdx = CouplingManager::freeFlowMomentumIndex; constexpr auto massIdx = CouplingManager::freeFlowMassIndex; + using Traits = MultiDomainTraits<MomentumTypeTag, MassTypeTag>; using SolutionVector = typename Traits::SolutionVector; SolutionVector x; x[momentumIdx].resize(momentumGridGeometry->numDofs()); diff --git a/test/freeflow/navierstokesnc/channel/problem.hh b/test/freeflow/navierstokesnc/channel/problem.hh index 3cce1ceb54b8967c5f0307b358c47ae1d584d3c8..fd790487c2c5fafe1e4f134b26f349b31cfd27e4 100644 --- a/test/freeflow/navierstokesnc/channel/problem.hh +++ b/test/freeflow/navierstokesnc/channel/problem.hh @@ -31,7 +31,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/staggered/problem.hh> namespace Dumux { @@ -45,9 +45,9 @@ namespace Dumux { * represent solid walls with no-slip/no-flow conditions. */ template <class TypeTag> -class ChannelNCTestProblem : public NavierStokesProblem<TypeTag> +class ChannelNCTestProblem : public NavierStokesStaggeredProblem<TypeTag> { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = NavierStokesStaggeredProblem<TypeTag>; using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh b/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh index 5d562ddc242e26e5a7eb152ca9ebb11d703d5ff4..76bae3d7ce50b3a963c9cc1b11524b6bf526dc83 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh +++ b/test/freeflow/navierstokesnc/densitydrivenflow/problem.hh @@ -30,7 +30,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/staggered/problem.hh> namespace Dumux { @@ -46,9 +46,9 @@ namespace Dumux { * small numerical instabilities, fingers of denser water will form and sink downwards. */ template <class TypeTag> -class DensityDrivenFlowProblem : public NavierStokesProblem<TypeTag> +class DensityDrivenFlowProblem : public NavierStokesStaggeredProblem<TypeTag> { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = NavierStokesStaggeredProblem<TypeTag>; using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; diff --git a/test/freeflow/navierstokesnc/maxwellstefan/problem.hh b/test/freeflow/navierstokesnc/maxwellstefan/problem.hh index fcf13b6b3d02b7a9b43b8da269420593cc250645..373028db26deabd014b027d70a291aec0af41d18 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/problem.hh +++ b/test/freeflow/navierstokesnc/maxwellstefan/problem.hh @@ -30,7 +30,7 @@ #include <dumux/common/numeqvector.hh> #include <dumux/freeflow/navierstokes/boundarytypes.hh> -#include <dumux/freeflow/navierstokes/problem.hh> +#include <dumux/freeflow/navierstokes/staggered/problem.hh> #include <dumux/io/gnuplotinterface.hh> @@ -41,9 +41,9 @@ namespace Dumux { * \brief Test problem for the Maxwell-Stefan model */ template <class TypeTag> -class MaxwellStefanNCTestProblem : public NavierStokesProblem<TypeTag> +class MaxwellStefanNCTestProblem : public NavierStokesStaggeredProblem<TypeTag> { - using ParentType = NavierStokesProblem<TypeTag>; + using ParentType = NavierStokesStaggeredProblem<TypeTag>; using BoundaryTypes = Dumux::NavierStokesBoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;