mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added ternary saturation visualization
Ternary saturation available on top of dynamic results Created visualization for ternary based on SOIL, SGAS and SWAT
This commit is contained in:
@@ -43,5 +43,6 @@ public:
|
||||
static QString undefinedGridFaultName() { return "Undefined grid faults"; }
|
||||
|
||||
static QString combinedTransmissibilityResultName() { return "TRANSXYZ"; }
|
||||
static QString ternarySaturationResultName() { return "TERNARY"; }
|
||||
};
|
||||
|
||||
|
||||
@@ -818,7 +818,7 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
{
|
||||
m_reservoirGridPartManager->updateCellEdgeResultColor(geometriesToRecolor[i], m_currentTimeStep, this->cellResult(), this->cellEdgeResult());
|
||||
}
|
||||
else if (this->animationMode() && this->cellResult()->hasResult())
|
||||
else if ((this->animationMode() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
m_reservoirGridPartManager->updateCellResultColor(geometriesToRecolor[i], m_currentTimeStep, this->cellResult());
|
||||
}
|
||||
|
||||
@@ -160,10 +160,10 @@ QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptions(const c
|
||||
QStringList varList = getResultVariableListForCurrentUIFieldSettings();
|
||||
|
||||
bool hasCombinedTransmissibility = false;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> optionList;
|
||||
for (int i = 0; i < varList.size(); ++i)
|
||||
{
|
||||
|
||||
if (varList[i].compare(RimDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
hasCombinedTransmissibility = true;
|
||||
@@ -171,7 +171,6 @@ QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptions(const c
|
||||
}
|
||||
|
||||
optionList.push_back(caf::PdmOptionItemInfo(varList[i], varList[i]));
|
||||
|
||||
}
|
||||
|
||||
if (hasCombinedTransmissibility)
|
||||
@@ -179,6 +178,11 @@ QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptions(const c
|
||||
optionList.push_front(caf::PdmOptionItemInfo(RimDefines::combinedTransmissibilityResultName(), RimDefines::combinedTransmissibilityResultName()));
|
||||
}
|
||||
|
||||
if (m_resultTypeUiField == RimDefines::DYNAMIC_NATIVE)
|
||||
{
|
||||
optionList.push_front(caf::PdmOptionItemInfo(RimDefines::ternarySaturationResultName(), RimDefines::ternarySaturationResultName()));
|
||||
}
|
||||
|
||||
optionList.push_front(caf::PdmOptionItemInfo( RimDefines::undefinedResultName(), RimDefines::undefinedResultName() ));
|
||||
|
||||
if (useOptionsOnly) *useOptionsOnly = true;
|
||||
@@ -223,7 +227,6 @@ void RimResultDefinition::loadResult()
|
||||
gridCellResults->findOrLoadScalarResult(m_resultType(), m_resultVariable);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +254,6 @@ bool RimResultDefinition::hasStaticResult() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimResultDefinition::hasResult() const
|
||||
{
|
||||
|
||||
if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults())
|
||||
{
|
||||
const RigCaseCellResultsData* gridCellResults = this->currentGridCellResults()->cellResults();
|
||||
@@ -341,3 +343,14 @@ void RimResultDefinition::setPorosityModelUiFieldHidden(bool hide)
|
||||
{
|
||||
m_porosityModelUiField.setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimResultDefinition::isTernarySaturationSelected() const
|
||||
{
|
||||
bool isTernary = (m_resultType() == RimDefines::DYNAMIC_NATIVE) &&
|
||||
(m_resultVariable().compare(RimDefines::ternarySaturationResultName(), Qt::CaseInsensitive) == 0);
|
||||
|
||||
return isTernary;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
bool hasStaticResult() const;
|
||||
bool hasDynamicResult() const;
|
||||
bool hasResult() const;
|
||||
bool isTernarySaturationSelected() const;
|
||||
|
||||
RimReservoirCellResultsStorage* currentGridCellResults() const;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user