mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-15 01:42:13 -05:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
1 parent
10f0abc9b5
commit
c82df63e10
710 files changed
+3167
-4721
No files matched your search
+1
-3
@@ -96,9 +96,7 @@ public:
|
||||
|
||||
bool reportCompletionsTypesIndividually() const;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
||||
+2
-1
@@ -101,7 +101,8 @@ std::vector<RimWellPath*> RicExportCompletionsForVisibleWellPathsFeature::visibl
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
|
||||
{
|
||||
auto measurementColl = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
auto measurementColl =
|
||||
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
if ( measurementColl ) return wellPaths;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -74,8 +74,8 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicCaseAndFileExportSettingsUi exportSettings;
|
||||
std::vector<RimCase*> cases;
|
||||
|
||||
+36
-45
@@ -132,14 +132,14 @@ std::vector<RigCompletionData>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValues(
|
||||
RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues( RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
{
|
||||
std::vector<RigCompletionData> fractureCompletions;
|
||||
|
||||
@@ -266,8 +266,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const std::vector<double>* currentMatrixPressures = nullptr;
|
||||
if ( performPressureDepletionScaling )
|
||||
{
|
||||
pressureResultVector = &results->cellScalarResults(
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
pressureResultVector =
|
||||
&results->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
CVF_ASSERT( !pressureResultVector->empty() );
|
||||
|
||||
if ( pdParams.pressureScalingTimeStep < static_cast<int>( pressureResultVector->size() ) )
|
||||
@@ -301,8 +301,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const RigFractureGrid* fractureGrid = fracTemplate->fractureGrid();
|
||||
if ( !fractureGrid ) continue;
|
||||
|
||||
bool useFiniteConductivityInFracture = ( fracTemplate->conductivityType() ==
|
||||
RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
bool useFiniteConductivityInFracture =
|
||||
( fracTemplate->conductivityType() == RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
|
||||
// If finite cond chosen and conductivity not present in stimplan file, do not calculate trans for this fracture
|
||||
if ( useFiniteConductivityInFracture && !checkForStimPlanConductivity( fracTemplate, fracture ) )
|
||||
@@ -364,9 +364,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
scaledCondenser.calculateFicticiousFractureToWellTransmissibilities();
|
||||
// b. Calculate new effective matrix to well transmissibilities
|
||||
std::map<size_t, double> effectiveMatrixToWellTrans =
|
||||
scaledCondenser
|
||||
.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
scaledCondenser.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
matrixToWellTrans = effectiveMatrixToWellTrans;
|
||||
}
|
||||
}
|
||||
@@ -461,9 +460,9 @@ void RicExportFractureCompletionsImpl::getWellPressuresAndInitialProductionTimeS
|
||||
currentDate = caseTimeSteps.back();
|
||||
}
|
||||
|
||||
RifEclipseSummaryAddress wbhpPressureAddress = RifEclipseSummaryAddress::wellAddress( "WBHP",
|
||||
wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
RifEclipseSummaryAddress wbhpPressureAddress =
|
||||
RifEclipseSummaryAddress::wellAddress( "WBHP", wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
if ( mainCollection )
|
||||
{
|
||||
RimSummaryCase* summaryCase = mainCollection->findSummaryCaseFromEclipseResultCase( resultCase );
|
||||
@@ -532,10 +531,9 @@ bool RicExportFractureCompletionsImpl::checkForStimPlanConductivity( const RimFr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities(
|
||||
const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities( const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
for ( size_t i = 0; i < fractureGrid->iCellCount(); i++ )
|
||||
{
|
||||
@@ -599,13 +597,12 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities(
|
||||
const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
////
|
||||
// If fracture has orientation Azimuth or Transverse, assume only radial inflow
|
||||
@@ -627,9 +624,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
cDarcyInCorrectUnit );
|
||||
|
||||
transCondenser.addNeighborTransmissibility( {true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
|
||||
{false,
|
||||
RigTransmissibilityCondenser::CellAddress::STIMPLAN,
|
||||
wellCellIndex},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex},
|
||||
radialTrans );
|
||||
}
|
||||
else if ( fracTemplate->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
@@ -653,8 +648,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
if ( intersection.hlength > 0.0 || intersection.vlength > 0.0 )
|
||||
{
|
||||
linearTrans =
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell
|
||||
.getConductivityValue(),
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell.getConductivityValue(),
|
||||
fractureWellCell.cellSizeX(),
|
||||
fractureWellCell.cellSizeZ(),
|
||||
intersection.vlength,
|
||||
@@ -677,8 +671,8 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities(
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
std::map<size_t, double>
|
||||
RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
std::map<size_t, double> matrixToWellTransmissibilities;
|
||||
|
||||
@@ -687,10 +681,9 @@ std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWell
|
||||
{
|
||||
if ( externalCell.m_cellIndexSpace == RigTransmissibilityCondenser::CellAddress::ECLIPSE )
|
||||
{
|
||||
double trans = transCondenser.condensedTransmissibility( externalCell,
|
||||
{true,
|
||||
RigTransmissibilityCondenser::CellAddress::WELL,
|
||||
1} );
|
||||
double trans =
|
||||
transCondenser.condensedTransmissibility( externalCell,
|
||||
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1} );
|
||||
|
||||
if ( trans > transCondenser.transmissibilityThreshold() )
|
||||
{
|
||||
@@ -738,9 +731,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters( const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double dFactorForFracture = fracture->nonDarcyProperties().dFactor;
|
||||
double khForFracture = fracture->nonDarcyProperties().conductivity;
|
||||
@@ -763,8 +755,7 @@ void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities(
|
||||
const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities( const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double transmissibility = 0.0;
|
||||
for ( const auto& c : allCompletionsForOneFracture )
|
||||
|
||||
+13
-10
@@ -92,12 +92,13 @@ std::vector<RigCompletionData>
|
||||
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 );
|
||||
findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
|
||||
|
||||
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 )
|
||||
{
|
||||
@@ -237,8 +238,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
}
|
||||
|
||||
{
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for fishbones
|
||||
// defined by ResInsight. It is not trivial to define the open section of the main bore for imported laterals.
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for
|
||||
// fishbones defined by ResInsight. It is not trivial to define the open section of the main bore for imported
|
||||
// laterals.
|
||||
|
||||
if ( wellPath->fishbonesCollection()->isChecked() )
|
||||
{
|
||||
@@ -302,11 +304,12 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
for ( const auto& cellIntersectionInfo : intersectedCells )
|
||||
{
|
||||
QString completionMetaData = fishbonesPath->name();
|
||||
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
WellBorePartForTransCalc wellBorePart =
|
||||
WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
|
||||
|
||||
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );
|
||||
|
||||
+4
-4
@@ -48,10 +48,10 @@ private:
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void findFishboneImportedLateralsWellBoreParts(
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
static void
|
||||
findFishboneImportedLateralsWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void appendMainWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswCompletion::RicMswCompletion( const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/ )
|
||||
RicMswCompletion::RicMswCompletion( const QString& label, size_t index /* = cvf::UNDEFINED_SIZE_T */, int branchNumber /*= 0*/ )
|
||||
: m_label( label )
|
||||
, m_index( index )
|
||||
, m_branchNumber( branchNumber )
|
||||
|
||||
+4
-4
@@ -54,10 +54,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
|
||||
|
||||
|
||||
+71
-84
@@ -107,8 +107,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
else
|
||||
{
|
||||
int caseId = exportSettings.caseToApply->caseId();
|
||||
QString format = QString(
|
||||
"Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString format =
|
||||
QString( "Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
|
||||
RiaLogging::error( errMsg );
|
||||
}
|
||||
@@ -142,19 +142,19 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
}
|
||||
else
|
||||
{
|
||||
fractureTransmissibilityExportInformationStream = std::unique_ptr<QTextStream>(
|
||||
new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
fractureTransmissibilityExportInformationStream =
|
||||
std::unique_ptr<QTextStream>( new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
}
|
||||
}
|
||||
|
||||
size_t maxProgress = usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit ==
|
||||
RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
size_t maxProgress =
|
||||
usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
|
||||
caf::ProgressInfo progress( maxProgress, "Export Completions" );
|
||||
|
||||
@@ -437,18 +437,16 @@ std::vector<RigCompletionData>
|
||||
exportSettings.includeFractures = true;
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData = RicFishbonesTransmissibilityCalculationFeatureImp::
|
||||
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath, exportSettings );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath,
|
||||
exportSettings );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath,
|
||||
eclipseCase,
|
||||
nullptr,
|
||||
nullptr );
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath, eclipseCase, nullptr, nullptr );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
@@ -591,8 +589,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEclipseDoes( settings.caseToApply(),
|
||||
skinfactor,
|
||||
wellBoreDiameter / 2,
|
||||
cellIndexIJK
|
||||
.globalCellIndex(),
|
||||
cellIndexIJK.globalCellIndex(),
|
||||
cellDirection );
|
||||
|
||||
double wpimult = combinedTrans / transmissibilityEclipseCalculation;
|
||||
@@ -810,8 +807,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
for ( const auto& completion : completionsForLgr.second )
|
||||
{
|
||||
const auto wellPath = RicWellPathExportCompletionsFileTools::findWellPathFromExportName(
|
||||
completion.wellName() );
|
||||
const auto wellPath =
|
||||
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
|
||||
auto item = wellPathToLgrNameMap.find( wellPath );
|
||||
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
|
||||
}
|
||||
@@ -821,9 +818,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
const RimWellPath* wellPath = wellPathsForLgr.first;
|
||||
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD = std::make_tuple( std::numeric_limits<double>::max(),
|
||||
cvf::Vec2i(),
|
||||
"" );
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD =
|
||||
std::make_tuple( std::numeric_limits<double>::max(), cvf::Vec2i(), "" );
|
||||
|
||||
// Find first LGR-intersection along the well path
|
||||
|
||||
@@ -884,8 +880,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
{
|
||||
try
|
||||
{
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
fileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, fileName );
|
||||
|
||||
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
|
||||
completionsForGrid.insert( std::pair<QString, std::vector<RigCompletionData>>( "", completionsForMainGrid ) );
|
||||
@@ -904,8 +900,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
try
|
||||
{
|
||||
QString lgrFileName = fileName + "_LGR";
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
lgrFileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, lgrFileName );
|
||||
|
||||
exportWellPathFractureReport( eclipseCase, exportFile, wellPathFractureReportItems );
|
||||
exportWelspeclToFile( eclipseCase, exportFile, completionsForSubGrids );
|
||||
@@ -965,46 +961,44 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
|
||||
if ( gridName.isEmpty() )
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDAT" );
|
||||
}
|
||||
else
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDATL" );
|
||||
}
|
||||
@@ -1167,8 +1161,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
return completionData;
|
||||
}
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::MATRIX_MODEL );
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->isChecked() )
|
||||
{
|
||||
@@ -1218,21 +1212,19 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
|
||||
transmissibility = transmissibilityData.connectionFactor();
|
||||
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
|
||||
const double effectiveH = transmissibilityData.effectiveH();
|
||||
|
||||
const double effectivePermeability = nonDarcyParameters->gridPermeabilityScalingFactor() *
|
||||
transmissibilityData.effectiveK();
|
||||
const double effectivePermeability =
|
||||
nonDarcyParameters->gridPermeabilityScalingFactor() * transmissibilityData.effectiveK();
|
||||
|
||||
dFactor = calculateDFactor( settings.caseToApply,
|
||||
effectiveH,
|
||||
@@ -1418,8 +1410,7 @@ TransmissibilityData
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
|
||||
if ( ntgAccessObject.notNull() )
|
||||
{
|
||||
@@ -1450,8 +1441,7 @@ TransmissibilityData
|
||||
if ( directionForVolumeScaling == CellDirection::DIR_K ) dz = dz / volumeScaleConstant;
|
||||
}
|
||||
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() *
|
||||
latNtg,
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() * latNtg,
|
||||
permy,
|
||||
permz,
|
||||
dy,
|
||||
@@ -1459,8 +1449,7 @@ TransmissibilityData
|
||||
wellRadius,
|
||||
skinFactor,
|
||||
darcy );
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() *
|
||||
latNtg,
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() * latNtg,
|
||||
permx,
|
||||
permz,
|
||||
dx,
|
||||
@@ -1511,8 +1500,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor( RimEclipseC
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"PORO" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) );
|
||||
|
||||
if ( poroAccessObject.notNull() )
|
||||
{
|
||||
@@ -1607,8 +1595,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
ntg = ntgAccessObject->cellScalarGlobIdx( globalCellIndex );
|
||||
}
|
||||
|
||||
@@ -1690,8 +1677,8 @@ std::pair<double, cvf::Vec2i>
|
||||
for ( WellPathCellIntersectionInfo intersection : intersections )
|
||||
{
|
||||
size_t gridLocalCellIndex = 0;
|
||||
const RigGridBase* grid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex,
|
||||
&gridLocalCellIndex );
|
||||
const RigGridBase* grid =
|
||||
mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex, &gridLocalCellIndex );
|
||||
|
||||
if ( grid->gridId() == gridId && activeCellInfo->isActive( intersection.globCellIndex ) )
|
||||
{
|
||||
|
||||
+10
-13
@@ -96,9 +96,8 @@ private:
|
||||
class RicWellPathExportCompletionDataFeatureImpl
|
||||
{
|
||||
public:
|
||||
static CellDirection calculateCellMainDirection( RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell );
|
||||
static CellDirection
|
||||
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
|
||||
|
||||
static TransmissibilityData
|
||||
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
|
||||
@@ -124,9 +123,8 @@ public:
|
||||
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStepIndex );
|
||||
static std::vector<RigCompletionData>
|
||||
computeDynamicCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase, size_t timeStepIndex );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationsCompdatValues( const RimWellPath* wellPath,
|
||||
@@ -161,13 +159,12 @@ private:
|
||||
QFilePtr exportFile,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completions );
|
||||
|
||||
static void
|
||||
sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
static void sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
|
||||
static void exportCompdatAndWpimultTables( RimEclipseCase* sourceCase,
|
||||
QFilePtr exportFile,
|
||||
|
||||
+84
-101
@@ -91,8 +91,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString unifiedFileName =
|
||||
QString( "UnifiedCompletions_MSW_%1" ).arg( exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
unifiedFileName );
|
||||
unifiedExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, unifiedFileName );
|
||||
}
|
||||
|
||||
for ( const auto& wellPath : wellPaths )
|
||||
@@ -111,8 +111,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString wellFileName = QString( "%1_UnifiedCompletions_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedWellPathFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
wellFileName );
|
||||
unifiedWellPathFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, wellFileName );
|
||||
}
|
||||
|
||||
if ( exportFractures )
|
||||
@@ -124,10 +124,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fractureExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fracture_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFractures( exportSettings.caseToApply,
|
||||
fractureExportFile,
|
||||
@@ -146,8 +146,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString fileName = QString( "%1_Perforation_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
perforationsExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
perforationsExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForPerforations( exportSettings.caseToApply,
|
||||
perforationsExportFile,
|
||||
@@ -165,10 +165,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fishbonesExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fishbones_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFishbones( exportSettings.caseToApply,
|
||||
fishbonesExportFile,
|
||||
@@ -204,11 +204,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones(
|
||||
RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
{
|
||||
if ( eclipseCase == nullptr )
|
||||
{
|
||||
@@ -242,7 +241,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
|
||||
return;
|
||||
}
|
||||
|
||||
RicMswExportInfo exportInfo = generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
RicMswExportInfo exportInfo =
|
||||
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
|
||||
QTextStream stream( exportFile.get() );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@@ -286,15 +286,16 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RifTextDataTableColumn> header =
|
||||
{RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough", RifTextDataTableDoubleFormatting( RIF_FLOAT, 7 ) )};
|
||||
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough",
|
||||
RifTextDataTableDoubleFormatting( RIF_FLOAT,
|
||||
7 ) )};
|
||||
formatter.header( header );
|
||||
}
|
||||
|
||||
@@ -329,8 +330,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
|
||||
formatter.add( location->segmentNumber() ).add( location->segmentNumber() );
|
||||
formatter.add( 1 ); // All segments on main stem are branch 1
|
||||
formatter.add( location->segmentNumber() -
|
||||
1 ); // All main stem segments are connected to the segment below them
|
||||
formatter.add( location->segmentNumber() - 1 ); // All main stem segments are connected to the segment below
|
||||
// them
|
||||
formatter.add( length );
|
||||
formatter.add( depth );
|
||||
formatter.add( exportInfo.linerDiameter() );
|
||||
@@ -442,9 +443,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsSegments(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader(
|
||||
RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
{
|
||||
if ( completionType == RigCompletionData::CT_UNDEFINED )
|
||||
{
|
||||
@@ -705,8 +705,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
|
||||
{
|
||||
if ( completion->completionType() == RigCompletionData::PERFORATION_AICD )
|
||||
{
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>(
|
||||
completion );
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>( completion );
|
||||
if ( !aicd->isValid() )
|
||||
{
|
||||
RiaLogging::error( QString( "Export AICD Valve (%1): Valve is invalid. At least one required "
|
||||
@@ -849,12 +848,11 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
{
|
||||
for ( auto& sub : subs->installedLateralIndices() )
|
||||
{
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount = SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD,
|
||||
subEndMD,
|
||||
maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount =
|
||||
SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD, subEndMD, maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
|
||||
double startMd = subStartMD;
|
||||
double startTvd = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( startMd ).z();
|
||||
@@ -874,8 +872,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
if ( ssi == 0 )
|
||||
{
|
||||
// Add completion for ICD
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion(
|
||||
new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion( new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswSubSegment> icdSegment(
|
||||
new RicMswSubSegment( subEndMD, subEndMD + 0.1, subEndTVD, subEndTVD ) );
|
||||
icdCompletion->setFlowCoefficient( subs->icdFlowCoefficient() );
|
||||
@@ -890,11 +887,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
QString label = QString( "Lateral %1" ).arg( lateralIndex );
|
||||
location->addCompletion( std::make_shared<RicMswFishbones>( label, lateralIndex ) );
|
||||
}
|
||||
assignFishbonesLateralIntersections( caseToApply,
|
||||
subs,
|
||||
location,
|
||||
&foundSubGridIntersections,
|
||||
maxSegmentLength );
|
||||
assignFishbonesLateralIntersections( caseToApply, subs, location, &foundSubGridIntersections, maxSegmentLength );
|
||||
}
|
||||
|
||||
exportInfo.addWellSegment( location );
|
||||
@@ -928,10 +921,10 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo(
|
||||
RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
RicMswExportInfo
|
||||
RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
{
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
@@ -947,9 +940,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
|
||||
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double initialMD = 0.0;
|
||||
if ( wellPath->fractureCollection()->mswParameters()->referenceMDType() ==
|
||||
@@ -988,9 +979,9 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
double endTVD = cellIntInfo.endTVD;
|
||||
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@@ -1122,10 +1113,8 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections = filterIntersections( intersections,
|
||||
initialMD,
|
||||
wellPathGeometry,
|
||||
eclipseCase );
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
||||
filterIntersections( intersections, initialMD, wellPathGeometry, eclipseCase );
|
||||
|
||||
const double maxSegmentLength = wellPath->perforationIntervalCollection()->mswParameters()->maxSegmentLength();
|
||||
|
||||
@@ -1137,11 +1126,11 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::filterIntersections(
|
||||
const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
std::vector<WellPathCellIntersectionInfo>
|
||||
RicWellPathExportMswCompletionsImpl::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections;
|
||||
|
||||
@@ -1154,14 +1143,14 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::f
|
||||
|
||||
WellPathCellIntersectionInfo extraIntersection;
|
||||
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut = cvf::StructGridInterface::oppositeFace(
|
||||
firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut =
|
||||
cvf::StructGridInterface::oppositeFace( firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
|
||||
|
||||
filteredIntersections.push_back( extraIntersection );
|
||||
@@ -1236,11 +1225,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( segmentLength > segmentLengthThreshold )
|
||||
{
|
||||
QString label = QString( "Main stem segment %1" ).arg( mainBoreSegments.size() + 2 );
|
||||
std::shared_ptr<RicMswSegment> segment( new RicMswSegment( label,
|
||||
cellIntInfo.startMD,
|
||||
cellIntInfo.endMD,
|
||||
cellIntInfo.startTVD,
|
||||
cellIntInfo.endTVD ) );
|
||||
std::shared_ptr<RicMswSegment> segment(
|
||||
new RicMswSegment( label, cellIntInfo.startMD, cellIntInfo.endMD, cellIntInfo.startTVD, cellIntInfo.endTVD ) );
|
||||
|
||||
for ( const RimPerforationInterval* interval : perforationIntervals )
|
||||
{
|
||||
@@ -1250,10 +1236,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( overlap > 0.0 )
|
||||
{
|
||||
std::shared_ptr<RicMswCompletion> intervalCompletion( new RicMswPerforation( interval->name() ) );
|
||||
std::vector<RigCompletionData> completionData = generatePerforationIntersections( wellPath,
|
||||
interval,
|
||||
timeStep,
|
||||
eclipseCase );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
generatePerforationIntersections( wellPath, interval, timeStep, eclipseCase );
|
||||
assignPerforationIntersections( completionData,
|
||||
intervalCompletion,
|
||||
cellIntInfo,
|
||||
@@ -1267,9 +1251,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
}
|
||||
else
|
||||
{
|
||||
QString text = QString( "Skipping segment , threshold = %1, length = %2" )
|
||||
.arg( segmentLengthThreshold )
|
||||
.arg( segmentLength );
|
||||
QString text =
|
||||
QString( "Skipping segment , threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( segmentLength );
|
||||
RiaLogging::info( text );
|
||||
}
|
||||
}
|
||||
@@ -1353,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
|
||||
@@ -1361,7 +1345,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
|
||||
@@ -1651,9 +1636,7 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
pathGeometry.m_wellPathPoints = lateralCoords;
|
||||
pathGeometry.m_measuredDepths = lateralMDs;
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double previousExitMD = lateralMDs.front();
|
||||
double previousExitTVD = -lateralCoords.front().z();
|
||||
@@ -1661,9 +1644,9 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
for ( const auto& cellIntInfo : subSegIntersections )
|
||||
{
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@@ -1728,11 +1711,11 @@ void RicWellPathExportMswCompletionsImpl::assignFractureIntersections( const Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportMswCompletionsImpl::generatePerforationIntersections(
|
||||
const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
std::vector<RigCompletionData>
|
||||
RicWellPathExportMswCompletionsImpl::generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<RigCompletionData> completionData;
|
||||
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
+4
-5
@@ -146,11 +146,10 @@ private:
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswCompletion> perforationCompletion,
|
||||
|
||||
+1
-3
@@ -531,9 +531,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
|
||||
floatNumberColumn( "LPerf" ),
|
||||
floatNumberColumn( "PerfEff" ),
|
||||
floatNumberColumn( "Wdia" ),
|
||||
RifTextDataTableColumn( "Dfac",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ),
|
||||
RIGHT ),
|
||||
RifTextDataTableColumn( "Dfac", RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ), RIGHT ),
|
||||
};
|
||||
|
||||
formatter.header( header );
|
||||
|
||||
+1
-2
@@ -54,8 +54,7 @@ private:
|
||||
QString createFracturePressureDepletionSummaryText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
QString createConnectionsPerWellText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
QString createConnectionsPerWellText( const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
void configureFormatter( RifTextDataTableFormatter* formatter ) const;
|
||||
};
|
||||
Reference in new issue
Block a user