mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#11396 RelPerm: Remove display of KROG curve if no gas is present
This commit is contained in:
parent
6e74fa98c0
commit
a993841671
@ -737,6 +737,28 @@ std::vector<RigFlowDiagSolverInterface::RelPermCurve> RigFlowDiagSolverInterface
|
||||
return retCurveArr;
|
||||
}
|
||||
|
||||
// For unknown reasons, the ECLSaturationFunc returns a KROG curve when there is no gas in the system.
|
||||
// Remove invalid KROG curve if no KRG curve is present
|
||||
// https://github.com/OPM/ResInsight/issues/11396
|
||||
|
||||
bool hasKRG = false;
|
||||
for ( const RelPermCurve& curve : retCurveArr )
|
||||
{
|
||||
if ( curve.ident == RelPermCurve::KRG )
|
||||
{
|
||||
hasKRG = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !hasKRG )
|
||||
{
|
||||
retCurveArr.erase( std::remove_if( retCurveArr.begin(),
|
||||
retCurveArr.end(),
|
||||
[]( const RelPermCurve& curve ) { return curve.ident == RelPermCurve::KROG; } ),
|
||||
retCurveArr.end() );
|
||||
}
|
||||
|
||||
return retCurveArr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user