changed: remove EclProblem::checkDeckCompatibility

these checks are disabled and do not add anything new,
as the checks of value here are also performed elsewhere
This commit is contained in:
Arne Morten Kvarving
2022-11-23 10:58:33 +01:00
parent 8fc13d4bef
commit 473598c791
3 changed files with 0 additions and 123 deletions

View File

@@ -446,80 +446,6 @@ beginTimeStep_(bool enableExperiments,
maxDRv_[pvtRegionIdx] = oilVaporizationControl.getMaxDRVDT(pvtRegionIdx)*timeStepSize;
}
template<class GridView, class FluidSystem, class Scalar>
void EclGenericProblem<GridView,FluidSystem,Scalar>::
checkDeckCompatibility_(const Deck& deck,
bool enableApiTracking,
bool enableSolvent,
bool enablePolymer,
bool enableExtbo,
bool enableEnergy,
int numPhases,
bool indicesGasEnabled,
bool indicesOilEnabled,
bool indicesWaterEnabled,
bool enableMICP) const
{
if (enableApiTracking)
throw std::logic_error("API tracking is not yet implemented but requested at compile time.");
if (!enableApiTracking && deck.hasKeyword("API"))
throw std::logic_error("The simulator is build with API tracking disabled, but API tracking is requested by the deck.");
if (enableSolvent && !deck.hasKeyword("SOLVENT"))
throw std::runtime_error("The simulator requires the solvent option to be enabled, but the deck does not.");
else if (!enableSolvent && deck.hasKeyword("SOLVENT"))
throw std::runtime_error("The deck enables the solvent option, but the simulator is compiled without it.");
if (enablePolymer && !deck.hasKeyword("POLYMER"))
throw std::runtime_error("The simulator requires the polymer option to be enabled, but the deck does not.");
else if (!enablePolymer && deck.hasKeyword("POLYMER"))
throw std::runtime_error("The deck enables the polymer option, but the simulator is compiled without it.");
if (enableMICP && !deck.hasKeyword("MICP"))
throw std::runtime_error("The simulator requires the MICP option to be enabled, but the deck does not.");
else if (!enableMICP && deck.hasKeyword("MICP"))
throw std::runtime_error("The deck enables the MICP option, but the simulator is compiled without it.");
if (enableExtbo && !deck.hasKeyword("PVTSOL"))
throw std::runtime_error("The simulator requires the extendedBO option to be enabled, but the deck does not.");
else if (!enableExtbo && deck.hasKeyword("PVTSOL"))
throw std::runtime_error("The deck enables the extendedBO option, but the simulator is compiled without it.");
if (deck.hasKeyword("TEMP") && deck.hasKeyword("THERMAL"))
throw std::runtime_error("The deck enables both, the TEMP and the THERMAL options, but they are mutually exclusive.");
bool deckEnergyEnabled = (deck.hasKeyword("TEMP") || deck.hasKeyword("THERMAL"));
if (enableEnergy && !deckEnergyEnabled)
throw std::runtime_error("The simulator requires the TEMP or the THERMAL option to be enabled, but the deck activates neither.");
else if (!enableEnergy && deckEnergyEnabled)
throw std::runtime_error("The deck enables the TEMP or the THERMAL option, but the simulator is not compiled to support either.");
if (deckEnergyEnabled && deck.hasKeyword("TEMP"))
std::cerr << "WARNING: The deck requests the TEMP option, i.e., treating energy "
<< "conservation as a post processing step. This is currently unsupported, "
<< "i.e., energy conservation is always handled fully implicitly." << std::endl;
int numDeckPhases = FluidSystem::numActivePhases();
if (numDeckPhases < numPhases)
std::cerr << "WARNING: The number of active phases specified by the deck ("
<< numDeckPhases << ") is smaller than the number of compiled-in phases ("
<< numPhases << "). This usually results in a significant "
<< "performance degradation compared to using a specialized simulator." << std::endl;
else if (numDeckPhases < numPhases)
throw std::runtime_error("The deck enables "+std::to_string(numDeckPhases)+" phases "
"while this simulator can only handle "+
std::to_string(numPhases)+".");
// make sure that the correct phases are active
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) && !indicesOilEnabled)
throw std::runtime_error("The deck enables oil, but this simulator cannot handle it.");
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx) && !indicesGasEnabled)
throw std::runtime_error("The deck enables gas, but this simulator cannot handle it.");
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx) && !indicesWaterEnabled)
throw std::runtime_error("The deck enables water, but this simulator cannot handle it.");
// the opposite cases should be fine (albeit a bit slower than what's possible)
}
template<class GridView, class FluidSystem, class Scalar>
void EclGenericProblem<GridView,FluidSystem,Scalar>::
initFluidSystem_()

View File

@@ -280,19 +280,6 @@ protected:
Scalar timeStepSize,
Scalar endTime);
void checkDeckCompatibility_(const Deck& deck,
bool enableApiTracking,
bool enableSolvent,
bool enablePolymer,
bool enableExtbo,
bool enableEnergy,
int numPhases,
bool indicesGasEnabled,
bool indicesOilEnabled,
bool indicesWaterEnabled,
bool enableMICP) const;
void readRockParameters_(const std::vector<Scalar>& cellCenterDepths);
void readRockCompactionParameters_();

View File

@@ -912,42 +912,6 @@ public:
drift_ = 0.0;
}
if constexpr (enableExperiments)
{
int success = 1;
const auto& cc = simulator.vanguard().grid().comm();
try
{
// Only rank 0 has the deck and hence can do the checks!
if (cc.rank() == 0)
this->checkDeckCompatibility_(simulator.vanguard().deck(),
enableApiTracking,
enableSolvent,
enablePolymer,
enableExtbo,
enableEnergy,
Indices::numPhases,
Indices::gasEnabled,
Indices::oilEnabled,
Indices::waterEnabled,
enableMICP);
}
catch(const std::exception& e)
{
success = 0;
success = cc.min(success);
throw;
}
success = cc.min(success);
if (!success)
{
throw std::runtime_error("Checking deck compatibility failed");
}
}
// write the static output files (EGRID, INIT, SMSPEC, etc.)
if (enableEclOutput_) {
if (simulator.vanguard().grid().comm().size() > 1) {