2017-02-07 09:09:00 +01: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
|
|
|
|
|
|
|
|
|
|
#include "RimFractureTemplate.h"
|
|
|
|
|
|
|
|
|
|
#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 09:09:00 +01:00
|
|
|
#include "cvfBase.h"
|
2017-02-07 11:08:56 +01:00
|
|
|
#include "cvfObject.h"
|
2017-02-07 09:09:00 +01:00
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
2017-05-30 11:52:19 +02:00
|
|
|
#include "RigFractureCell.h"
|
2017-05-26 16:27:48 +02:00
|
|
|
#include "RigFractureGrid.h"
|
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
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RimStimPlanFractureTemplate : public RimFractureTemplate
|
|
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
2018-01-25 12:27:36 +01:00
|
|
|
RimStimPlanFractureTemplate();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimStimPlanFractureTemplate() override;
|
2017-02-07 09:09:00 +01:00
|
|
|
|
2018-01-25 12:27:36 +01:00
|
|
|
int activeTimeStepIndex();
|
2017-02-27 14:55:12 +01:00
|
|
|
|
2018-02-21 09:50:50 +01:00
|
|
|
void loadDataAndUpdate() override;
|
2017-06-13 11:38:22 +02:00
|
|
|
void setDefaultsBasedOnXMLfile();
|
2017-02-07 11:08:56 +01:00
|
|
|
|
2017-02-10 15:29:15 +01:00
|
|
|
void setFileName(const QString& fileName);
|
|
|
|
|
const QString& fileName();
|
2017-02-07 11:08:56 +01:00
|
|
|
|
2017-08-03 13:21:19 +02:00
|
|
|
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
|
|
|
|
|
|
|
|
|
|
2017-06-13 11:38:22 +02:00
|
|
|
// Fracture geometry
|
|
|
|
|
|
2018-01-25 12:27:36 +01:00
|
|
|
const RigFractureGrid* fractureGrid() const override;
|
2017-06-13 11:38:22 +02:00
|
|
|
void updateFractureGrid();
|
|
|
|
|
void fractureTriangleGeometry(std::vector<cvf::Vec3f>* nodeCoords,
|
2018-08-10 14:28:52 +02:00
|
|
|
std::vector<cvf::uint>* triangleIndices) const override;
|
2017-03-06 11:32:09 +01:00
|
|
|
|
2017-06-13 11:38:22 +02:00
|
|
|
// Result Access
|
|
|
|
|
|
2018-01-15 08:58:15 +01:00
|
|
|
std::vector<double> timeSteps();
|
2018-02-06 12:42:13 +01:00
|
|
|
std::vector<std::pair<QString, QString> > uiResultNamesWithUnit() const override;
|
2018-01-25 12:14:54 +01:00
|
|
|
std::vector<std::vector<double>> resultValues(const QString& uiResultName, const QString& unitName, size_t timeStepIndex) const;
|
2017-06-26 10:28:23 +02:00
|
|
|
std::vector<double> fractureGridResults(const QString& resultName, const QString& unitName, size_t timeStepIndex) const;
|
2017-09-14 13:48:30 +02:00
|
|
|
bool hasConductivity() const;
|
2018-03-04 10:36:39 +01:00
|
|
|
double resultValueAtIJ(const QString& uiResultName, const QString& unitName, size_t timeStepIndex, size_t i, size_t j);
|
2017-04-25 16:08:44 +02:00
|
|
|
|
2018-09-11 13:22:57 +02:00
|
|
|
std::vector<double> widthResultValues() const;
|
2018-08-09 11:01:44 +02:00
|
|
|
|
2018-02-21 19:53:22 +01:00
|
|
|
void appendDataToResultStatistics(const QString& uiResultName,
|
|
|
|
|
const QString& unit,
|
|
|
|
|
MinMaxAccumulator& minMaxAccumulator,
|
|
|
|
|
PosNegAccumulator& posNegAccumulator) const override;
|
2018-01-19 09:10:30 +01:00
|
|
|
|
2018-01-25 14:24:54 +01:00
|
|
|
QString mapUiResultNameToFileResultName(const QString& uiResultName) const;
|
|
|
|
|
|
2018-02-02 09:06:24 +01:00
|
|
|
bool showStimPlanMesh() const;
|
|
|
|
|
|
2018-02-20 15:15:06 +01:00
|
|
|
|
2018-02-21 19:53:22 +01:00
|
|
|
void convertToUnitSystem(RiaEclipseUnitTools::UnitSystem neededUnit) override;
|
2017-02-17 15:10:04 +01:00
|
|
|
|
2017-02-07 11:08:56 +01:00
|
|
|
private:
|
2018-09-13 08:32:27 +02:00
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
|
|
|
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
|
|
|
|
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;
|
|
|
|
|
void onLoadDataAndUpdateGeometryHasChanged() override;
|
|
|
|
|
|
2018-03-06 08:16:39 +01:00
|
|
|
void setDefaultConductivityResultIfEmpty();
|
2017-06-13 11:23:53 +02:00
|
|
|
bool setBorderPolygonResultNameToDefault();
|
2018-06-28 16:11:47 +02:00
|
|
|
void computeDepthOfWellPathAtFracture();
|
|
|
|
|
void computePerforationLength();
|
2017-03-15 15:02:20 +01:00
|
|
|
|
2018-08-15 09:44:27 +02:00
|
|
|
std::vector<double> fractureGridResultsForUnitSystem(const QString& resultName, const QString& unitName, size_t timeStepIndex, RiaEclipseUnitTools::UnitSystem requiredUnitSystem) const;
|
2018-02-14 13:35:35 +01:00
|
|
|
|
2018-10-19 15:43:29 +02:00
|
|
|
WellFractureIntersectionData wellFractureIntersectionData(const RimFracture* fractureInstance) const override;
|
2018-02-14 13:35:35 +01:00
|
|
|
|
2018-08-09 11:01:44 +02:00
|
|
|
std::pair<QString, QString> widthParameterNameAndUnit() const;
|
2018-08-15 09:44:27 +02:00
|
|
|
std::pair<QString, QString> conductivityParameterNameAndUnit() const;
|
2018-09-24 15:10:46 +02:00
|
|
|
std::pair<QString, QString> betaFactorParameterNameAndUnit() const;
|
|
|
|
|
bool isBetaFactorAvailableOnFile() const override;
|
2018-08-09 11:01:44 +02:00
|
|
|
|
2018-12-17 10:33:42 +01:00
|
|
|
double conversionFactorForBetaValues() const;
|
|
|
|
|
|
2018-01-25 12:14:54 +01:00
|
|
|
private:
|
2017-06-12 14:42:35 +02:00
|
|
|
caf::PdmField<int> m_activeTimeStepIndex;
|
2018-01-25 12:14:54 +01:00
|
|
|
caf::PdmField<QString> m_conductivityResultNameOnFile;
|
2017-06-12 14:42:35 +02:00
|
|
|
|
|
|
|
|
caf::PdmField<double> m_wellPathDepthAtFracture;
|
2017-06-13 11:23:53 +02:00
|
|
|
caf::PdmField<QString> m_borderPolygonResultName;
|
2017-06-12 14:42:35 +02:00
|
|
|
|
|
|
|
|
caf::PdmField<QString> m_stimPlanFileName;
|
|
|
|
|
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
|
|
|
|
|
cvf::ref<RigFractureGrid> m_fractureGrid;
|
2018-01-30 13:48:28 +01:00
|
|
|
bool m_readError;
|
2018-02-02 09:06:24 +01:00
|
|
|
|
|
|
|
|
caf::PdmField<bool> m_showStimPlanMesh_OBSOLETE;
|
2017-02-07 09:09:00 +01:00
|
|
|
};
|