mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
#2546 Well Connection Factors : Several changes related to data access
Moved rig classes from command feature into ReservoirDataModel\Completions\
This commit is contained in:
1 parent
009ae7c750
commit
8e8c168405
30 files changed
+553
-14
No files matched your search
@@ -41,6 +41,7 @@ include_directories(
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ResultStatisticsCache
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ReservoirDataModel
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ReservoirDataModel/Completions
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/WellPathImportSsihub
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech/OdbReader
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech/GeoMechDataModel
|
||||
@@ -80,6 +81,7 @@ list( APPEND REFERENCED_CMAKE_FILES
|
||||
|
||||
ReservoirDataModel/CMakeLists_files.cmake
|
||||
ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake
|
||||
ReservoirDataModel/Completions/CMakeLists_files.cmake
|
||||
FileInterface/CMakeLists_files.cmake
|
||||
|
||||
ProjectDataModel/CMakeLists_files.cmake
|
||||
|
||||
@@ -4,15 +4,9 @@ ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionDataSettingsUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathExportCompletionDataFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathExportCompletionDataFeatureImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicFishbonesTransmissibilityCalculationFeatureImp.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFishbonesWellSegmentsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.h
|
||||
)
|
||||
|
||||
|
||||
@@ -21,15 +15,9 @@ ${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionDataSettingsUi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathExportCompletionDataFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathExportCompletionDataFeatureImpl.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicFishbonesTransmissibilityCalculationFeatureImp.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFishbonesWellSegmentsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
+141
@@ -57,6 +57,7 @@
|
||||
|
||||
#include "cvfPlane.h"
|
||||
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include <QDir>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -315,6 +316,146 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
void RicWellPathExportCompletionDataFeatureImpl::computeVirtualPerfTrans(
|
||||
RigVirtualPerforationTransmissibilities* virtualPerfTrans,
|
||||
RimEclipseCase* eclipseCase,
|
||||
const std::vector<RimWellPath*>& inputWellPaths)
|
||||
{
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
std::vector<RimWellPath*> usedWellPaths;
|
||||
|
||||
{
|
||||
for (RimWellPath* wellPath : inputWellPaths)
|
||||
{
|
||||
if (wellPath->unitSystem() == eclipseCase->eclipseCaseData()->unitsType())
|
||||
{
|
||||
usedWellPaths.push_back(wellPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error("Well path unit systems must match unit system of chosen eclipse case.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RicExportCompletionDataSettingsUi exportSettings;
|
||||
exportSettings.caseToApply = eclipseCase;
|
||||
exportSettings.includeFishbones = true;
|
||||
exportSettings.includePerforations = true;
|
||||
exportSettings.includeFractures = true;
|
||||
|
||||
bool anyPerforationsPresent = false;
|
||||
for (const auto& w : usedWellPaths)
|
||||
{
|
||||
if (!w->perforationIntervalCollection()->perforations().empty())
|
||||
{
|
||||
anyPerforationsPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto wellPath : usedWellPaths)
|
||||
{
|
||||
std::vector<RigCompletionData> completionsPerEclipseCell;
|
||||
|
||||
// Compute completions that do not change between time steps
|
||||
|
||||
if (exportSettings.includeFishbones)
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(
|
||||
wellPath, exportSettings);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
if (exportSettings.includeFractures())
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(wellPath, exportSettings, nullptr);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
if (!anyPerforationsPresent)
|
||||
{
|
||||
virtualPerfTrans->appendCompletionDataForWellPath(wellPath, completionsPerEclipseCell);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i < eclipseCase->timeStepDates().size(); i++)
|
||||
{
|
||||
// Update time step in export settings
|
||||
exportSettings.timeStep = static_cast<int>(i);
|
||||
|
||||
if (exportSettings.includePerforations)
|
||||
{
|
||||
std::vector<RigCompletionData> completionData = generatePerforationsCompdatValues(wellPath, exportSettings);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
//virtualPerfTrans->appendCompletionDataForWellPath(wellPath, completionsPerEclipseCell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeCompletionsForWellPath(
|
||||
RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings)
|
||||
{
|
||||
std::vector<RigCompletionData> completionsPerEclipseCell;
|
||||
{
|
||||
// Compute completions that do not change between time steps
|
||||
|
||||
if (exportSettings.includeFishbones)
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(
|
||||
wellPath, exportSettings);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
if (exportSettings.includeFractures())
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(wellPath, exportSettings, nullptr);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
{
|
||||
/*
|
||||
for (size_t i = 0; i < exportSettings.caseToApply()->timeStepDates().size(); i++)
|
||||
{
|
||||
// Update time step in export settings
|
||||
exportSettings.timeStep = static_cast<int>(i);
|
||||
|
||||
if (exportSettings.includePerforations)
|
||||
{
|
||||
std::vector<RigCompletionData> completionData = generatePerforationsCompdatValues(wellPath, exportSettings);
|
||||
|
||||
std::copy(completionData.begin(), completionData.end(), std::back_inserter(completionsPerEclipseCell));
|
||||
}
|
||||
|
||||
// virtualPerfTrans->appendCompletionDataForWellPath(wellPath, completionsPerEclipseCell);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
return completionsPerEclipseCell;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
+4
@@ -35,6 +35,7 @@ class RimFishbonesMultipleSubs;
|
||||
class RimSimWellInView;
|
||||
class RimWellPath;
|
||||
class RifEclipseDataTableFormatter;
|
||||
class RigVirtualPerforationTransmissibilities;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -145,6 +146,9 @@ public:
|
||||
const std::vector<RimSimWellInView*>& simWells,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings);
|
||||
|
||||
static std::vector<RigCompletionData> computeCompletionsForWellPath(RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& exportSettings);
|
||||
|
||||
private:
|
||||
static double calculateTransmissibilityAsEclipseDoes(RimEclipseCase* eclipseCase,
|
||||
double skinFactor,
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@@ -203,6 +205,28 @@ void RivWellPathPartMgr::appendPerforationsToModel(const QDateTime& currentViewD
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellPathPartMgr::appendVirtualTransmissibilitiesToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize)
|
||||
{
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
|
||||
m_rimView->firstAncestorOrThisOfType(eclipseCase);
|
||||
if (!eclipseCase) return;
|
||||
if (!eclipseCase->eclipseCaseData()) return;
|
||||
|
||||
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||
|
||||
const RigVirtualPerforationTransmissibilities* trans = eclipseCaseData->virtualPerforationTransmissibilities();
|
||||
if (trans)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -87,6 +87,10 @@ private:
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize);
|
||||
|
||||
void appendVirtualTransmissibilitiesToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize);
|
||||
|
||||
|
||||
void buildWellPathParts(const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
double characteristicCellSize,
|
||||
|
||||
@@ -99,6 +99,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimVirtualPerforationResults.h
|
||||
)
|
||||
|
||||
|
||||
@@ -202,6 +203,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Rim3dWellLogCurve.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimVirtualPerforationResults.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimVirtualPerforationResults.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
@@ -125,6 +126,10 @@ RimEclipseView::RimEclipseView()
|
||||
m_fractureColors = new RimStimPlanColors();
|
||||
m_fractureColors.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_virtualPerforationResult, "VirtualPerforationResult", "Virtual Perforation Result", "", "", "");
|
||||
m_virtualPerforationResult = new RimVirtualPerforationResults();
|
||||
m_virtualPerforationResult.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellCollection, "WellCollection", "Simulation Wells", "", "", "");
|
||||
m_wellCollection = new RimSimWellInViewCollection;
|
||||
m_wellCollection.uiCapability()->setUiHidden(true);
|
||||
@@ -1414,6 +1419,8 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
}
|
||||
}
|
||||
|
||||
uiTreeOrdering.add(m_virtualPerforationResult);
|
||||
|
||||
uiTreeOrdering.add(faultCollection());
|
||||
uiTreeOrdering.add(crossSectionCollection());
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ class RimReservoirCellResultsStorage;
|
||||
class RimReservoirCellResultsStorage;
|
||||
class RimSimWellInViewCollection;
|
||||
class RimStimPlanColors;
|
||||
class RimVirtualPerforationResults;
|
||||
class RiuViewer;
|
||||
class RivReservoirSimWellsPartMgr;
|
||||
class RivIntersectionPartMgr;
|
||||
@@ -176,6 +177,7 @@ private:
|
||||
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
||||
caf::PdmChildField<RimEclipseFaultColors*> m_faultResultSettings;
|
||||
caf::PdmChildField<RimStimPlanColors*> m_fractureColors;
|
||||
caf::PdmChildField<RimVirtualPerforationResults*> m_virtualPerforationResult;
|
||||
|
||||
caf::PdmChildField<RimSimWellInViewCollection*> m_wellCollection;
|
||||
caf::PdmChildField<RimFaultInViewCollection*> m_faultCollection;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimVirtualPerforationResults.h"
|
||||
|
||||
#include "RimLegendConfig.h"
|
||||
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimVirtualPerforationResults, "RimVirtualPerforationResults");
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimVirtualPerforationResults::RimVirtualPerforationResults()
|
||||
{
|
||||
CAF_PDM_InitObject("Virtual Perforation Results", ":/CellResult.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&legendConfig, "LegendDefinition", "Legend Definition", "", "", "");
|
||||
this->legendConfig = new RimLegendConfig();
|
||||
legendConfig.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_showTensors, "ShowTensors", true, "", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimVirtualPerforationResults::~RimVirtualPerforationResults()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimVirtualPerforationResults::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimVirtualPerforationResults::objectToggleField()
|
||||
{
|
||||
return &m_showTensors;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimVirtualPerforationResults::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
*useOptionsOnly = true;
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimVirtualPerforationResults::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RimLegendConfig;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimVirtualPerforationResults : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
|
||||
public:
|
||||
RimVirtualPerforationResults();
|
||||
virtual ~RimVirtualPerforationResults();
|
||||
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showTensors;
|
||||
|
||||
caf::PdmChildField<RimLegendConfig*> legendConfig;
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigVirtualPerforationTransmissibilities.h
|
||||
)
|
||||
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigVirtualPerforationTransmissibilities.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
${SOURCE_GROUP_HEADER_FILES}
|
||||
)
|
||||
|
||||
list(APPEND CODE_SOURCE_FILES
|
||||
${SOURCE_GROUP_SOURCE_FILES}
|
||||
)
|
||||
|
||||
source_group( "ReservoirDataModel\\Completions" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+107
@@ -0,0 +1,107 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
CompletionDataFrame::CompletionDataFrame() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void CompletionDataFrame::setCompletionData(const std::vector<RigCompletionData>& completions)
|
||||
{
|
||||
for (auto& completion : completions)
|
||||
{
|
||||
auto it = m_multipleCompletionsPerEclipseCell.find(completion.completionDataGridCell());
|
||||
if (it != m_multipleCompletionsPerEclipseCell.end())
|
||||
{
|
||||
it->second.push_back(completion);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_multipleCompletionsPerEclipseCell.insert(std::pair<RigCompletionDataGridCell, std::vector<RigCompletionData>>(
|
||||
completion.completionDataGridCell(), std::vector<RigCompletionData>{completion}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>& CompletionDataFrame::multipleCompletionsPerEclipseCell() const
|
||||
{
|
||||
return m_multipleCompletionsPerEclipseCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigVirtualPerforationTransmissibilities::RigVirtualPerforationTransmissibilities() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigVirtualPerforationTransmissibilities::~RigVirtualPerforationTransmissibilities() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigVirtualPerforationTransmissibilities::appendCompletionDataForWellPath(
|
||||
RimWellPath* wellPath,
|
||||
const std::vector<RigCompletionData>& completions)
|
||||
{
|
||||
/*
|
||||
auto item = m_mapFromWellToCompletionData.find(wellPath);
|
||||
if (item != m_mapFromWellToCompletionData.end())
|
||||
{
|
||||
item->second.setCompletionData
|
||||
}
|
||||
|
||||
auto it = m_multipleCompletionsPerEclipseCell.find(completion.completionDataGridCell());
|
||||
if (it != m_multipleCompletionsPerEclipseCell.end())
|
||||
{
|
||||
it->second.push_back(completion);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_multipleCompletionsPerEclipseCell.insert(std::pair<RigCompletionDataGridCell, std::vector<RigCompletionData>>(
|
||||
completion.completionDataGridCell(), std::vector<RigCompletionData>{completion}));
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>&
|
||||
RigVirtualPerforationTransmissibilities::multipleCompletionsPerEclipseCell(RimWellPath* wellPath, size_t timeStepIndex) const
|
||||
{
|
||||
static std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> dummy;
|
||||
|
||||
auto item = m_mapFromWellToCompletionData.find(wellPath);
|
||||
if (item != m_mapFromWellToCompletionData.end())
|
||||
{
|
||||
return item->second[timeStepIndex].multipleCompletionsPerEclipseCell();
|
||||
}
|
||||
|
||||
return dummy;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
class RigCompletionData;
|
||||
class RigCompletionDataGridCell;
|
||||
class RimWellPath;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class CompletionDataFrame
|
||||
{
|
||||
public:
|
||||
CompletionDataFrame();
|
||||
|
||||
void setCompletionData(const std::vector<RigCompletionData>& completions);
|
||||
|
||||
const std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>&
|
||||
multipleCompletionsPerEclipseCell() const;
|
||||
|
||||
private:
|
||||
std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>> m_multipleCompletionsPerEclipseCell;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RigVirtualPerforationTransmissibilities : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RigVirtualPerforationTransmissibilities();
|
||||
~RigVirtualPerforationTransmissibilities();
|
||||
|
||||
void appendCompletionDataForWellPath(RimWellPath* wellPath,
|
||||
const std::vector<RigCompletionData>& completions);
|
||||
|
||||
const std::map<RigCompletionDataGridCell, std::vector<RigCompletionData>>&
|
||||
multipleCompletionsPerEclipseCell(RimWellPath* wellPath, size_t timeStepIndex) const;
|
||||
|
||||
private:
|
||||
std::map<RimWellPath*, std::vector<CompletionDataFrame>> m_mapFromWellToCompletionData;
|
||||
};
|
||||
File renamed without changes.
File renamed without changes.
@@ -30,6 +30,7 @@
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RigSimulationWellCoordsAndMD.h"
|
||||
#include "RigVirtualPerforationTransmissibilities.h"
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimFlowPlotCollection.h"
|
||||
@@ -519,6 +520,22 @@ std::vector<const RigWellPath*> RigEclipseCaseData::simulationWellBranches(const
|
||||
return branches;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseCaseData::setVirtualPerforationTransmissibilities(RigVirtualPerforationTransmissibilities* virtualPerforationTransmissibilities)
|
||||
{
|
||||
m_virtualPerforationTransmissibilities = virtualPerforationTransmissibilities;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigVirtualPerforationTransmissibilities* RigEclipseCaseData::virtualPerforationTransmissibilities() const
|
||||
{
|
||||
return m_virtualPerforationTransmissibilities;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -47,6 +47,7 @@ class RigSimWellData;
|
||||
class RigCell;
|
||||
class RigWellPath;
|
||||
class RimEclipseCase;
|
||||
class RigVirtualPerforationTransmissibilities;
|
||||
|
||||
struct RigWellResultPoint;
|
||||
|
||||
@@ -110,6 +111,9 @@ public:
|
||||
bool includeAllCellCenters,
|
||||
bool useAutoDetectionOfBranches) const;
|
||||
|
||||
void setVirtualPerforationTransmissibilities(RigVirtualPerforationTransmissibilities* virtualPerforationTransmissibilities);
|
||||
const RigVirtualPerforationTransmissibilities* virtualPerforationTransmissibilities() const;
|
||||
|
||||
private:
|
||||
void computeActiveCellIJKBBox();
|
||||
void computeWellCellsPrGrid();
|
||||
@@ -127,6 +131,8 @@ private:
|
||||
|
||||
cvf::ref<RigFormationNames> m_activeFormationNamesData;
|
||||
|
||||
RigVirtualPerforationTransmissibilities* m_virtualPerforationTransmissibilities;
|
||||
|
||||
cvf::Collection<RigSimWellData> m_simWellData; //< A WellResults object for each well in the reservoir
|
||||
cvf::Collection<cvf::UByteArray> m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling whether the cell is a well cell or not
|
||||
cvf::Collection<cvf::UIntArray> m_gridCellToResultWellIndex; //< Array pr grid with index to well pr cell telling which well a cell is in
|
||||
|
||||
@@ -295,7 +295,7 @@ TEST(RigCellGeometryTools, polylinePolygonIntersectionTest2)
|
||||
}
|
||||
|
||||
|
||||
#include "CompletionExportCommands/RigWellPathStimplanIntersector.h"
|
||||
#include "Completions/RigWellPathStimplanIntersector.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "CompletionExportCommands/RigTransmissibilityCondenser.h"
|
||||
#include "Completions/RigTransmissibilityCondenser.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user