Skip to content
Snippets Groups Projects
Commit a6719a03 authored by Mathis Kelm's avatar Mathis Kelm Committed by Ned Coltman
Browse files

[flux][staggered] ficks use average density at boundary

parent cff6b1f4
No related branches found
No related tags found
1 merge request!3572Fix/old staggered fluxes
......@@ -115,7 +115,10 @@ public:
if (scvf.boundary())
{
flux[compIdx] = insideDensity * insideDiffCoeff
// When the face lies on a boundary, use the average density
const Scalar outsideDensity = massOrMolarDensity(outsideVolVars, referenceSystem, phaseIdx);
const Scalar avgDensity = 0.5*(insideDensity + outsideDensity);
flux[compIdx] = avgDensity * insideDiffCoeff
* (massOrMoleFractionInside - massOrMoleFractionOutside) / insideDistance;
}
else
......
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