mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3197 Refactoring : Whitespace
This commit is contained in:
parent
a672e1fa7f
commit
b111b87e41
@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -38,19 +38,19 @@
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEllipseFractureTemplate, "RimEllipseFractureTemplate");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEllipseFractureTemplate::RimEllipseFractureTemplate()
|
||||
{
|
||||
CAF_PDM_InitObject("Fracture Template", ":/FractureTemplate16x16.png", "", "");
|
||||
// clang-format off
|
||||
|
||||
CAF_PDM_InitObject("Fracture Template", ":/FractureTemplate16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_halfLength, "HalfLength", 0.0, "Halflength X<sub>f</sub>", "", "", "");
|
||||
CAF_PDM_InitField(&m_height, "Height", 0.0, "Height", "", "", "");
|
||||
@ -59,17 +59,17 @@ RimEllipseFractureTemplate::RimEllipseFractureTemplate()
|
||||
|
||||
m_fractureGrid = new RigFractureGrid();
|
||||
assignConductivityToCellsInsideEllipse();
|
||||
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEllipseFractureTemplate::~RimEllipseFractureTemplate()
|
||||
{
|
||||
}
|
||||
RimEllipseFractureTemplate::~RimEllipseFractureTemplate() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::loadDataAndUpdate()
|
||||
{
|
||||
@ -80,21 +80,20 @@ void RimEllipseFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
RimFractureTemplate::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
if ( changedField == &m_halfLength
|
||||
|| changedField == &m_height
|
||||
|| changedField == &m_width
|
||||
|| changedField == &m_permeability
|
||||
|| changedField == &m_scaleApplyButton)
|
||||
if (changedField == &m_halfLength || changedField == &m_height || changedField == &m_width ||
|
||||
changedField == &m_permeability || changedField == &m_scaleApplyButton)
|
||||
{
|
||||
m_scaleApplyButton = false;
|
||||
|
||||
//Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
// Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
reload();
|
||||
}
|
||||
|
||||
@ -105,10 +104,10 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices) const
|
||||
void RimEllipseFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices) const
|
||||
{
|
||||
RigEllipsisTesselator tesselator(20);
|
||||
|
||||
@ -119,7 +118,7 @@ void RimEllipseFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon() const
|
||||
{
|
||||
@ -139,7 +138,7 @@ std::vector<cvf::Vec3f> RimEllipseFractureTemplate::fractureBorderPolygon() cons
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::changeUnits()
|
||||
{
|
||||
@ -156,7 +155,7 @@ void RimEllipseFractureTemplate::changeUnits()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::assignConductivityToCellsInsideEllipse()
|
||||
{
|
||||
@ -164,47 +163,53 @@ void RimEllipseFractureTemplate::assignConductivityToCellsInsideEllipse()
|
||||
|
||||
int numberOfCellsI = 35;
|
||||
int numberOfCellsJ = 35;
|
||||
|
||||
double height = m_height * m_heightScaleFactor;
|
||||
|
||||
double height = m_height * m_heightScaleFactor;
|
||||
double halfLength = m_halfLength * m_widthScaleFactor;
|
||||
|
||||
double cellSizeX = (halfLength * 2) / numberOfCellsI * m_widthScaleFactor;
|
||||
double cellSizeZ = height / numberOfCellsJ * m_heightScaleFactor;
|
||||
|
||||
double cellArea = cellSizeX * cellSizeZ;
|
||||
double cellArea = cellSizeX * cellSizeZ;
|
||||
double areaTresholdForIncludingCell = 0.5 * cellArea;
|
||||
|
||||
|
||||
for (int i = 0; i < numberOfCellsI; i++)
|
||||
{
|
||||
for (int j = 0; j < numberOfCellsJ; j++)
|
||||
{
|
||||
double X1 = - halfLength + i * cellSizeX;
|
||||
double X2 = - halfLength + (i+1) * cellSizeX;
|
||||
double Y1 = - height / 2 + j * cellSizeZ;
|
||||
double Y2 = - height / 2 + (j+1) * cellSizeZ;
|
||||
double X1 = -halfLength + i * cellSizeX;
|
||||
double X2 = -halfLength + (i + 1) * cellSizeX;
|
||||
double Y1 = -height / 2 + j * cellSizeZ;
|
||||
double Y2 = -height / 2 + (j + 1) * cellSizeZ;
|
||||
|
||||
std::vector<cvf::Vec3d> cellPolygon;
|
||||
cellPolygon.push_back(cvf::Vec3d(X1, Y1, 0.0));
|
||||
cellPolygon.push_back(cvf::Vec3d(X2, Y1, 0.0));
|
||||
cellPolygon.push_back(cvf::Vec3d(X2, Y2, 0.0));
|
||||
cellPolygon.push_back(cvf::Vec3d(X1, Y2, 0.0));
|
||||
|
||||
|
||||
double cond = conductivity();
|
||||
|
||||
std::vector<cvf::Vec3f> ellipseFracPolygon = fractureBorderPolygon();
|
||||
std::vector<cvf::Vec3d> ellipseFracPolygonDouble;
|
||||
for (const auto& v : ellipseFracPolygon) ellipseFracPolygonDouble.push_back(static_cast<cvf::Vec3d>(v));
|
||||
std::vector<std::vector<cvf::Vec3d> >clippedFracturePolygons = RigCellGeometryTools::intersectPolygons(cellPolygon, ellipseFracPolygonDouble);
|
||||
for (const auto& v : ellipseFracPolygon)
|
||||
ellipseFracPolygonDouble.push_back(static_cast<cvf::Vec3d>(v));
|
||||
std::vector<std::vector<cvf::Vec3d>> clippedFracturePolygons =
|
||||
RigCellGeometryTools::intersectPolygons(cellPolygon, ellipseFracPolygonDouble);
|
||||
if (!clippedFracturePolygons.empty())
|
||||
{
|
||||
for (const auto& clippedFracturePolygon : clippedFracturePolygons)
|
||||
{
|
||||
double areaCutPolygon = cvf::GeometryTools::polygonAreaNormal3D(clippedFracturePolygon).length();
|
||||
if (areaCutPolygon < areaTresholdForIncludingCell) cond = 0.0; //Cell is excluded from calculation, cond is set to zero. Must be included for indexing to be correct
|
||||
if (areaCutPolygon < areaTresholdForIncludingCell)
|
||||
{
|
||||
cond = 0.0; // Cell is excluded from calculation, cond is set to zero. Must be included for indexing to be
|
||||
// correct
|
||||
}
|
||||
}
|
||||
}
|
||||
else cond = 0.0;
|
||||
else
|
||||
cond = 0.0;
|
||||
|
||||
RigFractureCell fractureCell(cellPolygon, i, j);
|
||||
fractureCell.setConductivityValue(cond);
|
||||
@ -212,31 +217,31 @@ void RimEllipseFractureTemplate::assignConductivityToCellsInsideEllipse()
|
||||
fractureCells.push_back(fractureCell);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_fractureGrid->setFractureCells(fractureCells);
|
||||
|
||||
// Set well intersection to center of ellipse
|
||||
std::pair<size_t, size_t> wellCenterFractureCellIJ = std::make_pair(numberOfCellsI / 2, numberOfCellsJ / 2);
|
||||
m_fractureGrid->setWellCenterFractureCellIJ(wellCenterFractureCellIJ);
|
||||
|
||||
|
||||
m_fractureGrid->setICellCount(numberOfCellsI);
|
||||
m_fractureGrid->setJCellCount(numberOfCellsJ);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
FractureWidthAndConductivity RimEllipseFractureTemplate::widthAndConductivityAtWellPathIntersection() const
|
||||
{
|
||||
FractureWidthAndConductivity values;
|
||||
values.m_width = m_width;
|
||||
values.m_width = m_width;
|
||||
values.m_permeability = m_permeability;
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigFractureGrid* RimEllipseFractureTemplate::fractureGrid() const
|
||||
{
|
||||
@ -244,7 +249,7 @@ const RigFractureGrid* RimEllipseFractureTemplate::fractureGrid() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
{
|
||||
@ -267,19 +272,19 @@ void RimEllipseFractureTemplate::setDefaultValuesFromUnit()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimEllipseFractureTemplate::conductivity() const
|
||||
{
|
||||
double cond = cvf::UNDEFINED_DOUBLE;
|
||||
if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
//Conductivity should be md-m, width is in m
|
||||
// Conductivity should be md-m, width is in m
|
||||
cond = m_permeability * m_width;
|
||||
}
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
//Conductivity should be md-ft, but width is in inches
|
||||
// Conductivity should be md-ft, but width is in inches
|
||||
cond = m_permeability * RiaEclipseUnitTools::inchToFeet(m_width);
|
||||
}
|
||||
|
||||
@ -287,7 +292,7 @@ double RimEllipseFractureTemplate::conductivity() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimEllipseFractureTemplate::halfLength() const
|
||||
{
|
||||
@ -295,7 +300,7 @@ double RimEllipseFractureTemplate::halfLength() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimEllipseFractureTemplate::height() const
|
||||
{
|
||||
@ -303,7 +308,7 @@ double RimEllipseFractureTemplate::height() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimEllipseFractureTemplate::width() const
|
||||
{
|
||||
@ -311,9 +316,12 @@ double RimEllipseFractureTemplate::width() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::appendDataToResultStatistics(const QString& uiResultName, const QString& unit, MinMaxAccumulator& minMaxAccumulator, PosNegAccumulator& posNegAccumulator) const
|
||||
void RimEllipseFractureTemplate::appendDataToResultStatistics(const QString& uiResultName,
|
||||
const QString& unit,
|
||||
MinMaxAccumulator& minMaxAccumulator,
|
||||
PosNegAccumulator& posNegAccumulator) const
|
||||
{
|
||||
if (uiResultName == RiaDefines::conductivityResultName())
|
||||
{
|
||||
@ -323,7 +331,7 @@ void RimEllipseFractureTemplate::appendDataToResultStatistics(const QString& uiR
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<QString, QString>> RimEllipseFractureTemplate::uiResultNamesWithUnit() const
|
||||
{
|
||||
@ -336,7 +344,7 @@ std::vector<std::pair<QString, QString>> RimEllipseFractureTemplate::uiResultNam
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::reload()
|
||||
{
|
||||
@ -350,7 +358,7 @@ void RimEllipseFractureTemplate::reload()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitSystem neededUnit)
|
||||
{
|
||||
@ -361,20 +369,20 @@ void RimEllipseFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitSy
|
||||
|
||||
if (neededUnit == RiaEclipseUnitTools::UNITS_FIELD)
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::meterToFeet(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::meterToFeet(m_height);
|
||||
m_width = RiaEclipseUnitTools::meterToInch(m_width);
|
||||
m_halfLength = RiaEclipseUnitTools::meterToFeet(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::meterToFeet(m_height);
|
||||
m_width = RiaEclipseUnitTools::meterToInch(m_width);
|
||||
}
|
||||
else if (neededUnit == RiaEclipseUnitTools::UNITS_METRIC)
|
||||
{
|
||||
m_halfLength = RiaEclipseUnitTools::feetToMeter(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::feetToMeter(m_height);
|
||||
m_width = RiaEclipseUnitTools::inchToMeter(m_width);
|
||||
m_halfLength = RiaEclipseUnitTools::feetToMeter(m_halfLength);
|
||||
m_height = RiaEclipseUnitTools::feetToMeter(m_height);
|
||||
m_width = RiaEclipseUnitTools::inchToMeter(m_width);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
@ -401,7 +409,7 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
m_permeability.uiCapability()->setUiHidden(true);
|
||||
m_width.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
|
||||
uiOrdering.add(&m_name);
|
||||
uiOrdering.add(&m_id);
|
||||
|
||||
@ -425,4 +433,3 @@ void RimEllipseFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pdm
|
||||
|
||||
RimFractureTemplate::defineUiOrdering(uiConfigName, uiOrdering);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -28,13 +28,15 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
#include "cafPdmUiDoubleValueEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// clang-format off
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
@ -169,15 +171,15 @@ RimFractureTemplate::RimFractureTemplate()
|
||||
m_scaleApplyButton.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate::~RimFractureTemplate()
|
||||
{
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate::~RimFractureTemplate() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimFractureTemplate::id() const
|
||||
{
|
||||
@ -185,7 +187,7 @@ int RimFractureTemplate::id() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setName(const QString& name)
|
||||
{
|
||||
@ -193,7 +195,7 @@ void RimFractureTemplate::setName(const QString& name)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setFractureTemplateUnit(RiaEclipseUnitTools::UnitSystemType unitSystem)
|
||||
{
|
||||
@ -201,7 +203,7 @@ void RimFractureTemplate::setFractureTemplateUnit(RiaEclipseUnitTools::UnitSyste
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureTemplate::name() const
|
||||
{
|
||||
@ -209,7 +211,7 @@ QString RimFractureTemplate::name() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate::FracOrientationEnum RimFractureTemplate::orientationType() const
|
||||
{
|
||||
@ -217,7 +219,7 @@ RimFractureTemplate::FracOrientationEnum RimFractureTemplate::orientationType()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaEclipseUnitTools::UnitSystemType RimFractureTemplate::fractureTemplateUnit() const
|
||||
{
|
||||
@ -225,7 +227,7 @@ RiaEclipseUnitTools::UnitSystemType RimFractureTemplate::fractureTemplateUnit()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimFractureTemplate::userDescriptionField()
|
||||
{
|
||||
@ -233,19 +235,21 @@ caf::PdmFieldHandle* RimFractureTemplate::userDescriptionField()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
bool createDisplayModelAndRedraw = false;
|
||||
if (changedField == &m_azimuthAngle || changedField == &m_orientationType)
|
||||
{
|
||||
//Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
// Changes to one of these parameters should change all fractures with this fracture template attached.
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
//Regenerate geometry
|
||||
// Regenerate geometry
|
||||
std::vector<RimFracture*> fractures;
|
||||
proj->descendantsIncludingThisOfType(fractures);
|
||||
|
||||
@ -264,7 +268,10 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
fracture->m_azimuth = m_azimuthAngle;
|
||||
}
|
||||
else fracture->updateAzimuthBasedOnWellAzimuthAngle();
|
||||
else
|
||||
{
|
||||
fracture->updateAzimuthBasedOnWellAzimuthAngle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -289,7 +296,8 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
fracture->m_perforationLength = m_perforationLength;
|
||||
}
|
||||
if (changedField == &m_perforationEfficiency && (fabs(oldValue.toDouble() - fracture->m_perforationEfficiency()) < 1e-5))
|
||||
if (changedField == &m_perforationEfficiency &&
|
||||
(fabs(oldValue.toDouble() - fracture->m_perforationEfficiency()) < 1e-5))
|
||||
{
|
||||
fracture->m_perforationEfficiency = m_perforationEfficiency;
|
||||
}
|
||||
@ -318,7 +326,7 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
@ -337,7 +345,7 @@ void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
|
||||
auto nonDarcyFlowGroup = uiOrdering.addNewGroup("Non-Darcy Flow");
|
||||
nonDarcyFlowGroup->add(&m_nonDarcyFlowType);
|
||||
|
||||
|
||||
if (m_nonDarcyFlowType == RimFractureTemplate::NON_DARCY_USER_DEFINED)
|
||||
{
|
||||
nonDarcyFlowGroup->add(&m_userDefinedDFactor);
|
||||
@ -365,7 +373,7 @@ void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
nonDarcyFlowGroup->add(&m_dFactorDisplayField);
|
||||
|
||||
{
|
||||
auto group = nonDarcyFlowGroup->addNewGroup("D Factor Details");
|
||||
auto group = nonDarcyFlowGroup->addNewGroup("D Factor Details");
|
||||
group->setCollapsedByDefault(true);
|
||||
group->add(&m_dFactorSummaryText);
|
||||
}
|
||||
@ -376,9 +384,11 @@ void RimFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
void RimFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (field == &m_perforationEfficiency)
|
||||
{
|
||||
@ -396,16 +406,16 @@ void RimFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field
|
||||
if (myAttr)
|
||||
{
|
||||
myAttr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
||||
|
||||
|
||||
QFont font("Monospace", 10);
|
||||
myAttr->font = font;
|
||||
myAttr->font = font;
|
||||
myAttr->textMode = caf::PdmUiTextEditorAttribute::HTML;
|
||||
}
|
||||
}
|
||||
|
||||
if (field == &m_scaleApplyButton)
|
||||
{
|
||||
caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*> (attribute);
|
||||
caf::PdmUiPushButtonEditorAttribute* attrib = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>(attribute);
|
||||
if (attrib)
|
||||
{
|
||||
attrib->m_buttonText = "Apply";
|
||||
@ -457,8 +467,8 @@ void RimFractureTemplate::prepareFieldsForUiDisplay()
|
||||
m_fractureWidth.uiCapability()->setUiName("Fracture Width [ft]");
|
||||
}
|
||||
|
||||
if (m_orientationType == RimFractureTemplate::ALONG_WELL_PATH
|
||||
|| m_orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
if (m_orientationType == RimFractureTemplate::ALONG_WELL_PATH ||
|
||||
m_orientationType == RimFractureTemplate::TRANSVERSE_WELL_PATH)
|
||||
{
|
||||
m_azimuthAngle.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
@ -472,7 +482,7 @@ void RimFractureTemplate::prepareFieldsForUiDisplay()
|
||||
m_perforationEfficiency.uiCapability()->setUiHidden(false);
|
||||
m_perforationLength.uiCapability()->setUiHidden(false);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
m_perforationEfficiency.uiCapability()->setUiHidden(true);
|
||||
m_perforationLength.uiCapability()->setUiHidden(true);
|
||||
@ -519,12 +529,12 @@ void RimFractureTemplate::prepareFieldsForUiDisplay()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureTemplate::dFactorSummary() const
|
||||
{
|
||||
QString text;
|
||||
|
||||
|
||||
auto val = dFactor();
|
||||
text += QString("D-factor : %1").arg(val);
|
||||
|
||||
@ -561,7 +571,7 @@ QString RimFractureTemplate::dFactorSummary() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::effectivePermeability() const
|
||||
{
|
||||
@ -572,7 +582,7 @@ double RimFractureTemplate::effectivePermeability() const
|
||||
else
|
||||
{
|
||||
double fracPermeability = 0.0;
|
||||
auto values = widthAndConductivityAtWellPathIntersection();
|
||||
auto values = widthAndConductivityAtWellPathIntersection();
|
||||
if (values.isWidthAndPermeabilityDefined())
|
||||
{
|
||||
fracPermeability = values.m_permeability;
|
||||
@ -580,7 +590,7 @@ double RimFractureTemplate::effectivePermeability() const
|
||||
else
|
||||
{
|
||||
auto conductivity = values.m_conductivity;
|
||||
auto width = fractureWidth();
|
||||
auto width = fractureWidth();
|
||||
|
||||
if (fabs(width) < 1e-10) return HUGE_VAL;
|
||||
|
||||
@ -592,7 +602,7 @@ double RimFractureTemplate::effectivePermeability() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::dFactor() const
|
||||
{
|
||||
@ -604,16 +614,16 @@ double RimFractureTemplate::dFactor() const
|
||||
}
|
||||
else
|
||||
{
|
||||
auto alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
auto beta = m_inertialCoefficient;
|
||||
auto alpha = RiaDefines::nonDarcyFlowAlpha(m_fractureTemplateUnit());
|
||||
auto beta = m_inertialCoefficient;
|
||||
auto effPerm = effectivePermeability();
|
||||
auto gamma = m_relativeGasDensity;
|
||||
auto gamma = m_relativeGasDensity;
|
||||
|
||||
auto radius = m_wellDiameter / 2.0;
|
||||
auto mu = m_gasViscosity;
|
||||
auto h = fractureWidth();
|
||||
auto mu = m_gasViscosity;
|
||||
auto h = fractureWidth();
|
||||
|
||||
double numerator = alpha * beta * effPerm * gamma;
|
||||
double numerator = alpha * beta * effPerm * gamma;
|
||||
double denumerator = h * radius * mu;
|
||||
|
||||
if (denumerator < 1e-10) return HUGE_VAL;
|
||||
@ -625,7 +635,7 @@ double RimFractureTemplate::dFactor() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::kh() const
|
||||
{
|
||||
@ -638,12 +648,12 @@ double RimFractureTemplate::kh() const
|
||||
// If conductivity is found in stim plan file, use this directly
|
||||
return values.m_conductivity;
|
||||
}
|
||||
|
||||
|
||||
return effectivePermeability() * fractureWidth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitSystem neededUnit)
|
||||
{
|
||||
@ -662,7 +672,7 @@ void RimFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitSystem ne
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::disconnectAllFracturesAndRedrawViews() const
|
||||
{
|
||||
@ -690,7 +700,7 @@ void RimFractureTemplate::disconnectAllFracturesAndRedrawViews() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setId(int id)
|
||||
{
|
||||
@ -698,31 +708,34 @@ void RimFractureTemplate::setId(int id)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setScaleFactors(double widthScale, double heightScale, double dFactorScale, double conductivityScale)
|
||||
{
|
||||
m_widthScaleFactor = widthScale;
|
||||
m_heightScaleFactor = heightScale;
|
||||
m_dFactorScaleFactor = dFactorScale;
|
||||
m_widthScaleFactor = widthScale;
|
||||
m_heightScaleFactor = heightScale;
|
||||
m_dFactorScaleFactor = dFactorScale;
|
||||
m_conductivityScaleFactor = conductivityScale;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::scaleFactors(double* widthScale, double* heightScale, double* dFactorScale, double* conductivityScale) const
|
||||
void RimFractureTemplate::scaleFactors(double* widthScale,
|
||||
double* heightScale,
|
||||
double* dFactorScale,
|
||||
double* conductivityScale) const
|
||||
{
|
||||
CVF_ASSERT(widthScale && heightScale && dFactorScale && conductivityScale);
|
||||
|
||||
*widthScale = m_widthScaleFactor;
|
||||
*heightScale = m_widthScaleFactor;
|
||||
*dFactorScale = m_dFactorScaleFactor;
|
||||
*widthScale = m_widthScaleFactor;
|
||||
*heightScale = m_widthScaleFactor;
|
||||
*dFactorScale = m_dFactorScaleFactor;
|
||||
*conductivityScale = m_conductivityScaleFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setContainmentTopKLayer(int topKLayer)
|
||||
{
|
||||
@ -730,7 +743,7 @@ void RimFractureTemplate::setContainmentTopKLayer(int topKLayer)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setContainmentBaseKLayer(int baseKLayer)
|
||||
{
|
||||
@ -738,14 +751,14 @@ void RimFractureTemplate::setContainmentBaseKLayer(int baseKLayer)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::fractureWidth() const
|
||||
{
|
||||
if (m_fractureWidthType == RimFractureTemplate::WIDTH_FROM_FRACTURE)
|
||||
{
|
||||
auto values = widthAndConductivityAtWellPathIntersection();
|
||||
|
||||
|
||||
return values.m_width;
|
||||
}
|
||||
|
||||
@ -753,7 +766,7 @@ double RimFractureTemplate::fractureWidth() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFractureTemplate::nameAndUnit() const
|
||||
{
|
||||
@ -774,7 +787,7 @@ QString RimFractureTemplate::nameAndUnit() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::wellDiameter() const
|
||||
{
|
||||
@ -782,7 +795,7 @@ double RimFractureTemplate::wellDiameter() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFractureTemplate::perforationLength() const
|
||||
{
|
||||
@ -790,15 +803,15 @@ double RimFractureTemplate::perforationLength() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimFractureContainment * RimFractureTemplate::fractureContainment() const
|
||||
const RimFractureContainment* RimFractureTemplate::fractureContainment() const
|
||||
{
|
||||
return m_fractureContainment();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureTemplate::FracConductivityEnum RimFractureTemplate::conductivityType() const
|
||||
{
|
||||
@ -806,7 +819,7 @@ RimFractureTemplate::FracConductivityEnum RimFractureTemplate::conductivityType(
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
float RimFractureTemplate::azimuthAngle() const
|
||||
{
|
||||
@ -814,7 +827,7 @@ float RimFractureTemplate::azimuthAngle() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
float RimFractureTemplate::skinFactor() const
|
||||
{
|
||||
@ -822,7 +835,7 @@ float RimFractureTemplate::skinFactor() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplate::setDefaultWellDiameterFromUnit()
|
||||
{
|
||||
@ -837,7 +850,7 @@ void RimFractureTemplate::setDefaultWellDiameterFromUnit()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFractureTemplate::isNonDarcyFlowEnabled() const
|
||||
{
|
||||
|
@ -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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -24,8 +24,8 @@
|
||||
|
||||
#include "RifStimPlanXmlReader.h"
|
||||
|
||||
#include "RigStimPlanFractureDefinition.h"
|
||||
#include "RigFractureGrid.h"
|
||||
#include "RigStimPlanFractureDefinition.h"
|
||||
|
||||
#include "RigFractureCell.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -47,18 +47,20 @@
|
||||
#include <QFileInfo>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
static std::vector<double> EMPTY_DOUBLE_VECTOR;
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimStimPlanFractureTemplate, "RimStimPlanFractureTemplate");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
||||
{
|
||||
// clang-format off
|
||||
|
||||
CAF_PDM_InitObject("Fracture Template", ":/FractureTemplate16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_stimPlanFileName, "StimPlanFileName", QString(""), "File Name", "", "", "");
|
||||
@ -82,17 +84,17 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
||||
m_areaWeightedConductivity = 0.0;
|
||||
m_areaWeightedWidth = 0.0;
|
||||
m_longestYRangeAboveConductivityThreshold = 0.0;
|
||||
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimStimPlanFractureTemplate::~RimStimPlanFractureTemplate()
|
||||
{
|
||||
}
|
||||
RimStimPlanFractureTemplate::~RimStimPlanFractureTemplate() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimStimPlanFractureTemplate::activeTimeStepIndex()
|
||||
{
|
||||
@ -100,9 +102,11 @@ int RimStimPlanFractureTemplate::activeTimeStepIndex()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
RimFractureTemplate::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
|
||||
@ -115,7 +119,7 @@ void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
||||
|
||||
if (&m_activeTimeStepIndex == changedField)
|
||||
{
|
||||
//Changes to this parameters should change all fractures with this fracture template attached.
|
||||
// Changes to this parameters should change all fractures with this fracture template attached.
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
@ -133,11 +137,9 @@ void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
||||
}
|
||||
}
|
||||
|
||||
if (&m_wellPathDepthAtFracture == changedField
|
||||
|| &m_borderPolygonResultName == changedField
|
||||
|| &m_activeTimeStepIndex == changedField
|
||||
|| &m_stimPlanFileName == changedField
|
||||
|| &m_conductivityResultNameOnFile == changedField)
|
||||
if (&m_wellPathDepthAtFracture == changedField || &m_borderPolygonResultName == changedField ||
|
||||
&m_activeTimeStepIndex == changedField || &m_stimPlanFileName == changedField ||
|
||||
&m_conductivityResultNameOnFile == changedField)
|
||||
{
|
||||
updateFractureGrid();
|
||||
|
||||
@ -157,7 +159,7 @@ void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::setFileName(const QString& fileName)
|
||||
{
|
||||
@ -165,7 +167,7 @@ void RimStimPlanFractureTemplate::setFileName(const QString& fileName)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RimStimPlanFractureTemplate::fileName()
|
||||
{
|
||||
@ -173,7 +175,7 @@ const QString& RimStimPlanFractureTemplate::fileName()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
||||
{
|
||||
@ -181,7 +183,7 @@ void RimStimPlanFractureTemplate::updateFilePathsFromProjectPath(const QString&
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
||||
{
|
||||
@ -191,12 +193,16 @@ void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
||||
computePerforationLength();
|
||||
|
||||
RiaLogging::info(QString("Setting well/fracture intersection depth at %1").arg(m_wellPathDepthAtFracture));
|
||||
|
||||
|
||||
m_activeTimeStepIndex = static_cast<int>(m_stimPlanFractureDefinitionData->totalNumberTimeSteps() - 1);
|
||||
|
||||
|
||||
bool polygonPropertySet = setBorderPolygonResultNameToDefault();
|
||||
if (polygonPropertySet) RiaLogging::info(QString("Calculating polygon outline based on %1 at timestep %2").arg(m_borderPolygonResultName).arg(m_stimPlanFractureDefinitionData->timeSteps()[m_activeTimeStepIndex]));
|
||||
else RiaLogging::info(QString("Property for polygon calculation not set."));
|
||||
if (polygonPropertySet)
|
||||
RiaLogging::info(QString("Calculating polygon outline based on %1 at timestep %2")
|
||||
.arg(m_borderPolygonResultName)
|
||||
.arg(m_stimPlanFractureDefinitionData->timeSteps()[m_activeTimeStepIndex]));
|
||||
else
|
||||
RiaLogging::info(QString("Property for polygon calculation not set."));
|
||||
|
||||
if (!m_stimPlanFractureDefinitionData->conductivityResultNames().isEmpty())
|
||||
{
|
||||
@ -205,7 +211,7 @@ void RimStimPlanFractureTemplate::setDefaultsBasedOnXMLfile()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
{
|
||||
@ -218,7 +224,7 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if width not found, use conductivity
|
||||
if (hasConductivity())
|
||||
{
|
||||
@ -236,7 +242,7 @@ bool RimStimPlanFractureTemplate::setBorderPolygonResultNameToDefault()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
{
|
||||
@ -244,7 +250,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
|
||||
if (m_readError) return;
|
||||
|
||||
m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile( m_stimPlanFileName(),
|
||||
m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile(m_stimPlanFileName(),
|
||||
m_conductivityScaleFactor(),
|
||||
m_widthScaleFactor(),
|
||||
m_heightScaleFactor(),
|
||||
@ -267,7 +273,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
else
|
||||
{
|
||||
setFractureTemplateUnit(RiaEclipseUnitTools::UNITS_UNKNOWN);
|
||||
setFractureTemplateUnit(RiaEclipseUnitTools::UNITS_UNKNOWN);
|
||||
m_readError = true;
|
||||
}
|
||||
|
||||
@ -281,9 +287,10 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimStimPlanFractureTemplate::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
QList<caf::PdmOptionItemInfo> RimStimPlanFractureTemplate::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@ -322,14 +329,14 @@ QList<caf::PdmOptionItemInfo> RimStimPlanFractureTemplate::calculateValueOptions
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::computeDepthOfWellPathAtFracture()
|
||||
{
|
||||
if (!m_stimPlanFractureDefinitionData.isNull())
|
||||
{
|
||||
double firstTvd = m_stimPlanFractureDefinitionData->topPerfTvd();
|
||||
double lastTvd = m_stimPlanFractureDefinitionData->bottomPerfTvd();
|
||||
double lastTvd = m_stimPlanFractureDefinitionData->bottomPerfTvd();
|
||||
|
||||
if (firstTvd != HUGE_VAL && lastTvd != HUGE_VAL)
|
||||
{
|
||||
@ -337,22 +344,22 @@ void RimStimPlanFractureTemplate::computeDepthOfWellPathAtFracture()
|
||||
}
|
||||
else
|
||||
{
|
||||
firstTvd = m_stimPlanFractureDefinitionData->minDepth();
|
||||
lastTvd = m_stimPlanFractureDefinitionData->maxDepth();
|
||||
firstTvd = m_stimPlanFractureDefinitionData->minDepth();
|
||||
lastTvd = m_stimPlanFractureDefinitionData->maxDepth();
|
||||
m_wellPathDepthAtFracture = (firstTvd + lastTvd) / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::computePerforationLength()
|
||||
{
|
||||
if (!m_stimPlanFractureDefinitionData.isNull())
|
||||
{
|
||||
double firstTvd = m_stimPlanFractureDefinitionData->topPerfTvd();
|
||||
double lastTvd = m_stimPlanFractureDefinitionData->bottomPerfTvd();
|
||||
double lastTvd = m_stimPlanFractureDefinitionData->bottomPerfTvd();
|
||||
|
||||
if (firstTvd != HUGE_VAL && lastTvd != HUGE_VAL)
|
||||
{
|
||||
@ -364,39 +371,39 @@ void RimStimPlanFractureTemplate::computePerforationLength()
|
||||
{
|
||||
m_perforationLength = 10;
|
||||
}
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD && m_perforationLength < RiaEclipseUnitTools::meterToFeet(10))
|
||||
else if (fractureTemplateUnit() == RiaEclipseUnitTools::UNITS_FIELD &&
|
||||
m_perforationLength < RiaEclipseUnitTools::meterToFeet(10))
|
||||
{
|
||||
m_perforationLength = std::round(RiaEclipseUnitTools::meterToFeet(10));
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimStimPlanFractureTemplate::getUnitForStimPlanParameter(QString parameterName)
|
||||
{
|
||||
QString unit;
|
||||
bool found = false;
|
||||
bool foundMultiple = false;
|
||||
bool found = false;
|
||||
bool foundMultiple = false;
|
||||
|
||||
for (std::pair<QString, QString> nameUnit : uiResultNamesWithUnit())
|
||||
{
|
||||
if (nameUnit.first == parameterName)
|
||||
{
|
||||
unit = nameUnit.second;
|
||||
unit = nameUnit.second;
|
||||
if (found) foundMultiple = true;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundMultiple) RiaLogging::error(QString("Multiple units found for same parameter"));
|
||||
if (!found) RiaLogging::error(QString("Requested unit / parameter not found for %1 template").arg(name()));
|
||||
if (foundMultiple) RiaLogging::error(QString("Multiple units found for same parameter"));
|
||||
if (!found) RiaLogging::error(QString("Requested unit / parameter not found for %1 template").arg(name()));
|
||||
return unit;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
FractureWidthAndConductivity RimStimPlanFractureTemplate::widthAndConductivityAtWellPathIntersection() const
|
||||
{
|
||||
@ -404,11 +411,11 @@ FractureWidthAndConductivity RimStimPlanFractureTemplate::widthAndConductivityAt
|
||||
|
||||
if (m_fractureGrid.notNull())
|
||||
{
|
||||
std::pair<size_t, size_t> wellCellIJ = m_fractureGrid->fractureCellAtWellCenter();
|
||||
size_t wellCellIndex = m_fractureGrid->getGlobalIndexFromIJ(wellCellIJ.first, wellCellIJ.second);
|
||||
const RigFractureCell& wellCell = m_fractureGrid->cellFromIndex(wellCellIndex);
|
||||
std::pair<size_t, size_t> wellCellIJ = m_fractureGrid->fractureCellAtWellCenter();
|
||||
size_t wellCellIndex = m_fractureGrid->getGlobalIndexFromIJ(wellCellIJ.first, wellCellIJ.second);
|
||||
const RigFractureCell& wellCell = m_fractureGrid->cellFromIndex(wellCellIndex);
|
||||
|
||||
double conductivity = wellCell.getConductivityValue();
|
||||
double conductivity = wellCell.getConductivityValue();
|
||||
values.m_conductivity = conductivity;
|
||||
|
||||
auto nameUnit = widthParameterNameAndUnit();
|
||||
@ -416,7 +423,8 @@ FractureWidthAndConductivity RimStimPlanFractureTemplate::widthAndConductivityAt
|
||||
{
|
||||
double widthInRequiredUnit = HUGE_VAL;
|
||||
{
|
||||
auto resultValues = m_stimPlanFractureDefinitionData->fractureGridResults(nameUnit.first, nameUnit.second, m_activeTimeStepIndex);
|
||||
auto resultValues =
|
||||
m_stimPlanFractureDefinitionData->fractureGridResults(nameUnit.first, nameUnit.second, m_activeTimeStepIndex);
|
||||
|
||||
double widthInFileUnitSystem = resultValues[wellCellIndex];
|
||||
|
||||
@ -436,7 +444,7 @@ FractureWidthAndConductivity RimStimPlanFractureTemplate::widthAndConductivityAt
|
||||
|
||||
if (widthInRequiredUnit != HUGE_VAL && fabs(widthInRequiredUnit) > 1e-20)
|
||||
{
|
||||
values.m_width = widthInRequiredUnit;
|
||||
values.m_width = widthInRequiredUnit;
|
||||
values.m_permeability = conductivity / widthInRequiredUnit;
|
||||
}
|
||||
}
|
||||
@ -446,13 +454,14 @@ FractureWidthAndConductivity RimStimPlanFractureTemplate::widthAndConductivityAt
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<QString, QString> RimStimPlanFractureTemplate::widthParameterNameAndUnit() const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
std::vector<std::pair<QString, QString> > propertyNamesUnitsOnFile = m_stimPlanFractureDefinitionData->getStimPlanPropertyNamesUnits();
|
||||
std::vector<std::pair<QString, QString>> propertyNamesUnitsOnFile =
|
||||
m_stimPlanFractureDefinitionData->getStimPlanPropertyNamesUnits();
|
||||
|
||||
for (const auto& nameUnit : propertyNamesUnitsOnFile)
|
||||
{
|
||||
@ -472,7 +481,7 @@ std::pair<QString, QString> RimStimPlanFractureTemplate::widthParameterNameAndUn
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::setDefaultConductivityResultIfEmpty()
|
||||
{
|
||||
@ -486,7 +495,7 @@ void RimStimPlanFractureTemplate::setDefaultConductivityResultIfEmpty()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimStimPlanFractureTemplate::mapUiResultNameToFileResultName(const QString& uiResultName) const
|
||||
{
|
||||
@ -505,7 +514,7 @@ QString RimStimPlanFractureTemplate::mapUiResultNameToFileResultName(const QStri
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::showStimPlanMesh() const
|
||||
{
|
||||
@ -513,7 +522,7 @@ bool RimStimPlanFractureTemplate::showStimPlanMesh() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitSystem neededUnit)
|
||||
{
|
||||
@ -536,11 +545,15 @@ void RimStimPlanFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitS
|
||||
m_wellPathDepthAtFracture = RiaEclipseUnitTools::feetToMeter(m_wellPathDepthAtFracture);
|
||||
}
|
||||
|
||||
m_activeTimeStepIndex = static_cast<int>(m_stimPlanFractureDefinitionData->totalNumberTimeSteps() - 1);
|
||||
m_activeTimeStepIndex = static_cast<int>(m_stimPlanFractureDefinitionData->totalNumberTimeSteps() - 1);
|
||||
bool polygonPropertySet = setBorderPolygonResultNameToDefault();
|
||||
|
||||
if (polygonPropertySet) RiaLogging::info(QString("Calculating polygon outline based on %1 at timestep %2").arg(m_borderPolygonResultName).arg(m_stimPlanFractureDefinitionData->timeSteps()[m_activeTimeStepIndex]));
|
||||
else RiaLogging::info(QString("Property for polygon calculation not set."));
|
||||
if (polygonPropertySet)
|
||||
RiaLogging::info(QString("Calculating polygon outline based on %1 at timestep %2")
|
||||
.arg(m_borderPolygonResultName)
|
||||
.arg(m_stimPlanFractureDefinitionData->timeSteps()[m_activeTimeStepIndex]));
|
||||
else
|
||||
RiaLogging::info(QString("Property for polygon calculation not set."));
|
||||
|
||||
if (!m_stimPlanFractureDefinitionData->conductivityResultNames().isEmpty())
|
||||
{
|
||||
@ -549,7 +562,7 @@ void RimStimPlanFractureTemplate::convertToUnitSystem(RiaEclipseUnitTools::UnitS
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::reload()
|
||||
{
|
||||
@ -561,11 +574,10 @@ void RimStimPlanFractureTemplate::reload()
|
||||
{
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimStimPlanFractureTemplate::timeSteps()
|
||||
{
|
||||
@ -578,19 +590,20 @@ std::vector<double> RimStimPlanFractureTemplate::timeSteps()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<QString, QString> > RimStimPlanFractureTemplate::uiResultNamesWithUnit() const
|
||||
std::vector<std::pair<QString, QString>> RimStimPlanFractureTemplate::uiResultNamesWithUnit() const
|
||||
{
|
||||
std::vector<std::pair<QString, QString> > propertyNamesAndUnits;
|
||||
|
||||
std::vector<std::pair<QString, QString>> propertyNamesAndUnits;
|
||||
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
QString conductivityUnit = "mD/s";
|
||||
|
||||
std::vector<std::pair<QString, QString> > tmp;
|
||||
std::vector<std::pair<QString, QString>> tmp;
|
||||
|
||||
std::vector<std::pair<QString, QString> > propertyNamesUnitsOnFile = m_stimPlanFractureDefinitionData->getStimPlanPropertyNamesUnits();
|
||||
std::vector<std::pair<QString, QString>> propertyNamesUnitsOnFile =
|
||||
m_stimPlanFractureDefinitionData->getStimPlanPropertyNamesUnits();
|
||||
for (const auto& nameUnitPair : propertyNamesUnitsOnFile)
|
||||
{
|
||||
if (nameUnitPair.first.contains(RiaDefines::conductivityResultName(), Qt::CaseInsensitive))
|
||||
@ -615,9 +628,10 @@ std::vector<std::pair<QString, QString> > RimStimPlanFractureTemplate::uiResultN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::vector<double>> RimStimPlanFractureTemplate::resultValues(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const
|
||||
std::vector<std::vector<double>>
|
||||
RimStimPlanFractureTemplate::resultValues(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
@ -630,9 +644,11 @@ std::vector<std::vector<double>> RimStimPlanFractureTemplate::resultValues(const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const
|
||||
std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QString& uiResultName,
|
||||
const QString& unitName,
|
||||
size_t timeStepIndex) const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
@ -641,16 +657,15 @@ std::vector<double> RimStimPlanFractureTemplate::fractureGridResults(const QStri
|
||||
return m_stimPlanFractureDefinitionData->fractureGridResults(fileResultName, unitName, timeStepIndex);
|
||||
}
|
||||
|
||||
return std::vector<double>();
|
||||
return std::vector<double>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStimPlanFractureTemplate::hasConductivity() const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull() &&
|
||||
!m_stimPlanFractureDefinitionData->conductivityResultNames().isEmpty())
|
||||
if (m_stimPlanFractureDefinitionData.notNull() && !m_stimPlanFractureDefinitionData->conductivityResultNames().isEmpty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -659,9 +674,13 @@ bool RimStimPlanFractureTemplate::hasConductivity() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimStimPlanFractureTemplate::resultValueAtIJ(const QString& uiResultName, const QString& unitName, size_t timeStepIndex, size_t i, size_t j)
|
||||
double RimStimPlanFractureTemplate::resultValueAtIJ(const QString& uiResultName,
|
||||
const QString& unitName,
|
||||
size_t timeStepIndex,
|
||||
size_t i,
|
||||
size_t j)
|
||||
{
|
||||
auto values = resultValues(uiResultName, unitName, timeStepIndex);
|
||||
|
||||
@ -672,7 +691,6 @@ double RimStimPlanFractureTemplate::resultValueAtIJ(const QString& uiResultName,
|
||||
|
||||
if (adjustedI >= fractureGrid()->iCellCount() || adjustedJ >= fractureGrid()->jCellCount())
|
||||
{
|
||||
|
||||
return HUGE_VAL;
|
||||
}
|
||||
|
||||
@ -680,7 +698,7 @@ double RimStimPlanFractureTemplate::resultValueAtIJ(const QString& uiResultName,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimStimPlanFractureTemplate::areaWeightedWidth() const
|
||||
{
|
||||
@ -688,7 +706,7 @@ double RimStimPlanFractureTemplate::areaWeightedWidth() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimStimPlanFractureTemplate::areaWeightedConductivity() const
|
||||
{
|
||||
@ -696,7 +714,7 @@ double RimStimPlanFractureTemplate::areaWeightedConductivity() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimStimPlanFractureTemplate::longestYRange() const
|
||||
{
|
||||
@ -706,15 +724,17 @@ double RimStimPlanFractureTemplate::longestYRange() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::appendDataToResultStatistics(const QString& uiResultName, const QString& unit,
|
||||
MinMaxAccumulator& minMaxAccumulator,
|
||||
PosNegAccumulator& posNegAccumulator) const
|
||||
void RimStimPlanFractureTemplate::appendDataToResultStatistics(const QString& uiResultName,
|
||||
const QString& unit,
|
||||
MinMaxAccumulator& minMaxAccumulator,
|
||||
PosNegAccumulator& posNegAccumulator) const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
QString fileResultName = mapUiResultNameToFileResultName(uiResultName);
|
||||
|
||||
m_stimPlanFractureDefinitionData->appendDataToResultStatistics(fileResultName, unit, minMaxAccumulator, posNegAccumulator);
|
||||
m_stimPlanFractureDefinitionData->appendDataToResultStatistics(
|
||||
fileResultName, unit, minMaxAccumulator, posNegAccumulator);
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,21 +747,19 @@ const RigFractureGrid* RimStimPlanFractureTemplate::fractureGrid() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::updateFractureGrid()
|
||||
{
|
||||
m_fractureGrid = nullptr;
|
||||
m_areaWeightedConductivity = 0.0;
|
||||
m_areaWeightedWidth = 0.0;
|
||||
m_fractureGrid = nullptr;
|
||||
m_areaWeightedConductivity = 0.0;
|
||||
m_areaWeightedWidth = 0.0;
|
||||
m_longestYRangeAboveConductivityThreshold = 0.0;
|
||||
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
m_fractureGrid = m_stimPlanFractureDefinitionData->createFractureGrid(m_conductivityResultNameOnFile,
|
||||
m_activeTimeStepIndex,
|
||||
m_wellPathDepthAtFracture,
|
||||
m_fractureTemplateUnit());
|
||||
m_fractureGrid = m_stimPlanFractureDefinitionData->createFractureGrid(
|
||||
m_conductivityResultNameOnFile, m_activeTimeStepIndex, m_wellPathDepthAtFracture, m_fractureTemplateUnit());
|
||||
if (m_fractureGrid.notNull())
|
||||
{
|
||||
std::vector<double> areaPerCell;
|
||||
@ -782,14 +800,14 @@ void RimStimPlanFractureTemplate::updateFractureGrid()
|
||||
// Compute longest y-range with continuous non-zero conductivity
|
||||
{
|
||||
double longestYRange = 0.0;
|
||||
|
||||
|
||||
for (size_t i = 0; i < m_fractureGrid->iCellCount(); i++)
|
||||
{
|
||||
double currentYRange = 0.0;
|
||||
for (size_t j = 0; j < m_fractureGrid->jCellCount(); j++)
|
||||
{
|
||||
size_t globalIndex = m_fractureGrid->getGlobalIndexFromIJ(i, j);
|
||||
const auto& cell = m_fractureGrid->cellFromIndex(globalIndex);
|
||||
size_t globalIndex = m_fractureGrid->getGlobalIndexFromIJ(i, j);
|
||||
const auto& cell = m_fractureGrid->cellFromIndex(globalIndex);
|
||||
if (cell.hasNonZeroConductivity())
|
||||
{
|
||||
currentYRange += cell.cellSizeZ();
|
||||
@ -811,22 +829,20 @@ void RimStimPlanFractureTemplate::updateFractureGrid()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices) const
|
||||
void RimStimPlanFractureTemplate::fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
||||
std::vector<cvf::uint>* triangleIndices) const
|
||||
{
|
||||
if (m_stimPlanFractureDefinitionData.notNull())
|
||||
{
|
||||
m_stimPlanFractureDefinitionData->createFractureTriangleGeometry(m_wellPathDepthAtFracture,
|
||||
name(),
|
||||
nodeCoords,
|
||||
triangleIndices);
|
||||
m_stimPlanFractureDefinitionData->createFractureTriangleGeometry(
|
||||
m_wellPathDepthAtFracture, name(), nodeCoords, triangleIndices);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
@ -857,9 +873,11 @@ void RimStimPlanFractureTemplate::defineUiOrdering(QString uiConfigName, caf::Pd
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
|
||||
void RimStimPlanFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
RimFractureTemplate::defineEditorAttribute(field, uiConfigName, attribute);
|
||||
|
||||
@ -874,10 +892,10 @@ void RimStimPlanFractureTemplate::defineEditorAttribute(const caf::PdmFieldHandl
|
||||
|
||||
if (field == &m_wellPathDepthAtFracture)
|
||||
{
|
||||
if ( !m_stimPlanFractureDefinitionData.isNull() && (m_stimPlanFractureDefinitionData->yCount() > 0) )
|
||||
if (!m_stimPlanFractureDefinitionData.isNull() && (m_stimPlanFractureDefinitionData->yCount() > 0))
|
||||
{
|
||||
caf::PdmUiDoubleSliderEditorAttribute* myAttr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>(attribute);
|
||||
if ( myAttr )
|
||||
if (myAttr)
|
||||
{
|
||||
myAttr->m_minimum = m_stimPlanFractureDefinitionData->minDepth();
|
||||
myAttr->m_maximum = m_stimPlanFractureDefinitionData->maxDepth();
|
||||
|
Loading…
Reference in New Issue
Block a user