diff --git a/dumux/freeflow/compositional/kepsilonncmodel.hh b/dumux/freeflow/compositional/kepsilonncmodel.hh index 5e529df9bf43c8ac95f8bce564a7a563c1a68b0a..0a6623ce931457abea06fd9aff03060ad3524d01 100644 --- a/dumux/freeflow/compositional/kepsilonncmodel.hh +++ b/dumux/freeflow/compositional/kepsilonncmodel.hh @@ -94,6 +94,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: @@ -161,6 +166,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/compositional/komegancmodel.hh b/dumux/freeflow/compositional/komegancmodel.hh index 83e340962f5a9f20a148ecc408dde6d58510ed6f..418d3d586ca12e8ecaba61c9e098be8a8ea09904 100644 --- a/dumux/freeflow/compositional/komegancmodel.hh +++ b/dumux/freeflow/compositional/komegancmodel.hh @@ -99,6 +99,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: @@ -166,6 +171,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/compositional/lowrekepsilonncmodel.hh b/dumux/freeflow/compositional/lowrekepsilonncmodel.hh index 9b110ee5b25b1468ab020df3118b0ed1eef65474..b5260777393e157d4290a5e0ed59d7c27f4307d1 100644 --- a/dumux/freeflow/compositional/lowrekepsilonncmodel.hh +++ b/dumux/freeflow/compositional/lowrekepsilonncmodel.hh @@ -99,6 +99,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: @@ -166,6 +171,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/compositional/navierstokesncmodel.hh b/dumux/freeflow/compositional/navierstokesncmodel.hh index 4f43143fdc3b4f8b9a1553b9c8a73408304e846b..75fc93af337ce908849d0057d2bbf226cc59f3f4 100644 --- a/dumux/freeflow/compositional/navierstokesncmodel.hh +++ b/dumux/freeflow/compositional/navierstokesncmodel.hh @@ -155,6 +155,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; public: using type = FreeflowNCVolumeVariables<Traits>; diff --git a/dumux/freeflow/compositional/oneeqncmodel.hh b/dumux/freeflow/compositional/oneeqncmodel.hh index c9092e38885ed75986fba53e239d7b2ac6734bc4..0647cb90556211d7d27fccd392a8f96781dec6f0 100644 --- a/dumux/freeflow/compositional/oneeqncmodel.hh +++ b/dumux/freeflow/compositional/oneeqncmodel.hh @@ -99,6 +99,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: @@ -166,6 +171,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/compositional/zeroeqncmodel.hh b/dumux/freeflow/compositional/zeroeqncmodel.hh index 305aefbf0b62073c4281aba0a36ed718f498b122..c55ed9b71cc3f9f2e65c60b35cf57dc644284d41 100644 --- a/dumux/freeflow/compositional/zeroeqncmodel.hh +++ b/dumux/freeflow/compositional/zeroeqncmodel.hh @@ -87,6 +87,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using CompositionalVolVars = FreeflowNCVolumeVariables<Traits>; public: @@ -136,6 +141,11 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid system"); + static_assert(FST::numComponents == MT::numComponents(), "Number of components mismatch between model and fluid state"); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NCVolVars = FreeflowNCVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/navierstokes/model.hh b/dumux/freeflow/navierstokes/model.hh index 7cfce0fd9f7b0dede4b86f5ba82bf19ea494e054..fa0d6aef7a6a88c2bb912f9e43eadb8659fc505f 100644 --- a/dumux/freeflow/navierstokes/model.hh +++ b/dumux/freeflow/navierstokes/model.hh @@ -185,8 +185,9 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); - static_assert(!FSY::isMiscible(), - "The Navier-Stokes model only works with immiscible fluid systems."); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; public: diff --git a/dumux/freeflow/rans/oneeq/model.hh b/dumux/freeflow/rans/oneeq/model.hh index 1b03724aae2d2405524f06ed1f9ef38208e1abcf..d04da55f0e34866b7b5ce27567faa02f7b679240 100644 --- a/dumux/freeflow/rans/oneeq/model.hh +++ b/dumux/freeflow/rans/oneeq/model.hh @@ -158,6 +158,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: @@ -200,6 +204,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/rans/twoeq/kepsilon/model.hh b/dumux/freeflow/rans/twoeq/kepsilon/model.hh index 8a0a07a17af84e0b3eec05206a7de567943f4c4d..2941e1ff60ec0ac7a98cdf4b92cdcc3fbb80e9f4 100644 --- a/dumux/freeflow/rans/twoeq/kepsilon/model.hh +++ b/dumux/freeflow/rans/twoeq/kepsilon/model.hh @@ -145,6 +145,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: @@ -187,6 +191,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/rans/twoeq/komega/model.hh b/dumux/freeflow/rans/twoeq/komega/model.hh index 14f7055817833fac6ebdcf6816d1d93ec85f4708..fe6cc4c6ada41a9bfcf2991da26b482113922a8f 100644 --- a/dumux/freeflow/rans/twoeq/komega/model.hh +++ b/dumux/freeflow/rans/twoeq/komega/model.hh @@ -152,6 +152,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: @@ -195,6 +199,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh b/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh index 37839774a1a2a6ad2e5cd51a680ef88ad75eaa15..424dd407d97152d66a58a5ccd4ecd480bc6c8927 100644 --- a/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh +++ b/dumux/freeflow/rans/twoeq/lowrekepsilon/model.hh @@ -161,6 +161,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: @@ -203,6 +207,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: diff --git a/dumux/freeflow/rans/zeroeq/model.hh b/dumux/freeflow/rans/zeroeq/model.hh index b0d647ba4d0f9fb127dc5b03093499d13619f182..c084c3c49e675b1a2e84ecbc11721e3f6d743e39 100644 --- a/dumux/freeflow/rans/zeroeq/model.hh +++ b/dumux/freeflow/rans/zeroeq/model.hh @@ -62,6 +62,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: @@ -84,6 +88,10 @@ private: using FST = typename GET_PROP_TYPE(TypeTag, FluidState); using MT = typename GET_PROP_TYPE(TypeTag, ModelTraits); + static_assert(FSY::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid system"); + static_assert(FST::numPhases == MT::numPhases(), "Number of phases mismatch between model and fluid state"); + static_assert(!FSY::isMiscible(), "The Navier-Stokes model only works with immiscible fluid systems."); + using Traits = NavierStokesVolumeVariablesTraits<PV, FSY, FST, MT>; using NSVolVars = NavierStokesVolumeVariables<Traits>; public: diff --git a/test/freeflow/navierstokesnc/channeltestproblem.hh b/test/freeflow/navierstokesnc/channeltestproblem.hh index 21b431cda5a3932a80f56dbd9ba71153c0e5f685..416f0abcd5dd5e66c100c972721b741d1e235436 100644 --- a/test/freeflow/navierstokesnc/channeltestproblem.hh +++ b/test/freeflow/navierstokesnc/channeltestproblem.hh @@ -28,19 +28,19 @@ #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/fluidsystems/h2oair.hh> +#include <dumux/material/fluidsystems/1padapter.hh> #include <dumux/freeflow/navierstokes/problem.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> #include <dumux/freeflow/compositional/navierstokesncmodel.hh> -namespace Dumux -{ +namespace Dumux { + template <class TypeTag> class ChannelNCTestProblem; -namespace Properties -{ +namespace Properties { #if !NONISOTHERMAL NEW_TYPE_TAG(ChannelNCTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStokesNC)); @@ -48,16 +48,15 @@ NEW_TYPE_TAG(ChannelNCTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierS NEW_TYPE_TAG(ChannelNCTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStokesNCNI)); #endif -NEW_PROP_TAG(FluidSystem); - // Select the fluid system -SET_TYPE_PROP(ChannelNCTestTypeTag, FluidSystem, - FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); - -SET_INT_PROP(ChannelNCTestTypeTag, PhaseIdx, - GET_PROP_TYPE(TypeTag, FluidSystem)::liquidPhaseIdx); +SET_PROP(ChannelNCTestTypeTag, FluidSystem) +{ + using H2OAir = FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>; + static constexpr int phaseIdx = H2OAir::liquidPhaseIdx; + using type = FluidSystems::OnePAdapter<H2OAir, phaseIdx>; +}; -SET_INT_PROP(ChannelNCTestTypeTag, ReplaceCompEqIdx, GET_PROP_VALUE(TypeTag, PhaseIdx)); +SET_INT_PROP(ChannelNCTestTypeTag, ReplaceCompEqIdx, 0); // Set the grid type SET_TYPE_PROP(ChannelNCTestTypeTag, Grid, Dune::YaspGrid<2>); diff --git a/test/freeflow/navierstokesnc/densityflowproblem.hh b/test/freeflow/navierstokesnc/densityflowproblem.hh index ac9d0064dce86fc701574c4c159cd82de52f152f..759e7e6d30df1280523ff717fa50f6ef9d64e6f2 100644 --- a/test/freeflow/navierstokesnc/densityflowproblem.hh +++ b/test/freeflow/navierstokesnc/densityflowproblem.hh @@ -28,31 +28,31 @@ #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/fluidsystems/h2oair.hh> +#include <dumux/material/fluidsystems/1padapter.hh> #include <dumux/discretization/staggered/freeflow/properties.hh> #include <dumux/freeflow/compositional/navierstokesncmodel.hh> #include <dumux/freeflow/navierstokes/problem.hh> -namespace Dumux -{ +namespace Dumux { + template <class TypeTag> class DensityDrivenFlowProblem; -namespace Properties -{ -NEW_TYPE_TAG(DensityDrivenFlowTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStokesNC)); +namespace Properties { -NEW_PROP_TAG(FluidSystem); +NEW_TYPE_TAG(DensityDrivenFlowTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStokesNC)); // Select the fluid system -SET_TYPE_PROP(DensityDrivenFlowTypeTag, FluidSystem, - FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>); - -SET_INT_PROP(DensityDrivenFlowTypeTag, PhaseIdx, - GET_PROP_TYPE(TypeTag, FluidSystem)::liquidPhaseIdx); +SET_PROP(DensityDrivenFlowTypeTag, FluidSystem) +{ + using H2OAir = FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>; + static constexpr int phaseIdx = H2OAir::liquidPhaseIdx; + using type = FluidSystems::OnePAdapter<H2OAir, phaseIdx>; +}; -SET_INT_PROP(DensityDrivenFlowTypeTag, ReplaceCompEqIdx, GET_PROP_VALUE(TypeTag, PhaseIdx)); +SET_INT_PROP(DensityDrivenFlowTypeTag, ReplaceCompEqIdx, 0); // Set the grid type SET_TYPE_PROP(DensityDrivenFlowTypeTag, Grid, Dune::YaspGrid<2>); diff --git a/test/freeflow/navierstokesnc/msfreeflowtestproblem.hh b/test/freeflow/navierstokesnc/msfreeflowtestproblem.hh index 13e03771b526f9f38679e2e176f70bf155d24075..3eac5449eb5c94a022f591737d9f7df10ebc8bd7 100644 --- a/test/freeflow/navierstokesnc/msfreeflowtestproblem.hh +++ b/test/freeflow/navierstokesnc/msfreeflowtestproblem.hh @@ -46,8 +46,6 @@ namespace Properties { NEW_TYPE_TAG(MaxwellStefanNCTestTypeTag, INHERITS_FROM(StaggeredFreeFlowModel, NavierStokesNC)); -NEW_PROP_TAG(FluidSystem); - SET_INT_PROP(MaxwellStefanNCTestTypeTag, ReplaceCompEqIdx, 0); // Set the grid type @@ -76,7 +74,8 @@ SET_TYPE_PROP(MaxwellStefanNCTestTypeTag, MolecularDiffusionType, MaxwellStefans * \todo doc me! */ template<class TypeTag> -class MaxwellStefanFluidSystem: public FluidSystems::BaseFluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar),MaxwellStefanFluidSystem<TypeTag>> +class MaxwellStefanFluidSystem +: public FluidSystems::BaseFluidSystem<typename GET_PROP_TYPE(TypeTag, Scalar), MaxwellStefanFluidSystem<TypeTag>> { using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);