Commit 64cde4f6 authored by Katharina Heck's avatar Katharina Heck Committed by Ned Coltman
Browse files

[tracer] add effective laws in volvars to and adapt volvar traits

parent 483eabae
......@@ -94,7 +94,7 @@ struct TracerModelTraits
* \tparam FSY The fluid system type
* \tparam MT The model traits
*/
template<class PV, class FSY, class SSY, class SST, class MT>
template<class PV, class FSY, class SSY, class SST, class MT, class EDM>
struct TracerVolumeVariablesTraits
{
using PrimaryVariables = PV;
......@@ -102,6 +102,7 @@ struct TracerVolumeVariablesTraits
using SolidSystem = SSY;
using SolidState = SST;
using ModelTraits = MT;
using EffectiveDiffusivityModel = EDM;
};
// \{
......@@ -153,8 +154,9 @@ private:
using SSY = GetPropType<TypeTag, Properties::SolidSystem>;
using SST = GetPropType<TypeTag, Properties::SolidState>;
using MT = GetPropType<TypeTag, Properties::ModelTraits>;
using EDM = GetPropType<TypeTag, Properties::EffectiveDiffusivityModel>;
using Traits = TracerVolumeVariablesTraits<PV, FSY, SSY, SST, MT>;
using Traits = TracerVolumeVariablesTraits<PV, FSY, SSY, SST, MT, EDM>;
public:
using type = TracerVolumeVariables<Traits>;
};
......
......@@ -57,6 +57,7 @@ class TracerVolumeVariables
using ParentType = PorousMediumFlowVolumeVariables<Traits>;
using Scalar = typename Traits::PrimaryVariables::value_type;
static constexpr bool useMoles = Traits::ModelTraits::useMoles();
using EffDiffModel = typename Traits::EffectiveDiffusivityModel;
public:
//! Export fluid system type
......@@ -93,6 +94,7 @@ public:
{
moleOrMassFraction_[compIdx] = this->priVars()[compIdx];
diffCoeff_[compIdx] = FluidSystem::binaryDiffusionCoefficient(compIdx, problem, element, scv);
effectiveDiffCoeff_[compIdx] = EffDiffModel::effectiveDiffusivity(*this, diffCoeff_[compIdx] ,0 /*phaseIdx*/);
}
}
......@@ -188,6 +190,14 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{ return diffCoeff_[compIdx]; }
/*!
* \brief Returns the effective diffusion coefficients
*/
Scalar effectiveDiffusivity(int phaseIdx, int compIdx) const
{
return effectiveDiffCoeff_[compIdx];
}
// /*!
// * \brief Returns the dispersivity of the fluid's streamlines.
// * \todo implement me
......@@ -237,6 +247,7 @@ protected:
// DispersivityType dispersivity_;
std::array<Scalar, ParentType::numFluidComponents()> diffCoeff_;
std::array<Scalar, ParentType::numFluidComponents()> effectiveDiffCoeff_;
std::array<Scalar, ParentType::numFluidComponents()> moleOrMassFraction_;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment