mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1602 Include sim well fractures when calculating completion type results
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -147,7 +147,7 @@ void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
if (proj) proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -111,6 +111,7 @@ public:
|
||||
bool showPlotWindow() const;
|
||||
|
||||
void reloadCompletionTypeResultsInAllViews();
|
||||
void reloadCompletionTypeResultsForEclipseCase(RimEclipseCase* eclipseCase);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user