Skip to content
Snippets Groups Projects
Commit 7cc3b95b authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

Merge branch 'fix/clamp-negative-nonwetting-phase-cross-sectional-area' into 'master'

[pnm][2p][fluxVarCache] wetting phase cross sectional area can not be larger...

See merge request !2997
parents 17e939f7 06c98c39
No related branches found
No related tags found
1 merge request!2997[pnm][2p][fluxVarCache] wetting phase cross sectional area can not be larger...
Pipeline #13041 passed
+3
......@@ -83,6 +83,11 @@ public:
wettingLayerArea_[i] = Throat::wettingLayerCrossSectionalArea(curvatureRadius(), theta, cornerHalfAngles[i]);
throatCrossSectionalArea_[wPhaseIdx()] = std::accumulate(wettingLayerArea_.begin(), wettingLayerArea_.end(), 0.0);
if (const Scalar totalArea = spatialParams.throatCrossSectionalArea(element, elemVolVars); throatCrossSectionalArea_[wPhaseIdx()] > totalArea)
{
std::cout << "\n\n *** WARNING : Sum of wetting phase layer areas exceeds total throat cross-sectional area. Clamping the result. *** \n" << std::endl;
throatCrossSectionalArea_[wPhaseIdx()] = totalArea;
}
throatCrossSectionalArea_[nPhaseIdx()] = spatialParams.throatCrossSectionalArea(element, elemVolVars) - throatCrossSectionalArea_[wPhaseIdx()];
}
else // single-phase flow
......
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