mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt RelpermDiagnostics to single phase systems
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user