mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6232 Simplify importing elastic properties for fracture model.
This commit is contained in:
@@ -10,14 +10,12 @@ well_path = project.well_path_by_name("Well-1")
|
||||
print("well path:", well_path)
|
||||
fracture_model_collection = project.descendants(rips.FractureModelCollection)[0]
|
||||
|
||||
# Create fracture model at a give measured depth
|
||||
measured_depth = 4100.0
|
||||
fracture_model = fracture_model_collection.new_fracture_model(well_path=well_path, measured_depth=measured_depth)
|
||||
elastic_properties_file_path = "/home/resinsight/stimplan/complete_dataset_2020-06-22/Elastic_Template_CSV_file-with-biot.csv"
|
||||
fracture_model = fracture_model_collection.new_fracture_model(well_path=well_path, measured_depth=measured_depth, elastic_properties_file_path=elastic_properties_file_path)
|
||||
|
||||
elastic_properties = rips.ElasticProperties()
|
||||
elastic_properties.file_path = "/home/resinsight/stimplan/complete_dataset_2020-06-22/Elastic_Template_CSV_file-with-biot.csv"
|
||||
elastic_properties.update()
|
||||
|
||||
fracture_model.elastic_properties = elastic_properties
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RimcFractureModelCollection.h"
|
||||
|
||||
#include "RicElasticPropertiesImportTools.h"
|
||||
|
||||
#include "FractureCommands/RicNewFractureModelFeature.h"
|
||||
|
||||
#include "RimFractureModel.h"
|
||||
@@ -40,6 +42,12 @@ RimcFractureModelCollection_newFractureModel::RimcFractureModelCollection_newFra
|
||||
CAF_PDM_InitObject( "Create Fracture Model", "", "", "Create a new Fracture Model" );
|
||||
CAF_PDM_InitScriptableFieldWithIONoDefault( &m_wellPath, "WellPath", "", "", "", "Well Path" );
|
||||
CAF_PDM_InitScriptableFieldWithIONoDefault( &m_md, "MeasuredDepth", "", "", "", "Measured Depth" );
|
||||
CAF_PDM_InitScriptableFieldWithIONoDefault( &m_elasticPropertiesFilePath,
|
||||
"ElasticPropertiesFilePath",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Elastic Properties File Path" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -60,6 +68,9 @@ caf::PdmObjectHandle* RimcFractureModelCollection_newFractureModel::execute()
|
||||
if ( newFractureModel )
|
||||
{
|
||||
newFractureModel->setMD( m_md() );
|
||||
|
||||
RicElasticPropertiesImportTools::importElasticPropertiesFromFile( m_elasticPropertiesFilePath, newFractureModel );
|
||||
|
||||
self<RimFractureModelCollection>()->updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "cafPdmPtrArrayField.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimFractureModelCollection;
|
||||
class RimWellPath;
|
||||
|
||||
@@ -46,4 +48,5 @@ public:
|
||||
private:
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||
caf::PdmField<double> m_md;
|
||||
caf::PdmField<QString> m_elasticPropertiesFilePath;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user