mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#1176 Read out state directly from well using RigSingleWellResultsData
This commit is contained in:
@@ -252,33 +252,8 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString wellStatusText;
|
QString wellStatusText = QString("(%1)").arg(RimWellAllocationPlot::wellStatusTextForTimeStep(m_wellName, m_case, m_timeStep));
|
||||||
|
|
||||||
{
|
|
||||||
QString wellStatus;
|
|
||||||
|
|
||||||
RimFlowDiagSolution::TracerStatusType wellStatusForTimeStep = m_flowDiagSolution->tracerStatusInTimeStep(m_wellName, m_timeStep);
|
|
||||||
switch (wellStatusForTimeStep)
|
|
||||||
{
|
|
||||||
case RimFlowDiagSolution::CLOSED:
|
|
||||||
wellStatus = "Closed";
|
|
||||||
break;
|
|
||||||
case RimFlowDiagSolution::PRODUCER:
|
|
||||||
wellStatus = "Producer";
|
|
||||||
break;
|
|
||||||
case RimFlowDiagSolution::INJECTOR:
|
|
||||||
wellStatus = "Injector";
|
|
||||||
break;
|
|
||||||
case RimFlowDiagSolution::UNDEFINED:
|
|
||||||
wellStatus = "Undefined";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
wellStatusText = QString("(%1)").arg(wellStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
setDescription("Well Allocation: " + m_wellName + " " + wellStatusText + ", " + m_case->timeStepStrings()[m_timeStep] + " (" + m_case->caseUserDescription() + ")");
|
setDescription("Well Allocation: " + m_wellName + " " + wellStatusText + ", " + m_case->timeStepStrings()[m_timeStep] + " (" + m_case->caseUserDescription() + ")");
|
||||||
|
|
||||||
/// Pie chart
|
/// Pie chart
|
||||||
@@ -363,6 +338,52 @@ void RimWellAllocationPlot::updateWidgetTitleWindowTitle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellAllocationPlot::wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep)
|
||||||
|
{
|
||||||
|
QString statusText = "Undefined";
|
||||||
|
|
||||||
|
if (eclipseResultCase)
|
||||||
|
{
|
||||||
|
const RigSingleWellResultsData* wellResults = nullptr;
|
||||||
|
wellResults = eclipseResultCase->reservoirData()->findWellResult(wellName);
|
||||||
|
|
||||||
|
if (wellResults)
|
||||||
|
{
|
||||||
|
if (wellResults->hasWellResult(timeStep))
|
||||||
|
{
|
||||||
|
const RigWellResultFrame& wellResultFrame = wellResults->wellResultFrame(timeStep);
|
||||||
|
|
||||||
|
RigWellResultFrame::WellProductionType prodType = wellResultFrame.m_productionType;
|
||||||
|
|
||||||
|
switch (prodType)
|
||||||
|
{
|
||||||
|
case RigWellResultFrame::PRODUCER:
|
||||||
|
statusText = "Producer";
|
||||||
|
break;
|
||||||
|
case RigWellResultFrame::OIL_INJECTOR:
|
||||||
|
statusText = "Oil Injector";
|
||||||
|
break;
|
||||||
|
case RigWellResultFrame::GAS_INJECTOR:
|
||||||
|
statusText = "Gas Injector";
|
||||||
|
break;
|
||||||
|
case RigWellResultFrame::WATER_INJECTOR:
|
||||||
|
statusText = "Water Injector";
|
||||||
|
break;
|
||||||
|
case RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return statusText;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ private:
|
|||||||
RimWellLogTrack* plotTrack);
|
RimWellLogTrack* plotTrack);
|
||||||
|
|
||||||
void updateWidgetTitleWindowTitle();
|
void updateWidgetTitleWindowTitle();
|
||||||
|
static QString wellStatusTextForTimeStep(const QString& wellName, const RimEclipseResultCase* eclipseResultCase, size_t timeStep);
|
||||||
|
|
||||||
// RimViewWindow overrides
|
// RimViewWindow overrides
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user