#2249 Summary Plot Editor. Support for plotting individual aquifers

This commit is contained in:
Bjørn Erik Jensen 2017-12-12 15:09:52 +01:00
parent 17ece26929
commit 6ffcb703fd
10 changed files with 68 additions and 15 deletions

View File

@ -280,6 +280,7 @@ RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot*
"",
-1,
-1,
-1,
-1);
if (!gridSummaryCase->summaryReader()->hasAddress(addr))

View File

@ -88,6 +88,9 @@ RifEclipseSummaryAddress::RifEclipseSummaryAddress(SummaryVarCategory category,
m_cellJ = std::get<1>(ijkTuple);
m_cellK = std::get<2>(ijkTuple);
break;
case SUMMARY_AQUIFER:
m_aquiferNumber = RiaStdStringTools::toInt(identifiers[INPUT_AQUIFER_NUMBER]);
break;
}
// Set quantity for all categories
@ -195,6 +198,11 @@ std::string RifEclipseSummaryAddress::uiText() const
text += ":" + formatUiTextIJK();
}
break;
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
{
text += ":" + std::to_string(this->aquiferNumber());
}
break;
}
return text;
@ -214,6 +222,7 @@ std::string RifEclipseSummaryAddress::uiText(RifEclipseSummaryAddress::SummaryId
case RifEclipseSummaryAddress::INPUT_CELL_IJK: return formatUiTextIJK();
case RifEclipseSummaryAddress::INPUT_LGR_NAME: return lgrName();
case RifEclipseSummaryAddress::INPUT_SEGMENT_NUMBER: return std::to_string(wellSegmentNumber());
case RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER: return std::to_string(aquiferNumber());
case RifEclipseSummaryAddress::INPUT_VECTOR_NAME: return quantityName();
}
return "";
@ -283,6 +292,10 @@ bool RifEclipseSummaryAddress::isValid() const
if (m_cellJ == -1) return false;
if (m_cellK == -1) return false;
return true;
case SUMMARY_AQUIFER:
if (m_aquiferNumber == -1) return false;
return true;
}
return true;
@ -409,7 +422,11 @@ bool operator==(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAd
if(first.cellK() != second.cellK()) return false;
}
break;
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
{
if (first.aquiferNumber() != second.aquiferNumber()) return false;
}
break;
}
return true;
}
@ -489,6 +506,11 @@ bool operator<(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAdd
if(first.cellK() != second.cellK()) return (first.cellK() < second.cellK());
}
break;
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
{
if (first.aquiferNumber() != second.aquiferNumber()) return first.aquiferNumber() < second.aquiferNumber();
}
break;
}
return false;

View File

@ -59,7 +59,8 @@ public:
INPUT_CELL_IJK,
INPUT_LGR_NAME,
INPUT_SEGMENT_NUMBER,
INPUT_VECTOR_NAME
INPUT_AQUIFER_NUMBER,
INPUT_VECTOR_NAME,
};
public:
@ -71,7 +72,8 @@ public:
m_wellSegmentNumber(-1),
m_cellI(-1),
m_cellJ(-1),
m_cellK(-1)
m_cellK(-1),
m_aquiferNumber(-1)
{
}
@ -85,7 +87,8 @@ public:
const std::string& lgrName,
int cellI,
int cellJ,
int cellK):
int cellK,
int aquiferNumber):
m_variableCategory(category),
m_quantityName(quantityName),
m_regionNumber(regionNumber),
@ -96,7 +99,8 @@ public:
m_lgrName(lgrName),
m_cellI(cellI),
m_cellJ(cellJ),
m_cellK(cellK)
m_cellK(cellK),
m_aquiferNumber(aquiferNumber)
{
}
@ -124,6 +128,7 @@ public:
int cellI() const { return m_cellI; }
int cellJ() const { return m_cellJ; }
int cellK() const { return m_cellK; }
int aquiferNumber() const { return m_aquiferNumber; }
// Derived properties
@ -135,6 +140,7 @@ public:
void setWellName(const std::string& wellName) { m_wellName = wellName; }
void setWellGroupName(const std::string& wellGroupName) { m_wellGroupName = wellGroupName; }
void setRegion(int region) { m_regionNumber = region; }
void setAquiferNumber(int aquiferNumber) { m_aquiferNumber = aquiferNumber; }
private:
@ -154,6 +160,7 @@ private:
int m_cellI;
int m_cellJ;
int m_cellK;
int m_aquiferNumber;
};
bool operator==(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second);

View File

@ -167,13 +167,20 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress(cons
int cellI = -1;
int cellJ = -1;
int cellK = -1;
int aquiferNumber = -1;
switch (category)
{
case RifEclipseSummaryAddress::SUMMARY_FIELD:
break;
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
{
if (columnHeaderText.size() > 0)
{
aquiferNumber = RiaStdStringTools::toInt(columnHeaderText[0]);
}
break;
}
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
break;
case RifEclipseSummaryAddress::SUMMARY_MISC:
@ -268,7 +275,8 @@ RifEclipseSummaryAddress RifEclipseUserDataKeywordTools::makeAndFillAddress(cons
lgrName,
cellI,
cellJ,
cellK);
cellK,
aquiferNumber);
}

View File

@ -175,8 +175,8 @@ bool RifKeywordVectorUserData::parse(const QString& data, const QString& customW
"",
-1,
-1,
-1
);
-1,
-1);
m_allResultAddresses.push_back(addr);

View File

@ -112,6 +112,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
int cellI(-1);
int cellJ(-1);
int cellK(-1);
int aquiferNumber(-1);
quantityName = smspec_node_get_keyword(ertSumVarNode);
@ -120,6 +121,7 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
case ECL_SMSPEC_AQUIFER_VAR:
{
sumCategory = RifEclipseSummaryAddress::SUMMARY_AQUIFER;
aquiferNumber = smspec_node_get_num(ertSumVarNode);
}
break;
case ECL_SMSPEC_WELL_VAR:
@ -230,7 +232,8 @@ RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSu
wellName,
wellSegmentNumber,
lgrName,
cellI, cellJ, cellK);
cellI, cellJ, cellK,
aquiferNumber);
}
//--------------------------------------------------------------------------------------------------

View File

@ -143,6 +143,7 @@ RifEclipseSummaryAddress RifReaderObservedData::address(const QString& quantity,
int cellI(-1);
int cellJ(-1);
int cellK(-1);
int aquiferNumber(-1);
switch (summaryCategory)
{
@ -167,7 +168,8 @@ RifEclipseSummaryAddress RifReaderObservedData::address(const QString& quantity,
wellName,
wellSegmentNumber,
lgrName,
cellI, cellJ, cellK);
cellI, cellJ, cellK,
aquiferNumber);
}
//--------------------------------------------------------------------------------------------------

View File

@ -67,9 +67,10 @@ RimSummaryAddress::RimSummaryAddress()
CAF_PDM_InitFieldNoDefault(&m_cellI, "SummaryCellI", "I", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_cellJ, "SummaryCellJ", "J", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_cellK, "SummaryCellK", "K", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_aquiferNumber, "SummaryAquifer", "Aquifer", "", "", "");
m_category = RifEclipseSummaryAddress::SUMMARY_INVALID;
m_regionNumber = m_regionNumber2 = m_wellSegmentNumber = m_cellI = m_cellJ = m_cellK = -1;
m_regionNumber = m_regionNumber2 = m_wellSegmentNumber = m_cellI = m_cellJ = m_cellK = m_aquiferNumber -1;
}
//--------------------------------------------------------------------------------------------------
@ -93,6 +94,7 @@ void RimSummaryAddress::setAddress(const RifEclipseSummaryAddress& addr)
m_wellName = addr.wellName().c_str();
m_wellSegmentNumber = addr.wellSegmentNumber();
m_lgrName = addr.lgrName().c_str();
m_aquiferNumber = addr.aquiferNumber();
m_cellI = addr.cellI(); m_cellJ = addr.cellJ(); m_cellK = addr.cellK();
}
@ -110,6 +112,7 @@ RifEclipseSummaryAddress RimSummaryAddress::address()
m_wellName().toStdString(),
m_wellSegmentNumber(),
m_lgrName().toStdString(),
m_cellI(), m_cellJ(), m_cellK());
m_cellI(), m_cellJ(), m_cellK(),
m_aquiferNumber);
}

View File

@ -62,6 +62,6 @@ private:
caf::PdmField<int> m_cellI;
caf::PdmField<int> m_cellJ;
caf::PdmField<int> m_cellK;
caf::PdmField<int> m_aquiferNumber;
};

View File

@ -84,6 +84,7 @@ RiuSummaryCurveDefSelection::RiuSummaryCurveDefSelection() : m_identifierFieldsM
{ new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_VECTOR_NAME) }
} },
{ RifEclipseSummaryAddress::SUMMARY_AQUIFER, {
{ new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_AQUIFER_NUMBER) },
{ new SummaryIdentifierAndField(RifEclipseSummaryAddress::INPUT_VECTOR_NAME) }
} },
{ RifEclipseSummaryAddress::SUMMARY_NETWORK, {
@ -155,7 +156,8 @@ RiuSummaryCurveDefSelection::RiuSummaryCurveDefSelection() : m_identifierFieldsM
CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_FIELD][0]->pdmField(), "FieldVectors", "Field vectors", "", "", "");
CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "AquiferVectors", "Aquifer Vectors", "", "", "");
CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField(), "Aquifers", "Aquifers", "", "", "");
CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField(), "AquiferVectors", "Aquifer Vectors", "", "", "");
CAF_PDM_InitFieldNoDefault(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_NETWORK][0]->pdmField(), "NetworkVectors", "Network Vectors", "", "", "");
@ -586,7 +588,12 @@ void RiuSummaryCurveDefSelection::defineUiOrdering(QString uiConfigName, caf::Pd
}
else if (sumCategory == RifEclipseSummaryAddress::SUMMARY_AQUIFER)
{
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField();
{
caf::PdmUiGroup* myGroup = uiOrdering.addNewGroup("Aquifers");
myGroup->add(m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][0]->pdmField());
}
summaryiesField = m_identifierFieldsMap[RifEclipseSummaryAddress::SUMMARY_AQUIFER][1]->pdmField();
}
else if (sumCategory == RifEclipseSummaryAddress::SUMMARY_NETWORK)
{