///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2020- Equinor 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 "cafPdmField.h" #include "cafPdmObject.h" #include class RimGeoMechCase; class RigGeoMechCaseData; //================================================================================================== /// /// //================================================================================================== class RimMudWeightWindowParameters : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: enum class SourceType { FIXED = 0, PER_ELEMENT, GRID }; enum class ParameterType { WELL_DEVIATION, WELL_AZIMUTH, UCS, POISSONS_RATIO, K0_FG, OBG0 }; enum class UpperLimitType { FG, SH_MIN }; enum class LowerLimitType { PORE_PRESSURE, MAX_OF_PORE_PRESSURE_AND_SFG }; enum class FractureGradientCalculationType { DERIVED_FROM_K0FG, PROPORTIONAL_TO_SH }; enum class NonReservoirPorePressureType { HYDROSTATIC, PER_ELEMENT }; RimMudWeightWindowParameters( void ); SourceType wellDeviationType() const; double wellDeviation() const; QString wellDeviationAddress() const; SourceType wellAzimuthType() const; double wellAzimuth() const; QString wellAzimuthAddress() const; SourceType ucsType() const; double ucs() const; QString ucsAddress() const; SourceType poissonsRatioType() const; double poissonsRatio() const; QString poissonsRatioAddress() const; SourceType K0_FG_Type() const; double K0_FG() const; QString K0_FGAddress() const; double airGap() const; void updateFemPartResults() const; private: void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly ) override; void defineGroup( caf::PdmUiOrdering& uiOrdering, const QString& title, caf::PdmField>* typeField, caf::PdmField* fixedField, caf::PdmField* addressField ); void handleFieldChanged( RimGeoMechCase* geoMechCase, ParameterType parameterType, caf::PdmField>* typeField, caf::PdmField* fixedField, caf::PdmField* addressField, bool typeFieldChanged ); void updateFemPartsForParameter( ParameterType parameterType, RigGeoMechCaseData* rigCaseData ) const; private: caf::PdmField> m_wellDeviationType; caf::PdmField m_wellDeviationFixed; caf::PdmField m_wellDeviationAddress; caf::PdmField> m_wellAzimuthType; caf::PdmField m_wellAzimuthFixed; caf::PdmField m_wellAzimuthAddress; caf::PdmField> m_UCSType; caf::PdmField m_UCSFixed; caf::PdmField m_UCSAddress; caf::PdmField> m_poissonsRatioType; caf::PdmField m_poissonsRatioFixed; caf::PdmField m_poissonsRatioAddress; caf::PdmField> m_K0_FGType; caf::PdmField m_K0_FGFixed; caf::PdmField m_K0_FGAddress; caf::PdmField> m_obg0Type; caf::PdmField m_obg0Fixed; caf::PdmField m_obg0Address; typedef std::tuple>*, caf::PdmField*, caf::PdmField*> ParameterPdmFields; std::map m_parameterFields; caf::PdmField m_airGap; caf::PdmField m_shMultiplier; caf::PdmField m_userDefinedPPNonReservoir; caf::PdmField> m_upperLimitType; caf::PdmField> m_lowerLimitType; caf::PdmField> m_fractureGradientCalculationType; caf::PdmField> m_porePressureNonReservoirSource; caf::PdmField m_porePressureNonReservoirAddress; caf::PdmField m_referenceLayer; };