mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3038 Fracture Completion Summary : Add fracture grid calculator
This commit is contained in:
parent
21bfe6b87d
commit
de5cced38f
@ -7,6 +7,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigVirtualPerforationTransmissibilities.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCalculator.h
|
||||
)
|
||||
|
||||
|
||||
@ -18,6 +19,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigVirtualPerforationTransmissibilities.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCalculator.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
@ -0,0 +1,141 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Statoil ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigEclipseToStimPlanCalculator.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
#include "RigCellGeometryTools.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFractureCell.h"
|
||||
#include "RigFractureGrid.h"
|
||||
#include "RigFractureTransmissibilityEquations.h"
|
||||
#include "RigHexIntersectionTools.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigTransmissibilityCondenser.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureContainmentTools.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseToStimPlanCalculator::RigEclipseToStimPlanCalculator(RimEclipseCase* caseToApply,
|
||||
cvf::Mat4d fractureTransform,
|
||||
double skinFactor,
|
||||
double cDarcy,
|
||||
const RigFractureGrid& fractureGrid)
|
||||
: m_case(caseToApply)
|
||||
, m_fractureTransform(fractureTransform)
|
||||
, m_fractureSkinFactor(skinFactor)
|
||||
, m_cDarcy(cDarcy)
|
||||
, m_fractureGrid(fractureGrid)
|
||||
{
|
||||
computeValues();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseToStimPlanCalculator::computeValues()
|
||||
{
|
||||
for (const RigFractureCell& fractureCell : m_fractureGrid.fractureCells())
|
||||
{
|
||||
if (!fractureCell.hasNonZeroConductivity()) continue;
|
||||
|
||||
RigEclipseToStimPlanCellTransmissibilityCalculator eclToFractureTransCalc(
|
||||
m_case, m_fractureTransform, m_fractureSkinFactor, m_cDarcy, fractureCell);
|
||||
|
||||
const std::vector<size_t>& fractureCellContributingEclipseCells =
|
||||
eclToFractureTransCalc.globalIndiciesToContributingEclipseCells();
|
||||
|
||||
if (!fractureCellContributingEclipseCells.empty())
|
||||
{
|
||||
m_singleFractureCellCalculators.emplace_back(eclToFractureTransCalc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using CellIdxSpace = RigTransmissibilityCondenser::CellAddress;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigEclipseToStimPlanCalculator::appendDataToTransmissibilityCondenser(RimFracture* fracture,
|
||||
bool useFiniteConductivityInFracture,
|
||||
RigTransmissibilityCondenser* condenser) const
|
||||
{
|
||||
for (const auto& eclToFractureTransCalc : m_singleFractureCellCalculators)
|
||||
{
|
||||
const std::vector<size_t>& fractureCellContributingEclipseCells =
|
||||
eclToFractureTransCalc.globalIndiciesToContributingEclipseCells();
|
||||
|
||||
const std::vector<double>& fractureCellContributingEclipseCellTransmissibilities =
|
||||
eclToFractureTransCalc.contributingEclipseCellTransmissibilities();
|
||||
|
||||
const auto& fractureCell = eclToFractureTransCalc.fractureCell();
|
||||
size_t stimPlanCellIndex = m_fractureGrid.getGlobalIndexFromIJ(fractureCell.getI(), fractureCell.getJ());
|
||||
|
||||
auto truncatedFractureCellIndices = RimFractureContainmentTools::fracturedCellsTruncatedByFaults(m_case, fracture);
|
||||
|
||||
for (size_t i = 0; i < fractureCellContributingEclipseCells.size(); i++)
|
||||
{
|
||||
if (fracture->isEclipseCellWithinContainment(
|
||||
m_case->eclipseCaseData()->mainGrid(), truncatedFractureCellIndices, fractureCellContributingEclipseCells[i]))
|
||||
{
|
||||
if (useFiniteConductivityInFracture)
|
||||
{
|
||||
condenser->addNeighborTransmissibility({true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i]},
|
||||
{false, CellIdxSpace::STIMPLAN, stimPlanCellIndex},
|
||||
fractureCellContributingEclipseCellTransmissibilities[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
condenser->addNeighborTransmissibility({true, CellIdxSpace::ECLIPSE, fractureCellContributingEclipseCells[i]},
|
||||
{true, CellIdxSpace::WELL, 1},
|
||||
fractureCellContributingEclipseCellTransmissibilities[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<size_t, double> RigEclipseToStimPlanCalculator::areaPerEclipseCell() const
|
||||
{
|
||||
std::map<size_t, double> areaForEclipseReservoirCells;
|
||||
|
||||
for (const auto& singleCellCalc : m_singleFractureCellCalculators)
|
||||
{
|
||||
const auto& cellIndices = singleCellCalc.globalIndiciesToContributingEclipseCells();
|
||||
const auto& cellAreas = singleCellCalc.contributingEclipseCellAreas();
|
||||
|
||||
for (size_t i = 0; i < cellIndices.size(); i++)
|
||||
{
|
||||
areaForEclipseReservoirCells[cellIndices[i]] += cellAreas[i];
|
||||
}
|
||||
}
|
||||
|
||||
return areaForEclipseReservoirCells;
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Statoil ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaPorosityModel.h"
|
||||
|
||||
#include "RigEclipseToStimPlanCellTransmissibilityCalculator.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfMatrix4.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
class QString;
|
||||
|
||||
class RimEclipseCase;
|
||||
class RigFractureGrid;
|
||||
class RigTransmissibilityCondenser;
|
||||
class RimFracture;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RigEclipseToStimPlanCalculator
|
||||
{
|
||||
public:
|
||||
explicit RigEclipseToStimPlanCalculator(RimEclipseCase* caseToApply,
|
||||
cvf::Mat4d fractureTransform,
|
||||
double skinFactor,
|
||||
double cDarcy,
|
||||
const RigFractureGrid& fractureGrid);
|
||||
|
||||
void appendDataToTransmissibilityCondenser(RimFracture* fracture,
|
||||
bool useFiniteConductivityInFracture,
|
||||
RigTransmissibilityCondenser* condenser) const;
|
||||
|
||||
// Returns the area of each stimplan cell intersecting eclipse cells
|
||||
std::map<size_t, double> areaPerEclipseCell() const;
|
||||
|
||||
private:
|
||||
void computeValues();
|
||||
|
||||
private:
|
||||
RimEclipseCase* m_case;
|
||||
double m_cDarcy;
|
||||
double m_fractureSkinFactor;
|
||||
cvf::Mat4d m_fractureTransform;
|
||||
const RigFractureGrid& m_fractureGrid;
|
||||
|
||||
std::vector<RigEclipseToStimPlanCellTransmissibilityCalculator> m_singleFractureCellCalculators;
|
||||
};
|
@ -49,34 +49,41 @@ RigEclipseToStimPlanCellTransmissibilityCalculator::RigEclipseToStimPlanCellTran
|
||||
, m_cDarcy(cDarcy)
|
||||
, m_stimPlanCell(stimPlanCell)
|
||||
{
|
||||
calculateStimPlanCellsMatrixTransmissibility();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<size_t>& RigEclipseToStimPlanCellTransmissibilityCalculator::globalIndiciesToContributingEclipseCells()
|
||||
const std::vector<size_t>& RigEclipseToStimPlanCellTransmissibilityCalculator::globalIndiciesToContributingEclipseCells() const
|
||||
{
|
||||
if (m_globalIndiciesToContributingEclipseCells.empty())
|
||||
{
|
||||
calculateStimPlanCellsMatrixTransmissibility();
|
||||
}
|
||||
|
||||
return m_globalIndiciesToContributingEclipseCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigEclipseToStimPlanCellTransmissibilityCalculator::contributingEclipseCellTransmissibilities()
|
||||
const std::vector<double>& RigEclipseToStimPlanCellTransmissibilityCalculator::contributingEclipseCellTransmissibilities() const
|
||||
{
|
||||
if (m_globalIndiciesToContributingEclipseCells.empty())
|
||||
{
|
||||
calculateStimPlanCellsMatrixTransmissibility();
|
||||
}
|
||||
|
||||
return m_contributingEclipseCellTransmissibilities;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigEclipseToStimPlanCellTransmissibilityCalculator::contributingEclipseCellAreas() const
|
||||
{
|
||||
return m_contributingEclipseCellAreas;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigFractureCell& RigEclipseToStimPlanCellTransmissibilityCalculator::fractureCell() const
|
||||
{
|
||||
return m_stimPlanCell;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -229,6 +236,7 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM
|
||||
|
||||
m_globalIndiciesToContributingEclipseCells.push_back(fracCell);
|
||||
m_contributingEclipseCellTransmissibilities.push_back(transmissibility);
|
||||
m_contributingEclipseCellAreas.push_back(fractureArea);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -21,8 +21,8 @@
|
||||
#include "RiaPorosityModel.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cvfMatrix4.h"
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -30,7 +30,6 @@ class QString;
|
||||
|
||||
class RimEclipseCase;
|
||||
class RigFractureCell;
|
||||
class RigEclipseCaseData;
|
||||
class RigResultAccessor;
|
||||
|
||||
//==================================================================================================
|
||||
@ -40,23 +39,24 @@ class RigResultAccessor;
|
||||
class RigEclipseToStimPlanCellTransmissibilityCalculator
|
||||
{
|
||||
public:
|
||||
explicit RigEclipseToStimPlanCellTransmissibilityCalculator(RimEclipseCase* caseToApply,
|
||||
cvf::Mat4d fractureTransform,
|
||||
double skinFactor,
|
||||
double cDarcy,
|
||||
explicit RigEclipseToStimPlanCellTransmissibilityCalculator(RimEclipseCase* caseToApply,
|
||||
cvf::Mat4d fractureTransform,
|
||||
double skinFactor,
|
||||
double cDarcy,
|
||||
const RigFractureCell& stimPlanCell);
|
||||
|
||||
const std::vector<size_t>& globalIndiciesToContributingEclipseCells();
|
||||
const std::vector<double>& contributingEclipseCellTransmissibilities();
|
||||
const std::vector<size_t>& globalIndiciesToContributingEclipseCells() const;
|
||||
const std::vector<double>& contributingEclipseCellTransmissibilities() const;
|
||||
const std::vector<double>& contributingEclipseCellAreas() const;
|
||||
const RigFractureCell& fractureCell() const;
|
||||
|
||||
private:
|
||||
void calculateStimPlanCellsMatrixTransmissibility();
|
||||
std::vector<size_t> getPotentiallyFracturedCellsForPolygon(const std::vector<cvf::Vec3d>& polygon) const;
|
||||
void calculateStimPlanCellsMatrixTransmissibility();
|
||||
std::vector<size_t> getPotentiallyFracturedCellsForPolygon(const std::vector<cvf::Vec3d>& polygon) const;
|
||||
|
||||
static cvf::ref<RigResultAccessor>
|
||||
loadResultAndCreateResultAccessor(RimEclipseCase* eclipseCase,
|
||||
RiaDefines::PorosityModelType porosityModel,
|
||||
const QString& uiResultName);
|
||||
static cvf::ref<RigResultAccessor> loadResultAndCreateResultAccessor(RimEclipseCase* eclipseCase,
|
||||
RiaDefines::PorosityModelType porosityModel,
|
||||
const QString& uiResultName);
|
||||
|
||||
private:
|
||||
RimEclipseCase* m_case;
|
||||
@ -66,4 +66,5 @@ private:
|
||||
const RigFractureCell& m_stimPlanCell;
|
||||
std::vector<size_t> m_globalIndiciesToContributingEclipseCells;
|
||||
std::vector<double> m_contributingEclipseCellTransmissibilities;
|
||||
std::vector<double> m_contributingEclipseCellAreas;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user