mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard for missing well path
This commit is contained in:
parent
cf1557fdf8
commit
87977824db
@ -65,6 +65,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
|||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const RicExportCompletionDataSettingsUi& settings)
|
const RicExportCompletionDataSettingsUi& settings)
|
||||||
{
|
{
|
||||||
|
if (!wellPath) return;
|
||||||
|
|
||||||
// Generate data
|
// Generate data
|
||||||
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();
|
const RigEclipseCaseData* caseData = settings.caseToApply()->eclipseCaseData();
|
||||||
std::vector<WellSegmentLocation> locations = RicWellPathExportCompletionDataFeatureImpl::findWellSegmentLocations(settings.caseToApply, wellPath);
|
std::vector<WellSegmentLocation> locations = RicWellPathExportCompletionDataFeatureImpl::findWellSegmentLocations(settings.caseToApply, wellPath);
|
||||||
@ -103,6 +105,13 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
|||||||
std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(const RimWellPath* wellPath,
|
std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume(const RimWellPath* wellPath,
|
||||||
const RicExportCompletionDataSettingsUi& settings)
|
const RicExportCompletionDataSettingsUi& settings)
|
||||||
{
|
{
|
||||||
|
std::vector<RigCompletionData> completionData;
|
||||||
|
|
||||||
|
if (!wellPath || !wellPath->completions())
|
||||||
|
{
|
||||||
|
return completionData;
|
||||||
|
}
|
||||||
|
|
||||||
std::map<size_t, std::vector<WellBorePartForTransCalc> > wellBorePartsInCells; //wellBore = main bore or fishbone lateral
|
std::map<size_t, std::vector<WellBorePartForTransCalc> > wellBorePartsInCells; //wellBore = main bore or fishbone lateral
|
||||||
findFishboneLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
findFishboneLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
||||||
findFishboneImportedLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
findFishboneImportedLateralsWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
||||||
@ -111,8 +120,6 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
|
|||||||
findMainWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
findMainWellBoreParts(wellBorePartsInCells, wellPath, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RigCompletionData> completionData;
|
|
||||||
|
|
||||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||||
|
|
||||||
for (const auto& cellAndWellBoreParts : wellBorePartsInCells)
|
for (const auto& cellAndWellBoreParts : wellBorePartsInCells)
|
||||||
@ -200,6 +207,10 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
|||||||
const RicExportCompletionDataSettingsUi& settings)
|
const RicExportCompletionDataSettingsUi& settings)
|
||||||
{
|
{
|
||||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||||
|
|
||||||
|
if (!wellPath) return;
|
||||||
|
if (!wellPath->wellPathGeometry()) return;
|
||||||
|
|
||||||
std::set<size_t> wellPathCells = RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
|
std::set<size_t> wellPathCells = RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
|
||||||
wellPath->wellPathGeometry()->m_wellPathPoints);
|
wellPath->wellPathGeometry()->m_wellPathPoints);
|
||||||
bool isMainBore = false;
|
bool isMainBore = false;
|
||||||
@ -235,6 +246,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
|||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const RicExportCompletionDataSettingsUi& settings)
|
const RicExportCompletionDataSettingsUi& settings)
|
||||||
{
|
{
|
||||||
|
if (!wellPath) return;
|
||||||
|
if (!wellPath->wellPathGeometry()) return;
|
||||||
|
|
||||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||||
bool isMainBore = true;
|
bool isMainBore = true;
|
||||||
double holeDiameter = wellPath->fishbonesCollection()->mainBoreDiameter(unitSystem);
|
double holeDiameter = wellPath->fishbonesCollection()->mainBoreDiameter(unitSystem);
|
||||||
@ -250,6 +264,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
|||||||
fishbonePerfWellPathCoords.first,
|
fishbonePerfWellPathCoords.first,
|
||||||
fishbonePerfWellPathCoords.second);
|
fishbonePerfWellPathCoords.second);
|
||||||
|
|
||||||
|
if (!wellPath->fishbonesCollection()) return;
|
||||||
|
|
||||||
for (auto& cell : intersectedCellsIntersectionInfo)
|
for (auto& cell : intersectedCellsIntersectionInfo)
|
||||||
{
|
{
|
||||||
double skinFactor = wellPath->fishbonesCollection()->mainBoreSkinFactor();
|
double skinFactor = wellPath->fishbonesCollection()->mainBoreSkinFactor();
|
||||||
@ -273,6 +289,11 @@ std::set<size_t> RicFishbonesTransmissibilityCalculationFeatureImp::findIntersec
|
|||||||
{
|
{
|
||||||
std::set<size_t> cells;
|
std::set<size_t> cells;
|
||||||
|
|
||||||
|
if (!caseData)
|
||||||
|
{
|
||||||
|
return cells;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
|
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
|
||||||
for (auto intersection : intersections)
|
for (auto intersection : intersections)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user