#6364 Add immobile fluid saturation to elastic properties csv parsing.

This commit is contained in:
Kristian Bendiksen
2020-08-26 06:23:37 +02:00
parent 1b5be32994
commit 71426dcacb
3 changed files with 19 additions and 12 deletions

View File

@@ -79,7 +79,7 @@ RifElasticProperties
{
QStringList tokens = tokenize( line, "," );
if ( tokens.size() != 12 )
if ( tokens.size() != 13 )
{
throw FileParseException( QString( "Incomplete data on line %1: %2" ).arg( lineNumber ).arg( filePath ) );
}
@@ -97,7 +97,8 @@ RifElasticProperties
<< "Biot Coefficient"
<< "k0"
<< "Fluid Loss Coefficient"
<< "Spurt Loss";
<< "Spurt Loss"
<< "Immobile Fluid Saturation";
verifyNonEmptyTokens( tokens, nameOfNonEmptyTokens, lineNumber, filePath );
RifElasticProperties elasticProperties;
@@ -113,6 +114,8 @@ RifElasticProperties
elasticProperties.k0 = parseDouble( tokens[9], "k0", lineNumber, filePath );
elasticProperties.fluidLossCoefficient = parseDouble( tokens[10], "Fluid Loss Coefficient", lineNumber, filePath );
elasticProperties.spurtLoss = parseDouble( tokens[11], "Spurt Loss", lineNumber, filePath );
elasticProperties.immobileFluidSaturation =
parseDouble( tokens[12], "Immobile Fluid Saturation", lineNumber, filePath );
return elasticProperties;
}

View File

@@ -36,6 +36,7 @@ struct RifElasticProperties
double k0;
double fluidLossCoefficient;
double spurtLoss;
double immobileFluidSaturation;
};
//==================================================================================================

View File

@@ -37,8 +37,8 @@ TEST( RifElasticPropertiesReaderTest, ReadCorrectInputFile )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n"
<< "Norne,Not,Sand,0.10,19,0.27,2099,0.3,0.4,0.5,0.2,0.5\n";
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.4\n"
<< "Norne,Not,Sand,0.10,19,0.27,2099,0.3,0.4,0.5,0.2,0.5,0.55\n";
}
QStringList filePaths;
@@ -72,6 +72,9 @@ TEST( RifElasticPropertiesReaderTest, ReadCorrectInputFile )
ASSERT_DOUBLE_EQ( 0.2, elasticProperties[0].proppantEmbedment );
ASSERT_DOUBLE_EQ( 0.3, elasticProperties[1].proppantEmbedment );
ASSERT_DOUBLE_EQ( 0.4, elasticProperties[0].immobileFluidSaturation );
ASSERT_DOUBLE_EQ( 0.55, elasticProperties[1].immobileFluidSaturation );
}
//--------------------------------------------------------------------------------------------------
@@ -119,7 +122,7 @@ TEST( RifElasticPropertiesReaderTest, ReadShortLinesFileThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n"
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.7\n"
<< "Norne,Not,Sand,0.10,19,0.27\n";
}
@@ -140,8 +143,8 @@ TEST( RifElasticPropertiesReaderTest, ReadEmptyFieldNameThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n"
<< ",Not,Sand,0.10,19,0.27,2099,0.3,0.3,0.4,0.5,0.6\n";
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.89\n"
<< ",Not,Sand,0.10,19,0.27,2099,0.3,0.3,0.4,0.5,0.6,0.89\n";
}
QStringList filePaths;
@@ -161,8 +164,8 @@ TEST( RifElasticPropertiesReaderTest, ReadInvalidMeasureDepthThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n"
<< "Norne,Not,Sand, not a number,23.4,0.27,2099,0.3,0.3,0.4,0.5,0.6\n";
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.9\n"
<< "Norne,Not,Sand, not a number,23.4,0.27,2099,0.3,0.3,0.4,0.5,0.6,0.77\n";
}
QStringList filePaths;
@@ -191,14 +194,14 @@ TEST( RifElasticPropertiesReaderTest, CommentsAndEmptyLinesAreIgnored )
out << "\t\n";
out << " \n";
// Then some data
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n";
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.7\n";
// Comment in-between data should be ignored
out << "# One more comment in-between the data\n";
out << "Norne,Not,Silt,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n";
out << "Norne,Not,Silt,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.7\n";
// Empty line in-between data should be ignored
out << "\n";
// Data with comment sign inside it is not ignored
out << "Norne,Not,Shale,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n";
out << "Norne,Not,Shale,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6,0.8\n";
// Trailing empty lines should be ignored
out << "\n\n\n";
}