adapt RelpermDiagnostics to single phase systems

This commit is contained in:
Tor Harald Sandve
2021-01-26 15:20:47 +01:00
parent c145722798
commit d4f5398af6
3 changed files with 24 additions and 3 deletions

View File

@@ -37,7 +37,7 @@
namespace Opm{
void RelpermDiagnostics::phaseCheck_(const EclipseState& es)
bool RelpermDiagnostics::phaseCheck_(const EclipseState& es)
{
const auto& phases = es.runspec().phases();
bool hasWater = phases.active( Phase::WATER );
@@ -45,6 +45,23 @@ namespace Opm{
bool hasOil = phases.active( Phase::OIL );
bool hasSolvent = phases.active( Phase::SOLVENT );
if (hasWater && !hasGas && !hasOil && !hasSolvent) {
const std::string msg = "System: Single phase Water system. Nothing to check";
OpmLog::info(msg);
return false;
}
if (!hasWater && hasGas && !hasOil && !hasSolvent) {
const std::string msg = "System: Single phase Gas system. Nothing to check";
OpmLog::info(msg);
return false;
}
if (!hasWater && !hasGas && hasOil && !hasSolvent) {
const std::string msg = "System: Single phase Oil system. Nothing to check";
OpmLog::info(msg);
return false;
}
if (hasWater && hasGas && !hasOil && !hasSolvent) {
const std::string msg = "System: Water-Gas system.";
OpmLog::info(msg);
@@ -70,6 +87,7 @@ namespace Opm{
OpmLog::info(msg);
fluidSystem_ = FluidSystem::Solvent;
}
return true;
}

View File

@@ -80,7 +80,8 @@ namespace Opm {
///Check the phase that used.
void phaseCheck_(const EclipseState& es);
/// return false if one-phase system
bool phaseCheck_(const EclipseState& es);
///Check saturation family I and II.
void satFamilyCheck_(const EclipseState& eclState);

View File

@@ -36,7 +36,9 @@ namespace Opm {
const CartesianIndexMapper& cartesianIndexMapper)
{
OpmLog::info("\n===============Saturation Functions Diagnostics===============\n");
phaseCheck_(eclState);
bool doDiagnostics = phaseCheck_(eclState);
if (!doDiagnostics) // no diagnostics needed for single phase problems
return;
satFamilyCheck_(eclState);
tableCheck_(eclState);
unscaledEndPointsCheck_(eclState);