diff --git a/dumux/freeflow/stokes/stokesproblem.hh b/dumux/freeflow/stokes/stokesproblem.hh index 30a66ca70d5cd6e902807cec40a857f22c28a3a9..8393076d92934628dd962e09a511c955e483f06e 100644 --- a/dumux/freeflow/stokes/stokesproblem.hh +++ b/dumux/freeflow/stokes/stokesproblem.hh @@ -108,6 +108,7 @@ public: * * \return (Scalar) permeability */ + DUNE_DEPRECATED_MSG("permeability() is deprecated.") Scalar permeability(const Element &element, const FVElementGeometry &fvGeometry, const Intersection &intersection, diff --git a/dumux/material/spatialparams/implicitspatialparams1p.hh b/dumux/material/spatialparams/implicitspatialparams1p.hh index 53b892295ea72dce3fa22e5893697a9805cbf9ef..8af68925c7ba83c873977fba087067ced4a7f629 100644 --- a/dumux/material/spatialparams/implicitspatialparams1p.hh +++ b/dumux/material/spatialparams/implicitspatialparams1p.hh @@ -164,6 +164,19 @@ public: "a porosityAtPos() method."); } + /*! + * \brief Function for defining the Beavers-Joseph coefficient for multidomain + * problems\f$\mathrm{[-]}\f$. + * + * \return Beavers-Joseph coefficient \f$\mathrm{[-]}\f$ + * \param globalPos The global position + */ + Scalar beaversJosephCoeffAtPos(const GlobalPosition& globalPos) const + { + DUNE_THROW(Dune::InvalidStateException, + "The spatial parameters do not provide a beaversJosephCoeffAtPos() method."); + } + /*! * \brief Apply the Forchheimer coefficient for inertial forces * calculation. diff --git a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh index e84e67ca1e60fd9882da6e3c02cd89000285b097..b631c31a7336c96393b0b7ce6ed666a35125f836 100644 --- a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh +++ b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh @@ -140,7 +140,7 @@ public: typedef typename GET_PROP_TYPE(TypeTag, SubDomain2TypeTag) TwoPTwoCTypeTag; typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - typedef typename GET_PROP_TYPE(Stokes2cTypeTag, SpatialParams) SpatialParams; + typedef typename GET_PROP_TYPE(TwoPTwoCTypeTag, SpatialParams) SpatialParams; typedef typename GET_PROP_TYPE(Stokes2cTypeTag, ElementVolumeVariables) ElementVolumeVariables1; typedef typename GET_PROP_TYPE(TwoPTwoCTypeTag, ElementVolumeVariables) ElementVolumeVariables2; @@ -432,10 +432,10 @@ public: // MOMENTUM_X Balance - SpatialParams spatialParams = globalProblem_.sdProblem1().spatialParams(); + SpatialParams spatialParams = globalProblem_.sdProblem2().spatialParams(); Scalar beaversJosephCoeff = spatialParams.beaversJosephCoeffAtPos(globalPos1); assert(beaversJosephCoeff > 0); - beaversJosephCoeff /= std::sqrt(spatialParams.intrinsicPermeability(sdElement1, cParams.fvGeometry1, vertInElem1)); + beaversJosephCoeff /= std::sqrt(spatialParams.intrinsicPermeability(sdElement2, cParams.fvGeometry2, vertInElem2)); // Neumann-like conditions // TODO revise comment @@ -805,7 +805,8 @@ public: } } - SpatialParams spatialParams = globalProblem_.sdProblem1().spatialParams(); + typedef typename GET_PROP_TYPE(Stokes2cTypeTag, SpatialParams) SpatialParams1; + SpatialParams1 spatialParams = globalProblem_.sdProblem1().spatialParams(); const GlobalPosition& globalPos = cParams.fvGeometry1.subContVol[vertInElem1].global; Scalar beaversJosephCoeff = spatialParams.beaversJosephCoeffAtPos(globalPos); assert(beaversJosephCoeff > 0); diff --git a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh index d0d4cfddf08fd0fbaad3e16407845214c599ee4f..ef2e9e0d4b82ecd94a55616fcb129d134253477d 100644 --- a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh @@ -48,7 +48,6 @@ #include <dumux/linear/pardisobackend.hh> #endif // HAVE_PARDISO -#include "2cnistokes2p2cnispatialparams.hh" #include "stokes2cnisubproblem.hh" #include "2p2cnisubproblem.hh" @@ -90,7 +89,6 @@ SET_TYPE_PROP(Stokes2cniSubProblem, OtherSubDomainTypeTag, TTAG(TwoPTwoCNISubPro SET_TYPE_PROP(TwoPTwoCNISubProblem, OtherSubDomainTypeTag, TTAG(Stokes2cniSubProblem)); // Set the spatial parameters used for the problems -SET_TYPE_PROP(Stokes2cniSubProblem, SpatialParams, Dumux::TwoCNIStokesTwoPTwoCNISpatialParams<TypeTag>); SET_TYPE_PROP(TwoPTwoCNISubProblem, SpatialParams, Dumux::TwoCNIStokesTwoPTwoCNISpatialParams<TypeTag>); // Set the fluid system to use complex relations (last argument) diff --git a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh index e4de0983a87c2aae3555fae2126094d266618978..df114ef356427ad0dbe2649409832288052d0183 100644 --- a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh @@ -421,16 +421,6 @@ public: (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - /*! - * \brief Returns whether the position is an interface corner point - * - * This function is required in case of mortar coupling otherwise it should return false - * - * \param globalPos The global position - */ - bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const - { return false; } - // \} private: diff --git a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh index a52363fabc5c34d69629d8ca5dc18c54a5861fe1..228e370cd5519ca20262adfdf38bf68e399ac519 100644 --- a/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/stokes2cnisubproblem.hh @@ -28,8 +28,6 @@ #include <dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh> #include <dumux/multidomain/common/subdomainpropertydefaults.hh> -#include "2cnistokes2p2cnispatialparams.hh" - namespace Dumux { @@ -42,7 +40,7 @@ class Stokes2cniSubProblem; namespace Properties { NEW_TYPE_TAG(Stokes2cniSubProblem, - INHERITS_FROM(BoxStokesncni, SubDomain, TwoCNIStokesTwoPTwoCNISpatialParams)); + INHERITS_FROM(BoxStokesncni, SubDomain)); // Set the problem property SET_TYPE_PROP(Stokes2cniSubProblem, Problem, Dumux::Stokes2cniSubProblem<TypeTag>); @@ -96,8 +94,6 @@ class Stokes2cniSubProblem : public StokesProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - enum { // Number of equations and grid dimension numEq = GET_PROP_VALUE(TypeTag, NumEq), @@ -151,8 +147,7 @@ public: * \param gridView The simulation's idea about physical space */ Stokes2cniSubProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), - spatialParams_(gridView) + : ParentType(timeManager, gridView) { bBoxMin_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); bBoxMax_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); @@ -391,23 +386,6 @@ public: return false; } - /*! - * \brief Auxiliary function used for the mortar coupling, if mortar coupling, - * this should return true - * - * \param globalPos The global position - */ - bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const - { return false; } - - /*! - * \brief Returns the spatial parameters object. - */ - SpatialParams &spatialParams() - { return spatialParams_; } - const SpatialParams &spatialParams() const - { return spatialParams_; } - //! \brief Returns the reference velocity. const Scalar refVelocity() const { return refVelocity_ + variation_(sinusVAmplitude_, sinusVPeriod_); } @@ -489,8 +467,6 @@ private: const Scalar height_() const { return bBoxMax_[1] - bBoxMin_[1]; } - SpatialParams spatialParams_; - static constexpr Scalar eps_ = 1e-8; GlobalPosition bBoxMin_; diff --git a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh index bce732ddc2e337695f0d112d48926752c4d00195..81c4649e9f6181592704288f7474014dfb418c01 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh @@ -76,7 +76,6 @@ SET_TYPE_PROP(ZeroEq2cniSubProblem, OtherSubDomainTypeTag, TTAG(TwoPTwoCNISubPro SET_TYPE_PROP(TwoPTwoCNISubProblem, OtherSubDomainTypeTag, TTAG(ZeroEq2cniSubProblem)); // Set the same spatial parameters for both sub-problems -SET_TYPE_PROP(ZeroEq2cniSubProblem, SpatialParams, Dumux::TwoCNIZeroEqTwoPTwoCNISpatialParams<TypeTag>); SET_TYPE_PROP(TwoPTwoCNISubProblem, SpatialParams, Dumux::TwoCNIZeroEqTwoPTwoCNISpatialParams<TypeTag>); // Set the fluid system to use complex relations (last argument) diff --git a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh index ae9715eb327a92278df45d438b07f5ce70b45691..9d7f8ebbba5a0b5f46539cedee0f9cff9c556464 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh @@ -347,16 +347,6 @@ public: || (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - /*! - * \brief Returns whether the position is an interface corner point - * - * This function is required in case of mortar coupling otherwise it should return false - * - * \param globalPos The global position - */ - bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const - { return false; } - // \} private: diff --git a/test/multidomain/2cnizeroeq2p2cni/zeroeq2cnisubproblem.hh b/test/multidomain/2cnizeroeq2p2cni/zeroeq2cnisubproblem.hh index d30bbd7d30ea7d4bfc0308ac9a33d83cb24211c4..b2e3d1b1be4d7a1ed71ae1e3b689b11ff32f0a24 100644 --- a/test/multidomain/2cnizeroeq2p2cni/zeroeq2cnisubproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/zeroeq2cnisubproblem.hh @@ -28,8 +28,6 @@ #include <dumux/multidomain/common/subdomainpropertydefaults.hh> #include <dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh> -#include "2cnizeroeq2p2cnispatialparameters.hh" - namespace Dumux { @@ -39,7 +37,7 @@ class ZeroEq2cniSubProblem; namespace Properties { NEW_TYPE_TAG(ZeroEq2cniSubProblem, - INHERITS_FROM(BoxZeroEqncni, SubDomain, TwoCNIZeroEqTwoPTwoCNISpatialParams)); + INHERITS_FROM(BoxZeroEqncni, SubDomain)); // Set the problem property SET_TYPE_PROP(ZeroEq2cniSubProblem, Problem, Dumux::ZeroEq2cniSubProblem<TypeTag>); @@ -108,8 +106,6 @@ class ZeroEq2cniSubProblem : public ZeroEqProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { @@ -159,8 +155,7 @@ public: * \param gridView The simulation's idea about physical space */ ZeroEq2cniSubProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView), - spatialParams_(gridView) + : ParentType(timeManager, gridView) { bBoxMin_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); bBoxMax_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); @@ -173,8 +168,6 @@ public: refPressure_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, FreeFlow, RefPressure); refMassfrac_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, FreeFlow, RefMassfrac); refTemperature_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, FreeFlow, RefTemperature); - - alphaBJ_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, AlphaBJ); } // functions have to be overwritten, otherwise they remain uninitialised @@ -298,25 +291,6 @@ public: || (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - /*! - * \brief Returns the spatial parameters object. - */ - SpatialParams &spatialParams() - { return spatialParams_; } - const SpatialParams &spatialParams() const - { return spatialParams_; } - - /*! - * \brief Auxiliary function used for the mortar coupling, if mortar coupling, - * this should return true - * - * \param globalPos The global position - */ - bool isInterfaceCornerPoint(const GlobalPosition &globalPos) const - { - return false; - } - //! \brief Returns the velocity at the inflow. const Scalar refVelocity() const { @@ -388,8 +362,6 @@ private: || onLowerBoundary_(globalPos) || onUpperBoundary_(globalPos)); } - SpatialParams spatialParams_; - static constexpr Scalar eps_ = 1e-8; GlobalPosition bBoxMin_; GlobalPosition bBoxMax_; @@ -399,8 +371,6 @@ private: Scalar refMassfrac_; Scalar refTemperature_; - Scalar alphaBJ_; - Scalar runUpDistanceX1_; Scalar runUpDistanceX2_; }; diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh index 35eb310e3cc376a62cfded0f1379f1167dbc71ef..ecadb6410c9bc9b7114308278e16c52654e005ca 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh @@ -89,7 +89,6 @@ SET_TYPE_PROP(Stokes2cSubProblem, OtherSubDomainTypeTag, TTAG(TwoPTwoCSubProblem SET_TYPE_PROP(TwoPTwoCSubProblem, OtherSubDomainTypeTag, TTAG(Stokes2cSubProblem)); // Set the spatial parameters used for the problems -SET_TYPE_PROP(Stokes2cSubProblem, SpatialParams, Dumux::TwoCStokesTwoPTwoCSpatialParams<TypeTag>); SET_TYPE_PROP(TwoPTwoCSubProblem, SpatialParams, Dumux::TwoCStokesTwoPTwoCSpatialParams<TypeTag>); // Set the fluid system to use simple relations (last argument) diff --git a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh index 4ed458a9420e0db9b9000b01cd39ab9a18315dee..37f045bc0b1b723bdafbca8c9ad3953011ab41d1 100644 --- a/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh +++ b/test/multidomain/2cstokes2p2c/stokes2csubproblem.hh @@ -28,8 +28,6 @@ #include <dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh> #include <dumux/multidomain/common/subdomainpropertydefaults.hh> -#include "2cstokes2p2cspatialparams.hh" - namespace Dumux { @@ -39,7 +37,7 @@ class Stokes2cSubProblem; namespace Properties { NEW_TYPE_TAG(Stokes2cSubProblem, - INHERITS_FROM(BoxStokesnc, SubDomain, TwoCStokesTwoPTwoCSpatialParams)); + INHERITS_FROM(BoxStokesnc, SubDomain)); // Set the problem property SET_TYPE_PROP(Stokes2cSubProblem, Problem, Dumux::Stokes2cSubProblem<TypeTag>); @@ -93,8 +91,6 @@ class Stokes2cSubProblem : public StokesProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { @@ -147,8 +143,7 @@ public: * \param gridView The simulation's idea about physical space */ Stokes2cSubProblem(TimeManager &timeManager, const GridView gridView) - : ParentType(timeManager, gridView), - spatialParams_(gridView) + : ParentType(timeManager, gridView) { bBoxMin_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); bBoxMax_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); @@ -365,14 +360,6 @@ public: return false; } - /*! - * \brief Returns the spatial parameters object. - */ - SpatialParams &spatialParams() - { return spatialParams_; } - const SpatialParams &spatialParams() const - { return spatialParams_; } - //! \brief Returns the reference velocity. const Scalar refVelocity() const { return refVelocity_ + variation_(sinusVAmplitude_, sinusVPeriod_); } @@ -454,8 +441,6 @@ private: const Scalar height_() const { return bBoxMax_[1] - bBoxMin_[1]; } - SpatialParams spatialParams_; - static constexpr Scalar eps_ = 1e-8; GlobalPosition bBoxMin_; GlobalPosition bBoxMax_; diff --git a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh index 6eac23eca64124f9508a5586a6b62657ace5263e..e69714d4c05b27dbba69a61681feda18e448e7dd 100644 --- a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh @@ -76,7 +76,6 @@ SET_TYPE_PROP(ZeroEq2cSubProblem, OtherSubDomainTypeTag, TTAG(TwoPTwoCSubProblem SET_TYPE_PROP(TwoPTwoCSubProblem, OtherSubDomainTypeTag, TTAG(ZeroEq2cSubProblem)); // Set the same spatial parameters for both sub-problems -SET_TYPE_PROP(ZeroEq2cSubProblem, SpatialParams, Dumux::TwoCZeroEqTwoPTwoCSpatialParams<TypeTag>); SET_TYPE_PROP(TwoPTwoCSubProblem, SpatialParams, Dumux::TwoCZeroEqTwoPTwoCSpatialParams<TypeTag>); // Set the fluid system to use simple relations (last argument) diff --git a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh index 8a17cbfea37e233451353dc466d24d3a0572277f..9beed5ef22b42f95f10900872e947275f6564882 100644 --- a/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh +++ b/test/multidomain/2czeroeq2p2c/zeroeq2csubproblem.hh @@ -28,8 +28,6 @@ #include <dumux/multidomain/common/subdomainpropertydefaults.hh> #include <dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh> -#include "2czeroeq2p2cspatialparameters.hh" - namespace Dumux { @@ -39,7 +37,7 @@ class ZeroEq2cSubProblem; namespace Properties { NEW_TYPE_TAG(ZeroEq2cSubProblem, - INHERITS_FROM(BoxZeroEqnc, SubDomain, TwoCZeroEqTwoPTwoCSpatialParams)); + INHERITS_FROM(BoxZeroEqnc, SubDomain)); // Set the problem property SET_TYPE_PROP(ZeroEq2cSubProblem, Problem, Dumux::ZeroEq2cSubProblem<TypeTag>); @@ -109,8 +107,6 @@ class ZeroEq2cSubProblem : public ZeroEqProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { @@ -160,8 +156,7 @@ public: * \param gridView The simulation's idea about physical space */ ZeroEq2cSubProblem(TimeManager &timeManager, const GridView gridView) - : ParentType(timeManager, gridView), - spatialParams_(gridView) + : ParentType(timeManager, gridView) { bBoxMin_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); bBoxMax_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); @@ -313,14 +308,6 @@ public: || (onRightBoundary_(globalPos) && onUpperBoundary_(globalPos))); } - /*! - * \brief Returns the spatial parameters object. - */ - SpatialParams &spatialParams() - { return spatialParams_; } - const SpatialParams &spatialParams() const - { return spatialParams_; } - //! \brief Returns the velocity at the inflow. const Scalar refVelocity() const { @@ -405,8 +392,6 @@ private: || onLowerBoundary_(globalPos) || onUpperBoundary_(globalPos)); } - SpatialParams spatialParams_; - static constexpr Scalar eps_ = 1e-8; GlobalPosition bBoxMin_; GlobalPosition bBoxMax_;