diff --git a/dumux/material/fluidmatrixinteractions/2p/brookscorey.hh b/dumux/material/fluidmatrixinteractions/2p/brookscorey.hh index 94b8365e66cd5559014e7a8ffeaf3142f56c2d3d..84283ce85786889d52c2a2c0a007326cf26ef41f 100644 --- a/dumux/material/fluidmatrixinteractions/2p/brookscorey.hh +++ b/dumux/material/fluidmatrixinteractions/2p/brookscorey.hh @@ -26,6 +26,7 @@ #ifndef DUMUX_BROOKS_COREY_HH #define DUMUX_BROOKS_COREY_HH +#include <dune/common/deprecated.hh> #include "brookscoreyparams.hh" #include <algorithm> @@ -111,7 +112,29 @@ public: * is constructed accordingly. Afterwards the values are set there, too. * \return Partial derivative of \f$\mathrm{[p_c]}\f$ w.r.t. effective saturation according to Brooks & Corey. */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) + { + return dpc_dswe(params, swe); + } + + /*! + * \brief The partial derivative of the capillary + * pressure w.r.t. the effective saturation according to Brooks & Corey. + * + * This is equivalent to + * \f$\mathrm{ + \frac{\partial p_C}{\partial \overline{S}_w} = + -\frac{p_e}{\lambda} \overline{S}_w^{-1/\lambda - 1} + }\f$ + * + * \param swe Effective saturation of the wetting phase \f$\mathrm{[\overline{S}_w]}\f$ + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + * \return Partial derivative of \f$\mathrm{[p_c]}\f$ w.r.t. effective saturation according to Brooks & Corey. + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); @@ -128,7 +151,23 @@ public: * is constructed accordingly. Afterwards the values are set there, too. * \return Partial derivative of effective saturation w.r.t. \f$\mathrm{[p_c]}\f$ according to Brooks & Corey. */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) + { + return dswe_dpc(params, pc); + } + + /*! + * \brief The partial derivative of the effective + * saturation w.r.t. the capillary pressure according to Brooks & Corey. + * + * \param pc Capillary pressure \f$\mathrm{[p_c]}\f$ in \f$\mathrm{[Pa]}\f$. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + * \return Partial derivative of effective saturation w.r.t. \f$\mathrm{[p_c]}\f$ according to Brooks & Corey. + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) { assert(pc >= 0); @@ -165,7 +204,25 @@ public: * \return Derivative of the relative permeability of the wetting phase w.r.t. effective wetting phase * saturation calculated as implied by Brooks & Corey. */ + DUNE_DEPRECATED_MSG("dkrw_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dkrw_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dkrw_dsw(const Params ¶ms, Scalar swe) + { + return dkrw_dswe(params, swe); + } + + /*! + * \brief The derivative of the relative permeability for the + * wetting phase with regard to the wetting saturation of the + * medium implied by the Brooks-Corey parameterization. + * + * \param swe The mobile saturation of the wetting phase. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, + * and then the params container is constructed accordingly. Afterwards the values are set there, too. + * \return Derivative of the relative permeability of the wetting phase w.r.t. effective wetting phase + * saturation calculated as implied by Brooks & Corey. + */ + static Scalar dkrw_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); @@ -205,7 +262,26 @@ public: * \return Derivative of the relative permeability of the non-wetting phase w.r.t. effective wetting phase * saturation calculated as implied by Brooks & Corey. */ + DUNE_DEPRECATED_MSG("dkrn_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dkrn_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dkrn_dsw(const Params ¶ms, Scalar swe) + { + return dkrn_dswe(params, swe); + } + + /*! + * \brief The derivative of the relative permeability for the + * non-wetting phase in regard to the wetting saturation of + * the medium as implied by the Brooks-Corey + * parameterization. + * + * \param swe The mobile saturation of the wetting phase. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, + * and then the params container is constructed accordingly. Afterwards the values are set there, too. + * \return Derivative of the relative permeability of the non-wetting phase w.r.t. effective wetting phase + * saturation calculated as implied by Brooks & Corey. + */ + static Scalar dkrn_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); diff --git a/dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh b/dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh index aea2a178d07561265a7aa8dad14c7cd635b09847..19091e404126e0bed644117d014e1ea0bd7e9776 100644 --- a/dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh +++ b/dumux/material/fluidmatrixinteractions/2p/efftoabslaw.hh @@ -119,7 +119,7 @@ public: */ static Scalar dpc_dsw(const Params ¶ms, Scalar sw) { - return EffLaw::dpc_dsw(params, swToSwe(params, sw) )*dswe_dsw_(params); + return EffLaw::dpc_dswe(params, swToSwe(params, sw) )*dswe_dsw_(params); } /*! @@ -142,7 +142,7 @@ public: */ static Scalar dsw_dpc(const Params ¶ms, Scalar pc) { - return EffLaw::dsw_dpc(params, pc)*dsw_dswe_(params); + return EffLaw::dswe_dpc(params, pc)*dsw_dswe_(params); } /*! @@ -172,7 +172,7 @@ public: */ static Scalar dkrw_dsw(const Params ¶ms, Scalar sw) { - return EffLaw::dkrw_dsw(params, swToSwe(params, sw)); + return EffLaw::dkrw_dswe(params, swToSwe(params, sw)); } /*! @@ -201,7 +201,7 @@ public: */ static Scalar dkrn_dsw(const Params ¶ms, Scalar sw) { - return EffLaw::dkrn_dsw(params, swToSwe(params, sw)); + return EffLaw::dkrn_dswe(params, swToSwe(params, sw)); } /*! diff --git a/dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh b/dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh index 7c6fcb961ad31ddb966d079d98a1fb5e3025462d..579ca1358e35e2f8b6c1b16999fb14c5974def5b 100644 --- a/dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh +++ b/dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh @@ -25,6 +25,7 @@ #ifndef LINEAR_MATERIAL_HH #define LINEAR_MATERIAL_HH +#include <dune/common/deprecated.hh> #include "linearmaterialparams.hh" #include <algorithm> @@ -104,7 +105,28 @@ public: * is constructed accordingly. Afterwards the values are set there, too. * \return Partial derivative of \f$\mathrm{[p_c]}\f$ w.r.t. effective saturation according to linear material relation. */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) + { + return dpc_dswe(params, swe); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure w.r.t. the effective saturation. + * + * This is equivalent to + * \f$\mathrm{ + \frac{\partial p_C}{\partial \overline{S}_w} = + - (p_{C,max} - p_{C,min}) + }\f$ + * \param swe Effective saturation of the wetting phase \f$\mathrm{[\overline{S}_w]}\f$ conversion from absolute saturation happened in EffToAbsLaw. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + * \return Partial derivative of \f$\mathrm{[p_c]}\f$ w.r.t. effective saturation according to linear material relation. + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) { return - (params.maxPc() - params.entryPc()); } diff --git a/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh b/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh index da74d8139844836fa2ca91e5360b4e57c45cd370..3d170470e9d5e05f4e3acf5b1ac5121af02f1a5a 100644 --- a/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh +++ b/dumux/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh @@ -92,12 +92,12 @@ public: // saturation moving to the right direction if it // temporarily is in an 'illegal' range. if (swe <= sThres) { - Scalar m = BrooksCorey::dpc_dsw(params, sThres); + Scalar m = BrooksCorey::dpc_dswe(params, sThres); Scalar pcsweLow = BrooksCorey::pc(params, sThres); return pcsweLow + m*(swe - sThres); } else if (swe > 1.0) { - Scalar m = BrooksCorey::dpc_dsw(params, 1.0); + Scalar m = BrooksCorey::dpc_dswe(params, 1.0); Scalar pcsweHigh = BrooksCorey::pc(params, 1.0); return pcsweHigh + m*(swe - 1.0); } @@ -138,12 +138,12 @@ public: // temporarily is in an 'illegal' range. if (swe <= sThres) { // invert the low saturation regularization of pc() - Scalar m = BrooksCorey::dpc_dsw(params, sThres); + Scalar m = BrooksCorey::dpc_dswe(params, sThres); Scalar pcsweLow = BrooksCorey::pc(params, sThres); return sThres + (pc - pcsweLow)/m; } else if (swe > 1.0) { - Scalar m = BrooksCorey::dpc_dsw(params, 1.0); + Scalar m = BrooksCorey::dpc_dswe(params, 1.0); Scalar pcsweHigh = BrooksCorey::pc(params, 1.0); return 1.0 + (pc - pcsweHigh)/m; } @@ -165,23 +165,43 @@ public: * * \copydetails BrooksCorey::dpc_dsw() */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) + { + return dpc_dswe(params, swe); + } + + /*! + * \brief A regularized version of the partial derivative + * of the \f$\mathrm{p_c(\overline{S}_w)}\f$ w.r.t. effective saturation + * according to Brooks & Corey. + * + * regularized part: + * - low saturation: use the slope of the regularization point (i.e. no kink). + * - high saturation: connect the high regularization point with \f$\mathrm{\overline{S}_w =1}\f$ + * by a straight line and use that slope (yes, there is a kink :-( ). + * + * For the non-regularized part: + * + * \copydetails BrooksCorey::dpc_dswe() + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) { const Scalar sThres = params.thresholdSw(); // derivative of the regualarization if (swe <= sThres) { // calculate the slope of the straight line used in pc() - Scalar m = BrooksCorey::dpc_dsw(params, sThres); + Scalar m = BrooksCorey::dpc_dswe(params, sThres); return m; } else if (swe > 1.0) { // calculate the slope of the straight line used in pc() - Scalar m = BrooksCorey::dpc_dsw(params, 1.0); + Scalar m = BrooksCorey::dpc_dswe(params, 1.0); return m; } - return BrooksCorey::dpc_dsw(params, swe); + return BrooksCorey::dpc_dswe(params, swe); } /*! @@ -198,7 +218,27 @@ public: * * \copydetails BrooksCorey::dsw_dpc() */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) + { + return dswe_dpc(params, pc); + } + + /*! + * \brief A regularized version of the partial derivative + * of the \f$\mathrm{\overline{S}_w(p_c)}\f$ w.r.t. cap.pressure + * according to Brooks & Corey. + * + * regularized part: + * - low saturation: use the slope of the regularization point (i.e. no kink). + * - high saturation: connect the high regularization point with \f$\mathrm{\overline{S}_w =1}\f$ + * by a straight line and use that slope (yes, there is a kink :-( ). + * + * For the non-regularized part: + * + * \copydetails BrooksCorey::dswe_dpc() + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) { const Scalar sThres = params.thresholdSw(); @@ -220,15 +260,15 @@ public: // derivative of the regularization if (swe <= sThres) { // calculate the slope of the straight line used in pc() - Scalar m = BrooksCorey::dpc_dsw(params, sThres); + Scalar m = BrooksCorey::dpc_dswe(params, sThres); return 1/m; } else if (swe > 1.0) { // calculate the slope of the straight line used in pc() - Scalar m = BrooksCorey::dpc_dsw(params, 1.0); + Scalar m = BrooksCorey::dpc_dswe(params, 1.0); return 1/m; } - return 1.0/BrooksCorey::dpc_dsw(params, swe); + return 1.0/BrooksCorey::dpc_dswe(params, swe); } /*! diff --git a/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh b/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh index 8c8741d9f88fb04b705e518873f6cbddc2eb5f48..5d49626bb7594ec930a40b7f409d31f873aa4215 100644 --- a/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh +++ b/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh @@ -116,9 +116,29 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) { - return LinearMaterial::dpc_dsw(params, swe); + return dpc_dswe(params, swe); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * + * This is equivalent to + * \f$\mathrm{ + \frac{\partial p_C}{\partial \overline{S}_w} = + - (p_{C,max} - p_{C,min}) + }\f$ + * \param swe Effective saturation of the wetting phase \f$\mathrm{\overline{S}_w}\f$ conversion from absolute saturation happened in EffToAbsLaw. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) + { + return LinearMaterial::dpc_dswe(params, swe); } /*! @@ -130,9 +150,24 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) { - return LinearMaterial::dsw_dpc(params, pc); + return dswe_dpc(params, pc); + } + + /*! + * \brief Returns the partial derivative of the effective + * saturation to the capillary pressure. + * + * \param pc Capillary pressure \f$\mathrm{p_C}\f$ in \f$\mathrm{[Pa]}\f$ + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) + { + return LinearMaterial::dswe_dpc(params, pc); } /*! diff --git a/dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh b/dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh index 4120e926a4b7986fefa005943ec09c60589042a4..bf9133a399e611447a78ee1aa3ad259b75a6cb9a 100644 --- a/dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh +++ b/dumux/material/fluidmatrixinteractions/2p/regularizedvangenuchten.hh @@ -112,7 +112,7 @@ public: if (swe < 1.0) { // use spline between threshold swe and 1.0 - Scalar mTh = VanGenuchten::dpc_dsw(params, swThHigh); + Scalar mTh = VanGenuchten::dpc_dswe(params, swThHigh); Spline<Scalar> sp(swThHigh, 1.0, // x0, x1 yTh, 0, // y0, y1 mTh, m1); // m0, m1 @@ -176,7 +176,7 @@ public: Scalar m1 = (0.0 - yTh)/(1.0 - swThHigh)*2; // invert spline between threshold swe and 1.0 - Scalar mTh = VanGenuchten::dpc_dsw(params, swThHigh); + Scalar mTh = VanGenuchten::dpc_dswe(params, swThHigh); Spline<Scalar> sp(swThHigh, 1.0, // x0, x1 yTh, 0, // m0, m1 mTh, m1); // m0, m1 @@ -202,7 +202,28 @@ public: \copydetails VanGenuchten::dpc_dsw() * */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) + { + return dpc_dswe(params, swe); + } + + /*! + * \brief A regularized version of the partial derivative + * of the \f$\mathrm{p_c(\overline{S}_w)}\f$ w.r.t. effective saturation + * according to van Genuchten. + * + * regularized part: + * - low saturation: use the slope of the regularization point (i.e. no kink). + * - high saturation: connect the high regularization point with \f$\mathrm{\overline{S}_w =1}\f$ + * by a straight line and use that slope (yes, there is a kink :-( ). + * + * For not-regularized part: + * + \copydetails VanGenuchten::dpc_dswe() + * + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) { // derivative of the regualarization if (swe < params.pcLowSw()) { @@ -214,7 +235,7 @@ public: return mHigh_(params); } - return VanGenuchten::dpc_dsw(params, swe); + return VanGenuchten::dpc_dswe(params, swe); } /*! @@ -230,7 +251,26 @@ public: * For not-regularized part: \copydetails VanGenuchten::dsw_dpc() */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) + { + return dswe_dpc(params, pc); + } + + /*! + * \brief A regularized version of the partial derivative + * of the \f$\mathrm{\overline{S}_w(p_c)}\f$ w.r.t. cap.pressure + * according to van Genuchten. + * + * regularized part: + * - low saturation: use the slope of the regularization point (i.e. no kink). + * - high saturation: connect the high regularization point with \f$\mathrm{\overline{S}_w =1}\f$ + * by a straight line and use that slope (yes, there is a kink :-( ). + * + * For not-regularized part: + \copydetails VanGenuchten::dswe_dpc() + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) { // calculate the saturation which corrosponds to the // saturation in the non-regularized verision of van @@ -243,15 +283,15 @@ public: // derivative of the regularization if (sw < params.pcLowSw()) { - // same as in dpc_dsw() but inverted + // same as in dpc_dswe() but inverted return 1/mLow_(params); } if (sw > params.pcHighSw()) { - // same as in dpc_dsw() but inverted + // same as in dpc_dswe() but inverted return 1/mHigh_(params); } - return VanGenuchten::dsw_dpc(params, pc); + return VanGenuchten::dswe_dpc(params, pc); } /*! @@ -283,7 +323,7 @@ public: typedef Dumux::Spline<Scalar> Spline; Spline sp(swThHigh, 1.0, // x1, x2 VanGenuchten::krw(params, swThHigh), 1.0, // y1, y2 - VanGenuchten::dkrw_dsw(params, swThHigh), 0); // m1, m2 + VanGenuchten::dkrw_dswe(params, swThHigh), 0); // m1, m2 return sp.eval(swe); } @@ -319,7 +359,7 @@ public: typedef Dumux::Spline<Scalar> Spline; Spline sp(0.0, swThLow, // x1, x2 1.0, VanGenuchten::krn(params, swThLow), // y1, y2 - 0.0, VanGenuchten::dkrn_dsw(params, swThLow)); // m1, m2 + 0.0, VanGenuchten::dkrn_dswe(params, swThLow)); // m1, m2 return sp.eval(swe); } @@ -342,7 +382,7 @@ private: { const Scalar swThLow = params.pcLowSw(); - return VanGenuchten::dpc_dsw(params, swThLow); + return VanGenuchten::dpc_dswe(params, swThLow); } /*! diff --git a/dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh b/dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh index 4920a9b0cb7d16611be82a39aabd51d64055e914..0791d44d38353bf2db74b52304328267bcc82b15 100644 --- a/dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh +++ b/dumux/material/fluidmatrixinteractions/2p/vangenuchten.hh @@ -25,6 +25,7 @@ #ifndef VAN_GENUCHTEN_HH #define VAN_GENUCHTEN_HH +#include <dune/common/deprecated.hh> #include "vangenuchtenparams.hh" #include <algorithm> @@ -108,7 +109,29 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dpc_dsw(const Params ¶ms, Scalar swe) + { + return dpc_dswe(params, swe); + } + + /*! + * \brief The partial derivative of the capillary + * pressure w.r.t. the effective saturation according to van Genuchten. + * + * This is equivalent to + * \f$\mathrm{ + \frac{\partial p_C}{\partial \overline{S}_w} = + -\frac{1}{\alpha} (\overline{S}_w^{-1/m} - 1)^{1/n - } + \overline{S}_w^{-1/m} / \overline{S}_w / m + }\f$ + * + * \param swe Effective saturation of the wetting phase \f$\mathrm{\overline{S}_w}\f$ + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); @@ -126,7 +149,22 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) + { + return dswe_dpc(params, pc); + } + + /*! + * \brief The partial derivative of the effective + * saturation to the capillary pressure according to van Genuchten. + * + * \param pc Capillary pressure \f$\mathrm{p_C}\f$ in \f$\mathrm{[Pa]}\f$ + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) { assert(pc >= 0); @@ -162,7 +200,23 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dkrw_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dkrw_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dkrw_dsw(const Params ¶ms, Scalar swe) + { + return dkrw_dswe(params, swe); + } + + /*! + * \brief The derivative of the relative permeability for the + * wetting phase in regard to the wetting saturation of the + * medium implied by the van Genuchten parameterization. + * + * \param swe The mobile saturation of the wetting phase. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dkrw_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); @@ -201,7 +255,24 @@ public: * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container * is constructed accordingly. Afterwards the values are set there, too. */ + DUNE_DEPRECATED_MSG("dkrn_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dkrn_dswe(const Params ¶ms, Scalar swe) instead.") static Scalar dkrn_dsw(const Params ¶ms, Scalar swe) + { + return dkrn_dswe(params, swe); + } + + /*! + * \brief The derivative of the relative permeability for the + * non-wetting phase in regard to the wetting saturation of + * the medium as implied by the van Genuchten + * parameterization. + * + * \param swe The mobile saturation of the wetting phase. + * \param params A container object that is populated with the appropriate coefficients for the respective law. + * Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container + * is constructed accordingly. Afterwards the values are set there, too. + */ + static Scalar dkrn_dswe(const Params ¶ms, Scalar swe) { assert(0 <= swe && swe <= 1); diff --git a/dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh b/dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh index 1827df4b08c1cd289dd8136be029225d2639ac9e..42752421bee1694459a00658ba18ab94d5680515 100644 --- a/dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh +++ b/dumux/material/fluidmatrixinteractions/3p/efftoabslaw.hh @@ -27,6 +27,7 @@ #ifndef DUMUX_EFF_TO_ABS_LAW_HH #define DUMUX_EFF_TO_ABS_LAW_HH +#include <dune/common/exceptions.hh> #include "efftoabslawparams.hh" namespace Dumux @@ -160,7 +161,7 @@ public: */ static Scalar dpc_dsw(const Params ¶ms, const Scalar sw) { - return EffLaw::dpc_dsw(params, pc); + return EffLaw::dpc_dswe(params, pc); } /*! diff --git a/dumux/material/fluidmatrixinteractions/3p/parkervangen3p.hh b/dumux/material/fluidmatrixinteractions/3p/parkervangen3p.hh index 25358b258a7f5f5f30b3071b5bd966ad67c1c48c..6be873070d0cdba63def5a404ad599f02bdcd419 100644 --- a/dumux/material/fluidmatrixinteractions/3p/parkervangen3p.hh +++ b/dumux/material/fluidmatrixinteractions/3p/parkervangen3p.hh @@ -143,9 +143,21 @@ public: * \param params Array of parameters * \param sw Wetting liquid saturation */ - static Scalar dpc_dsw(const Params ¶ms, const Scalar sw) + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, const Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, const Scalar swe) instead.") + static Scalar dpc_dsw(const Params ¶ms, const Scalar swe) { - DUNE_THROW(Dune::NotImplemented, "dpc/dsw for three phases not implemented! Do it yourself!"); + return dpc_dswe(params, swe); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * \param params Array of parameters + * \param sw Wetting liquid saturation + */ + static Scalar dpc_dswe(const Params ¶ms, const Scalar swe) + { + DUNE_THROW(Dune::NotImplemented, "dpc/dswe for three phases not implemented! Do it yourself!"); } /*! @@ -154,7 +166,19 @@ public: * \param params Array of parameters * \param seRegu Effective wetting phase saturation for regularization */ + DUNE_DEPRECATED_MSG("dpcgw_dsw(const Params ¶ms, const Scalar seRegu) is deprecated. Use dpcgw_dswe(const Params ¶ms, const Scalar seRegu) instead.") static Scalar dpcgw_dsw(const Params ¶ms, const Scalar seRegu) + { + return dpcgw_dswe(params, seRegu); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * \param params Array of parameters + * \param seRegu Effective wetting phase saturation for regularization + */ + static Scalar dpcgw_dswe(const Params ¶ms, const Scalar seRegu) { const Scalar powSeRegu = pow(seRegu, -1/params.vgm()); return - 1.0/params.vgAlpha() * pow(powSeRegu - 1, 1.0/params.vgn() - 1)/params.vgn() @@ -167,7 +191,19 @@ public: * \param params Array of parameters * \param seRegu Effective wetting phase saturation for regularization */ + DUNE_DEPRECATED_MSG("dpcnw_dsw(const Params ¶ms, const Scalar seRegu) is deprecated. Use dpcnw_dswe(const Params ¶ms, const Scalar seRegu) instead.") static Scalar dpcnw_dsw(const Params ¶ms, const Scalar seRegu) + { + return dpcnw_dswe(params, seRegu); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * \param params Array of parameters + * \param seRegu Effective wetting phase saturation for regularization + */ + static Scalar dpcnw_dswe(const Params ¶ms, const Scalar seRegu) { const Scalar powSeRegu = pow(seRegu, -1/params.vgm()); return - 1.0/params.vgAlpha() * pow(powSeRegu - 1, 1.0/params.vgn() - 1)/params.vgn() @@ -180,23 +216,46 @@ public: * \param params Array of parameters * \param seRegu Effective wetting phase saturation for regularization */ + DUNE_DEPRECATED_MSG("dpcgn_dst(const Params ¶ms, const Scalar seRegu) is deprecated. Use dpcgn_dste(const Params ¶ms, const Scalar seRegu) instead.") static Scalar dpcgn_dst(const Params ¶ms, const Scalar seRegu) + { + return dpcgn_dste(params, seRegu); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * \param params Array of parameters + * \param seRegu Effective wetting phase saturation for regularization + */ + static Scalar dpcgn_dste(const Params ¶ms, const Scalar seRegu) { const Scalar powSeRegu = pow(seRegu, -1/params.vgm()); return - 1.0/params.vgAlpha() * pow(powSeRegu - 1, 1.0/params.vgn() - 1)/params.vgn() * powSeRegu/seRegu/params.vgm()/params.betaGn(); } - /*! * \brief Returns the partial derivative of the effective * saturation to the capillary pressure. * \param params Array of parameters * \param pc Capillary pressure in \f$\mathrm{[Pa]}\f$ */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, const Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, const Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, const Scalar pc) { - DUNE_THROW(Dune::NotImplemented, "dsw/dpc for three phases not implemented! Do it yourself!"); + return dswe_dpc(params, pc); + } + + /*! + * \brief Returns the partial derivative of the effective + * saturation to the capillary pressure. + * \param params Array of parameters + * \param pc Capillary pressure in \f$\mathrm{[Pa]}\f$ + */ + static Scalar dswe_dpc(const Params ¶ms, const Scalar pc) + { + DUNE_THROW(Dune::NotImplemented, "dswe/dpc for three phases not implemented! Do it yourself!"); } /*! diff --git a/dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3p.hh b/dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3p.hh index 1fd9eded8869a86c0de960360e27afd314757416..78d450b7ddfa0dff54a94b8ecbd52b7417880f56 100644 --- a/dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3p.hh +++ b/dumux/material/fluidmatrixinteractions/3p/regularizedparkervangen3p.hh @@ -110,7 +110,7 @@ public: // value and derivative at regularization point const Scalar pc = ParkerVanGen3P::pcgw(params, seRegu); - const Scalar slope = ParkerVanGen3P::dpcgw_dsw(params, seRegu); + const Scalar slope = ParkerVanGen3P::dpcgw_dswe(params, seRegu); //evaluate tangential return (swe-seRegu)*slope+pc; @@ -140,7 +140,7 @@ public: // value and derivative at regularization point const Scalar pc = ParkerVanGen3P::pcnw(params, seRegu); - const Scalar slope = ParkerVanGen3P::dpcnw_dsw(params, seRegu); + const Scalar slope = ParkerVanGen3P::dpcnw_dswe(params, seRegu); //evaluate tangential return (swe-seRegu)*slope + pc; @@ -170,7 +170,7 @@ public: // value and derivative at regularization point const Scalar pc = ParkerVanGen3P::pcgn(params, seRegu); - const Scalar slope = ParkerVanGen3P::dpcgn_dst(params, seRegu); + const Scalar slope = ParkerVanGen3P::dpcgn_dste(params, seRegu); //evaluate tangential return (ste-seRegu)*slope + pc; @@ -204,9 +204,21 @@ public: * \param params Array of parameters * \param sw Wetting liquid saturation */ - static Scalar dpc_dsw(const Params ¶ms, Scalar sw) + DUNE_DEPRECATED_MSG("dpc_dsw(const Params ¶ms, Scalar swe) is deprecated. Use dpc_dswe(const Params ¶ms, Scalar swe) instead.") + static Scalar dpc_dsw(const Params ¶ms, Scalar swe) { - return ParkerVanGen3P::dpc_dsw(params, sw); + return dpc_dswe(params, swe); + } + + /*! + * \brief Returns the partial derivative of the capillary + * pressure to the effective saturation. + * \param params Array of parameters + * \param sw Wetting liquid saturation + */ + static Scalar dpc_dswe(const Params ¶ms, Scalar swe) + { + return ParkerVanGen3P::dpc_dswe(params, swe); } /*! @@ -215,9 +227,21 @@ public: * \param params Array of parameters * \param pc Capillary pressure in \f$\mathrm{[Pa]}\f$ */ + DUNE_DEPRECATED_MSG("dsw_dpc(const Params ¶ms, Scalar pc) is deprecated. Use dswe_dpc(const Params ¶ms, Scalar pc) instead.") static Scalar dsw_dpc(const Params ¶ms, Scalar pc) { - return ParkerVanGen3P::dsw_dpc(params, pc); + return dswe_dpc(params, pc); + } + + /*! + * \brief Returns the partial derivative of the effective + * saturation to the capillary pressure. + * \param params Array of parameters + * \param pc Capillary pressure in \f$\mathrm{[Pa]}\f$ + */ + static Scalar dswe_dpc(const Params ¶ms, Scalar pc) + { + return ParkerVanGen3P::dswe_dpc(params, pc); } /*!