Skip to content
Snippets Groups Projects
Commit 29f9f790 authored by Ned Coltman's avatar Ned Coltman
Browse files

[fluidmatrixinterations] clean up simple fluid lumping law

parent 9f0220cf
No related branches found
No related tags found
1 merge request!1684Improve effective laws
...@@ -32,19 +32,16 @@ namespace Dumux { ...@@ -32,19 +32,16 @@ namespace Dumux {
/*! /*!
* \ingroup Fluidmatrixinteractions * \ingroup Fluidmatrixinteractions
* \brief Relation for the saturation-dependent effective thermal conductivity * \brief Relation for the saturation-dependent effective thermal conductivity
* \todo This shouldn't depend on TypeTag!!
*/ */
template<class Scalar, int numEnergyEquationsFluid> template<class Scalar>
class ThermalConductivitySimpleFluidLumping class ThermalConductivitySimpleFluidLumping
{ {
public: public:
/*! /*!
* \brief Effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ * \brief Effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
* *
* \param volVars volume variables * \param volVars volume variables
* \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$ * \return effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$
* \todo TODO: Fix this law for changing wettability
*/ */
template<class VolumeVariables> template<class VolumeVariables>
static Scalar effectiveThermalConductivity(const VolumeVariables& volVars) static Scalar effectiveThermalConductivity(const VolumeVariables& volVars)
...@@ -56,9 +53,10 @@ public: ...@@ -56,9 +53,10 @@ public:
const Scalar lambdaSolid = volVars.solidThermalConductivity(); const Scalar lambdaSolid = volVars.solidThermalConductivity();
const Scalar porosity = volVars.porosity(); const Scalar porosity = volVars.porosity();
return effectiveThermalConductivity(sw, lambdaW, lambdaN, lambdaSolid, porosity); return effectiveThermalConductivity_(sw, lambdaW, lambdaN, lambdaSolid, porosity);
} }
private:
/*! /*!
* \brief Returns the effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$. * \brief Returns the effective thermal conductivity \f$\mathrm{[W/(m K)]}\f$.
* *
...@@ -67,36 +65,19 @@ public: ...@@ -67,36 +65,19 @@ public:
* \param lambdaN The thermal conductivity of the non-wetting phase in \f$\mathrm{[W/(m K)]}\f$ * \param lambdaN The thermal conductivity of the non-wetting phase in \f$\mathrm{[W/(m K)]}\f$
* \param lambdaSolid The thermal conductivity of the solid phase in \f$\mathrm{[W/(m K)]}\f$ * \param lambdaSolid The thermal conductivity of the solid phase in \f$\mathrm{[W/(m K)]}\f$
* \param porosity The porosity * \param porosity The porosity
* \param rhoSolid The density of the solid phase in \f$\mathrm{[kg/m^3]}\f$
* *
* \return Effective thermal conductivity of the fluid phases * \return Effective thermal conductivity of the fluid phases
*/ */
static Scalar effectiveThermalConductivity(const Scalar sw, static Scalar effectiveThermalConductivity_(const Scalar sw,
const Scalar lambdaW, const Scalar lambdaW,
const Scalar lambdaN, const Scalar lambdaN,
const Scalar lambdaSolid, const Scalar lambdaSolid,
const Scalar porosity, const Scalar porosity)
const Scalar rhoSolid = 0.0 /*unused*/)
{ {
assert(numEnergyEquationsFluid != 2) ;
// Franz Lindner / Shi & Wang 2011 // Franz Lindner / Shi & Wang 2011
using std::max; using std::max;
const Scalar satW = max<Scalar>(0.0, sw); const Scalar satW = max<Scalar>(0.0, sw);
return porosity * ( (1. - satW) * lambdaN + satW * lambdaW ) + (1.0 - porosity) * lambdaSolid ; ; // arithmetic
const Scalar kfeff = porosity *((1.-satW)*lambdaN + satW*lambdaW) ; // arithmetic
Scalar keff ;
if (numEnergyEquationsFluid == 1){ // solid dealed with individually (extra balance equation)
keff = kfeff ;
}
else {
const Scalar kseff = (1.0-porosity) * lambdaSolid ;
keff = kfeff + kseff;
}
return keff ;
} }
}; };
} // end namespace Dumux } // end namespace Dumux
......
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
#include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh> #include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh>
#include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh> #include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysimplefluidlumping.hh>
#include "volumevariables.hh" #include "volumevariables.hh"
namespace Dumux { namespace Dumux {
...@@ -281,15 +280,11 @@ public: ...@@ -281,15 +280,11 @@ public:
using type = TwoPTwoCUnconstrainedModelTraits<EquilibriumTraits>; using type = TwoPTwoCUnconstrainedModelTraits<EquilibriumTraits>;
}; };
//! In case we do not assume full thermal non-equilibrium (e.g. only an energy balance for the solid phase and a fluid mixture) one needs a law for calculating the thermal conductivity of the fluid mixture //! In case we do not assume full thermal non-equilibrium (e.g. only an energy balance for the solid phase and a fluid mixture)
//! one needs a law for calculating the thermal conductivity of the fluid mixture
template<class TypeTag> template<class TypeTag>
struct ThermalConductivityModel<TypeTag, TTag::TwoPTwoCNonEquil> struct ThermalConductivityModel<TypeTag, TTag::TwoPTwoCNonEquil>
{ { using type = ThermalConductivitySimpleFluidLumping<GetPropType<TypeTag, Properties::Scalar>>; };
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = ThermalConductivitySimpleFluidLumping<Scalar, getPropValue<TypeTag, Properties::NumEnergyEqFluid>()>;
};
//! Use the nonequilibrium volume variables together with the 2p2c vol vars //! Use the nonequilibrium volume variables together with the 2p2c vol vars
template<class TypeTag> template<class TypeTag>
...@@ -398,7 +393,8 @@ public: ...@@ -398,7 +393,8 @@ public:
//! Somerton is used as default model to compute the effective thermal heat conductivity //! Somerton is used as default model to compute the effective thermal heat conductivity
template<class TypeTag> template<class TypeTag>
struct ThermalConductivityModel<TypeTag, TTag::TwoPTwoCNINonEquil> { using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; }; struct ThermalConductivityModel<TypeTag, TTag::TwoPTwoCNINonEquil>
{ using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; };
} // end namespace Properties } // end namespace Properties
} // end namespace Dumux } // end namespace Dumux
......
...@@ -328,7 +328,7 @@ private: ...@@ -328,7 +328,7 @@ private:
using EDM = GetPropType<TypeTag, Properties::EffectiveDiffusivityModel>; using EDM = GetPropType<TypeTag, Properties::EffectiveDiffusivityModel>;
using BaseTraits = MPNCVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT, DT, EDM>; using BaseTraits = MPNCVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT, DT, EDM>;
using ETCM = GetPropType< TypeTag, Properties:: ThermalConductivityModel>; using ETCM = GetPropType< TypeTag, Properties::ThermalConductivityModel>;
template<class BaseTraits, class ETCM> template<class BaseTraits, class ETCM>
struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; }; struct NITraits : public BaseTraits { using EffectiveThermalConductivityModel = ETCM; };
public: public:
...@@ -338,12 +338,7 @@ public: ...@@ -338,12 +338,7 @@ public:
//! Somerton is used as default model to compute the effective thermal heat conductivity //! Somerton is used as default model to compute the effective thermal heat conductivity
template<class TypeTag> template<class TypeTag>
struct ThermalConductivityModel<TypeTag, TTag::MPNCNI> struct ThermalConductivityModel<TypeTag, TTag::MPNCNI>
{ { using type = ThermalConductivitySomerton<GetPropType<TypeTag, Properties::Scalar>>; };
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = ThermalConductivitySomerton<Scalar>;
};
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Properties for the non-equilibrium mpnc model // Properties for the non-equilibrium mpnc model
...@@ -392,12 +387,7 @@ public: ...@@ -392,12 +387,7 @@ public:
//! in case we do not assume full non-equilibrium one needs a thermal conductivity //! in case we do not assume full non-equilibrium one needs a thermal conductivity
template<class TypeTag> template<class TypeTag>
struct ThermalConductivityModel<TypeTag, TTag::MPNCNonequil> struct ThermalConductivityModel<TypeTag, TTag::MPNCNonequil>
{ { using type = ThermalConductivitySimpleFluidLumping<GetPropType<TypeTag, Properties::Scalar>>; };
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = ThermalConductivitySimpleFluidLumping<Scalar, getPropValue<TypeTag, Properties::NumEnergyEqFluid>()>;
};
//! use the mineralization volume variables together with the 2pnc vol vars //! use the mineralization volume variables together with the 2pnc vol vars
template<class TypeTag> template<class TypeTag>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment