#1589 Setting includeFractures to false and read-only when using setting "Use Default Connection Factors and WPImult (excludes fractures)"

This commit is contained in:
astridkbjorke 2017-06-23 15:45:22 +02:00
parent 6febf1dfbf
commit 50a0dcd499
3 changed files with 41 additions and 27 deletions

View File

@ -42,7 +42,7 @@ namespace caf
void RicExportCompletionDataSettingsUi::CompdatExportType::setUp() void RicExportCompletionDataSettingsUi::CompdatExportType::setUp()
{ {
addItem(RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES, "TRANSMISSIBILITIES", "Calculated Transmissibilities"); addItem(RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES, "TRANSMISSIBILITIES", "Calculated Transmissibilities");
addItem(RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS, "WPIMULT_AND_DEFAULT_CONNECTION_FACTORS", "Default Connection Factors and WPIMULT"); addItem(RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS, "WPIMULT_AND_DEFAULT_CONNECTION_FACTORS", "Default Connection Factors and WPIMULT (Fractures Not Supported)");
setDefault(RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES); setDefault(RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES);
} }
} }
@ -156,13 +156,29 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
caf::PdmUiGroup* fishboneGroup = uiOrdering.addNewGroup("Export of Fishbone Completions"); caf::PdmUiGroup* fishboneGroup = uiOrdering.addNewGroup("Export of Fishbone Completions");
fishboneGroup->add(&includeFishbones); fishboneGroup->add(&includeFishbones);
fishboneGroup->add(&excludeMainBoreForFishbones); fishboneGroup->add(&excludeMainBoreForFishbones);
if (!includeFishbones) excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(true);
else excludeMainBoreForFishbones.uiCapability()->setUiReadOnly(false);
caf::PdmUiGroup* perfIntervalGroup = uiOrdering.addNewGroup("Export of Perforation Completions"); caf::PdmUiGroup* perfIntervalGroup = uiOrdering.addNewGroup("Export of Perforation Completions");
perfIntervalGroup->add(&includePerforations); perfIntervalGroup->add(&includePerforations);
perfIntervalGroup->add(&timeStep); perfIntervalGroup->add(&timeStep);
if (!includePerforations) timeStep.uiCapability()->setUiReadOnly(true);
else timeStep.uiCapability()->setUiReadOnly(false);
caf::PdmUiGroup* fractureGroup = uiOrdering.addNewGroup("Export of Fracture Completions"); caf::PdmUiGroup* fractureGroup = uiOrdering.addNewGroup("Export of Fracture Completions");
fractureGroup->add(&includeFractures); fractureGroup->add(&includeFractures);
if (compdatExport == WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
{
includeFractures = false;
includeFractures.uiCapability()->setUiReadOnly(true);
}
else if (compdatExport == TRANSMISSIBILITIES)
{
includeFractures = true;
includeFractures.uiCapability()->setUiReadOnly(false);
}
} }
uiOrdering.skipRemainingFields(); uiOrdering.skipRemainingFields();
} }

View File

@ -288,37 +288,37 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
//If fracture has orientation along well, linear inflow along well and radial flow at endpoints //If fracture has orientation along well, linear inflow along well and radial flow at endpoints
RigWellPathStimplanIntersector wellFractureIntersector(wellPathGeometry, fracture); RigWellPathStimplanIntersector wellFractureIntersector(wellPathGeometry, fracture);
const std::map<size_t, RigWellPathStimplanIntersector::WellCellIntersection >& fractureWellCells = wellFractureIntersector.intersections(); const std::map<size_t, RigWellPathStimplanIntersector::WellCellIntersection >& fractureWellCells = wellFractureIntersector.intersections();
for (const auto& fracCellIdxIsectDataPair : fractureWellCells) for (const auto& fracCellIdxIsectDataPair : fractureWellCells)
{ {
size_t fracWellCellIdx = fracCellIdxIsectDataPair.first; size_t fracWellCellIdx = fracCellIdxIsectDataPair.first;
if(!blockedFractureCellIndices.count(fracWellCellIdx)) if (!blockedFractureCellIndices.count(fracWellCellIdx))
{ {
RigWellPathStimplanIntersector::WellCellIntersection intersection = fracCellIdxIsectDataPair.second; RigWellPathStimplanIntersector::WellCellIntersection intersection = fracCellIdxIsectDataPair.second;
const RigFractureCell& fractureWellCell = fractureGrid->cellFromIndex(fracWellCellIdx); const RigFractureCell& fractureWellCell = fractureGrid->cellFromIndex(fracWellCellIdx);
double radialTrans = 0.0; double radialTrans = 0.0;
if (intersection.endpointCount) if (intersection.endpointCount)
{ {
radialTrans = RigFractureTransmissibilityEquations::fractureCellToWellRadialTrans(fractureWellCell.getConductivtyValue(), radialTrans = RigFractureTransmissibilityEquations::fractureCellToWellRadialTrans(fractureWellCell.getConductivtyValue(),
fractureWellCell.cellSizeX(), fractureWellCell.cellSizeX(),
fractureWellCell.cellSizeZ(), fractureWellCell.cellSizeZ(),
fracture->wellRadius(caseToApply->eclipseCaseData()->unitsType()), fracture->wellRadius(caseToApply->eclipseCaseData()->unitsType()),
fracTemplate->skinFactor(), fracTemplate->skinFactor(),
cDarcyInCorrectUnit); cDarcyInCorrectUnit);
} }
double linearTrans = 0.0; double linearTrans = 0.0;
if (intersection.hlength > 0.0 || intersection.vlength > 0.0 ) if (intersection.hlength > 0.0 || intersection.vlength > 0.0)
{ {
linearTrans = RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans(fractureWellCell.getConductivtyValue(), linearTrans = RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans(fractureWellCell.getConductivtyValue(),
fractureWellCell.cellSizeX(), fractureWellCell.cellSizeX(),
fractureWellCell.cellSizeZ(), fractureWellCell.cellSizeZ(),
intersection.vlength, intersection.vlength,
intersection.hlength , intersection.hlength,
fracture->perforationEfficiency, fracture->perforationEfficiency,
fracTemplate->skinFactor(), fracTemplate->skinFactor(),
cDarcyInCorrectUnit); cDarcyInCorrectUnit);
@ -326,9 +326,9 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
double totalWellTrans = 0.5 * intersection.endpointCount * radialTrans + linearTrans; double totalWellTrans = 0.5 * intersection.endpointCount * radialTrans + linearTrans;
transCondenser.addNeighborTransmissibility( { true, RigTransmissibilityCondenser::CellAddress::WELL, 1 }, transCondenser.addNeighborTransmissibility({ true, RigTransmissibilityCondenser::CellAddress::WELL, 1 },
{ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fracWellCellIdx }, { false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fracWellCellIdx },
totalWellTrans); totalWellTrans);
} }
else else
{ {

View File

@ -109,8 +109,6 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
QString projectFolder = app->currentProjectPath(); QString projectFolder = app->currentProjectPath();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("COMPLETIONS", projectFolder); QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("COMPLETIONS", projectFolder);
//RicExportCompletionDataSettingsUi exportSettings;
bool onlyWellPathCollectionSelected = noWellPathsSelectedDirectly(); bool onlyWellPathCollectionSelected = noWellPathsSelectedDirectly();
RicExportCompletionDataSettingsUi exportSettings(onlyWellPathCollectionSelected); RicExportCompletionDataSettingsUi exportSettings(onlyWellPathCollectionSelected);
@ -436,12 +434,12 @@ RigCompletionData RicWellPathExportCompletionDataFeature::combineEclipseCellComp
} }
if (settings.compdatExport == RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES) if (completions[0].completionType() == RigCompletionData::FRACTURE
|| settings.compdatExport == RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES)
{ {
resultCompletion.setCombinedValuesExplicitTrans(totalTrans, completionType); resultCompletion.setCombinedValuesExplicitTrans(totalTrans, completionType);
} }
else if (settings.compdatExport == RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
if (settings.compdatExport == RicExportCompletionDataSettingsUi::WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
{ {
//calculate trans for main bore - but as Eclipse will do it! //calculate trans for main bore - but as Eclipse will do it!
double transmissibilityEclipseCalculation = RicWellPathExportCompletionDataFeature::calculateTransmissibilityAsEclipseDoes(settings.caseToApply(), double transmissibilityEclipseCalculation = RicWellPathExportCompletionDataFeature::calculateTransmissibilityAsEclipseDoes(settings.caseToApply(),
@ -616,7 +614,7 @@ void RicWellPathExportCompletionDataFeature::generateWpimultTable(RifEclipseData
for (auto& completion : completionData) for (auto& completion : completionData)
{ {
if (completion.wpimult() == 0.0) if (completion.wpimult() == 0.0 || completion.isDefaultValue(completion.wpimult()))
{ {
continue; continue;
} }