Skip to content
Snippets Groups Projects
Commit 9ff13b71 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[navierstokesnc] Use an effective diffusion coefficient

parent 39dd9bfb
No related branches found
No related tags found
1 merge request!866Freeflow/ransnc
......@@ -161,7 +161,7 @@ public:
const auto& insideVolVars = elemVolVars[insideScv];
const Scalar insideDistance = (insideScv.dofPosition() - scvf.ipGlobal()).two_norm();
const Scalar insideD = insideVolVars.diffusionCoefficient(phaseIdx, compIdx);
const Scalar insideD = insideVolVars.effectiveDiffusivity(phaseIdx, compIdx);
const Scalar ti = calculateOmega_(insideDistance, insideD, 1.0);
if(scvf.boundary())
......@@ -171,7 +171,7 @@ public:
const auto& outsideScv = fvGeometry.scv(scvf.outsideScvIdx());
const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
const Scalar outsideDistance = (outsideScv.dofPosition() - scvf.ipGlobal()).two_norm();
const Scalar outsideD = outsideVolVars.diffusionCoefficient(phaseIdx, compIdx);
const Scalar outsideD = outsideVolVars.effectiveDiffusivity(phaseIdx, compIdx);
const Scalar tj = calculateOmega_(outsideDistance, outsideD, 1.0);
tij = scvf.area()*(ti * tj)/(ti + tj);
......
......@@ -204,6 +204,14 @@ public:
DUNE_THROW(Dune::InvalidStateException, "Diffusion coefficient called for phaseIdx = compIdx");
}
/*!
* \brief Returns the effective diffusion coefficient \f$\mathrm{[m^2/s]}\f$
*/
Scalar effectiveDiffusivity(int pIdx, int compIdx) const
{
return diffusionCoefficient(pIdx, compIdx);
}
protected:
Implementation &asImp_()
......
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