Commit 5eaf8248 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[mpfa][darcyslaw] fix gravity calculation on boundaries

parent 216bf79b
......@@ -78,9 +78,15 @@ public:
const auto& volVarsPositions = fluxVarsCache.advectionVolVarsPositions(phaseIdx);
const auto& tij = fluxVarsCache.advectionTij(phaseIdx);
Scalar rho = elemVolVars[scvf.outsideScvIdx()].density(phaseIdx);
rho += elemVolVars[scvf.insideScvIdx()].density(phaseIdx);
rho /= 2.0;
Scalar rho;
if (!scvf.boundary())
{
rho = elemVolVars[scvf.outsideScvIdx()].density(phaseIdx);
rho += elemVolVars[scvf.insideScvIdx()].density(phaseIdx);
rho /= 2.0;
}
else
rho = elemVolVars[scvf.outsideScvIdx()].density(phaseIdx);
// calculate Tij*pj
Scalar flux(0.0);
......
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