diff --git a/dumux/freeflow/compositional/iofields.hh b/dumux/freeflow/compositional/iofields.hh index ebed53abf218bb216fbc20a17877b8f92acbdb02..895eefc9ffa4dc75771c01106d33d8ca83543db1 100644 --- a/dumux/freeflow/compositional/iofields.hh +++ b/dumux/freeflow/compositional/iofields.hh @@ -36,12 +36,9 @@ namespace Dumux * \ingroup FreeflowNCModel * \brief Adds I/O fields specific to the FreeflowNC model */ -template<class BaseOutputFields, class ModelTraits> -class FreeflowNCIOFields +template<class BaseOutputFields, bool turbulenceModel = false> +struct FreeflowNCIOFields { - -public: - //! Initialize the FreeflowNC specific output fields. template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") @@ -67,7 +64,7 @@ public: out.addVolumeVariable([j](const auto& v){ return v.diffusionCoefficient(0, j); }, "D^" + FluidSystem::componentName(j) + "_" + FluidSystem::phaseName(0)); // the eddy diffusivity is recalculated for an arbitrary component which is not the phase component - if (ModelTraits::usesTurbulenceModel()) + if (turbulenceModel) out.addVolumeVariable([j](const auto& v){ return v.effectiveDiffusivity(0, j) - v.diffusionCoefficient(0, j); }, "D_t"); } } diff --git a/dumux/freeflow/compositional/kepsilonncmodel.hh b/dumux/freeflow/compositional/kepsilonncmodel.hh index 757ddc59668f2037a841bc4a2eaa3aeebe81d965..5b2ad1784d40fd91f35e3780fef3805168ab92b4 100644 --- a/dumux/freeflow/compositional/kepsilonncmodel.hh +++ b/dumux/freeflow/compositional/kepsilonncmodel.hh @@ -124,15 +124,7 @@ public: }; //! The specific I/O fields -SET_PROP(KEpsilonNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using SinglePhaseIOFields = KEpsilonIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<SinglePhaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(KEpsilonNC, IOFields, FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>); ////////////////////////////////////////////////////////////////////////// // Property values for non-isothermal multi-component k-epsilon model @@ -198,12 +190,9 @@ public: SET_PROP(KEpsilonNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = KEpsilonIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<KEpsilonIOFields, true/*turbulenceModel*/>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>; }; // \} diff --git a/dumux/freeflow/compositional/komegancmodel.hh b/dumux/freeflow/compositional/komegancmodel.hh index 16c6b97e686b5d5d679bcc5bcd2bdeb5cef6a845..79843e06efc8a06ed52aa60e42874bff522cbb78 100644 --- a/dumux/freeflow/compositional/komegancmodel.hh +++ b/dumux/freeflow/compositional/komegancmodel.hh @@ -142,15 +142,7 @@ public: }; //! The specific I/O fields -SET_PROP(KOmegaNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using SinglePhaseIOFields = KOmegaIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<SinglePhaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(KOmegaNC, IOFields, FreeflowNCIOFields<KOmegaIOFields, true/*turbulenceModel*/>); ////////////////////////////////////////////////////////////////////////// // Property values for non-isothermal multi-component k-omega model @@ -216,12 +208,9 @@ public: SET_PROP(KOmegaNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = KOmegaIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<KOmegaIOFields, true/*turbulenceModel*/>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>; }; // \} diff --git a/dumux/freeflow/compositional/lowrekepsilonncmodel.hh b/dumux/freeflow/compositional/lowrekepsilonncmodel.hh index d09a86edaa28fec15e5ea46e7297a8547e08fb88..5859f653380010cfd7448981dab7f55cc632a727 100644 --- a/dumux/freeflow/compositional/lowrekepsilonncmodel.hh +++ b/dumux/freeflow/compositional/lowrekepsilonncmodel.hh @@ -129,15 +129,7 @@ public: }; //! The specific I/O fields -SET_PROP(LowReKEpsilonNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using SinglePhaseIOFields = LowReKEpsilonIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<SinglePhaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(LowReKEpsilonNC, IOFields, FreeflowNCIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>); ////////////////////////////////////////////////////////////////////////// // Property values for non-isothermal multi-component low-Re k-epsilon model @@ -203,12 +195,9 @@ public: SET_PROP(LowReKEpsilonNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = LowReKEpsilonIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>; }; // \} diff --git a/dumux/freeflow/compositional/navierstokesncmodel.hh b/dumux/freeflow/compositional/navierstokesncmodel.hh index b2fb022b1654c2db7a1ddc34f271bea5d1215ac7..27b91f3765dee5f705f38da1c7158bb8127caefb 100644 --- a/dumux/freeflow/compositional/navierstokesncmodel.hh +++ b/dumux/freeflow/compositional/navierstokesncmodel.hh @@ -171,15 +171,7 @@ SET_TYPE_PROP(NavierStokesNC, FluxVariables, FreeflowNCFluxVariables<TypeTag>); SET_TYPE_PROP(NavierStokesNC, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>); //! The specific I/O fields -SET_PROP(NavierStokesNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = NavierStokesIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<BaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(NavierStokesNC, IOFields, FreeflowNCIOFields<NavierStokesIOFields>); /*! * \brief The fluid state which is used by the volume variables to @@ -222,12 +214,9 @@ public: SET_PROP(NavierStokesNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = NavierStokesIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<NavierStokesIOFields>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields>; }; //! Use Fourier's Law as default heat conduction type diff --git a/dumux/freeflow/compositional/oneeqncmodel.hh b/dumux/freeflow/compositional/oneeqncmodel.hh index 4d75e899d0b657c6d8c48d456baccfa16a13094d..5673309cfce64cda1a5387031280aceaebd9579f 100644 --- a/dumux/freeflow/compositional/oneeqncmodel.hh +++ b/dumux/freeflow/compositional/oneeqncmodel.hh @@ -140,15 +140,7 @@ public: }; //! The specific I/O fields -SET_PROP(OneEqNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using SinglePhaseIOFields = OneEqIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<SinglePhaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(OneEqNC, IOFields, FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>); ////////////////////////////////////////////////////////////////////////// // Property values for non-isothermal multi-component one-equation model @@ -214,12 +206,9 @@ public: SET_PROP(OneEqNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = OneEqIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<OneEqIOFields, true/*turbulenceModel*/>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>; }; // \} diff --git a/dumux/freeflow/compositional/zeroeqncmodel.hh b/dumux/freeflow/compositional/zeroeqncmodel.hh index 45168b0716958c8f5e1f831c823ea6a3826b007a..8974cf29ae4c69935b3f61681c19aeebe937d9dc 100644 --- a/dumux/freeflow/compositional/zeroeqncmodel.hh +++ b/dumux/freeflow/compositional/zeroeqncmodel.hh @@ -99,15 +99,7 @@ public: }; //! The specific I/O fields -SET_PROP(ZeroEqNC, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = RANSIOFields<FVGridGeometry>; -public: - using type = FreeflowNCIOFields<BaseIOFields, ModelTraits>; -}; +SET_TYPE_PROP(ZeroEqNC, IOFields, FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>); ////////////////////////////////////////////////////////////////////////// // Property values for non-isothermal multi-component ZeroEq model @@ -155,12 +147,9 @@ public: SET_PROP(ZeroEqNCNI, IOFields) { private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using BaseIOFields = RANSIOFields<FVGridGeometry>; - using NonIsothermalFields = FreeflowNonIsothermalIOFields<BaseIOFields, ModelTraits>; + using IsothermalIOFields = FreeflowNCIOFields<RANSIOFields, true/*turbulenceModel*/>; public: - using type = FreeflowNCIOFields<NonIsothermalFields, ModelTraits>; + using type = FreeflowNonIsothermalIOFields<IsothermalIOFields, true/*turbulenceModel*/>; }; // \} diff --git a/dumux/freeflow/navierstokes/iofields.hh b/dumux/freeflow/navierstokes/iofields.hh index 704541c2ae46ee33d295e1846dca37cb4713711b..e23bc18ff980f83a7bc1e3364148f6ff68af8b90 100644 --- a/dumux/freeflow/navierstokes/iofields.hh +++ b/dumux/freeflow/navierstokes/iofields.hh @@ -74,29 +74,35 @@ std::function<std::string(int,int)> createStaggeredPVNameFunction(const Dune::Mu } } +// forward declare +template<class T, class U> +class StaggeredVtkOutputModule; + /*! * \ingroup NavierStokesModel * \brief Adds I/O fields for the Navier-Stokes model */ -template<class FVGridGeometry> class NavierStokesIOFields { - // Helper type used for tag dispatching (to add discretization-specific fields). - template<DiscretizationMethod discMethod> - using discMethodTag = std::integral_constant<DiscretizationMethod, discMethod>; + //! Helper strcuts to determine whether a staggered grid discretization is used + template<class T> + struct isStaggered : public std::false_type {}; + + template<class... Args> + struct isStaggered<StaggeredVtkOutputModule<Args...>> + : public std::true_type {}; public: //! Initialize the Navier-Stokes specific output fields. template <class OutputModule> static void initOutputModule(OutputModule& out) { - using FluidSystem = typename OutputModule::VolumeVariables::FluidSystem; out.addVolumeVariable([](const auto& v){ return v.pressure(); }, IOName::pressure()); out.addVolumeVariable([](const auto& v){ return v.molarDensity(); }, IOName::molarDensity()); out.addVolumeVariable([](const auto& v){ return v.density(); }, IOName::density()); // add discretization-specific fields - additionalOutput_(out, discMethodTag<FVGridGeometry::discMethod>{}); + additionalOutput_(out, isStaggered<OutputModule>()); } template <class OutputModule> @@ -119,21 +125,20 @@ public: private: //! Adds discretization-specific fields (nothing by default). - template <class OutputModule, class AnyMethod> - static void additionalOutput_(OutputModule& out, AnyMethod) + template <class OutputModule> + static void additionalOutput_(OutputModule& out) { } //! Adds discretization-specific fields (velocity vectors on the faces for the staggered discretization). template <class OutputModule> - static void additionalOutput_(OutputModule& out, discMethodTag<DiscretizationMethod::staggered>) + static void additionalOutput_(OutputModule& out, std::true_type) { const bool writeFaceVars = getParamFromGroup<bool>(out.paramGroup(), "Vtk.WriteFaceData", false); if(writeFaceVars) { - auto faceVelocityVector = [](const typename FVGridGeometry::SubControlVolumeFace& scvf, const auto& faceVars) + auto faceVelocityVector = [](const auto& scvf, const auto& faceVars) { - using Scalar = typename OutputModule::VolumeVariables::PrimaryVariables::value_type; - using VelocityVector = Dune::FieldVector<Scalar, FVGridGeometry::GridView::dimensionworld>; + using VelocityVector = std::decay_t<decltype(scvf.unitOuterNormal())>; VelocityVector velocity(0.0); velocity[scvf.directionIndex()] = faceVars.velocitySelf(); diff --git a/dumux/freeflow/navierstokes/model.hh b/dumux/freeflow/navierstokes/model.hh index c3940e3628564101450ed47cd3a605dc0115ce79..6b0275aaa502aec1cd53e8b7289f576133d191d9 100644 --- a/dumux/freeflow/navierstokes/model.hh +++ b/dumux/freeflow/navierstokes/model.hh @@ -199,13 +199,8 @@ SET_TYPE_PROP(NavierStokes, FluxVariables, NavierStokesFluxVariables<TypeTag>); SET_TYPE_PROP(NavierStokes, FluxVariablesCache, FreeFlowFluxVariablesCache<TypeTag>); //! The specific I/O fields -SET_PROP(NavierStokes, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = NavierStokesIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(NavierStokes, IOFields, NavierStokesIOFields); + ////////////////////////////////////////////////////////////////// // Property values for non-isothermal Navier-Stokes model ////////////////////////////////////////////////////////////////// @@ -222,15 +217,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(NavierStokesNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = NavierStokesIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(NavierStokesNI, IOFields, FreeflowNonIsothermalIOFields<NavierStokesIOFields>); // \} } diff --git a/dumux/freeflow/nonisothermal/iofields.hh b/dumux/freeflow/nonisothermal/iofields.hh index c8044fdb1d8a7a20528f704631621f7fc442fae8..06c4d268c81f666a432bdaf33fbda98dd5a3f141 100644 --- a/dumux/freeflow/nonisothermal/iofields.hh +++ b/dumux/freeflow/nonisothermal/iofields.hh @@ -35,12 +35,9 @@ namespace Dumux * \ingroup FreeflowNIModel * \brief Adds I/O fields specific to non-isothermal free-flow models */ -template<class IsothermalIOFields, class ModelTraits> -class FreeflowNonIsothermalIOFields +template<class IsothermalIOFields, bool turbulenceModel = false> +struct FreeflowNonIsothermalIOFields { - -public: - //! Initialize the non-isothermal specific output fields. template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") @@ -57,7 +54,7 @@ public: out.addVolumeVariable([](const auto& v){ return v.temperature(); }, IOName::temperature()); out.addVolumeVariable([](const auto& v){ return v.thermalConductivity(); }, "lambda"); - if (ModelTraits::usesTurbulenceModel()) + if (turbulenceModel) out.addVolumeVariable([](const auto& v){ return v.effectiveThermalConductivity() - v.thermalConductivity(); }, "lambda_t"); } diff --git a/dumux/freeflow/rans/iofields.hh b/dumux/freeflow/rans/iofields.hh index d14609bc553321a38c62caba81b0b9ca974e94eb..cbe45478edbfbe966ef71f1bfd47ae497dfa796a 100644 --- a/dumux/freeflow/rans/iofields.hh +++ b/dumux/freeflow/rans/iofields.hh @@ -34,13 +34,8 @@ namespace Dumux * \ingroup RANSModel * \brief Adds I/O fields for the Reynolds-Averaged Navier-Stokes model */ -template<class FVGridGeometry> -class RANSIOFields +struct RANSIOFields { - enum { dim = FVGridGeometry::GridView::dimension }; - -public: - template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") static void init(OutputModule& out) @@ -52,7 +47,9 @@ public: template <class OutputModule> static void initOutputModule(OutputModule& out) { - NavierStokesIOFields<FVGridGeometry>::initOutputModule(out); + NavierStokesIOFields::initOutputModule(out); + + static constexpr auto dim = decltype(std::declval<typename OutputModule::VolumeVariables>().velocity())::dimension; out.addVolumeVariable([](const auto& v){ return v.velocity()[0] / v.velocityMaximum()[0]; }, "v_x/v_x,max"); out.addVolumeVariable([](const auto& v){ return v.velocityGradients()[0]; }, "dv_x/dx_"); diff --git a/dumux/freeflow/rans/model.hh b/dumux/freeflow/rans/model.hh index 4a1f4e4635ec6df8d77b7dff0cec813007d5fc39..d03900ccd018a4084d6989d16495713798749062 100644 --- a/dumux/freeflow/rans/model.hh +++ b/dumux/freeflow/rans/model.hh @@ -84,13 +84,7 @@ public: }; //! The specific I/O fields -SET_PROP(RANS, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = RANSIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(RANS, IOFields, RANSIOFields); ////////////////////////////////////////////////////////////////// // Property values for non-isothermal Reynolds-averaged Navier-Stokes model @@ -112,15 +106,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(RANSNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = RANSIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(RANSNI, IOFields, FreeflowNonIsothermalIOFields<RANSIOFields, true/*turbulenceModel*/>); //! Use Fourier's Law as default heat conduction type SET_TYPE_PROP(RANSNI, HeatConductionType, FouriersLaw<TypeTag>); diff --git a/dumux/freeflow/rans/oneeq/iofields.hh b/dumux/freeflow/rans/oneeq/iofields.hh index 090195661b2ddc2f52d23e0c0ac3503fede7a1b0..82e1bb64d1ce9c548717d6b192a1c423f0f39033 100644 --- a/dumux/freeflow/rans/oneeq/iofields.hh +++ b/dumux/freeflow/rans/oneeq/iofields.hh @@ -33,12 +33,8 @@ namespace Dumux * \ingroup OneEqModel * \brief Adds I/O fields for the one-equation turbulence model by Spalart-Allmaras */ -template<class FVGridGeometry> -class OneEqIOFields +struct OneEqIOFields { - enum { dim = FVGridGeometry::GridView::dimension }; - -public: template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") static void init(OutputModule& out) @@ -50,7 +46,7 @@ public: template <class OutputModule> static void initOutputModule(OutputModule& out) { - RANSIOFields<FVGridGeometry>::initOutputModule(out); + RANSIOFields::initOutputModule(out); out.addVolumeVariable([](const auto& v){ return v.viscosityTilde(); }, "nu_tilde"); } diff --git a/dumux/freeflow/rans/oneeq/model.hh b/dumux/freeflow/rans/oneeq/model.hh index ac34e6be3bb512f08e2cbcf158846b6d51cf34f5..18e8e56c8d1cde1e5a6681fa194a0589e7ca4d88 100644 --- a/dumux/freeflow/rans/oneeq/model.hh +++ b/dumux/freeflow/rans/oneeq/model.hh @@ -170,13 +170,7 @@ public: }; //! The specific I/O fields -SET_PROP(OneEq, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = OneEqIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(OneEq, IOFields, OneEqIOFields); ////////////////////////////////////////////////////////////////// // default property values for the non-isothermal Spalart-Allmaras model @@ -216,15 +210,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(OneEqNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = OneEqIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(OneEqNI, IOFields, FreeflowNonIsothermalIOFields<OneEqIOFields, true/*turbulenceModel*/>); // \} } diff --git a/dumux/freeflow/rans/twoeq/kepsilon/iofields.hh b/dumux/freeflow/rans/twoeq/kepsilon/iofields.hh index 4fd4cab9517c991d1543c01050b83f278f2a9196..59b31fc03b7b895917caaa304f4e1fc19ddf6a4b 100644 --- a/dumux/freeflow/rans/twoeq/kepsilon/iofields.hh +++ b/dumux/freeflow/rans/twoeq/kepsilon/iofields.hh @@ -34,13 +34,8 @@ namespace Dumux * \ingroup KEpsilonModel * \brief Adds I/O fields for the k-epsilon turbulence model */ -template<class FVGridGeometry> -class KEpsilonIOFields +struct KEpsilonIOFields { - enum { dim = FVGridGeometry::GridView::dimension }; - -public: - template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") static void init(OutputModule& out) @@ -52,7 +47,7 @@ public: template <class OutputModule> static void initOutputModule(OutputModule& out) { - RANSIOFields<FVGridGeometry>::initOutputModule(out); + RANSIOFields::initOutputModule(out); out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k"); out.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "epsilon"); diff --git a/dumux/freeflow/rans/twoeq/kepsilon/model.hh b/dumux/freeflow/rans/twoeq/kepsilon/model.hh index 9a70db5584d9403223e9f7ff0544bc8cbf84453a..e0ea1338b075f5e412d14fe0e04a45ba507bbd3e 100644 --- a/dumux/freeflow/rans/twoeq/kepsilon/model.hh +++ b/dumux/freeflow/rans/twoeq/kepsilon/model.hh @@ -156,13 +156,7 @@ public: }; //! The specific I/O fields -SET_PROP(KEpsilon, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = KEpsilonIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(KEpsilon, IOFields, KEpsilonIOFields); ////////////////////////////////////////////////////////////////// // default property values for the non-isothermal k-epsilon model @@ -202,15 +196,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(KEpsilonNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = KEpsilonIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(KEpsilonNI, IOFields, FreeflowNonIsothermalIOFields<KEpsilonIOFields, true/*turbulenceModel*/>); // \} } diff --git a/dumux/freeflow/rans/twoeq/komega/iofields.hh b/dumux/freeflow/rans/twoeq/komega/iofields.hh index 689745676f6ff125daf824999ae842269cd26882..8f0a7fff434109211d05eb5c16613cc764075e02 100644 --- a/dumux/freeflow/rans/twoeq/komega/iofields.hh +++ b/dumux/freeflow/rans/twoeq/komega/iofields.hh @@ -34,13 +34,8 @@ namespace Dumux * \ingroup KOmegaModel * \brief Adds I/O fields for the Reynolds-Averaged Navier-Stokes model */ -template<class FVGridGeometry> -class KOmegaIOFields +struct KOmegaIOFields { - enum { dim = FVGridGeometry::GridView::dimension }; - -public: - template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") static void init(OutputModule& out) @@ -52,7 +47,7 @@ public: template <class OutputModule> static void initOutputModule(OutputModule& out) { - RANSIOFields<FVGridGeometry>::initOutputModule(out); + RANSIOFields::initOutputModule(out); out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k"); out.addVolumeVariable([](const auto& v){ return v.dissipation(); }, "omega"); diff --git a/dumux/freeflow/rans/twoeq/komega/model.hh b/dumux/freeflow/rans/twoeq/komega/model.hh index 7bf6db6d8c27c0ca6a20385ff280fd3bab4b512f..7cfebf2463bc07a4cc35b384b528145f30ddeb3e 100644 --- a/dumux/freeflow/rans/twoeq/komega/model.hh +++ b/dumux/freeflow/rans/twoeq/komega/model.hh @@ -163,13 +163,7 @@ public: }; //! The specific I/O fields -SET_PROP(KOmega, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = KOmegaIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(KOmega, IOFields, KOmegaIOFields); /////////////////////////////////////////////////////////////////////////// // default property values for the non-isothermal k-omega single phase model @@ -210,15 +204,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(KOmegaNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = KOmegaIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(KOmegaNI, IOFields, FreeflowNonIsothermalIOFields<KOmegaIOFields, true/*turbulenceModel*/>); // \} } diff --git a/dumux/freeflow/rans/twoeq/lowrekepsilon/iofields.hh b/dumux/freeflow/rans/twoeq/lowrekepsilon/iofields.hh index de2ffd8ad859acf255cfb92ed878afeb27118385..3c66ddb0b92ae8fee7c7f99cb079d8efd6a8f649 100644 --- a/dumux/freeflow/rans/twoeq/lowrekepsilon/iofields.hh +++ b/dumux/freeflow/rans/twoeq/lowrekepsilon/iofields.hh @@ -34,13 +34,8 @@ namespace Dumux * \ingroup LowReKEpsilonModel * \brief Adds I/O fields for the low-Re k-epsilon turbulence model */ -template<class FVGridGeometry> -class LowReKEpsilonIOFields +struct LowReKEpsilonIOFields { - enum { dim = FVGridGeometry::GridView::dimension }; - -public: - template <class OutputModule> DUNE_DEPRECATED_MSG("use initOutputModule instead") static void init(OutputModule& out) @@ -52,7 +47,7 @@ public: template <class OutputModule> static void initOutputModule(OutputModule& out) { - RANSIOFields<FVGridGeometry>::initOutputModule(out); + RANSIOFields::initOutputModule(out); out.addVolumeVariable([](const auto& v){ return v.turbulentKineticEnergy(); }, "k"); out.addVolumeVariable([](const auto& v){ return v.dissipationTilde(); }, "epsilon"); } diff --git a/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh b/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh index b1a840544b601b462679565f5e58c8d25b2a8eb4..6b178aa20f6254c5275ba6f2df4de406a21d468e 100644 --- a/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh +++ b/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh @@ -172,13 +172,7 @@ public: }; //! The specific I/O fields -SET_PROP(LowReKEpsilon, IOFields) -{ -private: - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); -public: - using type = LowReKEpsilonIOFields<FVGridGeometry>; -}; +SET_TYPE_PROP(LowReKEpsilon, IOFields, LowReKEpsilonIOFields); ////////////////////////////////////////////////////////////////// // default property values for the non-isothermal low-Reynolds k-epsilon model @@ -218,15 +212,7 @@ public: }; //! The specific non-isothermal I/O fields -SET_PROP(LowReKEpsilonNI, IOFields) -{ -private: - using ModelTraits = typename GET_PROP_TYPE(TypeTag, ModelTraits); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); - using IsothermalFields = LowReKEpsilonIOFields<FVGridGeometry>; -public: - using type = FreeflowNonIsothermalIOFields<IsothermalFields, ModelTraits>; -}; +SET_TYPE_PROP(LowReKEpsilonNI, IOFields, FreeflowNonIsothermalIOFields<LowReKEpsilonIOFields, true/*turbulenceModel*/>); // \} }