diff --git a/dumux/common/CMakeLists.txt b/dumux/common/CMakeLists.txt
index c743fc2994c169febabdbca4d545626b763fde93..9d6635fe38111a931e5fbee343339efb4f3deae9 100644
--- a/dumux/common/CMakeLists.txt
+++ b/dumux/common/CMakeLists.txt
@@ -11,6 +11,7 @@ boundingboxtree.hh
cubicspline.hh
defaultmappertraits.hh
defaultusagemessage.hh
+deprecated.hh
dimensionlessnumbers.hh
dumuxmessage.hh
entitymap.hh
diff --git a/dumux/common/deprecated.hh b/dumux/common/deprecated.hh
new file mode 100644
index 0000000000000000000000000000000000000000..9b6236d6d77f4bed43b485fd58fd300017c9b390
--- /dev/null
+++ b/dumux/common/deprecated.hh
@@ -0,0 +1,87 @@
+// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+// vi: set et ts=4 sw=4 sts=4:
+/*****************************************************************************
+ * See the file COPYING for full copying permissions. *
+ * *
+ * This program is free software: you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation, either version 3 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program. If not, see . *
+ *****************************************************************************/
+/*!
+ * \file
+ * \ingroup Common
+ * \brief Helpers for deprecation
+ */
+
+#ifndef DUMUX_COMMON_DEPRECATED_HH
+#define DUMUX_COMMON_DEPRECATED_HH
+
+#include
+
+#include
+
+#include
+
+namespace Dumux {
+
+#ifndef DOXYGEN // hide from doxygen
+// Helper classes/functions for deprecation
+// Each implementation has to state after which release
+// it will be removed. Implementations in the Deprecated
+// namespace will be removed without
+// deprecation after their usage in the code exprired,
+// so most likely you don't want to use this in your code
+namespace Deprecated {
+
+////////////////////////////////////////////////////////
+///// REMOVE THIS AFTER RELEASE 3.1
+////////////////////////////////////////////////////////
+
+
+// support old interface of the effective thermal conductivity laws
+template
+struct HasNewEffThermCondIF
+{
+ template
+ auto operator()(ETC&& e) -> decltype(e.effectiveThermalConductivity(std::declval())) {}
+};
+
+template()).template check())::value, int> = 0>
+auto effectiveThermalConductivity(const VV& volVars,
+ const SpatialParams& spatialParams,
+ const Element& element,
+ const FVGeometry& fvGeometry,
+ const typename FVGeometry::SubControlVolume& scv)
+{
+ return ETC::effectiveThermalConductivity(volVars, spatialParams, element, fvGeometry, scv);
+}
+
+template()).template check())::value, int> = 0>
+auto effectiveThermalConductivity(const VV& volVars,
+ const SpatialParams& spatialParams,
+ const Element& element,
+ const FVGeometry& fvGeometry,
+ const typename FVGeometry::SubControlVolume& scv)
+{
+ return ETC::effectiveThermalConductivity(volVars);
+}
+////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////
+
+} // end namespace Deprecated
+#endif
+
+} // end namespace Dumux
+
+#endif
diff --git a/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh b/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh
index 7821049deff9756e621b21937244f6293b1edc5c..f1e007622042ecf361dcd12ac69d50a80c37be3e 100644
--- a/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh
+++ b/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh
@@ -33,6 +33,8 @@
#include
#include
+#include // effective thermal conductivity interface
+
namespace Dumux {
/*!
@@ -87,11 +89,8 @@ public:
const auto& volVars,
const auto& fvGeometry,
const auto& scv)
- { return ThermalConductivityModel::effectiveThermalConductivity(volVars,
- problem.spatialParams(),
- element,
- fvGeometry,
- scv); };
+ { return Deprecated::template effectiveThermalConductivity(
+ volVars, problem.spatialParams(), element, fvGeometry, scv); };
}
};
diff --git a/dumux/flux/box/fourierslaw.hh b/dumux/flux/box/fourierslaw.hh
index b8d2d62a4feced2868ad3b95e2c750ebb682d4fd..bfcf3c031ca13db95940e017387362dc91de0967 100644
--- a/dumux/flux/box/fourierslaw.hh
+++ b/dumux/flux/box/fourierslaw.hh
@@ -28,6 +28,7 @@
#include
#include
#include
+#include
namespace Dumux {
@@ -67,8 +68,10 @@ public:
const auto& outsideVolVars = elemVolVars[outsideScv];
// effective diffusion tensors
- auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
- auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
+ auto insideLambda = Deprecated::template effectiveThermalConductivity(
+ insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
+ auto outsideLambda = Deprecated::template effectiveThermalConductivity(
+ outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
// scale by extrusion factor
insideLambda *= insideVolVars.extrusionFactor();
diff --git a/dumux/flux/box/fourierslawnonequilibrium.hh b/dumux/flux/box/fourierslawnonequilibrium.hh
index 4838dfd70907731b310f85c5dbb7e88d200a3835..a969bfc318201b08346f0b214187692f0d3061ed 100644
--- a/dumux/flux/box/fourierslawnonequilibrium.hh
+++ b/dumux/flux/box/fourierslawnonequilibrium.hh
@@ -29,9 +29,11 @@
#include
#include
+#include
#include
+
namespace Dumux {
// forward declaration
@@ -81,8 +83,10 @@ public:
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
- insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
- outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
+ insideLambda += Deprecated::template effectiveThermalConductivity(
+ insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
+ outsideLambda += Deprecated::template effectiveThermalConductivity(
+ outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
}
else
{
diff --git a/dumux/flux/cctpfa/fourierslaw.hh b/dumux/flux/cctpfa/fourierslaw.hh
index de30a6a03c3d58bb1377c3155993eb45cb89a26e..65947081bc5604d24c8ce308236944b324f303e8 100644
--- a/dumux/flux/cctpfa/fourierslaw.hh
+++ b/dumux/flux/cctpfa/fourierslaw.hh
@@ -30,6 +30,8 @@
#include
#include
+#include // effective thermal conductivity interface
+
namespace Dumux {
// forward declaration
@@ -142,11 +144,8 @@ public:
const auto& insideScv = fvGeometry.scv(insideScvIdx);
const auto& insideVolVars = elemVolVars[insideScvIdx];
- const auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars,
- problem.spatialParams(),
- element,
- fvGeometry,
- insideScv);
+ const auto insideLambda = Deprecated::template effectiveThermalConductivity(
+ insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
const Scalar ti = computeTpfaTransmissibility(scvf, insideScv, insideLambda, insideVolVars.extrusionFactor());
// for the boundary (dirichlet) or at branching points we only need ti
@@ -162,11 +161,8 @@ public:
const auto& outsideVolVars = elemVolVars[outsideScvIdx];
const auto outsideElement = fvGeometry.fvGridGeometry().element(outsideScvIdx);
- const auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars,
- problem.spatialParams(),
- outsideElement,
- fvGeometry,
- outsideScv);
+ const auto outsideLambda = Deprecated::template effectiveThermalConductivity(
+ outsideVolVars, problem.spatialParams(), outsideElement, fvGeometry, outsideScv);
Scalar tj;
if (dim == dimWorld)
// assume the normal vector from outside is anti parallel so we save flipping a vector
diff --git a/dumux/flux/cctpfa/fourierslawnonequilibrium.hh b/dumux/flux/cctpfa/fourierslawnonequilibrium.hh
index 1b33d5cab8f1d9c3d3f0a2b8d71888db1810b262..3b478195faaad99f14dd94563bea1e463abe7698 100644
--- a/dumux/flux/cctpfa/fourierslawnonequilibrium.hh
+++ b/dumux/flux/cctpfa/fourierslawnonequilibrium.hh
@@ -24,6 +24,7 @@
#ifndef DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
#define DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH
+#include
#include
#include
#include
@@ -117,7 +118,8 @@ public:
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
- insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
+ insideLambda += Deprecated::template effectiveThermalConductivity(
+ insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv);
}
else //numEnergyEqFluid >1
{
@@ -150,7 +152,8 @@ public:
//when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law
if (numEnergyEqFluid < ModelTraits::numFluidPhases())
{
- outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
+ outsideLambda += Deprecated::template effectiveThermalConductivity(
+ outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv);
}
else
{
diff --git a/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh b/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh
index d749f29544114860c9cb6b62e0861e9f907b3f04..4dfad09861795e370f1d4e6139b697b1f552eb5d 100644
--- a/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh
+++ b/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh
@@ -21,11 +21,12 @@
* \ingroup Fluidmatrixinteractions
* \brief Reation for a simple effective thermal conductivity
*/
-#ifndef THERMALCONDUCTIVITY_AVERAGE_HH
-#define THERMALCONDUCTIVITY_AVERAGE_HH
+#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
+#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_AVERAGE_HH
#include
+#include
namespace Dumux {
@@ -38,30 +39,42 @@ class ThermalConductivityAverage
{
public:
/*!
- * \brief Relation for a simple effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
- *
- * \param volVars volume variables
- * \param spatialParams spatial parameters
- * \param element element (to be passed to spatialParams)
- * \param fvGeometry fvGeometry (to be passed to spatialParams)
- * \param scv scv (to be passed to spatialParams)
- *
- * \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ * \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
*/
- template
+ template
+ DUNE_DEPRECATED_MSG("Signature deprecated. Use signature with volume variables only!")
static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
const SpatialParams& spatialParams,
const Element& element,
const FVGeometry& fvGeometry,
- const SubControlVolume& scv)
+ const typename FVGeometry::SubControlVolume& scv)
+ {
+ return effectiveThermalConductivity(volVars);
+ }
+
+ /*!
+ * \brief Relation for a simple effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ *
+ * \param volVars volume variables
+ * \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ */
+ template
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{
- //Get the thermal conductivities and the porosity from the volume variables
- Scalar lambdaW = volVars.fluidThermalConductivity(0);
- Scalar lambdaSolid = volVars.solidThermalConductivity();
- Scalar porosity = volVars.porosity();
+ constexpr int numFluidPhases = VolumeVariables::numFluidPhases();
- return lambdaSolid*(1-porosity) + lambdaW*porosity;
+ // Get the thermal conductivities and the porosity from the volume variables
+ Scalar lambdaFluid = 0.0;
+ for (int phaseIdx = 0; phaseIdx < numFluidPhases; ++phaseIdx)
+ lambdaFluid += volVars.fluidThermalConductivity(phaseIdx)*volVars.saturation(phaseIdx);
+
+ const Scalar lambdaSolid = volVars.solidThermalConductivity();
+ const Scalar porosity = volVars.porosity();
+
+ return lambdaSolid*(1-porosity) + lambdaFluid*porosity;
}
};
+
} // end namespace Dumux
+
#endif
diff --git a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh
index 44ed8b858e8f1112e9d28c389f4c23e4a8365ab0..f8f74b2fc966961a1d6a97cc5a7a107da4f6839b 100644
--- a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh
+++ b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh
@@ -21,12 +21,14 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective thermal conductivity
*/
-#ifndef THERMALCONDUCTIVITY_JOHANSEN_HH
-#define THERMALCONDUCTIVITY_JOHANSEN_HH
+#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_JOHANSEN_HH
+#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_JOHANSEN_HH
#include
#include
+#include
+
namespace Dumux {
struct JohansenIndices
@@ -65,15 +67,24 @@ template
class ThermalConductivityJohansen
{
public:
+ /*!
+ * \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Johansen (1975) \cite johansen1977
+ */
+ template
+ DUNE_DEPRECATED_MSG("Signature deprecated. Use signature with volume variables only!")
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
+ const SpatialParams& spatialParams,
+ const Element& element,
+ const FVGeometry& fvGeometry,
+ const typename FVGeometry::SubControlVolume& scv)
+ {
+ return effectiveThermalConductivity(volVars);
+ }
+
/*!
* \brief Returns the effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Johansen (1975) \cite johansen1977 .
*
* \param volVars volume variables
- * \param spatialParams spatial parameters
- * \param element element (to be passed to spatialParams)
- * \param fvGeometry fvGeometry (to be passed to spatialParams)
- * \param scv the sub control volume (to be passed to spatialParams)
- *
* \return Effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Johansen (1975) \cite johansen1977
*
* This formulation is semi-empirical and fitted to quartz sand.
@@ -85,13 +96,13 @@ public:
* of Sci. and Technol., Trondheim. (Draft Transl. 637. 1977. U.S. Army
* Corps of Eng., Cold Regions Res. and Eng. Lab., Hanover, NH.) \cite johansen1977
*/
- template
- static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
- const SpatialParams& spatialParams,
- const Element& element,
- const FVGeometry& fvGeometry,
- const SubControlVolume& scv)
+ template
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{
+ using FluidSystem = typename VolumeVariables::FluidSystem;
+ static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!");
+ // TODO: there should be an assertion that the indices are correct and 0 is actually the wetting phase!
+
const Scalar sw = volVars.saturation(Indices::wPhaseIdx);
const Scalar lambdaW = volVars.fluidThermalConductivity(Indices::wPhaseIdx);
const Scalar lambdaN = volVars.fluidThermalConductivity(Indices::nPhaseIdx);
diff --git a/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh b/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh
index cc8c2fe7915a3ef73f5c285fabad8df9ab470139..07cee18245f5e9a193ee6479a72710f6e41fa41b 100644
--- a/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh
+++ b/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh
@@ -21,12 +21,14 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective thermal conductivity
*/
-#ifndef THERMALCONDUCTIVITY_SIMPLE_FLUID_LUMPING_HH
-#define THERMALCONDUCTIVITY_SIMPLE_FLUID_LUMPING_HH
+#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_SIMPLE_FLUID_LUMPING_HH
+#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SIMPLE_FLUID_LUMPING_HH
#include
#include
+#include
+
namespace Dumux {
/*!
@@ -40,29 +42,35 @@ class ThermalConductivitySimpleFluidLumping
public:
/*!
- * \brief Effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
- *
- * \param volVars volume variables
- * \param spatialParams spatial parameters
- * \param element element (to be passed to spatialParams)
- * \param fvGeometry fvGeometry (to be passed to spatialParams)
- * \param scv the sub-control volume
- * \todo TODO: Fix this law for changing wettability
- * \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ * \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
*/
- template
+ template
+ DUNE_DEPRECATED_MSG("Signature deprecated. Use signature with volume variables only!")
static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
const SpatialParams& spatialParams,
const Element& element,
const FVGeometry& fvGeometry,
- SubControlVolume& scv)
+ const typename FVGeometry::SubControlVolume& scv)
+ {
+ return effectiveThermalConductivity(volVars);
+ }
+
+ /*!
+ * \brief Effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ *
+ * \param volVars volume variables
+ * \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
+ * \todo TODO: Fix this law for changing wettability
+ */
+ template
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{
using FluidSystem = typename VolumeVariables::FluidSystem;
- Scalar sw = volVars.saturation(FluidSystem::phase0Idx);
- Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::phase0Idx);
- Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::phase1Idx);
- Scalar lambdaSolid = volVars.solidThermalConductivity();
- Scalar porosity = volVars.porosity();
+ const Scalar sw = volVars.saturation(FluidSystem::phase0Idx);
+ const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::phase0Idx);
+ const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::phase1Idx);
+ const Scalar lambdaSolid = volVars.solidThermalConductivity();
+ const Scalar porosity = volVars.porosity();
return effectiveThermalConductivity(sw, lambdaW, lambdaN, lambdaSolid, porosity);
}
diff --git a/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh b/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh
index 6f1033a355ee0a7ceb9f8141e27d5319d2af5b21..187381ea850daa0a240ca3aaa1ea6ad967f8a600 100644
--- a/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh
+++ b/dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh
@@ -21,12 +21,14 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective thermal conductivity
*/
-#ifndef THERMALCONDUCTIVITY_SOMERTON_HH
-#define THERMALCONDUCTIVITY_SOMERTON_HH
+#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_HH
+#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_HH
#include
#include
+#include
+
namespace Dumux {
/*!
@@ -59,15 +61,24 @@ template
class ThermalConductivitySomerton
{
public:
+ /*!
+ * \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974) \cite somerton1974
+ */
+ template
+ DUNE_DEPRECATED_MSG("Signature deprecated. Use signature with volume variables only!")
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
+ const SpatialParams& spatialParams,
+ const Element& element,
+ const FVGeometry& fvGeometry,
+ const typename FVGeometry::SubControlVolume& scv)
+ {
+ return effectiveThermalConductivity(volVars);
+ }
+
/*!
* \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974) \cite somerton1974
*
* \param volVars volume variables
- * \param spatialParams spatial parameters
- * \param element element (to be passed to spatialParams)
- * \param fvGeometry fvGeometry (to be passed to spatialParams)
- * \param scv the sub control volume (to be passed to spatialParams)
- *
* \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974) \cite somerton1974
*
* This gives an interpolation of the effective thermal conductivities of a porous medium
@@ -76,12 +87,8 @@ public:
* fluid conductivities and interpolated with the square root of the wetting saturation.
* See f.e. Ebigbo, A.: Thermal Effects of Carbon Dioxide Sequestration in the Subsurface, Diploma thesis \cite ebigbo2005 .
*/
- template
- static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
- const SpatialParams& spatialParams,
- const Element& element,
- const FVGeometry& fvGeometry,
- const typename FVGeometry::SubControlVolume& scv)
+ template
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{
using FluidSystem = typename VolumeVariables::FluidSystem;
static_assert(FluidSystem::numPhases == 2, "ThermalConductivitySomerton only works for two-phase fluid systems!");
diff --git a/dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh b/dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh
index 9becaa4597777fcd37e570e1b30d22d08411e978..b66b26e708a930d05235fd5617a81e04f65a2809 100644
--- a/dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh
+++ b/dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh
@@ -21,12 +21,14 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective thermal conductivity
*/
-#ifndef THERMALCONDUCTIVITY_SOMERTON_3P_HH
-#define THERMALCONDUCTIVITY_SOMERTON_3P_HH
+#ifndef DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_3P_HH
+#define DUMUX_MATERIAL_THERMALCONDUCTIVITY_SOMERTON_3P_HH
#include
#include
+#include
+
namespace Dumux {
/*!
@@ -64,14 +66,24 @@ template
class ThermalConductivitySomerton
{
public:
+ /*!
+ * \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974) extended for a three phase system
+ */
+ template
+ DUNE_DEPRECATED_MSG("Signature deprecated. Use signature with volume variables only!")
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
+ const SpatialParams& spatialParams,
+ const Element& element,
+ const FVGeometry& fvGeometry,
+ const typename FVGeometry::SubControlVolume& scv)
+ {
+ return effectiveThermalConductivity(volVars);
+ }
+
/*!
* \brief effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974) extended for a three phase system
*
* \param volVars volume variables
- * \param spatialParams spatial parameters
- * \param element element (to be passed to spatialParams)
- * \param fvGeometry fvGeometry (to be passed to spatialParams)
- * \param scv The sub control volume
*
* \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ after Somerton (1974)
*
@@ -80,22 +92,18 @@ public:
* These two effective conductivities are computed as geometric mean of the solid and the
* fluid conductivities and interpolated with the square root of the wetting saturation.
*/
- template
- static Scalar effectiveThermalConductivity(const VolumeVariables& volVars,
- const SpatialParams& spatialParams,
- const Element& element,
- const FVGeometry& fvGeometry,
- const typename FVGeometry::SubControlVolume& scv)
+ template
+ static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
{
using FluidSystem = typename VolumeVariables::FluidSystem;
- Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
- Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
- Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
- Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
- Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
- Scalar lambdaSolid = volVars.solidThermalConductivity();
- Scalar porosity = volVars.porosity();
+ const Scalar sw = volVars.saturation(FluidSystem::wPhaseIdx);
+ const Scalar sn = volVars.saturation(FluidSystem::nPhaseIdx);
+ const Scalar lambdaW = volVars.fluidThermalConductivity(FluidSystem::wPhaseIdx);
+ const Scalar lambdaN = volVars.fluidThermalConductivity(FluidSystem::nPhaseIdx);
+ const Scalar lambdaG = volVars.fluidThermalConductivity(FluidSystem::gPhaseIdx);
+ const Scalar lambdaSolid = volVars.solidThermalConductivity();
+ const Scalar porosity = volVars.porosity();
return effectiveThermalConductivity(sw, sn, lambdaW, lambdaN, lambdaG, lambdaSolid, porosity);
}
@@ -131,10 +139,10 @@ public:
// const Scalar lSn = 0.65; //pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
// const Scalar lSg = 0.35; //pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
// porosity weighted geometric mean
- Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
- Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
- Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
- Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
+ const Scalar lSw = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaW, porosity);
+ const Scalar lSn = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaN, porosity);
+ const Scalar lSg = pow(lambdaSolid, (1.0 - porosity)) * pow(lambdaG, porosity);
+ const Scalar lambdaEff = lSg + sqrt(satW) * (lSw - lSg) + sqrt(satN) * (lSn -lSg);
return lambdaEff;
diff --git a/dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh b/dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh
index 90690ba4c2513c425da96c40f7b516c66b0cfa06..18678f15770090abc0e81ee566e7c40aa1889924 100644
--- a/dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh
+++ b/dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh
@@ -21,8 +21,8 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective diffusion coefficient
*/
-#ifndef DIFFUSIVITY_CONSTANT_TORTUOSITY_HH
-#define DIFFUSIVITY_CONSTANT_TORTUOSITY_HH
+#ifndef DUMUX_MATERIAL_DIFFUSIVITY_CONSTANT_TORTUOSITY_HH
+#define DUMUX_MATERIAL_DIFFUSIVITY_CONSTANT_TORTUOSITY_HH
#include
diff --git a/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh
index db34ccd7af88f2faa895df3056dc15de6aeada34..57ba6a9d667b6d860af7976dcb478c80f6797929 100644
--- a/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh
+++ b/dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh
@@ -21,8 +21,8 @@
* \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective diffusion coefficient
*/
-#ifndef DIFFUSIVITY_MILLINGTON_QUIRK_HH
-#define DIFFUSIVITY_MILLINGTON_QUIRK_HH
+#ifndef DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH
+#define DUMUX_MATERIAL_DIFFUSIVITY_MILLINGTON_QUIRK_HH
#include
diff --git a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh
index 47162178cd1de6d3671d92ab52fade7437228017..dca966f4e9970a644745bdc7eb5dcc6a6804321e 100644
--- a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh
+++ b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
namespace Dumux {
@@ -423,7 +424,8 @@ protected:
{
using ThermalConductivityModel = GetPropType, Properties::ThermalConductivityModel>;
const auto& problem = this->couplingManager().problem(darcyIdx);
- return ThermalConductivityModel::effectiveThermalConductivity(volVars, problem.spatialParams(), fvGeometry.fvGridGeometry().element(scv), fvGeometry, scv);
+ return Deprecated::template effectiveThermalConductivity(
+ volVars, problem.spatialParams(), fvGeometry.fvGridGeometry().element(scv), fvGeometry, scv);
}
/*!
diff --git a/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh
index 917347ae46ba8f5c65375dde5daa49cd5249da6c..e41a276186676fe7a11455646faf8793d6a7f5a8 100644
--- a/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh
+++ b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh
@@ -172,8 +172,7 @@ public:
const auto densityS = volVars.solidDensity();
const auto heatCapacityS = volVars.solidHeatCapacity();
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
- const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(),
- someElement, someFvGeometry, someScv);
+ const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGridGeometry().gridView()))
diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh
index 144a01b6d0fe6e1c6e992e025e104c7447cde6b6..30c5352e142646ee6d6c0981d8ef32ac8f5f09d6 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh
@@ -194,8 +194,7 @@ public:
const auto densityS = volVars.solidDensity();
const auto heatCapacityS = volVars.solidHeatCapacity();
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
- const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(),
- someElement, someFvGeometry, someScv);
+ const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGridGeometry().gridView()))
diff --git a/test/porousmediumflow/3p/implicit/conduction/problem.hh b/test/porousmediumflow/3p/implicit/conduction/problem.hh
index fa7cf29b59f902886033784f5df71d27728b2bc9..fecb632d9a22f4abc70c523cd946919c35fb4c24 100644
--- a/test/porousmediumflow/3p/implicit/conduction/problem.hh
+++ b/test/porousmediumflow/3p/implicit/conduction/problem.hh
@@ -177,8 +177,7 @@ public:
const auto densityS = volVars.solidDensity();
const auto heatCapacityS = volVars.solidHeatCapacity();
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
- const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(),
- someElement, someFvGeometry, someScv);
+ const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGridGeometry().gridView()))
diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
index 060c2579ebba3ffb9bda4bfa97350c168edf5b5a..5af51fd32bc3c05efc972989c3ffe0c0b88a36b9 100644
--- a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
+++ b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
@@ -171,8 +171,7 @@ public:
const auto densityS =volVars.solidDensity();
const auto heatCapacityS = volVars.solidHeatCapacity();
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
- const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(),
- someElement, someFvGeometry, someScv);
+ const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGridGeometry().gridView()))
diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
index 769708d59699b8acb1706242b4d0c20edd1f9511..fc4d1241c5f128c5db2e9ec91a236211014d03ea 100644
--- a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
+++ b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
@@ -181,8 +181,7 @@ public:
const auto densityS = volVars.solidDensity();
const auto heatCapacityS = volVars.solidHeatCapacity();
const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity);
- const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(),
- someElement, someFvGeometry, someScv);
+ const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars);
using std::max;
time = max(time, 1e-10);
for (const auto& element : elements(this->fvGridGeometry().gridView()))