diff --git a/dumux/freeflow/properties.hh b/dumux/freeflow/properties.hh index 71a0083b216dc51a587c81c15491222afc714f77..e3aa08cfb09c2f8b7badb44691f32d75af1aae59 100644 --- a/dumux/freeflow/properties.hh +++ b/dumux/freeflow/properties.hh @@ -40,7 +40,19 @@ namespace Properties //! Type tag for models involving flow in porous media NEW_TYPE_TAG(FreeFlow); +SET_PROP(FreeFlow, NumEq) +{ +private: + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + static constexpr auto dim = GridView::dimension; + static constexpr auto numComponents = GET_PROP_VALUE(TypeTag, NumComponents); +public: + static constexpr int value = dim + numComponents; +}; + SET_INT_PROP(FreeFlow, NumEqFace, 1); //!< set the number of equations to 1 +SET_INT_PROP(FreeFlow, NumEqCellCenter, 1); //!< set the number of equations to 1 + //! The sub-controlvolume face SET_PROP(FreeFlow, SubControlVolumeFace) @@ -100,9 +112,14 @@ public: }; //! Boundary types at a single degree of freedom -SET_TYPE_PROP(FreeFlow, - BoundaryTypes, - StaggeredFreeFlowBoundaryTypes<GET_PROP_VALUE(TypeTag, NumEq)>); +SET_PROP(FreeFlow, BoundaryTypes) +{ +private: + static constexpr auto size = GET_PROP_VALUE(TypeTag, NumEqCellCenter) + GET_PROP_VALUE(TypeTag, NumEqFace); +public: + using type = StaggeredFreeFlowBoundaryTypes<size>; +}; + } // namespace Properties } // namespace Dumux diff --git a/dumux/freeflow/staggered/properties.hh b/dumux/freeflow/staggered/properties.hh index 3a97aee983611ed1bd3366d898227c335f860369..e7da1fb65f7423fb72dc8c3c36ea9329ea3899ab 100644 --- a/dumux/freeflow/staggered/properties.hh +++ b/dumux/freeflow/staggered/properties.hh @@ -80,8 +80,9 @@ NEW_PROP_TAG(EnergyFluxVariables); //!< The energy flux variables /////////////////////////////////////////////////////////////////////////// // default property values for the isothermal single phase model /////////////////////////////////////////////////////////////////////////// -SET_INT_PROP(NavierStokes, NumEqCellCenter, 1); //!< set the number of equations to 1 -SET_INT_PROP(NavierStokes, NumPhases, 1); //!< The number of phases in the 1p model is 1 +SET_INT_PROP(NavierStokes, NumEqCellCenter, 1); //! set the number of equations to 1 +SET_INT_PROP(NavierStokes, NumPhases, 1); //! The number of phases in the 1p model is 1 +SET_INT_PROP(NavierStokes, NumComponents, 1); //! The number of components in the 1p model is 1 //! The fluid system to use by default SET_TYPE_PROP(NavierStokes, FluidSystem, Dumux::FluidSystems::OneP<typename GET_PROP_TYPE(TypeTag, Scalar), typename GET_PROP_TYPE(TypeTag, Fluid)>); diff --git a/dumux/freeflow/staggeredni/properties.hh b/dumux/freeflow/staggeredni/properties.hh index f8635e9972f48d404e4bd2025155c9efde639b4d..8aab152173bf3256515b5c15f71428087abd02cd 100644 --- a/dumux/freeflow/staggeredni/properties.hh +++ b/dumux/freeflow/staggeredni/properties.hh @@ -58,6 +58,16 @@ public: static constexpr auto value = isothermalNumEqCellCenter + 1; }; +SET_PROP(NavierStokesNonIsothermal, NumEq) +{ +private: + using GridView = typename GET_PROP_TYPE(TypeTag, GridView); + static constexpr auto dim = GridView::dimension; + static constexpr auto numComponents = GET_PROP_VALUE(TypeTag, NumComponents); +public: + static constexpr int value = dim + numComponents + 1; +}; + SET_TYPE_PROP(NavierStokesNonIsothermal, Indices, NavierStokesNonIsothermalIndices<TypeTag>); SET_TYPE_PROP(NavierStokesNonIsothermal, VtkOutputFields, FreeFlowEnergyVtkOutputFields<TypeTag>);