mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1048 Added weighted average TOF calculation
This commit is contained in:
@@ -311,7 +311,7 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
{
|
||||
if ( fieldNeedingOptions == &m_resultVariableUiField )
|
||||
{
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Time Of Flight (Weighted Sum)", RIG_FLD_TOF_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Time Of Flight (Average)", RIG_FLD_TOF_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Tracer Cell Fraction (Sum)", RIG_FLD_CELL_FRACTION_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Max Fraction Tracer", RIG_FLD_MAX_FRACTION_TRACER_RESNAME));
|
||||
optionItems.push_back(caf::PdmOptionItemInfo("Injector Producer Communication", RIG_FLD_COMMUNICATION_RESNAME));
|
||||
@@ -338,11 +338,11 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
std::map<QString, QString> prefixedTracerNamesMap;
|
||||
for ( const QString& tracerName : tracerNames )
|
||||
{
|
||||
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatus(tracerName);
|
||||
RimFlowDiagSolution::TracerStatusType status = flowSol->tracerStatusOverall(tracerName);
|
||||
QString prefix;
|
||||
switch (status)
|
||||
{
|
||||
case RimFlowDiagSolution::INJECTOR: prefix = "I : "; break;
|
||||
case RimFlowDiagSolution::INJECTOR: prefix = "I : "; break;
|
||||
case RimFlowDiagSolution::PRODUCER: prefix = "P : "; break;
|
||||
case RimFlowDiagSolution::VARYING: prefix = "I/P: "; break;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ std::map<std::string, std::vector<int> > RimFlowDiagSolution::allTracerActiveCel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatus(QString tracerName)
|
||||
RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusOverall(QString tracerName)
|
||||
{
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
@@ -213,6 +213,49 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatus(QString
|
||||
return tracerStatus;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeStep(QString tracerName, size_t timeStepIndex)
|
||||
{
|
||||
RimEclipseResultCase* eclCase;
|
||||
this->firstAncestorOrThisOfType(eclCase);
|
||||
|
||||
if ( eclCase )
|
||||
{
|
||||
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->reservoirData()->wellResults();
|
||||
|
||||
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
|
||||
{
|
||||
if ( wellResults[wIdx]->m_wellName == tracerName )
|
||||
{
|
||||
size_t wellTimeStep = wellResults[wIdx]->m_resultTimeStepIndexToWellTimeStepIndex[timeStepIndex];
|
||||
const RigWellResultFrame& wellResFrame = wellResults[wIdx]->m_wellCellsTimeSteps[wellTimeStep];
|
||||
{
|
||||
if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR
|
||||
|| wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR
|
||||
|| wellResFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR )
|
||||
{
|
||||
return INJECTOR;
|
||||
}
|
||||
else if ( wellResFrame.m_productionType == RigWellResultFrame::PRODUCER )
|
||||
{
|
||||
return PRODUCER;
|
||||
}
|
||||
else
|
||||
{
|
||||
return UNDEFINED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CVF_ASSERT(false);
|
||||
|
||||
return UNDEFINED;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -54,7 +54,8 @@ public:
|
||||
UNDEFINED
|
||||
};
|
||||
|
||||
TracerStatusType tracerStatus(QString tracerName);
|
||||
TracerStatusType tracerStatusOverall(QString tracerName);
|
||||
TracerStatusType tracerStatusInTimeStep(QString tracerName, size_t timeStepIndex);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user