mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fault Reactivation Assessment implementation (ref issue #7321)
This commit is contained in:
@@ -8,6 +8,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaFractureDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferences.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesSummary.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesGeoMech.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPorosityModel.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaCurveSetDefinition.h
|
||||
@@ -33,6 +34,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiaDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaFractureDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferences.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesSummary.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPreferencesGeoMech.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaPorosityModel.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveDefinition.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaCurveSetDefinition.cpp
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaPreferencesGeoMech.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaValidRegExpValidator.h"
|
||||
|
||||
@@ -332,6 +333,9 @@ RiaPreferences::RiaPreferences()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryPreferences, "summaryPreferences", "summaryPreferences", "", "", "" );
|
||||
m_summaryPreferences = new RiaPreferencesSummary;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geoMechPreferences, "geoMechPreferences", "geoMechPreferences", "", "", "" );
|
||||
m_geoMechPreferences = new RiaPreferencesGeoMech;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -453,6 +457,12 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
m_summaryPreferences()->uiOrdering( uiConfigName, *group );
|
||||
}
|
||||
}
|
||||
#ifdef USE_ODB_API
|
||||
else if ( uiConfigName == RiaPreferences::tabNameGeomech() )
|
||||
{
|
||||
m_geoMechPreferences()->appendItems( uiOrdering );
|
||||
}
|
||||
#endif
|
||||
else if ( uiConfigName == RiaPreferences::tabNamePlotting() )
|
||||
{
|
||||
uiOrdering.add( &m_dateFormat );
|
||||
@@ -625,6 +635,14 @@ QString RiaPreferences::tabNameEclipseSummary()
|
||||
return "Eclipse Summary";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferences::tabNameGeomech()
|
||||
{
|
||||
return "GeoMechanical";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -691,6 +709,9 @@ QStringList RiaPreferences::tabNames()
|
||||
names << tabNameGeneral();
|
||||
names << tabNameEclipseGrid();
|
||||
names << tabNameEclipseSummary();
|
||||
#ifdef USE_ODB_API
|
||||
names << tabNameGeomech();
|
||||
#endif
|
||||
names << tabNamePlotting();
|
||||
names << tabNameScripting();
|
||||
names << tabNameExport();
|
||||
@@ -1055,6 +1076,14 @@ RiaPreferencesSummary* RiaPreferences::summaryPreferences() const
|
||||
return m_summaryPreferences();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaPreferencesGeoMech* RiaPreferences::geoMechPreferences() const
|
||||
{
|
||||
return m_geoMechPreferences();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
class RifReaderSettings;
|
||||
class RiaPreferencesSummary;
|
||||
class RiaPreferencesGeoMech;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -120,6 +121,7 @@ public:
|
||||
QString pythonExecutable() const;
|
||||
QString octaveExecutable() const;
|
||||
|
||||
RiaPreferencesGeoMech* geoMechPreferences() const;
|
||||
RiaPreferencesSummary* summaryPreferences() const;
|
||||
|
||||
public:
|
||||
@@ -166,6 +168,7 @@ private:
|
||||
static QString tabNameGeneral();
|
||||
static QString tabNameEclipseGrid();
|
||||
static QString tabNameEclipseSummary();
|
||||
static QString tabNameGeomech();
|
||||
static QString tabNamePlotting();
|
||||
static QString tabNameScripting();
|
||||
static QString tabNameExport();
|
||||
@@ -219,6 +222,9 @@ private:
|
||||
// Well Path Import
|
||||
caf::PdmField<QString> m_multiLateralWellPattern;
|
||||
|
||||
// GeoMech things
|
||||
caf::PdmChildField<RiaPreferencesGeoMech*> m_geoMechPreferences;
|
||||
|
||||
// Summary data
|
||||
caf::PdmChildField<RiaPreferencesSummary*> m_summaryPreferences;
|
||||
|
||||
|
||||
159
ApplicationLibCode/Application/RiaPreferencesGeoMech.cpp
Normal file
159
ApplicationLibCode/Application/RiaPreferencesGeoMech.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 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 <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaPreferencesGeoMech.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "cafPdmUiFilePathEditor.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QStringList>
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RiaPreferencesGeoMech, "RiaPreferencesGeoMech" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaPreferencesGeoMech::RiaPreferencesGeoMech()
|
||||
{
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRAPreprocCommand, "geomechFRAPreprocCommand", "Pre-Processing Command", "", "", "" );
|
||||
m_geomechFRAPreprocCommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRAPreprocCommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRAPostprocCommand, "geomechFRAPostprocCommand", "Post-Processing Command", "", "", "" );
|
||||
m_geomechFRAPostprocCommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRAPostprocCommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRAMacrisCommand, "geomechFRAMacrisCommand", "Main Macris Command", "", "", "" );
|
||||
m_geomechFRAMacrisCommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRAMacrisCommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRADefaultBasicXML,
|
||||
"geomechFRADefaultXML",
|
||||
"Basic Processing Parameter XML File",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_geomechFRADefaultBasicXML.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRADefaultBasicXML.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRADefaultAdvXML,
|
||||
"geomechFRADefaultAdvXML",
|
||||
"Advanced Processing Parameter XML File",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_geomechFRADefaultAdvXML.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRADefaultAdvXML.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaPreferencesGeoMech* RiaPreferencesGeoMech::current()
|
||||
{
|
||||
return RiaApplication::instance()->preferences()->geoMechPreferences();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesGeoMech::appendItems( caf::PdmUiOrdering& uiOrdering ) const
|
||||
{
|
||||
caf::PdmUiGroup* faultRAGroup = uiOrdering.addNewGroup( "Fault Reactivation Assessment" );
|
||||
caf::PdmUiGroup* cmdGroup = faultRAGroup->addNewGroup( "Commands (without parameters)" );
|
||||
|
||||
cmdGroup->add( &m_geomechFRAPreprocCommand );
|
||||
cmdGroup->add( &m_geomechFRAPostprocCommand );
|
||||
cmdGroup->add( &m_geomechFRAMacrisCommand );
|
||||
|
||||
caf::PdmUiGroup* paramGroup = faultRAGroup->addNewGroup( "Parameters" );
|
||||
paramGroup->add( &m_geomechFRADefaultBasicXML );
|
||||
paramGroup->add( &m_geomechFRADefaultAdvXML );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesGeoMech::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRAPreprocCommand() const
|
||||
{
|
||||
return m_geomechFRAPreprocCommand;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRAPostprocCommand() const
|
||||
{
|
||||
return m_geomechFRAPostprocCommand;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRAMacrisCommand() const
|
||||
{
|
||||
return m_geomechFRAMacrisCommand;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRADefaultBasicXML() const
|
||||
{
|
||||
return m_geomechFRADefaultBasicXML;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRADefaultAdvXML() const
|
||||
{
|
||||
return m_geomechFRADefaultAdvXML;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferencesGeoMech::validateFRASettings() const
|
||||
{
|
||||
QStringList files;
|
||||
files << geomechFRAPreprocCommand();
|
||||
files << geomechFRAPostprocCommand();
|
||||
files << geomechFRAMacrisCommand();
|
||||
files << geomechFRADefaultBasicXML();
|
||||
files << geomechFRADefaultAdvXML();
|
||||
|
||||
for ( int i = 0; i < files.size(); i++ )
|
||||
{
|
||||
if ( files[i].isEmpty() ) return false;
|
||||
QFile file( files[i] );
|
||||
if ( !file.exists() ) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
56
ApplicationLibCode/Application/RiaPreferencesGeoMech.h
Normal file
56
ApplicationLibCode/Application/RiaPreferencesGeoMech.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 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 <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RiaPreferencesGeoMech : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RiaPreferencesGeoMech();
|
||||
|
||||
static RiaPreferencesGeoMech* current();
|
||||
|
||||
void appendItems( caf::PdmUiOrdering& uiOrdering ) const;
|
||||
bool validateFRASettings() const;
|
||||
|
||||
// geomech settings
|
||||
QString geomechFRAPreprocCommand() const;
|
||||
QString geomechFRAPostprocCommand() const;
|
||||
QString geomechFRAMacrisCommand() const;
|
||||
QString geomechFRADefaultBasicXML() const;
|
||||
QString geomechFRADefaultAdvXML() const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_geomechFRAPreprocCommand;
|
||||
caf::PdmField<QString> m_geomechFRAPostprocCommand;
|
||||
caf::PdmField<QString> m_geomechFRAMacrisCommand;
|
||||
caf::PdmField<QString> m_geomechFRADefaultBasicXML;
|
||||
caf::PdmField<QString> m_geomechFRADefaultAdvXML;
|
||||
};
|
||||
@@ -281,6 +281,14 @@ QString RiaResultNames::mobilePoreVolumeName()
|
||||
return "MOBPORV";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::faultReactAssessmentPrefix()
|
||||
{
|
||||
return "FAULT_";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -60,6 +60,8 @@ QString riCellVolumeResultName();
|
||||
QString riOilVolumeResultName();
|
||||
QString mobilePoreVolumeName();
|
||||
|
||||
QString faultReactAssessmentPrefix();
|
||||
|
||||
QString completionTypeResultName();
|
||||
|
||||
// Well path derived results
|
||||
|
||||
@@ -243,8 +243,8 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilter( const QString
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QStringList& fileNames,
|
||||
QString* fileContainingGrid /*=nullptr*/ )
|
||||
int RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QStringList& fileNames,
|
||||
QString* fileContainingGrid /*=nullptr*/ )
|
||||
{
|
||||
RimEclipseInputCase* rimInputReservoir = new RimEclipseInputCase();
|
||||
|
||||
@@ -257,7 +257,7 @@ bool RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QString
|
||||
if ( !gridImportSuccess )
|
||||
{
|
||||
RiaLogging::error( "Failed to import grid" );
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels()
|
||||
@@ -286,7 +286,7 @@ bool RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QString
|
||||
*fileContainingGrid = rimInputReservoir->gridFileName();
|
||||
}
|
||||
|
||||
return true;
|
||||
return rimInputReservoir->caseId();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
bool noDialog = false );
|
||||
static bool openEclipseCaseShowTimeStepFilter( const QString& fileName );
|
||||
|
||||
static bool openEclipseInputCaseFromFileNames( const QStringList& fileNames, QString* fileContainingGrid = nullptr );
|
||||
static int openEclipseInputCaseFromFileNames( const QStringList& fileNames, QString* fileContainingGrid = nullptr );
|
||||
static bool openMockModel( const QString& name );
|
||||
|
||||
static bool addEclipseCases( const QStringList& fileNames, RimIdenticalGridCaseGroup** resultingCaseGroup = nullptr );
|
||||
|
||||
Reference in New Issue
Block a user