2017-02-07 02:09:00 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-06-14 00:25:34 -05:00
|
|
|
#include "RiaEclipseUnitTools.h"
|
2017-02-16 08:22:03 -06:00
|
|
|
|
2017-02-07 02:09:00 -06:00
|
|
|
#include "cafAppEnum.h"
|
2018-02-14 06:35:35 -06:00
|
|
|
#include "cafPdmChildField.h"
|
2017-02-07 02:09:00 -06:00
|
|
|
#include "cafPdmField.h"
|
2018-02-14 06:35:35 -06:00
|
|
|
#include "cafPdmFieldCvfVec3d.h"
|
2017-02-07 02:09:00 -06:00
|
|
|
#include "cafPdmFieldHandle.h"
|
|
|
|
#include "cafPdmObject.h"
|
2018-02-14 06:35:35 -06:00
|
|
|
#include "cafPdmProxyValueField.h"
|
2017-02-07 02:09:00 -06:00
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2017-06-01 04:31:34 -05:00
|
|
|
class RigFractureGrid;
|
2017-06-08 15:54:06 -05:00
|
|
|
class RimFractureContainment;
|
2018-01-19 02:10:30 -06:00
|
|
|
class MinMaxAccumulator;
|
|
|
|
class PosNegAccumulator;
|
2017-02-07 02:09:00 -06:00
|
|
|
|
2018-02-14 06:35:35 -06:00
|
|
|
class FractureWidthAndConductivity
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FractureWidthAndConductivity()
|
|
|
|
: m_width(0.0)
|
|
|
|
, m_permeability(0.0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
double m_width;
|
|
|
|
double m_permeability;
|
|
|
|
};
|
|
|
|
|
2017-02-07 02:09:00 -06:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class RimFractureTemplate : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum FracOrientationEnum
|
|
|
|
{
|
|
|
|
AZIMUTH,
|
|
|
|
ALONG_WELL_PATH,
|
|
|
|
TRANSVERSE_WELL_PATH
|
|
|
|
};
|
2017-02-10 06:29:31 -06:00
|
|
|
|
|
|
|
enum FracConductivityEnum
|
|
|
|
{
|
|
|
|
INFINITE_CONDUCTIVITY,
|
|
|
|
FINITE_CONDUCTIVITY,
|
|
|
|
};
|
2017-02-14 02:49:14 -06:00
|
|
|
|
2018-02-14 06:35:35 -06:00
|
|
|
enum EffectivePermeabilityEnum
|
|
|
|
{
|
|
|
|
USER_DEFINED_PERMEABILITY,
|
|
|
|
CONDUCTIVITY_FROM_FRACTURE,
|
|
|
|
};
|
|
|
|
|
2018-02-08 04:34:18 -06:00
|
|
|
public:
|
|
|
|
RimFractureTemplate();
|
|
|
|
virtual ~RimFractureTemplate();
|
|
|
|
|
2018-02-08 06:57:43 -06:00
|
|
|
QString name() const;
|
|
|
|
RiaEclipseUnitTools::UnitSystemType fractureTemplateUnit() const;
|
|
|
|
FracOrientationEnum orientationType() const;
|
2018-02-08 04:34:18 -06:00
|
|
|
float azimuthAngle() const;
|
|
|
|
float skinFactor() const;
|
2017-06-15 03:49:27 -05:00
|
|
|
double wellDiameterInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit);
|
2018-02-08 06:57:43 -06:00
|
|
|
FracConductivityEnum conductivityType() const;
|
2017-06-15 03:49:27 -05:00
|
|
|
double perforationLengthInFractureUnit(RiaEclipseUnitTools::UnitSystemType fractureUnit);
|
2017-06-01 04:31:34 -05:00
|
|
|
|
2018-02-08 04:34:18 -06:00
|
|
|
virtual void fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
|
|
|
std::vector<cvf::uint>* triangleIndices,
|
|
|
|
RiaEclipseUnitTools::UnitSystem neededUnit) = 0;
|
2017-06-20 04:18:19 -05:00
|
|
|
|
2018-02-08 06:57:43 -06:00
|
|
|
virtual std::vector<cvf::Vec3f> fractureBorderPolygon(RiaEclipseUnitTools::UnitSystem neededUnit) = 0;
|
|
|
|
virtual const RigFractureGrid* fractureGrid() const = 0;
|
2018-02-08 04:34:18 -06:00
|
|
|
const RimFractureContainment* fractureContainment();
|
2018-01-19 02:10:30 -06:00
|
|
|
|
2018-02-08 04:34:18 -06:00
|
|
|
virtual void appendDataToResultStatistics(const QString& resultName,
|
|
|
|
const QString& unit,
|
|
|
|
MinMaxAccumulator& minMaxAccumulator,
|
|
|
|
PosNegAccumulator& posNegAccumulator) const = 0;
|
2018-02-06 05:42:13 -06:00
|
|
|
|
2018-02-08 06:57:43 -06:00
|
|
|
virtual std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const = 0;
|
|
|
|
|
|
|
|
void setName(const QString& name);
|
|
|
|
void setFractureTemplateUnit(RiaEclipseUnitTools::UnitSystemType unitSystem);
|
|
|
|
void setDefaultWellDiameterFromUnit();
|
2018-02-06 05:42:13 -06:00
|
|
|
|
2017-02-07 02:09:00 -06:00
|
|
|
protected:
|
2017-06-08 15:54:06 -05:00
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2018-01-10 00:44:26 -06:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2017-04-19 04:00:52 -05:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
|
|
|
|
2018-02-09 00:26:48 -06:00
|
|
|
private:
|
|
|
|
void prepareFieldsForUiDisplay();
|
2018-02-14 06:35:35 -06:00
|
|
|
virtual FractureWidthAndConductivity widthAndConductivityAtWellPathIntersection() const = 0;
|
|
|
|
|
|
|
|
QString dFactorSummary() const;
|
|
|
|
double effectivePermeability() const;
|
|
|
|
|
|
|
|
double computeDFactor() const;
|
|
|
|
double nonDarcyH() const;
|
|
|
|
|
2018-02-09 00:26:48 -06:00
|
|
|
|
2018-02-08 04:34:18 -06:00
|
|
|
protected:
|
2018-02-08 06:57:43 -06:00
|
|
|
caf::PdmField<QString> m_name;
|
|
|
|
caf::PdmField<RiaEclipseUnitTools::UnitSystemType> m_fractureTemplateUnit;
|
|
|
|
caf::PdmField<caf::AppEnum<FracOrientationEnum>> m_orientationType;
|
|
|
|
caf::PdmField<float> m_azimuthAngle;
|
|
|
|
caf::PdmField<float> m_skinFactor;
|
|
|
|
caf::PdmField<double> m_perforationLength;
|
|
|
|
caf::PdmField<double> m_perforationEfficiency;
|
|
|
|
caf::PdmField<double> m_wellDiameter;
|
|
|
|
caf::PdmField<caf::AppEnum<FracConductivityEnum>> m_conductivityType;
|
|
|
|
caf::PdmChildField<RimFractureContainment*> m_fractureContainment;
|
2018-02-09 00:26:48 -06:00
|
|
|
|
|
|
|
caf::PdmField<bool> m_useNonDarcyFlow;
|
|
|
|
caf::PdmField<double> m_inertialCoefficient;
|
2018-02-14 06:35:35 -06:00
|
|
|
|
|
|
|
caf::PdmField<caf::AppEnum<EffectivePermeabilityEnum>>
|
|
|
|
m_permeabilityType;
|
|
|
|
caf::PdmField<double> m_permeabilityScaleFactor;
|
|
|
|
caf::PdmField<double> m_permeability;
|
|
|
|
|
|
|
|
caf::PdmField<double> m_relativeGasDensity;
|
2018-02-09 00:26:48 -06:00
|
|
|
caf::PdmField<double> m_gasViscosity;
|
2018-02-14 06:35:35 -06:00
|
|
|
|
|
|
|
caf::PdmProxyValueField<double> m_dFactorDisplayField;
|
|
|
|
caf::PdmProxyValueField<QString> m_dFactorSummaryText;
|
2017-02-07 02:09:00 -06:00
|
|
|
};
|