///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RiaDefines.h" #include "cvfObject.h" #include "cvfVector3.h" #include #include class RigFractureGrid; class MinMaxAccumulator; class PosNegAccumulator; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- class RigStimPlanResultFrames { public: RigStimPlanResultFrames() {} QString resultName; QString unit; // Vector for each time step, for each y and for each x-value std::vector>> parameterValues; }; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- class RigStimPlanFractureDefinition : public cvf::Object { friend class RifStimPlanXmlReader; public: static const double THRESHOLD_VALUE; enum class Orientation { UNDEFINED, TRANSVERSE, LONGITUDINAL }; RigStimPlanFractureDefinition(); ~RigStimPlanFractureDefinition() override; RiaDefines::EclipseUnitSystem unitSet() const; size_t xCount() const; size_t yCount() const; double minDepth() const; double maxDepth() const; double topPerfTvd() const; double bottomPerfTvd() const; void setTvdToTopPerf( double topPerfTvd ); void setTvdToBottomPerf( double bottomPerfTvd ); double topPerfMd() const; double bottomPerfMd() const; void setMdToTopPerf( double topPerfMd ); void setMdToBottomPerf( double bottomPerfMd ); double formationDip() const; void setFormationDip( double formationDip ); Orientation orientation() const; void setOrientation( Orientation orientation ); cvf::cref createFractureGrid( const QString& resultName, int activeTimeStepIndex, double xScaleFactor, double yScaleFactor, double wellPathIntersectionAtFractureDepth, RiaDefines::EclipseUnitSystem requiredUnitSet ) const; void createFractureTriangleGeometry( double xScaleFactor, double yScaleFactor, double wellPathIntersectionAtFractureDepth, const QString& fractureUserName, std::vector* vertices, std::vector* triangleIndices ) const; const std::vector& timeSteps() const; void addTimeStep( double time ); size_t totalNumberTimeSteps() const; std::vector> getStimPlanPropertyNamesUnits() const; void setDataAtTimeValue( const QString& resultName, const QString& unit, const std::vector>& data, double timeStepValue ); const std::vector>& getDataAtTimeIndex( const QString& resultName, const QString& unit, size_t timeStepIndex ) const; std::vector fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const; void appendDataToResultStatistics( const QString& resultName, const QString& unit, MinMaxAccumulator& minMaxAccumulator, PosNegAccumulator& posNegAccumulator ) const; QStringList conductivityResultNames() const; private: bool timeStepExists( double timeStepValue ) const; size_t getTimeStepIndex( double timeStepValue ) const; size_t resultIndex( const QString& resultName, const QString& unit ) const; void generateXsFromFileXs( bool xMirrorMode ); std::vector> generateDataLayoutFromFileDataLayout( std::vector> rawXYData ) const; bool numberOfParameterValuesOK( std::vector> propertyValuesAtTimestep ) const; double minY() const; double maxY() const; static std::vector adjustedYCoordsAroundWellPathPosition( const std::vector& yCoords, double wellPathIntersectionAtFractureDepth ); static std::vector computeScaledXs( const std::vector& xs, double scaleFactor ); static std::vector computeScaledYs( const std::vector& ys, double scaleFactor, double wellPathIntersectionAtFractureDepth ); std::vector> conductivityValuesAtTimeStep( const QString& resultName, int activeTimeStepIndex, RiaDefines::EclipseUnitSystem requiredUnitSet ) const; private: RiaDefines::EclipseUnitSystem m_unitSet; // To be deleted std::vector m_fileXs; std::vector m_Ys; std::vector m_timeSteps; std::vector m_stimPlanResults; std::vector m_Xs; bool m_xMirrorMode; double m_topPerfTvd; double m_bottomPerfTvd; double m_topPerfMd; double m_bottomPerfMd; double m_formationDip; Orientation m_orientation; };