2015-04-20 02:02:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2015-04-20 02:02:33 -05: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 03:40:57 -05:00
|
|
|
//
|
2015-04-20 02:02:33 -05: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-04-20 02:02:33 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2015-05-15 11:51:49 -05:00
|
|
|
#include "RimCase.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2018-01-12 07:39:15 -06:00
|
|
|
#include "cafFilePath.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPointer.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
|
2015-04-25 01:57:34 -05:00
|
|
|
#include "cvfObject.h"
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2015-11-24 04:35:04 -06:00
|
|
|
#include <QDateTime>
|
|
|
|
|
2015-04-20 02:02:33 -05:00
|
|
|
class RimGeoMechView;
|
2015-04-25 01:57:34 -05:00
|
|
|
class RigGeoMechCaseData;
|
2015-04-30 10:06:01 -05:00
|
|
|
class RifGeoMechReaderInterface;
|
2019-01-16 03:51:43 -06:00
|
|
|
class RimGeoMechContourMapView;
|
|
|
|
class RimGeoMechContourMapViewCollection;
|
2020-08-03 07:06:59 -05:00
|
|
|
class RimMudWeightWindowParameters;
|
2015-04-30 10:06:01 -05:00
|
|
|
|
2015-04-20 02:02:33 -05:00
|
|
|
//==================================================================================================
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
|
|
|
///
|
2015-04-20 02:02:33 -05:00
|
|
|
//==================================================================================================
|
2015-05-15 11:51:49 -05:00
|
|
|
class RimGeoMechCase : public RimCase
|
2015-04-20 02:02:33 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-04-20 02:02:33 -05:00
|
|
|
|
|
|
|
public:
|
2018-06-21 06:56:10 -05:00
|
|
|
enum CaseOpenStatus
|
|
|
|
{
|
|
|
|
CASE_OPEN_OK = 0,
|
|
|
|
CASE_OPEN_CANCELLED,
|
|
|
|
CASE_OPEN_ERROR
|
|
|
|
};
|
2020-03-30 07:40:32 -05:00
|
|
|
|
2020-04-13 23:11:32 -05:00
|
|
|
enum class BiotCoefficientType
|
2020-03-30 07:40:32 -05:00
|
|
|
{
|
|
|
|
BIOT_NONE = 0,
|
|
|
|
BIOT_FIXED,
|
|
|
|
BIOT_PER_ELEMENT
|
|
|
|
};
|
|
|
|
|
2020-06-22 16:20:03 -05:00
|
|
|
enum class InitialPermeabilityType
|
|
|
|
{
|
|
|
|
INITIAL_PERMEABILITY_FIXED = 0,
|
|
|
|
INITIAL_PERMEABILITY_PER_ELEMENT
|
|
|
|
};
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimGeoMechCase( void );
|
|
|
|
~RimGeoMechCase( void ) override;
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CaseOpenStatus openGeoMechCase( std::string* errorMessage );
|
2015-04-27 06:51:22 -05:00
|
|
|
|
2020-09-10 05:54:43 -05:00
|
|
|
RimGeoMechCase* createCopy( const QString& newInputFileName );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RigGeoMechCaseData* geoMechData();
|
|
|
|
const RigGeoMechCaseData* geoMechData() const;
|
2019-01-16 03:51:43 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimGeoMechContourMapViewCollection* contourMapCollection();
|
2018-06-11 06:47:21 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void reloadDataAndUpdate();
|
2015-04-20 02:02:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RimGeoMechView* createAndAddReservoirView();
|
|
|
|
RimGeoMechView* createCopyAndAddView( const RimGeoMechView* sourceView );
|
2015-05-15 11:51:49 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void updateFilePathsFromProjectPath( const QString& projectPath, const QString& oldProjectPath ) override;
|
2015-09-21 04:20:07 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<QDateTime> timeStepDates() const override;
|
|
|
|
QStringList timeStepStrings() const override;
|
|
|
|
QString timeStepName( int frameIdx ) const override;
|
2015-11-16 00:16:30 -06:00
|
|
|
|
2020-01-23 07:43:51 -06:00
|
|
|
cvf::BoundingBox reservoirBoundingBox() override;
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::BoundingBox activeCellsBoundingBox() const override;
|
|
|
|
cvf::BoundingBox allCellsBoundingBox() const override;
|
2017-06-19 13:55:58 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
double characteristicCellSize() const override;
|
2017-12-01 06:24:43 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void addElementPropertyFiles( const std::vector<caf::FilePath>& filenames );
|
2018-02-26 06:39:13 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
double cohesion() const;
|
|
|
|
double frictionAngleDeg() const;
|
2015-11-24 04:35:04 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setApplyTimeFilter( bool applyTimeFilter );
|
|
|
|
// Fields:
|
|
|
|
caf::PdmChildArrayField<RimGeoMechView*> geoMechViews;
|
2016-09-06 03:27:30 -05:00
|
|
|
|
2020-03-30 07:40:32 -05:00
|
|
|
BiotCoefficientType biotCoefficientType() const;
|
|
|
|
double biotFixedCoefficient() const;
|
|
|
|
QString biotResultAddress() const;
|
|
|
|
|
2020-06-22 16:20:03 -05:00
|
|
|
InitialPermeabilityType initialPermeabilityType() const;
|
|
|
|
double initialPermeabilityFixed() const;
|
|
|
|
QString initialPermeabilityAddress() const;
|
|
|
|
double permeabilityExponent() const;
|
|
|
|
|
2020-08-03 07:06:59 -05: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 03:40:57 -05:00
|
|
|
private:
|
|
|
|
cvf::Vec3d displayModelOffset() const override;
|
|
|
|
static std::vector<QDateTime> vectorOfValidDateTimesFromTimeStepStrings( const QStringList& timeStepStrings );
|
|
|
|
static QDateTime dateTimeFromTimeStepString( const QString& timeStepString );
|
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 03:40:57 -05: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 07:06:59 -05:00
|
|
|
void importElementPropertyFile();
|
|
|
|
void closeSelectedElementPropertyFiles();
|
|
|
|
void reloadSelectedElementPropertyFiles();
|
|
|
|
std::vector<Rim3dView*> allSpecialViews() const override;
|
2018-01-14 02:10:23 -06:00
|
|
|
|
2015-05-06 09:07:30 -05:00
|
|
|
private:
|
2018-01-12 07:39:15 -06: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 03:40:57 -05:00
|
|
|
caf::PdmField<std::vector<int>> m_elementPropertyFileNameIndexUiSelection;
|
2020-04-03 03:31:41 -05:00
|
|
|
caf::PdmField<bool> m_importElementPropertyFileCommand;
|
2018-01-12 07:39:15 -06:00
|
|
|
caf::PdmField<bool> m_closeElementPropertyFileCommand;
|
|
|
|
caf::PdmField<bool> m_reloadElementPropertyFileCommand;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2020-03-30 07:40:32 -05:00
|
|
|
caf::PdmField<caf::AppEnum<BiotCoefficientType>> m_biotCoefficientType;
|
|
|
|
caf::PdmField<double> m_biotFixedCoefficient;
|
|
|
|
caf::PdmField<QString> m_biotResultAddress;
|
|
|
|
|
2020-06-22 16:20:03 -05: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 09:10:20 -05:00
|
|
|
caf::PdmField<double> m_waterDensityShearSlipIndicator;
|
|
|
|
|
2019-01-16 03:51:43 -06:00
|
|
|
caf::PdmChildField<RimGeoMechContourMapViewCollection*> m_contourMapCollection;
|
2020-08-03 07:06:59 -05:00
|
|
|
caf::PdmChildField<RimMudWeightWindowParameters*> m_mudWeightWindowParameters;
|
2019-01-16 03:51:43 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool m_applyTimeFilter;
|
2015-04-20 02:02:33 -05:00
|
|
|
};
|