Merge pull request #2464 from joakim-hove/relperm-diag-no-deck

Relperm diag no deck
This commit is contained in:
Joakim Hove
2020-03-16 13:28:44 +01:00
committed by GitHub
5 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -564,7 +564,7 @@ protected:
if (enableExperiments) {
Opm::RelpermDiagnostics relpermDiagnostics;
relpermDiagnostics.diagnosis(*eclState_, *deck_, asImp_().grid());
relpermDiagnostics.diagnosis(*eclState_, asImp_().grid());
}
}
private:
@@ -29,7 +29,6 @@
#include <opm/common/utility/numeric/linearInterpolation.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp>
@@ -52,11 +51,9 @@ namespace Opm {
///eclipse data file. Errors and warings will be
///output if they're found.
///\param[in] eclState eclipse state.
///\param[in] deck ecliplise data file.
///\param[in] grid unstructured grid.
template <class GridT>
void diagnosis(const EclipseState& eclState,
const Deck& deck,
const GridT& grid);
private:
@@ -95,8 +92,7 @@ namespace Opm {
void unscaledEndPointsCheck_(const EclipseState& eclState);
template <class GridT>
void scaledEndPointsCheck_(const Deck& deck,
const EclipseState& eclState,
void scaledEndPointsCheck_(const EclipseState& eclState,
const GridT& grid);
///For every table, need to deal with case by case.
@@ -33,7 +33,6 @@ namespace Opm {
template <class GridT>
void RelpermDiagnostics::diagnosis(const Opm::EclipseState& eclState,
const Opm::Deck& deck,
const GridT& grid)
{
OpmLog::info("\n===============Saturation Functions Diagnostics===============\n");
@@ -41,12 +40,11 @@ namespace Opm {
satFamilyCheck_(eclState);
tableCheck_(eclState);
unscaledEndPointsCheck_(eclState);
scaledEndPointsCheck_(deck, eclState, grid);
scaledEndPointsCheck_(eclState, grid);
}
template <class GridT>
void RelpermDiagnostics::scaledEndPointsCheck_(const Deck& deck,
const EclipseState& eclState,
void RelpermDiagnostics::scaledEndPointsCheck_(const EclipseState& eclState,
const GridT& grid)
{
// All end points are subject to round-off errors, checks should account for it
@@ -55,6 +53,7 @@ namespace Opm {
const auto& global_cell = Opm::UgGridHelpers::globalCell(grid);
const auto dims = Opm::UgGridHelpers::cartDims(grid);
const auto& compressedToCartesianIdx = Opm::compressedToCartesian(nc, global_cell);
const bool threepoint = eclState.runspec().endpointScaling().threepoint();
scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties(eclState, false);
const std::string tag = "Scaled endpoints";
@@ -85,7 +84,7 @@ namespace Opm {
OpmLog::warning(tag, msg);
}
if (deck.hasKeyword("SCALECRS") && fluidSystem_ == FluidSystem::BlackOil) {
if (threepoint && fluidSystem_ == FluidSystem::BlackOil) {
// Mobilility check.
if ((scaledEpsInfo_[c].Sowcr + scaledEpsInfo_[c].Swcr) >= (1.0 + tolerance)) {
const std::string msg = "For scaled endpoints input, cell" + cellIdx + " SATNUM = " + satnumIdx + ", SOWCR + SWCR exceed 1.0";
+1 -1
View File
@@ -456,7 +456,7 @@ namespace Opm
static_cast<ParallelEclipseState&>(this->eclState()).switchToGlobalProps();
#endif
}
diagnostic.diagnosis(eclState(), deck(), this->grid());
diagnostic.diagnosis(eclState(), this->grid());
if (mpi_size_ > 1) {
#if HAVE_MPI
this->grid().switchToDistributedView();
+1 -1
View File
@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(diagnosis)
std::shared_ptr<CounterLog> counterLog = std::make_shared<CounterLog>(Log::DefaultMessageTypes);
OpmLog::addBackend( "COUNTERLOG" , counterLog );
RelpermDiagnostics diagnostics;
diagnostics.diagnosis(eclState, deck, grid);
diagnostics.diagnosis(eclState, grid);
BOOST_CHECK_EQUAL(1, counterLog->numMessages(Log::MessageType::Warning));
}
BOOST_AUTO_TEST_SUITE_END()