#1602 Include sim well fractures when calculating completion type results

This commit is contained in:
Bjørnar Grip Fjær
2017-06-21 11:06:38 +02:00
parent 7d5157b3b3
commit 17593fba92
11 changed files with 105 additions and 22 deletions

View File

@@ -32,6 +32,12 @@
#include "RimWellPathFracture.h"
#include "RimFractureTemplate.h"
#include "RimWellPathFractureCollection.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimEclipseWellCollection.h"
#include "RimEclipseWell.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellFracture.h"
#include "RigMainGrid.h"
#include "RigWellPath.h"
@@ -45,7 +51,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimCompletionCellIntersectionCalc::calculateIntersections(const RimProject* project, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate)
void RimCompletionCellIntersectionCalc::calculateIntersections(const RimProject* project, const RimEclipseCase* eclipseCase, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate)
{
for (const RimWellPath* wellPath : project->activeOilField()->wellPathCollection->wellPaths)
{
@@ -54,6 +60,17 @@ void RimCompletionCellIntersectionCalc::calculateIntersections(const RimProject*
calculateWellPathIntersections(wellPath, grid, values, fromDate);
}
}
for (RimEclipseView* view : eclipseCase->reservoirViews())
{
for (RimEclipseWell* simWell : view->wellCollection()->wells())
{
for (RimSimWellFracture* fracture : simWell->simwellFractureCollection()->simwellFractures())
{
calculateFractureIntersections(grid, fracture, values);
}
}
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -25,6 +25,7 @@ class RimWellPath;
class RimFishbonesMultipleSubs;
class RimPerforationInterval;
class RimFracture;
class RimEclipseCase;
class RigMainGrid;
class QDateTime;
@@ -36,7 +37,7 @@ class QDateTime;
class RimCompletionCellIntersectionCalc
{
public:
static void calculateIntersections(const RimProject* project, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate);
static void calculateIntersections(const RimProject* project, const RimEclipseCase* eclipseCase, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate);
private:
static void calculateWellPathIntersections(const RimWellPath* wellPath, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate);

View File

@@ -147,7 +147,7 @@ void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj) proj->createDisplayModelAndRedrawAllViews();
if (proj) proj->reloadCompletionTypeResultsInAllViews();
}
}

View File

@@ -770,7 +770,22 @@ bool RimProject::showPlotWindow() const
void RimProject::reloadCompletionTypeResultsInAllViews()
{
createDisplayModelAndRedrawAllViews();
RiaApplication::instance()->scheduleRecalculateCompletionTypeAndRedraw();
RiaApplication::instance()->scheduleRecalculateCompletionTypeAndRedrawAllViews();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimProject::reloadCompletionTypeResultsForEclipseCase(RimEclipseCase* eclipseCase)
{
std::vector<RimView*> views = eclipseCase->views();
for (size_t viewIdx = 0; viewIdx < views.size(); viewIdx++)
{
views[viewIdx]->scheduleCreateDisplayModelAndRedraw();
}
RiaApplication::instance()->scheduleRecalculateCompletionTypeAndRedrawEclipseCase(eclipseCase);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -111,6 +111,7 @@ public:
bool showPlotWindow() const;
void reloadCompletionTypeResultsInAllViews();
void reloadCompletionTypeResultsForEclipseCase(RimEclipseCase* eclipseCase);
protected:

View File

@@ -363,10 +363,12 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RiaDefines::Result
}
else if (resultName == RiaDefines::completionTypeResultName())
{
caf::ProgressInfo progressInfo(m_cellResults->maxTimeStepCount(), "Calculate Completion Type Results");
m_cellResults->cellScalarResults(scalarResultIndex).resize(m_cellResults->maxTimeStepCount());
for (size_t timeStepIdx = 0; timeStepIdx < m_cellResults->maxTimeStepCount(); ++timeStepIdx)
{
computeCompletionTypeForTimeStep(timeStepIdx);
progressInfo.incrementProgress();
}
}
@@ -1429,7 +1431,7 @@ void RimReservoirCellResultsStorage::computeCompletionTypeForTimeStep(size_t tim
firstAncestorOrThisOfTypeAsserted(eclipseCase);
QDateTime timeStepDate = eclipseCase->timeStepDates()[timeStep];
RimCompletionCellIntersectionCalc::calculateIntersections(project, m_ownerMainGrid, completionTypeResult, timeStepDate);
RimCompletionCellIntersectionCalc::calculateIntersections(project, eclipseCase, m_ownerMainGrid, completionTypeResult, timeStepDate);
}
//--------------------------------------------------------------------------------------------------