2017-06-01 09:34:30 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
2018-08-09 04:30:18 -05:00
|
|
|
//
|
2017-06-01 09:34:30 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2018-08-09 04:30:18 -05:00
|
|
|
//
|
2017-06-01 09:34:30 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2018-08-09 04:30:18 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-06-01 09:34:30 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-08-24 08:13:30 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-01 09:34:30 -05:00
|
|
|
#include "RigCompletionData.h"
|
2017-06-12 05:03:42 -05:00
|
|
|
|
2018-09-10 06:00:39 -05:00
|
|
|
#include <map>
|
2017-08-24 08:13:30 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2018-09-10 06:00:39 -05:00
|
|
|
class RigFractureGrid;
|
2018-08-27 06:04:25 -05:00
|
|
|
class RicWellPathFractureReportItem;
|
2017-06-12 05:03:42 -05:00
|
|
|
class RigWellPath;
|
2018-09-10 06:00:39 -05:00
|
|
|
class RigTransmissibilityCondenser;
|
2018-09-11 06:22:57 -05:00
|
|
|
class RigEclipseToStimPlanCalculator;
|
2018-09-10 06:00:39 -05:00
|
|
|
|
2017-06-12 05:03:42 -05:00
|
|
|
class RimEclipseCase;
|
|
|
|
class RimFracture;
|
2018-09-10 06:00:39 -05:00
|
|
|
class RimFractureTemplate;
|
2017-10-13 02:29:42 -05:00
|
|
|
class RimSimWellInView;
|
2018-08-27 06:04:25 -05:00
|
|
|
class RimWellPath;
|
|
|
|
|
|
|
|
class QTextStream;
|
2018-09-10 06:00:39 -05:00
|
|
|
class QString;
|
2018-09-18 06:27:59 -05:00
|
|
|
|
2017-08-24 08:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2018-08-09 04:30:18 -05:00
|
|
|
///
|
2017-08-24 08:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-06-01 09:34:30 -05:00
|
|
|
class RicExportFractureCompletionsImpl
|
|
|
|
{
|
|
|
|
public:
|
2018-09-14 04:29:43 -05:00
|
|
|
enum PressureDepletionTransScaling
|
|
|
|
{
|
|
|
|
NO_SCALING = 0,
|
|
|
|
MATRIX_TO_FRACTURE_DP_OVER_MAX_DP,
|
|
|
|
MATRIX_TO_FRACTURE_DP_OVER_AVG_DP,
|
|
|
|
MATRIX_TO_WELL_DP_OVER_INITIAL_DP
|
|
|
|
};
|
|
|
|
|
|
|
|
enum PressureDepletionTransCorrection
|
|
|
|
{
|
|
|
|
NO_CORRECTION,
|
|
|
|
HOGSTOL_CORRECTION
|
|
|
|
};
|
|
|
|
|
2018-09-18 06:27:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
struct PressureDepletionParameters
|
|
|
|
{
|
|
|
|
PressureDepletionParameters(PressureDepletionTransScaling pressureDropScaling = NO_SCALING,
|
|
|
|
PressureDepletionTransCorrection transCorrection = NO_CORRECTION,
|
|
|
|
int pressureScalingTimeStep = 0,
|
|
|
|
bool wbhpFromSummaryCase = false,
|
|
|
|
double pressureScalingWBHP = 200.0)
|
|
|
|
: pressureDropScaling(pressureDropScaling)
|
|
|
|
, transCorrection(transCorrection)
|
|
|
|
, pressureScalingTimeStep(pressureScalingTimeStep)
|
|
|
|
, wbhpFromSummaryCase(wbhpFromSummaryCase)
|
|
|
|
, pressureScalingWBHP(pressureScalingWBHP)
|
|
|
|
{}
|
|
|
|
|
|
|
|
PressureDepletionTransScaling pressureDropScaling;
|
|
|
|
PressureDepletionTransCorrection transCorrection;
|
|
|
|
int pressureScalingTimeStep;
|
|
|
|
bool wbhpFromSummaryCase;
|
|
|
|
double pressureScalingWBHP;
|
|
|
|
};
|
|
|
|
|
2018-09-14 04:29:43 -05:00
|
|
|
static std::vector<RigCompletionData> generateCompdatValuesForWellPath(RimWellPath* wellPath,
|
|
|
|
RimEclipseCase* caseToApply,
|
|
|
|
std::vector<RicWellPathFractureReportItem>* fractureDataForReport,
|
|
|
|
QTextStream* outputStreamForIntermediateResultsText,
|
2018-09-18 06:27:59 -05:00
|
|
|
PressureDepletionParameters pdParams = PressureDepletionParameters());
|
2018-09-14 04:29:43 -05:00
|
|
|
|
|
|
|
static std::vector<RigCompletionData> generateCompdatValuesForSimWell(RimEclipseCase* eclipseCase,
|
2017-10-13 02:29:42 -05:00
|
|
|
const RimSimWellInView* well,
|
2018-09-14 04:29:43 -05:00
|
|
|
QTextStream* outputStreamForIntermediateResultsText,
|
2018-09-18 06:27:59 -05:00
|
|
|
PressureDepletionParameters pdParams = PressureDepletionParameters());
|
2018-09-14 04:29:43 -05:00
|
|
|
|
|
|
|
static std::vector<RigCompletionData> generateCompdatValues(RimEclipseCase* caseToApply,
|
|
|
|
const QString& wellPathName,
|
|
|
|
const RigWellPath* wellPathGeometry,
|
|
|
|
const std::vector<const RimFracture*>& fractures,
|
|
|
|
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
|
|
|
QTextStream* outputStreamForIntermediateResultsText,
|
2018-09-18 06:27:59 -05:00
|
|
|
PressureDepletionParameters pdParams = PressureDepletionParameters());
|
2018-08-24 03:49:34 -05:00
|
|
|
|
|
|
|
private:
|
2018-09-14 04:29:43 -05:00
|
|
|
static std::vector<RigCompletionData> generateCompdatValuesConst(const RimEclipseCase* caseToApply,
|
|
|
|
const QString& wellPathName,
|
|
|
|
const RigWellPath* wellPathGeometry,
|
|
|
|
const std::vector<const RimFracture*>& fractures,
|
|
|
|
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
|
|
|
QTextStream* outputStreamForIntermediateResultsText,
|
2018-09-18 06:27:59 -05:00
|
|
|
PressureDepletionParameters pdParams);
|
2018-09-17 03:51:08 -05:00
|
|
|
|
2018-09-19 04:38:37 -05:00
|
|
|
static void getWellPressuresAndInitialProductionTimeStepFromSummaryData(const RimEclipseCase* caseToApply,
|
|
|
|
const QString& wellPathName,
|
|
|
|
int currentTimeStep,
|
|
|
|
int* initialTimeStep,
|
|
|
|
double* initialWellPressure,
|
|
|
|
double* currentWellPressure);
|
2018-09-10 06:00:39 -05:00
|
|
|
|
|
|
|
static bool checkForStimPlanConductivity(const RimFractureTemplate* fracTemplate, const RimFracture* fracture);
|
|
|
|
|
2018-09-19 04:38:37 -05:00
|
|
|
static void calculateInternalFractureTransmissibilities(const RigFractureGrid* fractureGrid,
|
|
|
|
double cDarcyInCorrectUnit,
|
|
|
|
RigTransmissibilityCondenser& transCondenser);
|
2018-09-10 06:00:39 -05:00
|
|
|
|
2018-09-19 04:38:37 -05:00
|
|
|
static void calculateFractureToWellTransmissibilities(const RimFractureTemplate* fracTemplate,
|
|
|
|
const RigFractureGrid* fractureGrid,
|
|
|
|
const RimFracture* fracture,
|
|
|
|
double cDarcyInCorrectUnit,
|
|
|
|
const RigWellPath* wellPathGeometry,
|
|
|
|
RigTransmissibilityCondenser& transCondenser);
|
|
|
|
|
|
|
|
static std::map<size_t, double> calculateMatrixToWellTransmissibilities(RigTransmissibilityCondenser& transCondenser);
|
|
|
|
|
|
|
|
static std::vector<RigCompletionData> generateCompdatValuesForFracture(const std::map<size_t, double>& matrixToWellTransmissibilites,
|
|
|
|
const QString& wellPathName,
|
|
|
|
const RimEclipseCase* caseToApply,
|
|
|
|
const RimFracture* fracture,
|
|
|
|
const RimFractureTemplate* fracTemplate);
|
2018-09-10 06:00:39 -05:00
|
|
|
|
|
|
|
static void computeNonDarcyFlowParameters(const RimFracture* fracture, std::vector<RigCompletionData> allCompletionsForOneFracture);
|
|
|
|
|
2018-09-19 04:38:37 -05:00
|
|
|
static double sumUpTransmissibilities(const std::vector<RigCompletionData>& allCompletionsForOneFracture);
|
|
|
|
|
|
|
|
static void calculateAndSetReportItemData(const std::vector<RigCompletionData>& allCompletionsForOneFracture,
|
|
|
|
const RigEclipseToStimPlanCalculator& calculator,
|
|
|
|
RicWellPathFractureReportItem& reportItem);
|
2018-09-10 06:00:39 -05:00
|
|
|
|
2018-09-19 04:38:37 -05:00
|
|
|
static void outputIntermediateResultsText(QTextStream* outputStreamForIntermediateResultsText,
|
|
|
|
const RimFracture* fracture,
|
|
|
|
RigTransmissibilityCondenser& transCondenser,
|
|
|
|
const RigMainGrid* mainGrid,
|
|
|
|
const RigFractureGrid* fractureGrid);
|
2017-06-01 09:34:30 -05:00
|
|
|
};
|