mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6007 Rename Facies Properties to Elastic Properties.
This commit is contained in:
parent
466827e7d0
commit
5ddfd4f9da
@ -64,8 +64,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteSummaryCaseCollectionFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellMeasurementFilePathFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicReloadWellMeasurementsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellMeasurementImportTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicImportFaciesPropertiesFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicFaciesPropertiesImportTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicImportElasticPropertiesFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicElasticPropertiesImportTools.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCloseSourSimDataFeature.h
|
||||
|
||||
@ -157,8 +157,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteSummaryCaseCollectionFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteWellMeasurementFilePathFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicReloadWellMeasurementsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicWellMeasurementImportTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicImportFaciesPropertiesFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicFaciesPropertiesImportTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicImportElasticPropertiesFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicElasticPropertiesImportTools.cpp
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCloseSourSimDataFeature.cpp
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "RimColorLegendCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaciesPropertiesCurve.h"
|
||||
#include "RimElasticPropertiesCurve.h"
|
||||
#include "RimFractureModel.h"
|
||||
#include "RimFractureModelCurve.h"
|
||||
#include "RimFractureModelPlot.h"
|
||||
@ -96,15 +96,15 @@ RimFractureModelPlot*
|
||||
{
|
||||
auto task = progInfo.task( "Creating facies properties track", 15 );
|
||||
|
||||
std::vector<RimFaciesPropertiesCurve::PropertyType> results =
|
||||
{ RimFaciesPropertiesCurve::PropertyType::YOUNGS_MODULUS,
|
||||
RimFaciesPropertiesCurve::PropertyType::POISSONS_RATIO,
|
||||
RimFaciesPropertiesCurve::PropertyType::K_IC,
|
||||
RimFaciesPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT };
|
||||
std::vector<RimElasticPropertiesCurve::PropertyType> results =
|
||||
{RimElasticPropertiesCurve::PropertyType::YOUNGS_MODULUS,
|
||||
RimElasticPropertiesCurve::PropertyType::POISSONS_RATIO,
|
||||
RimElasticPropertiesCurve::PropertyType::K_IC,
|
||||
RimElasticPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT};
|
||||
|
||||
for ( auto result : results )
|
||||
{
|
||||
createFaciesPropertiesTrack( plot, fractureModel, eclipseCase, timeStep, result );
|
||||
createElasticPropertiesTrack( plot, fractureModel, eclipseCase, timeStep, result );
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,13 +291,13 @@ void RicNewFractureModelPlotFeature::createParametersTrack( RimFractureModelPlot
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFractureModelPlotFeature::createFaciesPropertiesTrack( RimFractureModelPlot* plot,
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase,
|
||||
int timeStep,
|
||||
RimFaciesPropertiesCurve::PropertyType propertyType )
|
||||
void RicNewFractureModelPlotFeature::createElasticPropertiesTrack( RimFractureModelPlot* plot,
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase,
|
||||
int timeStep,
|
||||
RimElasticPropertiesCurve::PropertyType propertyType )
|
||||
{
|
||||
QString trackName = caf::AppEnum<RimFaciesPropertiesCurve::PropertyType>::uiText( propertyType );
|
||||
QString trackName = caf::AppEnum<RimElasticPropertiesCurve::PropertyType>::uiText( propertyType );
|
||||
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, trackName, plot );
|
||||
plotTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() );
|
||||
plotTrack->setColSpan( RimPlot::TWO );
|
||||
@ -309,11 +309,11 @@ void RicNewFractureModelPlotFeature::createFaciesPropertiesTrack( RimFractureMod
|
||||
plotTrack->setShowRegionLabels( true );
|
||||
plotTrack->setShowWindow( true );
|
||||
caf::ColorTable colors = RiaColorTables::contrastCategoryPaletteColors();
|
||||
std::vector<RiuQwtPlotCurve::LineStyleEnum> lineStyles = { RiuQwtPlotCurve::STYLE_SOLID,
|
||||
RiuQwtPlotCurve::STYLE_DASH,
|
||||
RiuQwtPlotCurve::STYLE_DASH_DOT };
|
||||
std::vector<RiuQwtPlotCurve::LineStyleEnum> lineStyles = {RiuQwtPlotCurve::STYLE_SOLID,
|
||||
RiuQwtPlotCurve::STYLE_DASH,
|
||||
RiuQwtPlotCurve::STYLE_DASH_DOT};
|
||||
|
||||
RimFaciesPropertiesCurve* curve = new RimFaciesPropertiesCurve;
|
||||
RimElasticPropertiesCurve* curve = new RimElasticPropertiesCurve;
|
||||
curve->setPropertyType( propertyType );
|
||||
curve->setFractureModel( fractureModel );
|
||||
curve->setCase( eclipseCase );
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "RimFaciesPropertiesCurve.h"
|
||||
#include "RimElasticPropertiesCurve.h"
|
||||
|
||||
class RimEclipseCase;
|
||||
class RimFractureModelPlot;
|
||||
@ -57,11 +57,11 @@ private:
|
||||
const QString& resultVariable,
|
||||
RiaDefines::ResultCatType resultCategoryType );
|
||||
|
||||
static void createFaciesPropertiesTrack( RimFractureModelPlot* plot,
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase,
|
||||
int timeStep,
|
||||
RimFaciesPropertiesCurve::PropertyType propertyType );
|
||||
static void createElasticPropertiesTrack( RimFractureModelPlot* plot,
|
||||
RimFractureModel* fractureModel,
|
||||
RimEclipseCase* eclipseCase,
|
||||
int timeStep,
|
||||
RimElasticPropertiesCurve::PropertyType propertyType );
|
||||
|
||||
static RimFractureModelPlot* createFractureModelPlot( bool showAfterCreation, const QString& plotDescription );
|
||||
|
||||
|
@ -16,37 +16,36 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicFaciesPropertiesImportTools.h"
|
||||
#include "RicElasticPropertiesImportTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimElasticProperties.h"
|
||||
#include "RimFractureModel.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
|
||||
#include "RifFaciesPropertiesReader.h"
|
||||
#include "RifElasticPropertiesReader.h"
|
||||
#include "RifFileParseTools.h"
|
||||
|
||||
#include "RigFaciesProperties.h"
|
||||
#include "RigElasticProperties.h"
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( const QString& filePath,
|
||||
RimFractureModel* fractureModel )
|
||||
void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QString& filePath,
|
||||
RimFractureModel* fractureModel )
|
||||
{
|
||||
typedef std::tuple<QString, QString, QString> FaciesKey;
|
||||
|
||||
// Read the facies properties from file
|
||||
std::vector<RifFaciesProperties> rifFaciesProperties;
|
||||
std::vector<RifElasticProperties> rifElasticProperties;
|
||||
try
|
||||
{
|
||||
QStringList filePaths;
|
||||
filePaths << filePath;
|
||||
RifFaciesPropertiesReader::readFaciesProperties( rifFaciesProperties, filePaths );
|
||||
RifElasticPropertiesReader::readElasticProperties( rifElasticProperties, filePaths );
|
||||
}
|
||||
catch ( FileParseException& exception )
|
||||
{
|
||||
@ -54,27 +53,26 @@ void RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( const QStri
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Find the unique facies keys (combination of field, formation and facies names)
|
||||
std::set<FaciesKey> faciesKeys;
|
||||
for ( RifFaciesProperties item : rifFaciesProperties )
|
||||
for ( RifElasticProperties item : rifElasticProperties )
|
||||
{
|
||||
FaciesKey faciesKey = std::make_tuple( item.fieldName, item.formationName, item.faciesName );
|
||||
faciesKeys.insert( faciesKey );
|
||||
}
|
||||
|
||||
RimFaciesProperties* rimFaciesProperties = new RimFaciesProperties;
|
||||
// rimFaciesProperties->setFilePath();
|
||||
RimElasticProperties* rimElasticProperties = new RimElasticProperties;
|
||||
// rimElasticProperties->setFilePath();
|
||||
for ( FaciesKey key : faciesKeys )
|
||||
{
|
||||
std::vector<RifFaciesProperties> matchingFacies;
|
||||
std::vector<RifElasticProperties> matchingFacies;
|
||||
|
||||
QString fieldName = std::get<0>( key );
|
||||
QString formationName = std::get<1>( key );
|
||||
QString faciesName = std::get<2>( key );
|
||||
|
||||
// Group the items with a given facies key
|
||||
for ( RifFaciesProperties item : rifFaciesProperties )
|
||||
for ( RifElasticProperties item : rifElasticProperties )
|
||||
{
|
||||
if ( item.fieldName == fieldName && item.formationName == formationName && item.faciesName == faciesName )
|
||||
{
|
||||
@ -85,23 +83,23 @@ void RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( const QStri
|
||||
// Sort the matching items by porosity
|
||||
std::sort( matchingFacies.begin(),
|
||||
matchingFacies.end(),
|
||||
[]( const RifFaciesProperties& a, const RifFaciesProperties& b ) { return a.porosity < b.porosity; } );
|
||||
[]( const RifElasticProperties& a, const RifElasticProperties& b ) { return a.porosity < b.porosity; } );
|
||||
|
||||
// Finally add the values
|
||||
RigFaciesProperties rigFaciesProperties( fieldName, formationName, faciesName );
|
||||
for ( RifFaciesProperties item : matchingFacies )
|
||||
RigElasticProperties rigElasticProperties( fieldName, formationName, faciesName );
|
||||
for ( RifElasticProperties item : matchingFacies )
|
||||
{
|
||||
rigFaciesProperties.appendValues( item.porosity,
|
||||
item.youngsModulus,
|
||||
item.poissonsRatio,
|
||||
item.K_Ic,
|
||||
item.proppantEmbedment );
|
||||
rigElasticProperties.appendValues( item.porosity,
|
||||
item.youngsModulus,
|
||||
item.poissonsRatio,
|
||||
item.K_Ic,
|
||||
item.proppantEmbedment );
|
||||
}
|
||||
|
||||
rimFaciesProperties->setPropertiesForFacies( key, rigFaciesProperties );
|
||||
rimElasticProperties->setPropertiesForFacies( key, rigElasticProperties );
|
||||
}
|
||||
|
||||
rimFaciesProperties->setFilePath( filePath );
|
||||
fractureModel->setFaciesProperties( rimFaciesProperties );
|
||||
rimElasticProperties->setFilePath( filePath );
|
||||
fractureModel->setElasticProperties( rimElasticProperties );
|
||||
fractureModel->updateConnectedEditors();
|
||||
}
|
@ -25,12 +25,12 @@ class RimFractureModel;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RicFaciesPropertiesImportTools
|
||||
class RicElasticPropertiesImportTools
|
||||
{
|
||||
public:
|
||||
static void importFaciesPropertiesFromFile( const QString& filePath, RimFractureModel* fractureModel );
|
||||
static void importElasticPropertiesFromFile( const QString& filePath, RimFractureModel* fractureModel );
|
||||
|
||||
private:
|
||||
// Hidden to avoid instantiation
|
||||
RicFaciesPropertiesImportTools();
|
||||
RicElasticPropertiesImportTools();
|
||||
};
|
@ -16,11 +16,11 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicImportFaciesPropertiesFeature.h"
|
||||
#include "RicImportElasticPropertiesFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RicFaciesPropertiesImportTools.h"
|
||||
#include "RicElasticPropertiesImportTools.h"
|
||||
|
||||
#include "RimFractureModel.h"
|
||||
|
||||
@ -31,12 +31,12 @@
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicImportFaciesPropertiesFeature, "RicImportFaciesPropertiesFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicImportElasticPropertiesFeature, "RicImportElasticPropertiesFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicImportFaciesPropertiesFeature::isCommandEnabled()
|
||||
bool RicImportElasticPropertiesFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -44,7 +44,7 @@ bool RicImportFaciesPropertiesFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked )
|
||||
void RicImportElasticPropertiesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimFractureModel* fractureModel = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimFractureModel>();
|
||||
if ( !fractureModel ) return;
|
||||
@ -53,24 +53,24 @@ void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory( "FACIES_DIR" );
|
||||
QString filePath = QFileDialog::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Facies Properties",
|
||||
"Import Elastic Properties",
|
||||
defaultDir,
|
||||
"Facies Properties (*.csv);;All Files (*.*)" );
|
||||
"Elastic Properties (*.csv);;All Files (*.*)" );
|
||||
|
||||
if ( filePath.isNull() ) return;
|
||||
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( "FACIES_DIR", QFileInfo( filePath ).absolutePath() );
|
||||
|
||||
RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( filePath, fractureModel );
|
||||
RicElasticPropertiesImportTools::importElasticPropertiesFromFile( filePath, fractureModel );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportFaciesPropertiesFeature::setupActionLook( QAction* actionToSetup )
|
||||
void RicImportElasticPropertiesFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Import Facies Properties" );
|
||||
actionToSetup->setText( "Import Elastic Properties" );
|
||||
// TODO: add icon?
|
||||
// actionToSetup->setIcon( QIcon( ":/FaciesProperties16x16.png" ) );
|
||||
// actionToSetup->setIcon( QIcon( ":/ElasticProperties16x16.png" ) );
|
||||
}
|
@ -23,7 +23,7 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicImportFaciesPropertiesFeature : public caf::CmdFeature
|
||||
class RicImportElasticPropertiesFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
@ -53,7 +53,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RifEclipseInputPropertyLoader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSurfaceReader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifRoffReader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifColorLegendData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaciesPropertiesReader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifElasticPropertiesReader.h
|
||||
|
||||
# HDF5 file reader is directly included in ResInsight main CmakeList.txt
|
||||
#${CMAKE_CURRENT_LIST_DIR}/RifHdf5Reader.h
|
||||
@ -111,7 +111,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RifEclipseInputPropertyLoader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSurfaceReader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifRoffReader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifColorLegendData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaciesPropertiesReader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifElasticPropertiesReader.cpp
|
||||
|
||||
# HDF5 file reader is directly included in ResInsight main CmakeList.txt
|
||||
#${CMAKE_CURRENT_LIST_DIR}/RifHdf5Reader.cpp
|
||||
|
@ -16,7 +16,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifFaciesPropertiesReader.h"
|
||||
#include "RifElasticPropertiesReader.h"
|
||||
|
||||
#include "RifFileParseTools.h"
|
||||
|
||||
@ -26,19 +26,19 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
void RifFaciesPropertiesReader::readFaciesProperties( std::vector<RifFaciesProperties>& faciesProperties,
|
||||
const QStringList& filePaths )
|
||||
void RifElasticPropertiesReader::readElasticProperties( std::vector<RifElasticProperties>& elasticProperties,
|
||||
const QStringList& filePaths )
|
||||
{
|
||||
for ( const QString& filePath : filePaths )
|
||||
{
|
||||
try
|
||||
{
|
||||
readFaciesProperties( faciesProperties, filePath );
|
||||
readElasticProperties( elasticProperties, filePath );
|
||||
}
|
||||
catch ( FileParseException& )
|
||||
{
|
||||
// Delete all facies properties and rethrow exception
|
||||
faciesProperties.clear();
|
||||
elasticProperties.clear();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -47,8 +47,8 @@ void RifFaciesPropertiesReader::readFaciesProperties( std::vector<RifFaciesPrope
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifFaciesPropertiesReader::readFaciesProperties( std::vector<RifFaciesProperties>& faciesProperties,
|
||||
const QString& filePath )
|
||||
void RifElasticPropertiesReader::readElasticProperties( std::vector<RifElasticProperties>& elasticProperties,
|
||||
const QString& filePath )
|
||||
{
|
||||
QFile file( filePath );
|
||||
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
|
||||
@ -63,8 +63,8 @@ void RifFaciesPropertiesReader::readFaciesProperties( std::vector<RifFaciesPrope
|
||||
QString line = in.readLine();
|
||||
if ( !isEmptyLine( line ) && !isCommentLine( line ) )
|
||||
{
|
||||
RifFaciesProperties faciesProp = parseFaciesProperties( line, lineNumber, filePath );
|
||||
faciesProperties.push_back( faciesProp );
|
||||
RifElasticProperties faciesProp = parseElasticProperties( line, lineNumber, filePath );
|
||||
elasticProperties.push_back( faciesProp );
|
||||
}
|
||||
|
||||
lineNumber++;
|
||||
@ -74,8 +74,8 @@ void RifFaciesPropertiesReader::readFaciesProperties( std::vector<RifFaciesPrope
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifFaciesProperties
|
||||
RifFaciesPropertiesReader::parseFaciesProperties( const QString& line, int lineNumber, const QString& filePath )
|
||||
RifElasticProperties
|
||||
RifElasticPropertiesReader::parseElasticProperties( const QString& line, int lineNumber, const QString& filePath )
|
||||
{
|
||||
QStringList tokens = tokenize( line, "," );
|
||||
|
||||
@ -96,23 +96,23 @@ RifFaciesProperties
|
||||
<< "Proppant Embedment";
|
||||
verifyNonEmptyTokens( tokens, nameOfNonEmptyTokens, lineNumber, filePath );
|
||||
|
||||
RifFaciesProperties faciesProperties;
|
||||
faciesProperties.fieldName = tokens[0];
|
||||
faciesProperties.formationName = tokens[1];
|
||||
faciesProperties.faciesName = tokens[2];
|
||||
faciesProperties.porosity = parseDouble( tokens[3], "Porosity", lineNumber, filePath );
|
||||
faciesProperties.youngsModulus = parseDouble( tokens[4], "Young's Modulus", lineNumber, filePath );
|
||||
faciesProperties.poissonsRatio = parseDouble( tokens[5], "Poisson's Ratio", lineNumber, filePath );
|
||||
faciesProperties.K_Ic = parseDouble( tokens[6], "K-Ic", lineNumber, filePath );
|
||||
faciesProperties.proppantEmbedment = parseDouble( tokens[7], "Proppant Embedment", lineNumber, filePath );
|
||||
RifElasticProperties elasticProperties;
|
||||
elasticProperties.fieldName = tokens[0];
|
||||
elasticProperties.formationName = tokens[1];
|
||||
elasticProperties.faciesName = tokens[2];
|
||||
elasticProperties.porosity = parseDouble( tokens[3], "Porosity", lineNumber, filePath );
|
||||
elasticProperties.youngsModulus = parseDouble( tokens[4], "Young's Modulus", lineNumber, filePath );
|
||||
elasticProperties.poissonsRatio = parseDouble( tokens[5], "Poisson's Ratio", lineNumber, filePath );
|
||||
elasticProperties.K_Ic = parseDouble( tokens[6], "K-Ic", lineNumber, filePath );
|
||||
elasticProperties.proppantEmbedment = parseDouble( tokens[7], "Proppant Embedment", lineNumber, filePath );
|
||||
|
||||
return faciesProperties;
|
||||
return elasticProperties;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QStringList RifFaciesPropertiesReader::tokenize( const QString& line, const QString& separator )
|
||||
QStringList RifElasticPropertiesReader::tokenize( const QString& line, const QString& separator )
|
||||
{
|
||||
return RifFileParseTools::splitLineAndTrim( line, separator );
|
||||
}
|
||||
@ -120,10 +120,10 @@ QStringList RifFaciesPropertiesReader::tokenize( const QString& line, const QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RifFaciesPropertiesReader::parseDouble( const QString& token,
|
||||
const QString& propertyName,
|
||||
int lineNumber,
|
||||
const QString& filePath )
|
||||
double RifElasticPropertiesReader::parseDouble( const QString& token,
|
||||
const QString& propertyName,
|
||||
int lineNumber,
|
||||
const QString& filePath )
|
||||
{
|
||||
bool isOk = false;
|
||||
double value = token.toDouble( &isOk );
|
||||
@ -139,7 +139,7 @@ double RifFaciesPropertiesReader::parseDouble( const QString& token,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifFaciesPropertiesReader::isEmptyLine( const QString& line )
|
||||
bool RifElasticPropertiesReader::isEmptyLine( const QString& line )
|
||||
{
|
||||
return line.trimmed().isEmpty();
|
||||
}
|
||||
@ -147,7 +147,7 @@ bool RifFaciesPropertiesReader::isEmptyLine( const QString& line )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifFaciesPropertiesReader::isCommentLine( const QString& line )
|
||||
bool RifElasticPropertiesReader::isCommentLine( const QString& line )
|
||||
{
|
||||
return line.trimmed().startsWith( "#" );
|
||||
}
|
||||
@ -155,10 +155,10 @@ bool RifFaciesPropertiesReader::isCommentLine( const QString& line )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifFaciesPropertiesReader::verifyNonEmptyTokens( const QStringList& tokens,
|
||||
const QStringList& nameOfNonEmptyTokens,
|
||||
int lineNumber,
|
||||
const QString& filePath )
|
||||
void RifElasticPropertiesReader::verifyNonEmptyTokens( const QStringList& tokens,
|
||||
const QStringList& nameOfNonEmptyTokens,
|
||||
int lineNumber,
|
||||
const QString& filePath )
|
||||
{
|
||||
for ( int i = 0; i < nameOfNonEmptyTokens.size(); ++i )
|
||||
{
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
struct RifFaciesProperties
|
||||
struct RifElasticProperties
|
||||
{
|
||||
QString fieldName;
|
||||
QString formationName;
|
||||
@ -37,19 +37,19 @@ struct RifFaciesProperties
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RifFaciesPropertiesReader
|
||||
class RifElasticPropertiesReader
|
||||
{
|
||||
public:
|
||||
static void readFaciesProperties( std::vector<RifFaciesProperties>& faciesProperties, const QStringList& filePaths );
|
||||
static void readElasticProperties( std::vector<RifElasticProperties>& elasticProperties, const QStringList& filePaths );
|
||||
|
||||
private:
|
||||
static void readFaciesProperties( std::vector<RifFaciesProperties>& faciesProperties, const QString& filePath );
|
||||
static RifFaciesProperties parseFaciesProperties( const QString& line, int lineNumber, const QString& filePath );
|
||||
static QStringList tokenize( const QString& line, const QString& separator );
|
||||
static void verifyNonEmptyTokens( const QStringList& tokens,
|
||||
const QStringList& nameOfNonEmptyTokens,
|
||||
int lineNumber,
|
||||
const QString& filePath );
|
||||
static void readElasticProperties( std::vector<RifElasticProperties>& elasticProperties, const QString& filePath );
|
||||
static RifElasticProperties parseElasticProperties( const QString& line, int lineNumber, const QString& filePath );
|
||||
static QStringList tokenize( const QString& line, const QString& separator );
|
||||
static void verifyNonEmptyTokens( const QStringList& tokens,
|
||||
const QStringList& nameOfNonEmptyTokens,
|
||||
int lineNumber,
|
||||
const QString& filePath );
|
||||
|
||||
static double parseDouble( const QString& token, const QString& propertyName, int lineNumber, const QString& filePath );
|
||||
|
@ -158,8 +158,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimColorLegendItem.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelPlotCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelCurve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaciesProperties.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaciesPropertiesCurve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimElasticProperties.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimElasticPropertiesCurve.h
|
||||
)
|
||||
|
||||
|
||||
@ -322,8 +322,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimColorLegendItem.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelPlotCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFractureModelCurve.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaciesProperties.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaciesPropertiesCurve.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimElasticProperties.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimElasticPropertiesCurve.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
@ -33,8 +33,8 @@
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimElasticProperties.h"
|
||||
#include "RimEllipseFractureTemplate.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
@ -105,9 +105,9 @@ RimFractureModel::RimFractureModel()
|
||||
CAF_PDM_InitField( &m_boundingBoxHorizontal, "BoundingBoxHorizontal", 50.0, "Bounding Box Horizontal", "", "", "" );
|
||||
CAF_PDM_InitField( &m_boundingBoxVertical, "BoundingBoxVertical", 100.0, "Bounding Box Vertical", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_faciesProperties, "FaciesProperties", "Facies Properties", "", "", "" );
|
||||
m_faciesProperties.uiCapability()->setUiHidden( true );
|
||||
m_faciesProperties.uiCapability()->setUiTreeHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &m_elasticProperties, "ElasticProperties", "Elastic Properties", "", "", "" );
|
||||
m_elasticProperties.uiCapability()->setUiHidden( true );
|
||||
m_elasticProperties.uiCapability()->setUiTreeHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -361,7 +361,7 @@ cvf::Vec3d RimFractureModel::calculateTSTDirection() const
|
||||
void RimFractureModel::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
m_thicknessDirectionWellPath.uiCapability()->setUiHidden( true );
|
||||
m_faciesProperties.uiCapability()->setUiHidden( false );
|
||||
m_elasticProperties.uiCapability()->setUiHidden( false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -460,17 +460,17 @@ void RimFractureModel::findThicknessTargetPoints( cvf::Vec3d& topPosition, cvf::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaciesProperties* RimFractureModel::faciesProperties() const
|
||||
RimElasticProperties* RimFractureModel::elasticProperties() const
|
||||
{
|
||||
return m_faciesProperties;
|
||||
return m_elasticProperties;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModel::setFaciesProperties( RimFaciesProperties* faciesProperties )
|
||||
void RimFractureModel::setElasticProperties( RimElasticProperties* elasticProperties )
|
||||
{
|
||||
m_faciesProperties = faciesProperties;
|
||||
m_elasticProperties = elasticProperties;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -478,8 +478,8 @@ void RimFractureModel::setFaciesProperties( RimFaciesProperties* faciesPropertie
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModel::loadDataAndUpdate()
|
||||
{
|
||||
if ( m_faciesProperties )
|
||||
if ( m_elasticProperties )
|
||||
{
|
||||
m_faciesProperties->loadDataAndUpdate();
|
||||
m_elasticProperties->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
class RimEclipseCase;
|
||||
class RimWellPath;
|
||||
class RimModeledWellPath;
|
||||
class RimFaciesProperties;
|
||||
class RimElasticProperties;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -73,10 +73,10 @@ public:
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
RimModeledWellPath* thicknessDirectionWellPath() const;
|
||||
void setThicknessDirectionWellPath( RimModeledWellPath* thicknessDirectionWellPath );
|
||||
void setFaciesProperties( RimFaciesProperties* faciesProperties );
|
||||
RimFaciesProperties* faciesProperties() const;
|
||||
RimModeledWellPath* thicknessDirectionWellPath() const;
|
||||
void setThicknessDirectionWellPath( RimModeledWellPath* thicknessDirectionWellPath );
|
||||
void setElasticProperties( RimElasticProperties* elasticProperties );
|
||||
RimElasticProperties* elasticProperties() const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
@ -97,5 +97,5 @@ protected:
|
||||
caf::PdmField<double> m_boundingBoxVertical;
|
||||
caf::PdmField<double> m_boundingBoxHorizontal;
|
||||
caf::PdmPtrField<RimModeledWellPath*> m_thicknessDirectionWellPath;
|
||||
caf::PdmChildField<RimFaciesProperties*> m_faciesProperties;
|
||||
caf::PdmChildField<RimElasticProperties*> m_elasticProperties;
|
||||
};
|
||||
|
@ -431,7 +431,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
menuBuilder << "RicNewFractureModelPlotFeature";
|
||||
menuBuilder << "RicImportFaciesFeature";
|
||||
menuBuilder << "RicImportFaciesPropertiesFeature";
|
||||
menuBuilder << "RicImportElasticPropertiesFeature";
|
||||
}
|
||||
else if ( dynamic_cast<Rim3dWellLogCurveCollection*>( firstUiItem ) ||
|
||||
dynamic_cast<Rim3dWellLogExtractionCurve*>( firstUiItem ) ||
|
||||
|
@ -16,23 +16,23 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFaciesProperties.h"
|
||||
#include "RimElasticProperties.h"
|
||||
|
||||
#include "RimFractureModel.h"
|
||||
|
||||
#include "RicFaciesPropertiesImportTools.h"
|
||||
#include "RicElasticPropertiesImportTools.h"
|
||||
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFaciesProperties, "FaciesProperties" );
|
||||
CAF_PDM_SOURCE_INIT( RimElasticProperties, "ElasticProperties" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaciesProperties::RimFaciesProperties()
|
||||
RimElasticProperties::RimElasticProperties()
|
||||
{
|
||||
CAF_PDM_InitObject( "RimFaciesProperties", "", "", "" );
|
||||
CAF_PDM_InitObject( "RimElasticProperties", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_filePath, "FilePath", "File Path", "", "", "" );
|
||||
m_filePath.uiCapability()->setUiReadOnly( true );
|
||||
@ -44,20 +44,20 @@ RimFaciesProperties::RimFaciesProperties()
|
||||
m_propertiesTable.uiCapability()->setUiReadOnly( true );
|
||||
m_propertiesTable.xmlCapability()->disableIO();
|
||||
|
||||
setUiName( "Facies Properties" );
|
||||
setUiName( "Elastic Properties" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaciesProperties::~RimFaciesProperties()
|
||||
RimElasticProperties::~RimElasticProperties()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFaciesProperties::filePath() const
|
||||
QString RimElasticProperties::filePath() const
|
||||
{
|
||||
return m_filePath.v().path();
|
||||
}
|
||||
@ -65,7 +65,7 @@ QString RimFaciesProperties::filePath() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesProperties::setFilePath( const QString& filePath )
|
||||
void RimElasticProperties::setFilePath( const QString& filePath )
|
||||
{
|
||||
m_filePath = filePath;
|
||||
}
|
||||
@ -73,16 +73,16 @@ void RimFaciesProperties::setFilePath( const QString& filePath )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesProperties::setPropertiesForFacies( FaciesKey& key, const RigFaciesProperties& properties )
|
||||
void RimElasticProperties::setPropertiesForFacies( FaciesKey& key, const RigElasticProperties& properties )
|
||||
{
|
||||
m_properties.insert( std::pair<FaciesKey, RigFaciesProperties>( key, properties ) );
|
||||
m_properties.insert( std::pair<FaciesKey, RigElasticProperties>( key, properties ) );
|
||||
m_propertiesTable = generatePropertiesTable();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFaciesProperties::hasPropertiesForFacies( FaciesKey& key ) const
|
||||
bool RimElasticProperties::hasPropertiesForFacies( FaciesKey& key ) const
|
||||
{
|
||||
return m_properties.find( key ) != m_properties.end();
|
||||
}
|
||||
@ -90,7 +90,7 @@ bool RimFaciesProperties::hasPropertiesForFacies( FaciesKey& key ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigFaciesProperties& RimFaciesProperties::propertiesForFacies( FaciesKey& key ) const
|
||||
const RigElasticProperties& RimElasticProperties::propertiesForFacies( FaciesKey& key ) const
|
||||
{
|
||||
assert( hasPropertiesForFacies( key ) );
|
||||
return m_properties.find( key )->second;
|
||||
@ -99,9 +99,9 @@ const RigFaciesProperties& RimFaciesProperties::propertiesForFacies( FaciesKey&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesProperties::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RimElasticProperties::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_propertiesTable )
|
||||
{
|
||||
@ -117,7 +117,7 @@ void RimFaciesProperties::defineEditorAttribute( const caf::PdmFieldHandle* fiel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFaciesProperties::generatePropertiesTable()
|
||||
QString RimElasticProperties::generatePropertiesTable()
|
||||
{
|
||||
QString header( "<table border=1>"
|
||||
" <thead>"
|
||||
@ -178,12 +178,12 @@ QString RimFaciesProperties::generatePropertiesTable()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesProperties::loadDataAndUpdate()
|
||||
void RimElasticProperties::loadDataAndUpdate()
|
||||
{
|
||||
if ( !m_filePath().path().isEmpty() )
|
||||
{
|
||||
RimFractureModel* fractureModel;
|
||||
firstAncestorOrThisOfType( fractureModel );
|
||||
RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( m_filePath().path(), fractureModel );
|
||||
RicElasticPropertiesImportTools::importElasticPropertiesFromFile( m_filePath().path(), fractureModel );
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "RigFaciesProperties.h"
|
||||
#include "RigElasticProperties.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
@ -33,20 +33,20 @@ typedef std::tuple<QString, QString, QString> FaciesKey;
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFaciesProperties : public caf::PdmObject
|
||||
class RimElasticProperties : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFaciesProperties();
|
||||
~RimFaciesProperties() override;
|
||||
RimElasticProperties();
|
||||
~RimElasticProperties() override;
|
||||
|
||||
QString filePath() const;
|
||||
void setFilePath( const QString& filePath );
|
||||
|
||||
void setPropertiesForFacies( FaciesKey& key, const RigFaciesProperties& properties );
|
||||
bool hasPropertiesForFacies( FaciesKey& key ) const;
|
||||
const RigFaciesProperties& propertiesForFacies( FaciesKey& key ) const;
|
||||
void setPropertiesForFacies( FaciesKey& key, const RigElasticProperties& properties );
|
||||
bool hasPropertiesForFacies( FaciesKey& key ) const;
|
||||
const RigElasticProperties& propertiesForFacies( FaciesKey& key ) const;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
|
||||
@ -61,5 +61,5 @@ private:
|
||||
caf::PdmField<caf::FilePath> m_filePath;
|
||||
caf::PdmField<QString> m_propertiesTable;
|
||||
|
||||
std::map<FaciesKey, RigFaciesProperties> m_properties;
|
||||
std::map<FaciesKey, RigElasticProperties> m_properties;
|
||||
};
|
@ -16,11 +16,11 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFaciesPropertiesCurve.h"
|
||||
#include "RimElasticPropertiesCurve.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
#include "RigFaciesProperties.h"
|
||||
#include "RigElasticProperties.h"
|
||||
#include "RigResultAccessorFactory.h"
|
||||
#include "RigWellLogCurveData.h"
|
||||
#include "RigWellPath.h"
|
||||
@ -31,7 +31,7 @@
|
||||
#include "RimColorLegendItem.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimFaciesProperties.h"
|
||||
#include "RimElasticProperties.h"
|
||||
#include "RimFractureModel.h"
|
||||
#include "RimFractureModelPlot.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
@ -55,25 +55,25 @@
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFaciesPropertiesCurve, "FaciesPropertiesCurve" );
|
||||
CAF_PDM_SOURCE_INIT( RimElasticPropertiesCurve, "ElasticPropertiesCurve" );
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void AppEnum<RimFaciesPropertiesCurve::PropertyType>::setUp()
|
||||
void AppEnum<RimElasticPropertiesCurve::PropertyType>::setUp()
|
||||
{
|
||||
addItem( RimFaciesPropertiesCurve::PropertyType::YOUNGS_MODULUS, "YOUNGS_MODULUS", "Young's Modulus" );
|
||||
addItem( RimFaciesPropertiesCurve::PropertyType::POISSONS_RATIO, "POISSONS_RATIO", "Poisson's Ratio" );
|
||||
addItem( RimFaciesPropertiesCurve::PropertyType::K_IC, "K_IC", "K-Ic" );
|
||||
addItem( RimFaciesPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT, "PROPPANT_EMBEDMENT", "Proppant Embedment" );
|
||||
setDefault( RimFaciesPropertiesCurve::PropertyType::YOUNGS_MODULUS );
|
||||
addItem( RimElasticPropertiesCurve::PropertyType::YOUNGS_MODULUS, "YOUNGS_MODULUS", "Young's Modulus" );
|
||||
addItem( RimElasticPropertiesCurve::PropertyType::POISSONS_RATIO, "POISSONS_RATIO", "Poisson's Ratio" );
|
||||
addItem( RimElasticPropertiesCurve::PropertyType::K_IC, "K_IC", "K-Ic" );
|
||||
addItem( RimElasticPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT, "PROPPANT_EMBEDMENT", "Proppant Embedment" );
|
||||
setDefault( RimElasticPropertiesCurve::PropertyType::YOUNGS_MODULUS );
|
||||
}
|
||||
}; // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaciesPropertiesCurve::RimFaciesPropertiesCurve()
|
||||
RimElasticPropertiesCurve::RimElasticPropertiesCurve()
|
||||
{
|
||||
CAF_PDM_InitObject( "Fracture Model Curve", "", "", "" );
|
||||
|
||||
@ -89,14 +89,14 @@ RimFaciesPropertiesCurve::RimFaciesPropertiesCurve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaciesPropertiesCurve::~RimFaciesPropertiesCurve()
|
||||
RimElasticPropertiesCurve::~RimElasticPropertiesCurve()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesPropertiesCurve::setFractureModel( RimFractureModel* fractureModel )
|
||||
void RimElasticPropertiesCurve::setFractureModel( RimFractureModel* fractureModel )
|
||||
{
|
||||
m_fractureModel = fractureModel;
|
||||
m_wellPath = fractureModel->thicknessDirectionWellPath();
|
||||
@ -105,7 +105,7 @@ void RimFaciesPropertiesCurve::setFractureModel( RimFractureModel* fractureModel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesPropertiesCurve::setEclipseResultCategory( RiaDefines::ResultCatType catType )
|
||||
void RimElasticPropertiesCurve::setEclipseResultCategory( RiaDefines::ResultCatType catType )
|
||||
{
|
||||
m_eclipseResultDefinition->setResultType( catType );
|
||||
}
|
||||
@ -113,7 +113,7 @@ void RimFaciesPropertiesCurve::setEclipseResultCategory( RiaDefines::ResultCatTy
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesPropertiesCurve::setPropertyType( PropertyType propertyType )
|
||||
void RimElasticPropertiesCurve::setPropertyType( PropertyType propertyType )
|
||||
{
|
||||
m_propertyType = propertyType;
|
||||
}
|
||||
@ -121,7 +121,7 @@ void RimFaciesPropertiesCurve::setPropertyType( PropertyType propertyType )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaciesPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength )
|
||||
{
|
||||
std::vector<double> values;
|
||||
std::vector<double> measuredDepthValues;
|
||||
@ -230,8 +230,8 @@ void RimFaciesPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
return;
|
||||
}
|
||||
|
||||
RimFaciesProperties* faciesProperties = m_fractureModel->faciesProperties();
|
||||
if ( !faciesProperties )
|
||||
RimElasticProperties* elasticProperties = m_fractureModel->elasticProperties();
|
||||
if ( !elasticProperties )
|
||||
{
|
||||
std::cerr << "No facies properties" << std::endl;
|
||||
return;
|
||||
@ -250,28 +250,28 @@ void RimFaciesPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
// << " formation: " << formationName.toStdString();
|
||||
|
||||
FaciesKey faciesKey = std::make_tuple( fieldName, formationName, faciesName );
|
||||
if ( faciesProperties->hasPropertiesForFacies( faciesKey ) )
|
||||
if ( elasticProperties->hasPropertiesForFacies( faciesKey ) )
|
||||
{
|
||||
const RigFaciesProperties& rigFaciesProperties = faciesProperties->propertiesForFacies( faciesKey );
|
||||
const RigElasticProperties& rigElasticProperties = elasticProperties->propertiesForFacies( faciesKey );
|
||||
|
||||
if ( m_propertyType() == PropertyType::YOUNGS_MODULUS )
|
||||
{
|
||||
double val = rigFaciesProperties.getYoungsModulus( porosity );
|
||||
double val = rigElasticProperties.getYoungsModulus( porosity );
|
||||
values.push_back( val );
|
||||
}
|
||||
else if ( m_propertyType() == PropertyType::POISSONS_RATIO )
|
||||
{
|
||||
double val = rigFaciesProperties.getPoissonsRatio( porosity );
|
||||
double val = rigElasticProperties.getPoissonsRatio( porosity );
|
||||
values.push_back( val );
|
||||
}
|
||||
else if ( m_propertyType() == PropertyType::K_IC )
|
||||
{
|
||||
double val = rigFaciesProperties.getK_Ic( porosity );
|
||||
double val = rigElasticProperties.getK_Ic( porosity );
|
||||
values.push_back( val );
|
||||
}
|
||||
else if ( m_propertyType() == PropertyType::PROPPANT_EMBEDMENT )
|
||||
{
|
||||
double val = rigFaciesProperties.getProppantEmbedment( porosity );
|
||||
double val = rigElasticProperties.getProppantEmbedment( porosity );
|
||||
values.push_back( val );
|
||||
}
|
||||
}
|
||||
@ -317,7 +317,7 @@ void RimFaciesPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
|
||||
}
|
||||
}
|
||||
|
||||
QString RimFaciesPropertiesCurve::findFaciesName( const RimColorLegend& colorLegend, double value )
|
||||
QString RimElasticPropertiesCurve::findFaciesName( const RimColorLegend& colorLegend, double value )
|
||||
{
|
||||
for ( auto item : colorLegend.colorLegendItems() )
|
||||
{
|
||||
@ -327,9 +327,9 @@ QString RimFaciesPropertiesCurve::findFaciesName( const RimColorLegend& colorLeg
|
||||
return "not found";
|
||||
}
|
||||
|
||||
QString RimFaciesPropertiesCurve::findFormationNameForDepth( const std::vector<QString>& formationNames,
|
||||
const std::vector<std::pair<double, double>>& depthRanges,
|
||||
double depth )
|
||||
QString RimElasticPropertiesCurve::findFormationNameForDepth( const std::vector<QString>& formationNames,
|
||||
const std::vector<std::pair<double, double>>& depthRanges,
|
||||
double depth )
|
||||
{
|
||||
// assert(formationNames.size() == depthRanges.size());
|
||||
for ( size_t i = 0; i < formationNames.size(); i++ )
|
||||
@ -345,7 +345,7 @@ QString RimFaciesPropertiesCurve::findFormationNameForDepth( const std::vector<Q
|
||||
return "not found";
|
||||
}
|
||||
|
||||
QString RimFaciesPropertiesCurve::createCurveAutoName()
|
||||
QString RimElasticPropertiesCurve::createCurveAutoName()
|
||||
{
|
||||
return caf::AppEnum<RimFaciesPropertiesCurve::PropertyType>::uiText( m_propertyType() );
|
||||
return caf::AppEnum<RimElasticPropertiesCurve::PropertyType>::uiText( m_propertyType() );
|
||||
}
|
@ -35,7 +35,7 @@ class RimColorLegend;
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFaciesPropertiesCurve : public RimWellLogExtractionCurve
|
||||
class RimElasticPropertiesCurve : public RimWellLogExtractionCurve
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@ -48,8 +48,8 @@ public:
|
||||
PROPPANT_EMBEDMENT
|
||||
};
|
||||
|
||||
RimFaciesPropertiesCurve();
|
||||
~RimFaciesPropertiesCurve() override;
|
||||
RimElasticPropertiesCurve();
|
||||
~RimElasticPropertiesCurve() override;
|
||||
|
||||
void setFractureModel( RimFractureModel* fractureModel );
|
||||
|
@ -79,7 +79,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigCellFaceGeometryTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigNncConnection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellDiskData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigGocadData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFaciesProperties.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigElasticProperties.h
|
||||
)
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigCellFaceGeometryTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigNncConnection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigWellDiskData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigGocadData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigFaciesProperties.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RigElasticProperties.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
@ -16,14 +16,14 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RigFaciesProperties.h"
|
||||
#include "RigElasticProperties.h"
|
||||
|
||||
#include "RiaInterpolationTools.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFaciesProperties::RigFaciesProperties( const QString& fieldName, const QString& formationName, const QString& faciesName )
|
||||
RigElasticProperties::RigElasticProperties( const QString& fieldName, const QString& formationName, const QString& faciesName )
|
||||
: m_fieldName( fieldName )
|
||||
, m_formationName( formationName )
|
||||
, m_faciesName( faciesName )
|
||||
@ -33,7 +33,7 @@ RigFaciesProperties::RigFaciesProperties( const QString& fieldName, const QStrin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RigFaciesProperties::fieldName() const
|
||||
const QString& RigElasticProperties::fieldName() const
|
||||
{
|
||||
return m_fieldName;
|
||||
}
|
||||
@ -41,7 +41,7 @@ const QString& RigFaciesProperties::fieldName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RigFaciesProperties::formationName() const
|
||||
const QString& RigElasticProperties::formationName() const
|
||||
{
|
||||
return m_formationName;
|
||||
}
|
||||
@ -49,7 +49,7 @@ const QString& RigFaciesProperties::formationName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& RigFaciesProperties::faciesName() const
|
||||
const QString& RigElasticProperties::faciesName() const
|
||||
{
|
||||
return m_faciesName;
|
||||
}
|
||||
@ -57,7 +57,7 @@ const QString& RigFaciesProperties::faciesName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigFaciesProperties::porosity() const
|
||||
const std::vector<double>& RigElasticProperties::porosity() const
|
||||
{
|
||||
return m_porosity;
|
||||
}
|
||||
@ -65,7 +65,7 @@ const std::vector<double>& RigFaciesProperties::porosity() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigFaciesProperties::youngsModulus() const
|
||||
const std::vector<double>& RigElasticProperties::youngsModulus() const
|
||||
{
|
||||
return m_youngsModulus;
|
||||
}
|
||||
@ -73,7 +73,7 @@ const std::vector<double>& RigFaciesProperties::youngsModulus() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigFaciesProperties::poissonsRatio() const
|
||||
const std::vector<double>& RigElasticProperties::poissonsRatio() const
|
||||
{
|
||||
return m_poissonsRatio;
|
||||
}
|
||||
@ -81,7 +81,7 @@ const std::vector<double>& RigFaciesProperties::poissonsRatio() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigFaciesProperties::K_Ic() const
|
||||
const std::vector<double>& RigElasticProperties::K_Ic() const
|
||||
{
|
||||
return m_K_Ic;
|
||||
}
|
||||
@ -89,7 +89,7 @@ const std::vector<double>& RigFaciesProperties::K_Ic() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>& RigFaciesProperties::proppantEmbedment() const
|
||||
const std::vector<double>& RigElasticProperties::proppantEmbedment() const
|
||||
{
|
||||
return m_proppantEmbedment;
|
||||
}
|
||||
@ -97,11 +97,11 @@ const std::vector<double>& RigFaciesProperties::proppantEmbedment() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFaciesProperties::appendValues( double porosity,
|
||||
double youngsModulus,
|
||||
double poissonsRatio,
|
||||
double K_Ic,
|
||||
double proppantEmbedment )
|
||||
void RigElasticProperties::appendValues( double porosity,
|
||||
double youngsModulus,
|
||||
double poissonsRatio,
|
||||
double K_Ic,
|
||||
double proppantEmbedment )
|
||||
{
|
||||
m_porosity.push_back( porosity );
|
||||
m_youngsModulus.push_back( youngsModulus );
|
||||
@ -113,7 +113,7 @@ void RigFaciesProperties::appendValues( double porosity,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigFaciesProperties::getYoungsModulus( double porosity ) const
|
||||
double RigElasticProperties::getYoungsModulus( double porosity ) const
|
||||
{
|
||||
return RiaInterpolationTools::linear( m_porosity, m_youngsModulus, porosity );
|
||||
}
|
||||
@ -121,7 +121,7 @@ double RigFaciesProperties::getYoungsModulus( double porosity ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigFaciesProperties::getPoissonsRatio( double porosity ) const
|
||||
double RigElasticProperties::getPoissonsRatio( double porosity ) const
|
||||
{
|
||||
return RiaInterpolationTools::linear( m_porosity, m_poissonsRatio, porosity );
|
||||
}
|
||||
@ -129,7 +129,7 @@ double RigFaciesProperties::getPoissonsRatio( double porosity ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigFaciesProperties::getK_Ic( double porosity ) const
|
||||
double RigElasticProperties::getK_Ic( double porosity ) const
|
||||
{
|
||||
return RiaInterpolationTools::linear( m_porosity, m_K_Ic, porosity );
|
||||
}
|
||||
@ -137,7 +137,7 @@ double RigFaciesProperties::getK_Ic( double porosity ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RigFaciesProperties::getProppantEmbedment( double porosity ) const
|
||||
double RigElasticProperties::getProppantEmbedment( double porosity ) const
|
||||
{
|
||||
return RiaInterpolationTools::linear( m_porosity, m_proppantEmbedment, porosity );
|
||||
}
|
@ -25,10 +25,10 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RigFaciesProperties
|
||||
class RigElasticProperties
|
||||
{
|
||||
public:
|
||||
RigFaciesProperties( const QString& fieldName, const QString& formationName, const QString& faciesName );
|
||||
RigElasticProperties( const QString& fieldName, const QString& formationName, const QString& faciesName );
|
||||
const QString& fieldName() const;
|
||||
const QString& formationName() const;
|
||||
const QString& faciesName() const;
|
@ -69,7 +69,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigHexGradientTools-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSurfaceReader-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifColorLegendData-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifRoffReader-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaciesPropertiesReader-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifElasticPropertiesReader-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaStatisticsTools-Test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanXmlReader-Test.cpp
|
||||
)
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "RifFaciesPropertiesReader.h"
|
||||
#include "RifElasticPropertiesReader.h"
|
||||
#include "RifFileParseTools.h"
|
||||
|
||||
#include <QStringList>
|
||||
@ -30,7 +30,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, ReadCorrectInputFile )
|
||||
TEST( RifElasticPropertiesReaderTest, ReadCorrectInputFile )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
@ -44,53 +44,53 @@ TEST( RifFaciesPropertiesReaderTest, ReadCorrectInputFile )
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
|
||||
std::vector<RifFaciesProperties> faciesProperties;
|
||||
RifFaciesPropertiesReader::readFaciesProperties( faciesProperties, filePaths );
|
||||
std::vector<RifElasticProperties> elasticProperties;
|
||||
RifElasticPropertiesReader::readElasticProperties( elasticProperties, filePaths );
|
||||
|
||||
ASSERT_EQ( 2u, faciesProperties.size() );
|
||||
ASSERT_EQ( 2u, elasticProperties.size() );
|
||||
|
||||
ASSERT_EQ( "Norne", faciesProperties[0].fieldName.toStdString() );
|
||||
ASSERT_EQ( "Norne", faciesProperties[1].fieldName.toStdString() );
|
||||
ASSERT_EQ( "Norne", elasticProperties[0].fieldName.toStdString() );
|
||||
ASSERT_EQ( "Norne", elasticProperties[1].fieldName.toStdString() );
|
||||
|
||||
ASSERT_EQ( "Not", faciesProperties[0].formationName.toStdString() );
|
||||
ASSERT_EQ( "Not", faciesProperties[1].formationName.toStdString() );
|
||||
ASSERT_EQ( "Not", elasticProperties[0].formationName.toStdString() );
|
||||
ASSERT_EQ( "Not", elasticProperties[1].formationName.toStdString() );
|
||||
|
||||
ASSERT_EQ( "Sand", faciesProperties[0].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Sand", faciesProperties[1].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Sand", elasticProperties[0].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Sand", elasticProperties[1].faciesName.toStdString() );
|
||||
|
||||
ASSERT_DOUBLE_EQ( 0.0, faciesProperties[0].porosity );
|
||||
ASSERT_DOUBLE_EQ( 0.1, faciesProperties[1].porosity );
|
||||
ASSERT_DOUBLE_EQ( 0.0, elasticProperties[0].porosity );
|
||||
ASSERT_DOUBLE_EQ( 0.1, elasticProperties[1].porosity );
|
||||
|
||||
ASSERT_DOUBLE_EQ( 25.0, faciesProperties[0].youngsModulus );
|
||||
ASSERT_DOUBLE_EQ( 19.0, faciesProperties[1].youngsModulus );
|
||||
ASSERT_DOUBLE_EQ( 25.0, elasticProperties[0].youngsModulus );
|
||||
ASSERT_DOUBLE_EQ( 19.0, elasticProperties[1].youngsModulus );
|
||||
|
||||
ASSERT_DOUBLE_EQ( 0.25, faciesProperties[0].poissonsRatio );
|
||||
ASSERT_DOUBLE_EQ( 0.27, faciesProperties[1].poissonsRatio );
|
||||
ASSERT_DOUBLE_EQ( 0.25, elasticProperties[0].poissonsRatio );
|
||||
ASSERT_DOUBLE_EQ( 0.27, elasticProperties[1].poissonsRatio );
|
||||
|
||||
ASSERT_DOUBLE_EQ( 2000.0, faciesProperties[0].K_Ic );
|
||||
ASSERT_DOUBLE_EQ( 2099.0, faciesProperties[1].K_Ic );
|
||||
ASSERT_DOUBLE_EQ( 2000.0, elasticProperties[0].K_Ic );
|
||||
ASSERT_DOUBLE_EQ( 2099.0, elasticProperties[1].K_Ic );
|
||||
|
||||
ASSERT_DOUBLE_EQ( 0.2, faciesProperties[0].proppantEmbedment );
|
||||
ASSERT_DOUBLE_EQ( 0.3, faciesProperties[1].proppantEmbedment );
|
||||
ASSERT_DOUBLE_EQ( 0.2, elasticProperties[0].proppantEmbedment );
|
||||
ASSERT_DOUBLE_EQ( 0.3, elasticProperties[1].proppantEmbedment );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Helper to check exception messages when reading invalid files
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
::testing::AssertionResult readingFaciesPropertiesThrowsException( const QStringList& filePaths,
|
||||
const QString& expectedMessage )
|
||||
::testing::AssertionResult readingElasticPropertiesThrowsException( const QStringList& filePaths,
|
||||
const QString& expectedMessage )
|
||||
{
|
||||
std::vector<RifFaciesProperties> faciesProperties;
|
||||
std::vector<RifElasticProperties> elasticProperties;
|
||||
try
|
||||
{
|
||||
RifFaciesPropertiesReader::readFaciesProperties( faciesProperties, filePaths );
|
||||
RifElasticPropertiesReader::readElasticProperties( elasticProperties, filePaths );
|
||||
// No exception thrown: fail!
|
||||
return ::testing::AssertionFailure() << "readFaciesProperties did not throw exception";
|
||||
return ::testing::AssertionFailure() << "readElasticProperties did not throw exception";
|
||||
}
|
||||
catch ( FileParseException& error )
|
||||
{
|
||||
// Should always have cleaned up on failure
|
||||
EXPECT_EQ( 0u, faciesProperties.size() );
|
||||
EXPECT_EQ( 0u, elasticProperties.size() );
|
||||
// Check that we get the expected message
|
||||
EXPECT_EQ( expectedMessage.toStdString(), error.message.toStdString() );
|
||||
return ::testing::AssertionSuccess();
|
||||
@ -100,19 +100,19 @@ TEST( RifFaciesPropertiesReaderTest, ReadCorrectInputFile )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, ReadMissingFileThrows )
|
||||
TEST( RifElasticPropertiesReaderTest, ReadMissingFileThrows )
|
||||
{
|
||||
QStringList filePaths;
|
||||
QString nonExistingFile( "this/is/a/file/which/does/not/exist.csv" );
|
||||
filePaths.append( nonExistingFile );
|
||||
ASSERT_TRUE( readingFaciesPropertiesThrowsException( filePaths,
|
||||
QString( "Unable to open file: %1" ).arg( nonExistingFile ) ) );
|
||||
ASSERT_TRUE( readingElasticPropertiesThrowsException( filePaths,
|
||||
QString( "Unable to open file: %1" ).arg( nonExistingFile ) ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, ReadShortLinesFileThrows )
|
||||
TEST( RifElasticPropertiesReaderTest, ReadShortLinesFileThrows )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
@ -126,14 +126,14 @@ TEST( RifFaciesPropertiesReaderTest, ReadShortLinesFileThrows )
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
ASSERT_TRUE(
|
||||
readingFaciesPropertiesThrowsException( filePaths,
|
||||
QString( "Incomplete data on line 2: %1" ).arg( file.fileName() ) ) );
|
||||
readingElasticPropertiesThrowsException( filePaths,
|
||||
QString( "Incomplete data on line 2: %1" ).arg( file.fileName() ) ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, ReadEmptyFieldNameThrows )
|
||||
TEST( RifElasticPropertiesReaderTest, ReadEmptyFieldNameThrows )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
@ -146,15 +146,15 @@ TEST( RifFaciesPropertiesReaderTest, ReadEmptyFieldNameThrows )
|
||||
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
ASSERT_TRUE( readingFaciesPropertiesThrowsException( filePaths,
|
||||
QString( "Unexpected empty 'Field Name' on line 2: %1" )
|
||||
.arg( file.fileName() ) ) );
|
||||
ASSERT_TRUE( readingElasticPropertiesThrowsException( filePaths,
|
||||
QString( "Unexpected empty 'Field Name' on line 2: %1" )
|
||||
.arg( file.fileName() ) ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, ReadInvalidMeasureDepthThrows )
|
||||
TEST( RifElasticPropertiesReaderTest, ReadInvalidMeasureDepthThrows )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
@ -167,15 +167,15 @@ TEST( RifFaciesPropertiesReaderTest, ReadInvalidMeasureDepthThrows )
|
||||
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
ASSERT_TRUE( readingFaciesPropertiesThrowsException( filePaths,
|
||||
QString( "Invalid number for 'Porosity' on line 2: %1" )
|
||||
.arg( file.fileName() ) ) );
|
||||
ASSERT_TRUE( readingElasticPropertiesThrowsException( filePaths,
|
||||
QString( "Invalid number for 'Porosity' on line 2: %1" )
|
||||
.arg( file.fileName() ) ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST( RifFaciesPropertiesReaderTest, CommentsAndEmptyLinesAreIgnored )
|
||||
TEST( RifElasticPropertiesReaderTest, CommentsAndEmptyLinesAreIgnored )
|
||||
{
|
||||
QTemporaryFile file;
|
||||
EXPECT_TRUE( file.open() );
|
||||
@ -205,12 +205,12 @@ TEST( RifFaciesPropertiesReaderTest, CommentsAndEmptyLinesAreIgnored )
|
||||
|
||||
QStringList filePaths;
|
||||
filePaths.append( file.fileName() );
|
||||
std::vector<RifFaciesProperties> faciesProperties;
|
||||
RifFaciesPropertiesReader::readFaciesProperties( faciesProperties, filePaths );
|
||||
std::vector<RifElasticProperties> elasticProperties;
|
||||
RifElasticPropertiesReader::readElasticProperties( elasticProperties, filePaths );
|
||||
|
||||
ASSERT_EQ( 3u, faciesProperties.size() );
|
||||
ASSERT_EQ( 3u, elasticProperties.size() );
|
||||
|
||||
ASSERT_EQ( "Sand", faciesProperties[0].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Silt", faciesProperties[1].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Shale", faciesProperties[2].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Sand", elasticProperties[0].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Silt", elasticProperties[1].faciesName.toStdString() );
|
||||
ASSERT_EQ( "Shale", elasticProperties[2].faciesName.toStdString() );
|
||||
}
|
Loading…
Reference in New Issue
Block a user