2017-02-07 09:09:00 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2017 - Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-02-07 09:09:00 +01:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2022-06-17 22:22:44 +02:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
2017-02-07 09:09:00 +01:00
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-02-07 09:09:00 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-06-17 22:22:44 +02:00
|
|
|
#include "RimMeshFractureTemplate.h"
|
2017-02-07 09:09:00 +01:00
|
|
|
|
|
|
|
|
#include "cafAppEnum.h"
|
2017-02-17 09:29:46 +01:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2017-02-07 09:09:00 +01:00
|
|
|
#include "cafPdmField.h"
|
2017-02-07 11:08:56 +01:00
|
|
|
#include "cafPdmFieldCvfVec3d.h"
|
2017-02-07 09:09:00 +01:00
|
|
|
#include "cafPdmFieldHandle.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
2017-02-07 11:08:56 +01:00
|
|
|
#include "cafPdmPtrField.h"
|
2017-02-17 09:29:46 +01:00
|
|
|
|
2017-02-07 11:08:56 +01:00
|
|
|
#include "cvfObject.h"
|
2017-02-07 09:09:00 +01:00
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
2021-10-31 13:52:12 +01:00
|
|
|
#include "RigEnsembleFractureStatisticsCalculator.h"
|
2017-05-30 11:52:19 +02:00
|
|
|
#include "RigFractureCell.h"
|
2017-05-26 16:27:48 +02:00
|
|
|
#include "RigFractureGrid.h"
|
2021-10-31 13:52:12 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
#include <vector>
|
2017-02-07 09:09:00 +01:00
|
|
|
|
2017-02-07 11:08:56 +01:00
|
|
|
class RigStimPlanFractureDefinition;
|
2017-02-17 09:29:46 +01:00
|
|
|
class RimStimPlanLegendConfig;
|
2017-05-30 11:52:19 +02:00
|
|
|
class RigFractureCell;
|
2017-05-26 16:27:48 +02:00
|
|
|
class RigFractureGrid;
|
2017-02-07 09:09:00 +01:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2017-02-07 09:09:00 +01:00
|
|
|
//==================================================================================================
|
2022-06-17 22:22:44 +02:00
|
|
|
class RimStimPlanFractureTemplate : public RimMeshFractureTemplate
|
2017-02-07 09:09:00 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2017-02-07 09:09:00 +01:00
|
|
|
|
|
|
|
|
public:
|
2018-01-25 12:27:36 +01:00
|
|
|
RimStimPlanFractureTemplate();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimStimPlanFractureTemplate() override;
|
2017-02-27 14:55:12 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void loadDataAndUpdate() override;
|
2022-06-17 22:22:44 +02:00
|
|
|
void setDefaultsBasedOnFile() override;
|
2017-08-03 13:21:19 +02:00
|
|
|
|
2021-01-27 14:14:46 +01:00
|
|
|
std::pair<double, double> wellPathDepthAtFractureRange() const override;
|
2021-01-28 15:16:14 +01:00
|
|
|
QString wellPathDepthAtFractureUiName() const override;
|
2021-01-26 15:32:18 +01:00
|
|
|
|
2017-06-13 11:38:22 +02:00
|
|
|
// Fracture geometry
|
2021-01-26 15:32:18 +01:00
|
|
|
cvf::cref<RigFractureGrid> createFractureGrid( double wellPathDepthAtFracture ) const override;
|
2017-03-06 11:32:09 +01:00
|
|
|
|
2021-01-26 15:32:18 +01:00
|
|
|
void fractureTriangleGeometry( std::vector<cvf::Vec3f>* nodeCoords,
|
|
|
|
|
std::vector<cvf::uint>* triangleIndices,
|
|
|
|
|
double wellPathDepthAtFracture ) const override;
|
2017-06-13 11:38:22 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
// Result Access
|
2022-06-29 15:29:21 +02:00
|
|
|
std::vector<QString> timeStepsStrings() override;
|
2022-06-17 22:22:44 +02:00
|
|
|
std::vector<double> timeSteps() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<std::pair<QString, QString>> uiResultNamesWithUnit() const override;
|
2023-02-26 10:48:40 +01:00
|
|
|
std::vector<std::vector<double>> resultValues( const QString& uiResultName, const QString& unitName, size_t timeStepIndex ) const override;
|
|
|
|
|
std::vector<double> fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const override;
|
|
|
|
|
bool hasConductivity() const override;
|
|
|
|
|
double resultValueAtIJ( const RigFractureGrid* fractureGrid,
|
|
|
|
|
const QString& uiResultName,
|
|
|
|
|
const QString& unitName,
|
|
|
|
|
size_t timeStepIndex,
|
|
|
|
|
size_t i,
|
|
|
|
|
size_t j ) override;
|
2018-01-19 09:10:30 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void appendDataToResultStatistics( const QString& uiResultName,
|
|
|
|
|
const QString& unit,
|
|
|
|
|
MinMaxAccumulator& minMaxAccumulator,
|
|
|
|
|
PosNegAccumulator& posNegAccumulator ) const override;
|
2018-01-25 14:24:54 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setDefaultConductivityResultIfEmpty();
|
|
|
|
|
bool setBorderPolygonResultNameToDefault();
|
2022-06-17 22:22:44 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void computeDepthOfWellPathAtFracture();
|
|
|
|
|
void computePerforationLength();
|
|
|
|
|
|
2021-01-21 12:58:46 +01:00
|
|
|
std::vector<double> fractureGridResultsForUnitSystem( const QString& resultName,
|
|
|
|
|
const QString& unitName,
|
|
|
|
|
size_t timeStepIndex,
|
2022-06-17 22:22:44 +02:00
|
|
|
RiaDefines::EclipseUnitSystem requiredUnitSystem ) const override;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2022-06-17 22:22:44 +02:00
|
|
|
std::pair<QString, QString> widthParameterNameAndUnit() const override;
|
|
|
|
|
std::pair<QString, QString> conductivityParameterNameAndUnit() const override;
|
|
|
|
|
std::pair<QString, QString> betaFactorParameterNameAndUnit() const override;
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isBetaFactorAvailableOnFile() const override;
|
|
|
|
|
|
|
|
|
|
double conversionFactorForBetaValues() const;
|
2018-12-17 10:33:42 +01:00
|
|
|
|
2021-02-17 16:38:13 +01:00
|
|
|
QString generatePropertiesTable() const;
|
|
|
|
|
static void appendTextIfValidValue( QString& body, const QString& title, double value );
|
2023-02-26 10:48:40 +01:00
|
|
|
static void appendTextIfValidValue( QString& body, double value, RigEnsembleFractureStatisticsCalculator::PropertyType propertyType );
|
2021-02-04 09:03:03 +01:00
|
|
|
|
2022-06-17 22:22:44 +02:00
|
|
|
QString mapUiResultNameToFileResultName( const QString& uiResultName ) const;
|
|
|
|
|
void convertToUnitSystem( RiaDefines::EclipseUnitSystem neededUnit ) override;
|
2017-06-12 14:42:35 +02:00
|
|
|
|
2022-06-17 22:22:44 +02:00
|
|
|
double formationDip() const;
|
|
|
|
|
|
|
|
|
|
static std::pair<QString, QString> widthParameterNameAndUnit( cvf::ref<RigStimPlanFractureDefinition> def );
|
2017-06-12 14:42:35 +02:00
|
|
|
|
2022-09-05 18:28:51 +02:00
|
|
|
bool isValidResult( double value ) const override;
|
|
|
|
|
|
2022-06-17 22:22:44 +02:00
|
|
|
protected:
|
|
|
|
|
void initAfterRead() override;
|
|
|
|
|
|
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2023-02-26 10:48:40 +01:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
2022-06-17 22:22:44 +02:00
|
|
|
|
|
|
|
|
QString getFileSelectionFilter() const override;
|
|
|
|
|
QStringList conductivityResultNames() const override;
|
|
|
|
|
|
|
|
|
|
private:
|
2017-06-12 14:42:35 +02:00
|
|
|
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
2018-02-02 09:06:24 +01:00
|
|
|
|
2021-02-04 09:03:03 +01:00
|
|
|
caf::PdmField<QString> m_propertiesTable;
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<bool> m_showStimPlanMesh_OBSOLETE;
|
2017-02-07 09:09:00 +01:00
|
|
|
};
|