Commit fc69d153 authored by Timo Koch's avatar Timo Koch
Browse files

[diffusion] Do not store free diffusion coefficient in the volvars

parent c4730fbe
......@@ -103,28 +103,11 @@ public:
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
EnergyVolVars::updateEffectiveThermalConductivity();
// Second instance of a parameter cache.
// Could be avoided if diffusion coefficients also
// became part of the fluid state.
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, 0);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
0,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
}
......@@ -333,13 +316,17 @@ public:
*/
[[deprecated("Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{ return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
{ return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
/*!
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -382,9 +369,6 @@ protected:
private:
PermeabilityType permeability_;
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -139,11 +139,6 @@ public:
ParentType::update(elemSol, problem, element, scv);
asImp_().completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
// Second instance of a parameter cache. Could be avoided if
// diffusion coefficients also became part of the fluid state.
typename FluidSystem::ParameterCache paramCache;
paramCache.updateAll(fluidState_);
using MaterialLaw = typename Problem::SpatialParams::MaterialLaw;
const auto& matParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
......@@ -159,21 +154,11 @@ public:
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
EnergyVolVars::updateEffectiveThermalConductivity();
......@@ -390,13 +375,17 @@ public:
*/
[[deprecated("Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{ return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
{ return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
/*!
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -420,9 +409,6 @@ private:
// Relative permeability within the control volume
std::array<Scalar, ModelTraits::numFluidPhases()> relativePermeability_;
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
......
......@@ -137,11 +137,6 @@ public:
/////////////
// calculate the remaining quantities
/////////////
// Second instance of a parameter cache.
// Could be avoided if diffusion coefficients also
// became part of the fluid state.
typename FluidSystem::ParameterCache paramCache;
paramCache.updateAll(fluidState_);
using MaterialLaw = typename Problem::SpatialParams::MaterialLaw;
const auto& matParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
......@@ -155,21 +150,11 @@ public:
//update porosity before calculating the effective properties depending on it
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
// calculate the remaining quantities
......@@ -458,7 +443,7 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
if (compIdx != phaseIdx)
return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
else
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
}
......@@ -467,7 +452,11 @@ public:
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -509,7 +498,6 @@ private:
Scalar porosity_; // Effective porosity within the control volume
PermeabilityType permeability_; // Effective permeability within the control volume
Scalar mobility_[ModelTraits::numFluidPhases()]; // Effective mobility within the control volume
DiffusionCoefficients diffCoeff_;
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -561,10 +561,6 @@ public:
* We can then add a normalized tensorial component
* e.g. obtained from DTI from the spatial params (currently not implemented)
*/
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::diffusionCoefficient(fluidState_, paramCache, phaseIdx, compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
......@@ -574,7 +570,6 @@ public:
// porosity & permeabilty
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
......@@ -717,7 +712,7 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
if (compIdx != phaseIdx)
return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
else
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
}
......@@ -726,7 +721,11 @@ public:
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::diffusionCoefficient(fluidState_, paramCache, phaseIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -749,7 +748,6 @@ private:
Scalar mobility_[ModelTraits::numFluidPhases()]; //!< Effective mobility within the control volume
Scalar bulkDensTimesAdsorpCoeff_; //!< the basis for calculating adsorbed NAPL
DiffusionCoefficients diffCoeff_;
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -756,20 +756,11 @@ public:
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
if (phaseIdx != nPhaseIdx)
return FluidSystem::diffusionCoefficient(fluidState_, phaseIdx);
else
return 1.e-10;
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
// permeability
......@@ -908,13 +899,18 @@ public:
*/
[[deprecated("Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{ return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
{ return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx); }
/*
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
if (phaseIdx != nPhaseIdx)
return FluidSystem::diffusionCoefficient(fluidState_, phaseIdx);
else
return 1.e-10;
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -960,9 +956,7 @@ private:
Scalar mobility_[numPs]; //!< Effective mobility within the control volume
Scalar bulkDensTimesAdsorpCoeff_; //!< the basis for calculating adsorbed NAPL
/* We need a tensor here !! */
//!< Binary diffusion coefficients of the 3 components in the phases
DiffusionCoefficients diffCoeff_;
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -148,22 +148,11 @@ public:
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
// update the binary diffusion and effective diffusion coefficients
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
EnergyVolVars::updateEffectiveThermalConductivity();
......@@ -473,14 +462,18 @@ public:
if (phaseIdx == compIdx)
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
else
return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
}
/*!
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -504,9 +497,6 @@ private:
// Relative permeability within the control volume
std::array<Scalar, ModelTraits::numFluidPhases()> relativePermeability_;
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -122,23 +122,11 @@ public:
// porosity
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
if constexpr (enableDiffusion)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{ return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx); };
if (enableDiffusion)
{
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
}
......@@ -438,7 +426,7 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
if (compIdx != phaseIdx)
return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
else
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
}
......@@ -447,7 +435,11 @@ public:
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -506,9 +498,6 @@ protected:
FluidState fluidState_;
SolidState solidState_;
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
};
......@@ -585,22 +574,11 @@ public:
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
if constexpr (enableDiffusion)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
if (enableDiffusion)
{
diffCoeff_.update(getDiffusionCoefficient);
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{ return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx); };
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
}
......@@ -955,7 +933,7 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
if (compIdx != phaseIdx)
return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
else
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
}
......@@ -964,7 +942,11 @@ public:
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -1023,8 +1005,6 @@ protected:
FluidState fluidState_;
SolidState solidState_;
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
};
......
......@@ -115,15 +115,6 @@ public:
minPc_ = MaterialLaw::endPointPc(materialParams);
typename FluidSystem::ParameterCache paramCache;
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
......@@ -172,9 +163,6 @@ public:
//binary diffusion coefficients
paramCache.updateAll(fluidState_);
diffCoeff_ = getDiffusionCoefficient(FluidSystem::gasPhaseIdx,
FluidSystem::comp1Idx,
FluidSystem::comp0Idx);
effectiveDiffCoeff_ = getEffectiveDiffusionCoefficient(FluidSystem::gasPhaseIdx,
FluidSystem::comp1Idx,
FluidSystem::comp0Idx);
......@@ -201,9 +189,6 @@ public:
// binary diffusion coefficients
paramCache.updateAll(fluidState_);
diffCoeff_ = getDiffusionCoefficient(FluidSystem::gasPhaseIdx,
FluidSystem::comp1Idx,
FluidSystem::comp0Idx);
effectiveDiffCoeff_ = getEffectiveDiffusionCoefficient(FluidSystem::gasPhaseIdx,
FluidSystem::comp1Idx,
FluidSystem::comp0Idx);
......@@ -223,7 +208,6 @@ public:
massFraction_[FluidSystem::gasPhaseIdx] = 0.0;
// binary diffusion coefficients (none required for liquid phase only)
diffCoeff_ = 0.0;
effectiveDiffCoeff_ = 0.0;
}
}
......@@ -500,7 +484,7 @@ public:
Scalar diffusionCoefficient(int phaseIdx, int compIdx) const
{
assert(enableWaterDiffusionInAir() && phaseIdx == FluidSystem::gasPhaseIdx && compIdx == FluidSystem::comp0Idx);
return diffCoeff_;
return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);
}
/*!
......@@ -511,7 +495,9 @@ public:
assert(enableWaterDiffusionInAir());
assert(phaseIdx == FluidSystem::gasPhaseIdx);
assert(compIIdx != compJIdx);
return diffCoeff_;
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
......@@ -535,9 +521,6 @@ protected:
Scalar massFraction_[numPhases]; //!< The water mass fractions in water and air
Scalar molarDensity_[numPhases]; //!< The molar density of water and air
// Binary diffusion coefficient
Scalar diffCoeff_;
// Effective diffusion coefficients for the phases
Scalar effectiveDiffCoeff_;
......
......@@ -113,21 +113,11 @@ public:
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, 0);
auto getDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return FluidSystem::binaryDiffusionCoefficient(this->fluidState_,
paramCache,
phaseIdx,
compIIdx,
compJIdx);
};
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
return EffDiffModel::effectiveDiffusionCoefficient(*this, phaseIdx, compIIdx, compJIdx);
};
diffCoeff_.update(getDiffusionCoefficient);
effectiveDiffCoeff_.update(getEffectiveDiffusionCoefficient);
// calculate the remaining quantities
......@@ -412,13 +402,17 @@ public:
*/
[[deprecated("Will be removed after release 3.2. Use diffusionCoefficient(phaseIdx, compIIdx, compJIdx)!")]]
Scalar diffusionCoefficient(const int phaseIdx, const int compIdx) const
{ return diffCoeff_(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);}
{ return diffusionCoefficient(phaseIdx, FluidSystem::getMainComponent(phaseIdx), compIdx);}
/*!
* \brief Returns the binary diffusion coefficients for a phase in \f$[m^2/s]\f$.
*/
Scalar diffusionCoefficient(int phaseIdx, int compIIdx, int compJIdx) const
{ return diffCoeff_(phaseIdx, compIIdx, compJIdx); }
{
typename FluidSystem::ParameterCache paramCache;
paramCache.updatePhase(fluidState_, phaseIdx);
return FluidSystem::binaryDiffusionCoefficient(fluidState_, paramCache, phaseIdx, compIIdx, compJIdx);
}
/*!
* \brief Returns the effective diffusion coefficients for a phase in \f$[m^2/s]\f$.
......@@ -430,9 +424,6 @@ protected:
FluidState fluidState_; //!< the fluid state
private:
// Binary diffusion coefficient
DiffusionCoefficients diffCoeff_;
// Effective diffusion coefficients for the phases
DiffusionCoefficients effectiveDiffCoeff_;
......
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