mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
de5cced38f
commit
53b443e819
@ -35,23 +35,24 @@
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigTransmissibilityCondenser.h"
|
||||
#include "RigEclipseToStimPlanCellTransmissibilityCalculator.h"
|
||||
#include "RigFractureCell.h"
|
||||
#include "RigFractureGrid.h"
|
||||
#include "RigEclipseToStimPlanCellTransmissibilityCalculator.h"
|
||||
#include "RigFractureTransmissibilityEquations.h"
|
||||
#include "RigWellPathStimplanIntersector.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigSimulationWellCoordsAndMD.h"
|
||||
#include "RigTransmissibilityCondenser.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigWellPathStimplanIntersector.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(RimWellPath* wellPath,
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath(RimWellPath* wellPath,
|
||||
RimEclipseCase* caseToApply,
|
||||
QTextStream* outputStreamForIntermediateResultsText)
|
||||
{
|
||||
@ -97,7 +98,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,
|
||||
const RimSimWellInView* well,
|
||||
QTextStream* outputStreamForIntermediateResultsText)
|
||||
{
|
||||
@ -116,7 +118,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<RigCompletionData> branchCompletions = generateCompdatValues(eclipseCase, well->name(), branches[branchIndex], fractures, outputStreamForIntermediateResultsText);
|
||||
std::vector<RigCompletionData> branchCompletions = generateCompdatValues(
|
||||
eclipseCase, well->name(), branches[branchIndex], fractures, outputStreamForIntermediateResultsText);
|
||||
|
||||
completionData.insert(completionData.end(), branchCompletions.begin(), branchCompletions.end());
|
||||
}
|
||||
@ -127,7 +130,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValues(RimEclipseCase* caseToApply,
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues(RimEclipseCase* caseToApply,
|
||||
const QString& wellPathName,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<RimFracture*>& fractures,
|
||||
@ -146,7 +150,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
// To handle several fractures in the same eclipse cell we need to keep track of the transmissibility
|
||||
// to the well from each fracture intersecting the cell and sum these transmissibilities at the end.
|
||||
// std::map <eclipseCellIndex ,map< fracture, trans> >
|
||||
std::map <size_t, std::map<RimFracture*, double> > eclCellIdxToTransPrFractureMap;
|
||||
std::map<size_t, std::map<RimFracture*, double>> eclCellIdxToTransPrFractureMap;
|
||||
|
||||
for (RimFracture* fracture : fractures)
|
||||
{
|
||||
@ -159,7 +163,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
|
||||
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 finite cond chosen and conductivity not present in stimplan file, do not calculate trans for this fracture
|
||||
if (useFiniteConductivityInFracture)
|
||||
{
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||
@ -167,7 +171,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
RimStimPlanFractureTemplate* fracTemplateStimPlan = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
|
||||
if (!fracTemplateStimPlan->hasConductivity())
|
||||
{
|
||||
RiaLogging::error("Trying to export completion data for stimPlan fracture without conductivity data for " + fracture->name());
|
||||
RiaLogging::error("Trying to export completion data for stimPlan fracture without conductivity data for " +
|
||||
fracture->name());
|
||||
RiaLogging::error("No transmissibilities will be calculated for " + fracture->name());
|
||||
|
||||
continue;
|
||||
@ -175,7 +180,6 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using CellIdxSpace = RigTransmissibilityCondenser::CellAddress;
|
||||
RigTransmissibilityCondenser transCondenser;
|
||||
|
||||
@ -194,33 +198,38 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
cDarcyInCorrectUnit,
|
||||
fractureCell);
|
||||
|
||||
const std::vector<size_t>& fractureCellContributingEclipseCells = eclToFractureTransCalc.globalIndiciesToContributingEclipseCells();
|
||||
const std::vector<double>& fractureCellContributingEclipseCellTransmissibilities = eclToFractureTransCalc.contributingEclipseCellTransmissibilities();
|
||||
const std::vector<size_t>& fractureCellContributingEclipseCells =
|
||||
eclToFractureTransCalc.globalIndiciesToContributingEclipseCells();
|
||||
const std::vector<double>& fractureCellContributingEclipseCellTransmissibilities =
|
||||
eclToFractureTransCalc.contributingEclipseCellTransmissibilities();
|
||||
|
||||
size_t stimPlanCellIndex = fractureGrid->getGlobalIndexFromIJ(fractureCell.getI(), fractureCell.getJ());
|
||||
|
||||
auto truncatedFractureCellIndices = RimFractureContainmentTools::fracturedCellsTruncatedByFaults(caseToApply, fracture);
|
||||
auto truncatedFractureCellIndices =
|
||||
RimFractureContainmentTools::fracturedCellsTruncatedByFaults(caseToApply, fracture);
|
||||
|
||||
for ( size_t i = 0; i < fractureCellContributingEclipseCells.size(); i++ )
|
||||
for (size_t i = 0; i < fractureCellContributingEclipseCells.size(); i++)
|
||||
{
|
||||
if ( fracture->isEclipseCellWithinContainment(caseToApply->eclipseCaseData()->mainGrid(), truncatedFractureCellIndices, fractureCellContributingEclipseCells[i]) )
|
||||
if (fracture->isEclipseCellWithinContainment(caseToApply->eclipseCaseData()->mainGrid(),
|
||||
truncatedFractureCellIndices,
|
||||
fractureCellContributingEclipseCells[i]))
|
||||
{
|
||||
if ( useFiniteConductivityInFracture )
|
||||
if (useFiniteConductivityInFracture)
|
||||
{
|
||||
transCondenser.addNeighborTransmissibility({ true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i] },
|
||||
{ false, CellIdxSpace::STIMPLAN, stimPlanCellIndex },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i]},
|
||||
{false, CellIdxSpace::STIMPLAN, stimPlanCellIndex},
|
||||
fractureCellContributingEclipseCellTransmissibilities[i]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
transCondenser.addNeighborTransmissibility({ true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i] },
|
||||
{ true, CellIdxSpace::WELL, 1 },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i]},
|
||||
{true, CellIdxSpace::WELL, 1},
|
||||
fractureCellContributingEclipseCellTransmissibilities[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//////
|
||||
@ -238,13 +247,13 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
|
||||
if (!fractureCell.hasNonZeroConductivity()) continue;
|
||||
|
||||
if ( i < fractureGrid->iCellCount() - 1 )
|
||||
if (i < fractureGrid->iCellCount() - 1)
|
||||
{
|
||||
size_t fractureCellNeighbourXIndex = fractureGrid->getGlobalIndexFromIJ(i + 1, j);
|
||||
const RigFractureCell& fractureCellNeighbourX = fractureGrid->cellFromIndex(fractureCellNeighbourXIndex);
|
||||
|
||||
double horizontalTransToXneigbour =
|
||||
RigFractureTransmissibilityEquations::centerToCenterFractureCellTrans(fractureCell.getConductivityValue(),
|
||||
double horizontalTransToXneigbour = RigFractureTransmissibilityEquations::centerToCenterFractureCellTrans(
|
||||
fractureCell.getConductivityValue(),
|
||||
fractureCell.cellSizeX(),
|
||||
fractureCell.cellSizeZ(),
|
||||
fractureCellNeighbourX.getConductivityValue(),
|
||||
@ -252,18 +261,19 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
fractureCellNeighbourX.cellSizeZ(),
|
||||
cDarcyInCorrectUnit);
|
||||
|
||||
transCondenser.addNeighborTransmissibility({ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellIndex },
|
||||
{ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellNeighbourXIndex },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellIndex},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellNeighbourXIndex},
|
||||
horizontalTransToXneigbour);
|
||||
}
|
||||
|
||||
if ( j < fractureGrid->jCellCount() - 1 )
|
||||
if (j < fractureGrid->jCellCount() - 1)
|
||||
{
|
||||
size_t fractureCellNeighbourZIndex = fractureGrid->getGlobalIndexFromIJ(i, j + 1);
|
||||
const RigFractureCell& fractureCellNeighbourZ = fractureGrid->cellFromIndex(fractureCellNeighbourZIndex);
|
||||
|
||||
double verticalTransToZneigbour =
|
||||
RigFractureTransmissibilityEquations::centerToCenterFractureCellTrans(fractureCell.getConductivityValue(),
|
||||
double verticalTransToZneigbour = RigFractureTransmissibilityEquations::centerToCenterFractureCellTrans(
|
||||
fractureCell.getConductivityValue(),
|
||||
fractureCell.cellSizeZ(),
|
||||
fractureCell.cellSizeX(),
|
||||
fractureCellNeighbourZ.getConductivityValue(),
|
||||
@ -271,8 +281,9 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
fractureCellNeighbourZ.cellSizeX(),
|
||||
cDarcyInCorrectUnit);
|
||||
|
||||
transCondenser.addNeighborTransmissibility({ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellIndex },
|
||||
{ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellNeighbourZIndex },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellIndex},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fractureCellNeighbourZIndex},
|
||||
verticalTransToZneigbour);
|
||||
}
|
||||
}
|
||||
@ -285,10 +296,10 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
if (useFiniteConductivityInFracture)
|
||||
{
|
||||
////
|
||||
//If fracture has orientation Azimuth or Transverse, assume only radial inflow
|
||||
// If fracture has orientation Azimuth or Transverse, assume only radial inflow
|
||||
|
||||
if ( fracture->fractureTemplate()->orientationType() == RimFractureTemplate::AZIMUTH
|
||||
|| fracture->fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (fracture->fractureTemplate()->orientationType() == RimFractureTemplate::AZIMUTH ||
|
||||
fracture->fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
const RigFractureGrid* fracGrid = fracture->fractureTemplate()->fractureGrid();
|
||||
if (fracGrid)
|
||||
@ -298,26 +309,28 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
|
||||
const RigFractureCell& wellCell = fractureGrid->cellFromIndex(wellCellIndex);
|
||||
|
||||
double radialTrans = RigFractureTransmissibilityEquations::fractureCellToWellRadialTrans(wellCell.getConductivityValue(),
|
||||
double radialTrans =
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellRadialTrans(wellCell.getConductivityValue(),
|
||||
wellCell.cellSizeX(),
|
||||
wellCell.cellSizeZ(),
|
||||
fracture->wellRadius(),
|
||||
fracTemplate->skinFactor(),
|
||||
cDarcyInCorrectUnit);
|
||||
|
||||
transCondenser.addNeighborTransmissibility({ true, RigTransmissibilityCondenser::CellAddress::WELL, 1 },
|
||||
{ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex},
|
||||
radialTrans);
|
||||
}
|
||||
}
|
||||
else if (fracture->fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
|
||||
////
|
||||
//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);
|
||||
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)
|
||||
{
|
||||
@ -330,7 +343,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
double linearTrans = 0.0;
|
||||
if (intersection.hlength > 0.0 || intersection.vlength > 0.0)
|
||||
{
|
||||
linearTrans = RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans(fractureWellCell.getConductivityValue(),
|
||||
linearTrans = RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans(
|
||||
fractureWellCell.getConductivityValue(),
|
||||
fractureWellCell.cellSizeX(),
|
||||
fractureWellCell.cellSizeZ(),
|
||||
intersection.vlength,
|
||||
@ -340,8 +354,9 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
cDarcyInCorrectUnit);
|
||||
}
|
||||
|
||||
transCondenser.addNeighborTransmissibility({ true, RigTransmissibilityCondenser::CellAddress::WELL, 1 },
|
||||
{ false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fracWellCellIdx },
|
||||
transCondenser.addNeighborTransmissibility(
|
||||
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, fracWellCellIdx},
|
||||
linearTrans);
|
||||
}
|
||||
}
|
||||
@ -357,7 +372,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
{
|
||||
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});
|
||||
|
||||
eclCellIdxToTransPrFractureMap[externalCell.m_globalCellIdx][fracture] = trans;
|
||||
|
||||
@ -399,18 +415,30 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
}
|
||||
}
|
||||
|
||||
std::copy(allCompletionsForOneFracture.begin(), allCompletionsForOneFracture.end(), std::back_inserter(fractureCompletions));
|
||||
std::copy(
|
||||
allCompletionsForOneFracture.begin(), allCompletionsForOneFracture.end(), std::back_inserter(fractureCompletions));
|
||||
|
||||
if ( outputStreamForIntermediateResultsText )
|
||||
if (outputStreamForIntermediateResultsText)
|
||||
{
|
||||
(*outputStreamForIntermediateResultsText) << "\n" << "\n" << "\n----------- All Transimissibilities " << fracture->name() << " -------------------- \n\n";
|
||||
(*outputStreamForIntermediateResultsText) << QString::fromStdString(transCondenser.neighborTransDebugOutput(mainGrid, fractureGrid));
|
||||
(*outputStreamForIntermediateResultsText) << "\n" << "\n" << "\n----------- Condensed Results " << fracture->name() << " -------------------- \n\n";
|
||||
(*outputStreamForIntermediateResultsText) << QString::fromStdString(transCondenser.condensedTransDebugOutput(mainGrid, fractureGrid));
|
||||
(*outputStreamForIntermediateResultsText) << "\n" ;
|
||||
(*outputStreamForIntermediateResultsText)
|
||||
<< "\n"
|
||||
<< "\n"
|
||||
<< "\n----------- All Transmissibilities " << fracture->name() << " -------------------- \n\n";
|
||||
|
||||
(*outputStreamForIntermediateResultsText)
|
||||
<< QString::fromStdString(transCondenser.neighborTransDebugOutput(mainGrid, fractureGrid));
|
||||
|
||||
(*outputStreamForIntermediateResultsText)
|
||||
<< "\n"
|
||||
<< "\n"
|
||||
<< "\n----------- Condensed Results " << fracture->name() << " -------------------- \n\n";
|
||||
|
||||
(*outputStreamForIntermediateResultsText)
|
||||
<< QString::fromStdString(transCondenser.condensedTransDebugOutput(mainGrid, fractureGrid));
|
||||
|
||||
(*outputStreamForIntermediateResultsText) << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
return fractureCompletions;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "RigCompletionData.h"
|
||||
|
||||
#include <vector>
|
||||
|
Loading…
Reference in New Issue
Block a user