2015-04-20 09:02:33 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-04-20 09:02:33 +02: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
|
|
|
//
|
2015-04-20 09:02:33 +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
|
|
|
|
|
// 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>
|
2015-04-20 09:02:33 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2015-05-15 18:51:49 +02:00
|
|
|
#include "RimCase.h"
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2018-01-12 14:39:15 +01:00
|
|
|
#include "cafFilePath.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2015-04-20 09:02:33 +02:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmPointer.h"
|
2015-07-31 18:58:23 +02:00
|
|
|
|
2015-04-25 08:57:34 +02:00
|
|
|
#include "cvfObject.h"
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2015-11-24 11:35:04 +01:00
|
|
|
#include <QDateTime>
|
|
|
|
|
|
2015-04-20 09:02:33 +02:00
|
|
|
class RimGeoMechView;
|
2015-04-25 08:57:34 +02:00
|
|
|
class RigGeoMechCaseData;
|
2015-04-30 17:06:01 +02:00
|
|
|
class RifGeoMechReaderInterface;
|
2019-01-16 10:51:43 +01:00
|
|
|
class RimGeoMechContourMapView;
|
|
|
|
|
class RimGeoMechContourMapViewCollection;
|
2020-08-03 14:06:59 +02:00
|
|
|
class RimMudWeightWindowParameters;
|
2015-04-30 17:06:01 +02:00
|
|
|
|
2015-04-20 09:02:33 +02:00
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2015-04-20 09:02:33 +02:00
|
|
|
//==================================================================================================
|
2015-05-15 18:51:49 +02:00
|
|
|
class RimGeoMechCase : public RimCase
|
2015-04-20 09:02:33 +02:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-04-20 09:02:33 +02:00
|
|
|
|
|
|
|
|
public:
|
2018-06-21 13:56:10 +02:00
|
|
|
enum CaseOpenStatus
|
|
|
|
|
{
|
|
|
|
|
CASE_OPEN_OK = 0,
|
|
|
|
|
CASE_OPEN_CANCELLED,
|
|
|
|
|
CASE_OPEN_ERROR
|
|
|
|
|
};
|
2020-03-30 14:40:32 +02:00
|
|
|
|
2020-04-14 06:11:32 +02:00
|
|
|
enum class BiotCoefficientType
|
2020-03-30 14:40:32 +02:00
|
|
|
{
|
|
|
|
|
BIOT_NONE = 0,
|
|
|
|
|
BIOT_FIXED,
|
|
|
|
|
BIOT_PER_ELEMENT
|
|
|
|
|
};
|
|
|
|
|
|
2020-06-22 23:20:03 +02:00
|
|
|
enum class InitialPermeabilityType
|
|
|
|
|
{
|
|
|
|
|
INITIAL_PERMEABILITY_FIXED = 0,
|
|
|
|
|
INITIAL_PERMEABILITY_PER_ELEMENT
|
|
|
|
|
};
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimGeoMechCase( void );
|
|
|
|
|
~RimGeoMechCase( void ) override;
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CaseOpenStatus openGeoMechCase( std::string* errorMessage );
|
2015-04-27 13:51:22 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RigGeoMechCaseData* geoMechData();
|
|
|
|
|
const RigGeoMechCaseData* geoMechData() const;
|
2019-01-16 10:51:43 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimGeoMechContourMapViewCollection* contourMapCollection();
|
2018-06-11 13:47:21 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void reloadDataAndUpdate();
|
2015-04-20 09:02:33 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
RimGeoMechView* createAndAddReservoirView();
|
|
|
|
|
RimGeoMechView* createCopyAndAddView( const RimGeoMechView* sourceView );
|
2015-05-15 18:51:49 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void updateFilePathsFromProjectPath( const QString& projectPath, const QString& oldProjectPath ) override;
|
2015-09-21 11:20:07 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<QDateTime> timeStepDates() const override;
|
|
|
|
|
QStringList timeStepStrings() const override;
|
|
|
|
|
QString timeStepName( int frameIdx ) const override;
|
2015-11-16 07:16:30 +01:00
|
|
|
|
2020-01-23 14:43:51 +01:00
|
|
|
cvf::BoundingBox reservoirBoundingBox() override;
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::BoundingBox activeCellsBoundingBox() const override;
|
|
|
|
|
cvf::BoundingBox allCellsBoundingBox() const override;
|
2017-06-19 20:55:58 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
double characteristicCellSize() const override;
|
2017-12-01 13:24:43 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void addElementPropertyFiles( const std::vector<caf::FilePath>& filenames );
|
2018-02-26 13:39:13 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
double cohesion() const;
|
|
|
|
|
double frictionAngleDeg() const;
|
2015-11-24 11:35:04 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setApplyTimeFilter( bool applyTimeFilter );
|
|
|
|
|
// Fields:
|
|
|
|
|
caf::PdmChildArrayField<RimGeoMechView*> geoMechViews;
|
2016-09-06 10:27:30 +02:00
|
|
|
|
2020-03-30 14:40:32 +02:00
|
|
|
BiotCoefficientType biotCoefficientType() const;
|
|
|
|
|
double biotFixedCoefficient() const;
|
|
|
|
|
QString biotResultAddress() const;
|
|
|
|
|
|
2020-06-22 23:20:03 +02:00
|
|
|
InitialPermeabilityType initialPermeabilityType() const;
|
|
|
|
|
double initialPermeabilityFixed() const;
|
|
|
|
|
QString initialPermeabilityAddress() const;
|
|
|
|
|
double permeabilityExponent() const;
|
|
|
|
|
|
2020-08-03 14:06:59 +02:00
|
|
|
std::vector<std::string> possibleElementPropertyFieldNames();
|
|
|
|
|
std::vector<caf::FilePath> elementPropertyFileNames() const;
|
|
|
|
|
|
|
|
|
|
QString findFileNameForElementProperty( const std::string& elementProperty,
|
|
|
|
|
const std::map<std::string, QString> addressesInFiles ) const;
|
|
|
|
|
|
|
|
|
|
void updateConnectedViews();
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
private:
|
|
|
|
|
cvf::Vec3d displayModelOffset() const override;
|
|
|
|
|
static std::vector<QDateTime> vectorOfValidDateTimesFromTimeStepStrings( const QStringList& timeStepStrings );
|
|
|
|
|
static QDateTime dateTimeFromTimeStepString( const QString& timeStepString );
|
|
|
|
|
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
|
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
|
QString uiConfigName,
|
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
|
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
|
bool* useOptionsOnly ) override;
|
|
|
|
|
|
|
|
|
|
void updateFormationNamesData() override;
|
|
|
|
|
|
|
|
|
|
void initAfterRead() override;
|
|
|
|
|
static QString subStringOfDigits( const QString& timeStepString, int numberOfDigitsToFind );
|
|
|
|
|
|
2020-08-03 14:06:59 +02:00
|
|
|
void importElementPropertyFile();
|
|
|
|
|
void closeSelectedElementPropertyFiles();
|
|
|
|
|
void reloadSelectedElementPropertyFiles();
|
|
|
|
|
std::vector<Rim3dView*> allSpecialViews() const override;
|
2018-01-14 09:10:23 +01:00
|
|
|
|
2015-05-06 16:07:30 +02:00
|
|
|
private:
|
2018-01-12 14:39:15 +01:00
|
|
|
cvf::ref<RigGeoMechCaseData> m_geoMechCaseData;
|
|
|
|
|
caf::PdmField<double> m_cohesion;
|
|
|
|
|
caf::PdmField<double> m_frictionAngleDeg;
|
|
|
|
|
caf::PdmField<std::vector<caf::FilePath>> m_elementPropertyFileNames;
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<std::vector<int>> m_elementPropertyFileNameIndexUiSelection;
|
2020-04-03 10:31:41 +02:00
|
|
|
caf::PdmField<bool> m_importElementPropertyFileCommand;
|
2018-01-12 14:39:15 +01:00
|
|
|
caf::PdmField<bool> m_closeElementPropertyFileCommand;
|
|
|
|
|
caf::PdmField<bool> m_reloadElementPropertyFileCommand;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2020-03-30 14:40:32 +02:00
|
|
|
caf::PdmField<caf::AppEnum<BiotCoefficientType>> m_biotCoefficientType;
|
|
|
|
|
caf::PdmField<double> m_biotFixedCoefficient;
|
|
|
|
|
caf::PdmField<QString> m_biotResultAddress;
|
|
|
|
|
|
2020-06-22 23:20:03 +02:00
|
|
|
caf::PdmField<caf::AppEnum<InitialPermeabilityType>> m_initialPermeabilityType;
|
|
|
|
|
caf::PdmField<double> m_initialPermeabilityFixed;
|
|
|
|
|
caf::PdmField<QString> m_initialPermeabilityResultAddress;
|
|
|
|
|
caf::PdmField<double> m_permeabilityExponent;
|
|
|
|
|
|
2020-08-21 16:10:20 +02:00
|
|
|
caf::PdmField<double> m_waterDensityShearSlipIndicator;
|
|
|
|
|
|
2019-01-16 10:51:43 +01:00
|
|
|
caf::PdmChildField<RimGeoMechContourMapViewCollection*> m_contourMapCollection;
|
2020-08-03 14:06:59 +02:00
|
|
|
caf::PdmChildField<RimMudWeightWindowParameters*> m_mudWeightWindowParameters;
|
2019-01-16 10:51:43 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
bool m_applyTimeFilter;
|
2015-04-20 09:02:33 +02:00
|
|
|
};
|