mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
D-factor: Implement combination of multiple completions in same cell (#5349)
* #5345 Fractures : Report combined result for multiple completions in same cell
This commit is contained in:
parent
5f7df7f7f5
commit
17f2c71a11
@ -504,27 +504,6 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
resultCompletion.setSecondOrderingValue( firstCompletion.secondOrderingValue() );
|
||||
resultCompletion.setSourcePdmObject( firstCompletion.sourcePdmObject() );
|
||||
|
||||
bool anyNonDarcyFlowPresent = false;
|
||||
for ( const auto& c : completions )
|
||||
{
|
||||
if ( c.isNonDarcyFlow() ) anyNonDarcyFlowPresent = true;
|
||||
}
|
||||
|
||||
if ( anyNonDarcyFlowPresent && completions.size() > 1 )
|
||||
{
|
||||
QString errorMessage =
|
||||
QString( "Cannot combine multiple completions when Non-Darcy Flow contribution is present in same cell %1" )
|
||||
.arg( cellIndexIJK.oneBasedLocalCellIndexString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
resultCompletion.addMetadata( "ERROR", errorMessage );
|
||||
return resultCompletion; // Returning empty completion, should not be exported
|
||||
}
|
||||
|
||||
if ( firstCompletion.isNonDarcyFlow() )
|
||||
{
|
||||
return firstCompletion;
|
||||
}
|
||||
|
||||
// completion type, skin factor, well bore diameter and cell direction are taken from (first) main bore,
|
||||
// if no main bore they are taken from first completion
|
||||
double skinfactor = firstCompletion.skinFactor();
|
||||
@ -541,11 +520,13 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
skinfactor = completion.skinFactor();
|
||||
wellBoreDiameter = completion.diameter();
|
||||
cellDirection = completion.direction();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
double totalTrans = 0.0;
|
||||
RiaWeightedMeanCalculator<double> dFactorCalculator;
|
||||
|
||||
double combinedTrans = 0.0;
|
||||
double combinedKh = 0.0;
|
||||
|
||||
for ( const RigCompletionData& completion : completions )
|
||||
{
|
||||
@ -554,15 +535,6 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
completion.m_metadata.begin(),
|
||||
completion.m_metadata.end() );
|
||||
|
||||
if ( completion.completionType() != firstCompletion.completionType() )
|
||||
{
|
||||
QString errorMessage = QString( "Cannot combine completions of different types in same cell %1" )
|
||||
.arg( cellIndexIJK.oneBasedLocalCellIndexString() );
|
||||
RiaLogging::error( errorMessage );
|
||||
resultCompletion.addMetadata( "ERROR", errorMessage );
|
||||
return resultCompletion; // Returning empty completion, should not be exported
|
||||
}
|
||||
|
||||
if ( completion.wellName() != firstCompletion.wellName() )
|
||||
{
|
||||
QString errorMessage = QString( "Cannot combine completions of different types in same cell %1" )
|
||||
@ -581,12 +553,21 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
return resultCompletion; // Returning empty completion, should not be exported
|
||||
}
|
||||
|
||||
totalTrans = totalTrans + completion.transmissibility();
|
||||
combinedTrans = combinedTrans + completion.transmissibility();
|
||||
combinedKh = combinedKh + completion.kh();
|
||||
|
||||
dFactorCalculator.addValueAndWeight( completion.dFactor(), completion.transmissibility() );
|
||||
}
|
||||
|
||||
// Arithmetic MEAN dFactor weighted by Tj/SumTj from the completions
|
||||
// Note : Divide by n is intentional, based on input from @hhgs in mail dated 18.01.2020
|
||||
double combinedDFactor = dFactorCalculator.weightedMean() / completions.size();
|
||||
|
||||
if ( settings.compdatExport == RicExportCompletionDataSettingsUi::TRANSMISSIBILITIES )
|
||||
{
|
||||
resultCompletion.setCombinedValuesExplicitTrans( totalTrans,
|
||||
resultCompletion.setCombinedValuesExplicitTrans( combinedTrans,
|
||||
combinedKh,
|
||||
combinedDFactor,
|
||||
skinfactor,
|
||||
wellBoreDiameter,
|
||||
cellDirection,
|
||||
@ -603,8 +584,10 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
.globalCellIndex(),
|
||||
cellDirection );
|
||||
|
||||
double wpimult = totalTrans / transmissibilityEclipseCalculation;
|
||||
double wpimult = combinedTrans / transmissibilityEclipseCalculation;
|
||||
resultCompletion.setCombinedValuesImplicitTransWPImult( wpimult,
|
||||
combinedKh,
|
||||
combinedDFactor,
|
||||
skinfactor,
|
||||
wellBoreDiameter,
|
||||
cellDirection,
|
||||
|
@ -204,12 +204,16 @@ void RigCompletionData::setTransAndWPImultBackgroundDataFromPerforation( double
|
||||
///
|
||||
//==================================================================================================
|
||||
void RigCompletionData::setCombinedValuesExplicitTrans( double transmissibility,
|
||||
double kh,
|
||||
double dFactor,
|
||||
double skinFactor,
|
||||
double diameter,
|
||||
CellDirection celldirection,
|
||||
CompletionType completionType )
|
||||
{
|
||||
m_transmissibility = transmissibility;
|
||||
m_kh = kh;
|
||||
m_dFactor = dFactor;
|
||||
m_skinFactor = skinFactor;
|
||||
m_diameter = diameter;
|
||||
m_direction = celldirection;
|
||||
@ -220,12 +224,16 @@ void RigCompletionData::setCombinedValuesExplicitTrans( double transmiss
|
||||
///
|
||||
//==================================================================================================
|
||||
void RigCompletionData::setCombinedValuesImplicitTransWPImult( double wpimult,
|
||||
double kh,
|
||||
double dFactor,
|
||||
double skinFactor,
|
||||
double diameter,
|
||||
CellDirection celldirection,
|
||||
CompletionType completionType )
|
||||
{
|
||||
m_wpimult = wpimult;
|
||||
m_kh = kh;
|
||||
m_dFactor = dFactor;
|
||||
m_direction = celldirection;
|
||||
m_completionType = completionType;
|
||||
m_skinFactor = skinFactor;
|
||||
|
@ -112,12 +112,16 @@ public:
|
||||
CellDirection direction );
|
||||
|
||||
void setCombinedValuesExplicitTrans( double transmissibility,
|
||||
double kh,
|
||||
double dFactor,
|
||||
double skinFactor,
|
||||
double diameter,
|
||||
CellDirection celldirection,
|
||||
CompletionType completionType );
|
||||
|
||||
void setCombinedValuesImplicitTransWPImult( double wpimult,
|
||||
double kh,
|
||||
double dFactor,
|
||||
double skinFactor,
|
||||
double diameter,
|
||||
CellDirection celldirection,
|
||||
|
Loading…
Reference in New Issue
Block a user