///////////////////////////////////////////////////////////////////////////////// // // 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 "RiaStimPlanModelDefines.h" #include "RimFaciesInitialPressureConfig.h" #include "RimNamedObject.h" #include "cafPdmChildArrayField.h" #include "cafPdmChildField.h" #include "cafPdmField.h" #include "cafPdmObject.h" #include "cafPdmProxyValueField.h" #include "cafPdmPtrField.h" #include class RimEclipseCase; class RimElasticProperties; class RigEclipseCaseData; class RimFaciesProperties; class RimNonNetLayers; class RimFaciesInitialPressureConfig; class RimPressureTable; //================================================================================================== /// /// //================================================================================================== class RimStimPlanModelTemplate : public RimNamedObject { CAF_PDM_HEADER_INIT; public: RimStimPlanModelTemplate( void ); ~RimStimPlanModelTemplate( void ) override; caf::Signal<> changed; void setId( int id ); int id() const; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; double defaultPorosity() const; double defaultPermeability() const; double overburdenHeight() const; double underburdenHeight() const; double defaultOverburdenPorosity() const; double defaultUnderburdenPorosity() const; double defaultOverburdenPermeability() const; double defaultUnderburdenPermeability() const; QString overburdenFormation() const; QString overburdenFacies() const; QString underburdenFormation() const; QString underburdenFacies() const; double overburdenFluidDensity() const; double underburdenFluidDensity() const; double referenceTemperature() const; double referenceTemperatureGradient() const; double referenceTemperatureDepth() const; double verticalStress() const; double verticalStressGradient() const; double stressDepth() const; void setDynamicEclipseCase( RimEclipseCase* eclipseCase ); void setTimeStep( int timeStep ); void setStaticEclipseCase( RimEclipseCase* eclipseCase ); void setInitialPressureEclipseCase( RimEclipseCase* eclipseCase ); RimEclipseCase* dynamicEclipseCase() const; int timeStep() const; RimEclipseCase* staticEclipseCase() const; RimEclipseCase* initialPressureEclipseCase() const; std::map faciesWithInitialPressure() const; void loadDataAndUpdate(); void setElasticProperties( RimElasticProperties* elasticProperties ); RimElasticProperties* elasticProperties() const; void setFaciesProperties( RimFaciesProperties* faciesProperties ); RimFaciesProperties* faciesProperties() const; void setNonNetLayers( RimNonNetLayers* nonNetLayers ); RimNonNetLayers* nonNetLayers() const; void setPressureTable( RimPressureTable* pressureTable ); RimPressureTable* pressureTable() const; void updateReferringPlots(); bool usePressureTableForProperty( RiaDefines::CurveProperty curveProperty ) const; bool useEqlnumForPressureInterpolation() const; protected: void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ ) override; QList calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly ) override; void initAfterRead() override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; private: RimEclipseCase* getEclipseCase() const; RigEclipseCaseData* getEclipseCaseData() const; void faciesPropertiesChanged( const caf::SignalEmitter* emitter ); void elasticPropertiesChanged( const caf::SignalEmitter* emitter ); void nonNetLayersChanged( const caf::SignalEmitter* emitter ); void pressureTableChanged( const caf::SignalEmitter* emitter ); double computeDefaultStressDepth() const; static bool shouldProbablyUseInitialPressure( const QString& faciesName ); caf::PdmField m_id; caf::PdmPtrField m_dynamicEclipseCase; caf::PdmField m_timeStep; caf::PdmPtrField m_initialPressureEclipseCase; caf::PdmField m_useTableForInitialPressure; caf::PdmField m_useTableForPressure; caf::PdmField m_useEqlnumForPressureInterpolation; caf::PdmField m_editPressureTable; caf::PdmPtrField m_staticEclipseCase; caf::PdmField m_defaultPorosity; caf::PdmField m_defaultPermeability; caf::PdmField m_verticalStress; caf::PdmField m_verticalStressGradient; caf::PdmField m_stressDepth; caf::PdmField m_referenceTemperature; caf::PdmField m_referenceTemperatureGradient; caf::PdmField m_referenceTemperatureDepth; caf::PdmField m_overburdenHeight; caf::PdmField m_overburdenPorosity; caf::PdmField m_overburdenPermeability; caf::PdmField m_overburdenFormation; caf::PdmField m_overburdenFacies; caf::PdmField m_overburdenFluidDensity; caf::PdmField m_underburdenHeight; caf::PdmField m_underburdenPorosity; caf::PdmField m_underburdenPermeability; caf::PdmField m_underburdenFormation; caf::PdmField m_underburdenFacies; caf::PdmField m_underburdenFluidDensity; caf::PdmChildField m_elasticProperties; caf::PdmChildField m_faciesProperties; caf::PdmChildField m_nonNetLayers; caf::PdmChildArrayField m_faciesInitialPressureConfigs; caf::PdmChildField m_pressureTable; };