#6065 Import "Fluid Loss Coefficient" and "Spurt Loss" from csv and export to frk.

This commit is contained in:
Kristian Bendiksen 2020-06-17 09:36:56 +02:00
parent f2696b003d
commit 19ee0310a9
11 changed files with 116 additions and 38 deletions

View File

@ -129,7 +129,9 @@ RimFractureModelPlot*
RimElasticPropertiesCurve::PropertyType::K_IC,
RimElasticPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT,
RimElasticPropertiesCurve::PropertyType::BIOT_COEFFICIENT,
RimElasticPropertiesCurve::PropertyType::K0};
RimElasticPropertiesCurve::PropertyType::K0,
RimElasticPropertiesCurve::PropertyType::FLUID_LOSS_COEFFICIENT,
RimElasticPropertiesCurve::PropertyType::SPURT_LOSS};
for ( auto result : results )
{

View File

@ -94,7 +94,9 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt
item.K_Ic,
item.proppantEmbedment,
item.biotCoefficient,
item.k0 );
item.k0,
item.fluidLossCoefficient,
item.spurtLoss );
}
rimElasticProperties->setPropertiesForFacies( key, rigElasticProperties );

View File

@ -79,7 +79,7 @@ RifElasticProperties
{
QStringList tokens = tokenize( line, "," );
if ( tokens.size() != 10 )
if ( tokens.size() != 12 )
{
throw FileParseException( QString( "Incomplete data on line %1: %2" ).arg( lineNumber ).arg( filePath ) );
}
@ -95,20 +95,24 @@ RifElasticProperties
<< "K-Ic"
<< "Proppant Embedment"
<< "Biot Coefficient"
<< "k0";
<< "k0"
<< "Fluid Loss Coefficient"
<< "Spurt Loss";
verifyNonEmptyTokens( tokens, nameOfNonEmptyTokens, 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 );
elasticProperties.biotCoefficient = parseDouble( tokens[8], "Biot Coefficient", lineNumber, filePath );
elasticProperties.k0 = parseDouble( tokens[9], "k0", lineNumber, filePath );
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 );
elasticProperties.biotCoefficient = parseDouble( tokens[8], "Biot Coefficient", lineNumber, filePath );
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 );
return elasticProperties;
}

View File

@ -34,6 +34,8 @@ struct RifElasticProperties
double proppantEmbedment;
double biotCoefficient;
double k0;
double fluidLossCoefficient;
double spurtLoss;
};
//==================================================================================================

View File

@ -132,6 +132,8 @@ QString RimElasticProperties::generatePropertiesTable()
" <th>Proppant<br>Embedment</th>"
" <th>Biot<br>Coefficient</th>"
" <th>k0</th>"
" <th>Fluid Loss<br>Coefficient</th>"
" <th>Spurt Loss</th>"
" </tr>"
" </thead>"
" <tbody>" );
@ -139,14 +141,16 @@ QString RimElasticProperties::generatePropertiesTable()
QString body;
for ( auto prop : m_properties )
{
const QString& fieldName = prop.second.fieldName();
const std::vector<double>& porosity = prop.second.porosity();
const std::vector<double>& youngsModulus = prop.second.youngsModulus();
const std::vector<double>& poissonsRatio = prop.second.poissonsRatio();
const std::vector<double>& K_Ic = prop.second.K_Ic();
const std::vector<double>& proppantEmbedment = prop.second.proppantEmbedment();
const std::vector<double>& biotCoefficient = prop.second.biotCoefficient();
const std::vector<double>& k0 = prop.second.k0();
const QString& fieldName = prop.second.fieldName();
const std::vector<double>& porosity = prop.second.porosity();
const std::vector<double>& youngsModulus = prop.second.youngsModulus();
const std::vector<double>& poissonsRatio = prop.second.poissonsRatio();
const std::vector<double>& K_Ic = prop.second.K_Ic();
const std::vector<double>& proppantEmbedment = prop.second.proppantEmbedment();
const std::vector<double>& biotCoefficient = prop.second.biotCoefficient();
const std::vector<double>& k0 = prop.second.k0();
const std::vector<double>& fluidLossCoefficient = prop.second.fluidLossCoefficient();
const std::vector<double>& spurtLoss = prop.second.spurtLoss();
for ( size_t i = 0; i < porosity.size(); i++ )
{
@ -161,6 +165,8 @@ QString RimElasticProperties::generatePropertiesTable()
" <td align=right>%8</td>"
" <td align=right>%9</td>"
" <td align=right>%10</td>"
" <td align=right>%11</td>"
" <td align=right>%12</td>"
"</tr>" );
QString line = format.arg( fieldName )
@ -172,7 +178,9 @@ QString RimElasticProperties::generatePropertiesTable()
.arg( K_Ic[i] )
.arg( proppantEmbedment[i] )
.arg( biotCoefficient[i] )
.arg( k0[i] );
.arg( k0[i] )
.arg( fluidLossCoefficient[i] )
.arg( spurtLoss[i] );
body.append( line );
}

View File

@ -69,6 +69,10 @@ void AppEnum<RimElasticPropertiesCurve::PropertyType>::setUp()
addItem( RimElasticPropertiesCurve::PropertyType::PROPPANT_EMBEDMENT, "PROPPANT_EMBEDMENT", "Proppant Embedment" );
addItem( RimElasticPropertiesCurve::PropertyType::BIOT_COEFFICIENT, "BIOT_COEFFICIENT", "Biot Coefficient" );
addItem( RimElasticPropertiesCurve::PropertyType::K0, "K0", "k0" );
addItem( RimElasticPropertiesCurve::PropertyType::FLUID_LOSS_COEFFICIENT,
"FLUID_LOSS_COEFFICIENT",
"Fluid Loss Coefficient" );
addItem( RimElasticPropertiesCurve::PropertyType::SPURT_LOSS, "SPURT_LOSS", "Spurt Loss" );
setDefault( RimElasticPropertiesCurve::PropertyType::YOUNGS_MODULUS );
}
}; // namespace caf
@ -267,6 +271,16 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength
double val = rigElasticProperties.getK0( porosity );
values.push_back( val );
}
else if ( m_propertyType() == PropertyType::FLUID_LOSS_COEFFICIENT )
{
double val = rigElasticProperties.getFluidLossCoefficient( porosity );
values.push_back( val );
}
else if ( m_propertyType() == PropertyType::SPURT_LOSS )
{
double val = rigElasticProperties.getSpurtLoss( porosity );
values.push_back( val );
}
}
else
{

View File

@ -47,7 +47,9 @@ public:
K_IC,
PROPPANT_EMBEDMENT,
BIOT_COEFFICIENT,
K0
K0,
FLUID_LOSS_COEFFICIENT,
SPURT_LOSS
};
RimElasticPropertiesCurve();

View File

@ -479,7 +479,7 @@ std::vector<double> RimFractureModelPlot::calculateKIc() const
//--------------------------------------------------------------------------------------------------
std::vector<double> RimFractureModelPlot::calculateFluidLossCoefficient() const
{
return std::vector<double>();
return findCurveAndComputeLayeredAverage( "Fluid Loss Coefficient" );
}
//--------------------------------------------------------------------------------------------------
@ -487,7 +487,7 @@ std::vector<double> RimFractureModelPlot::calculateFluidLossCoefficient() const
//--------------------------------------------------------------------------------------------------
std::vector<double> RimFractureModelPlot::calculateSpurtLoss() const
{
return std::vector<double>();
return findCurveAndComputeLayeredAverage( "Spurt Loss" );
}
//--------------------------------------------------------------------------------------------------

View File

@ -110,6 +110,22 @@ const std::vector<double>& RigElasticProperties::k0() const
return m_k0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<double>& RigElasticProperties::fluidLossCoefficient() const
{
return m_fluidLossCoefficient;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<double>& RigElasticProperties::spurtLoss() const
{
return m_spurtLoss;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -119,7 +135,9 @@ void RigElasticProperties::appendValues( double porosity,
double K_Ic,
double proppantEmbedment,
double biotCoefficient,
double k0 )
double k0,
double fluidLossCoefficient,
double spurtLoss )
{
m_porosity.push_back( porosity );
m_youngsModulus.push_back( youngsModulus );
@ -128,6 +146,8 @@ void RigElasticProperties::appendValues( double porosity,
m_proppantEmbedment.push_back( proppantEmbedment );
m_biotCoefficient.push_back( biotCoefficient );
m_k0.push_back( k0 );
m_fluidLossCoefficient.push_back( fluidLossCoefficient );
m_spurtLoss.push_back( spurtLoss );
}
//--------------------------------------------------------------------------------------------------
@ -177,3 +197,19 @@ double RigElasticProperties::getK0( double porosity ) const
{
return RiaInterpolationTools::linear( m_porosity, m_k0, porosity );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigElasticProperties::getFluidLossCoefficient( double porosity ) const
{
return RiaInterpolationTools::linear( m_porosity, m_fluidLossCoefficient, porosity );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigElasticProperties::getSpurtLoss( double porosity ) const
{
return RiaInterpolationTools::linear( m_porosity, m_spurtLoss, porosity );
}

View File

@ -39,13 +39,17 @@ public:
double m_K_Ic,
double proppantEmbedment,
double biotCoefficient,
double k0 );
double k0,
double fluidLossCoefficient,
double spurtLoss );
double getYoungsModulus( double porosity ) const;
double getPoissonsRatio( double porosity ) const;
double getK_Ic( double porosity ) const;
double getProppantEmbedment( double porosity ) const;
double getBiotCoefficient( double porosity ) const;
double getK0( double porosity ) const;
double getFluidLossCoefficient( double porosity ) const;
double getSpurtLoss( double porosity ) const;
const std::vector<double>& porosity() const;
const std::vector<double>& youngsModulus() const;
@ -54,6 +58,8 @@ public:
const std::vector<double>& proppantEmbedment() const;
const std::vector<double>& biotCoefficient() const;
const std::vector<double>& k0() const;
const std::vector<double>& fluidLossCoefficient() const;
const std::vector<double>& spurtLoss() const;
private:
QString m_fieldName;
@ -67,4 +73,6 @@ private:
std::vector<double> m_proppantEmbedment;
std::vector<double> m_biotCoefficient;
std::vector<double> m_k0;
std::vector<double> m_fluidLossCoefficient;
std::vector<double> m_spurtLoss;
};

View File

@ -37,8 +37,8 @@ TEST( RifElasticPropertiesReaderTest, ReadCorrectInputFile )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2\n"
<< "Norne,Not,Sand,0.10,19,0.27,2099,0.3\n";
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";
}
QStringList filePaths;
@ -119,7 +119,7 @@ TEST( RifElasticPropertiesReaderTest, ReadShortLinesFileThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2\n"
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\n";
}
@ -140,8 +140,8 @@ TEST( RifElasticPropertiesReaderTest, ReadEmptyFieldNameThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2\n"
<< ",Not,Sand,0.10,19,0.27,2099,0.3\n";
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";
}
QStringList filePaths;
@ -161,8 +161,8 @@ TEST( RifElasticPropertiesReaderTest, ReadInvalidMeasureDepthThrows )
{
QTextStream out( &file );
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2\n"
<< "Norne,Not,Sand, not a number,23.4,0.27,2099,0.3\n";
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";
}
QStringList filePaths;
@ -191,14 +191,14 @@ TEST( RifElasticPropertiesReaderTest, CommentsAndEmptyLinesAreIgnored )
out << "\t\n";
out << " \n";
// Then some data
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2\n";
out << "Norne,Not,Sand,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\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\n";
out << "Norne,Not,Silt,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\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\n";
out << "Norne,Not,Shale,0.00,25,0.25,2000,0.2,0.3,0.4,0.5,0.6\n";
// Trailing empty lines should be ignored
out << "\n\n\n";
}