Skip to content
Snippets Groups Projects
Commit 1edd6262 authored by Hanchuan Wu's avatar Hanchuan Wu
Browse files

[pnm][bug-fix] Initialize snapoff-area

parent 93b8b50e
No related branches found
No related tags found
1 merge request!3265[pnm] Prevent negative non-wetting area
Pipeline #20743 waiting for manual action with stages
......@@ -135,12 +135,17 @@ public:
std::accumulate(wettingLayerArea_.begin(), wettingLayerArea_.end(), 0.0),
totalThroatCrossSectionalArea
);
throatCrossSectionalArea_[nPhaseIdx()] = std::max( (totalThroatCrossSectionalArea - throatCrossSectionalArea_[wPhaseIdx()]), 0.0);
throatCrossSectionalArea_[nPhaseIdx()] = totalThroatCrossSectionalArea - throatCrossSectionalArea_[wPhaseIdx()];
regBoundaryWettingThroatAreaInvasion_[0] = std::min(std::accumulate(entryWettingLayerArea_.begin(), entryWettingLayerArea_.end(), 0.0), totalThroatCrossSectionalArea);
regBoundaryWettingThroatAreaInvasion_[1] = std::min(std::accumulate(epsilonEntryWettingLayerArea_.begin(), epsilonEntryWettingLayerArea_.end(), 0.0), totalThroatCrossSectionalArea);
regBoundaryNonwettingThroatAreaInvasion_[0] = std::max( (totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaInvasion_[0]), 0.0);
regBoundaryNonwettingThroatAreaInvasion_[1] = std::max( (totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaInvasion_[1]), 0.0);
regBoundaryNonwettingThroatAreaInvasion_[0] = totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaInvasion_[0];
regBoundaryNonwettingThroatAreaInvasion_[1] = totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaInvasion_[1];
regBoundaryWettingThroatAreaSnapoff_[0] = std::min(std::accumulate(snapoffWettingLayerArea_.begin(), snapoffWettingLayerArea_.end(), 0.0), totalThroatCrossSectionalArea);
regBoundaryWettingThroatAreaSnapoff_[1] = std::min(std::accumulate(epsilonSnapoffWettingLayerArea_.begin(), epsilonSnapoffWettingLayerArea_.end(), 0.0), totalThroatCrossSectionalArea);
regBoundaryNonwettingThroatAreaSnapoff_[0] = totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaSnapoff_[0];
regBoundaryNonwettingThroatAreaSnapoff_[1] = totalThroatCrossSectionalArea - regBoundaryWettingThroatAreaSnapoff_[1];
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
......
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