mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6364 Add scaffolding for exporting detailed fluid loss for Stimplan.
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
|
#include "RimFractureModel.h"
|
||||||
#include "RimFractureModelPlot.h"
|
#include "RimFractureModelPlot.h"
|
||||||
|
|
||||||
#include "RifFractureModelPlotExporter.h"
|
#include "RifFractureModelPlotExporter.h"
|
||||||
@@ -61,7 +62,9 @@ void RicExportFractureModelPlotToFileFeature::onActionTriggered( bool isChecked
|
|||||||
|
|
||||||
if ( fileName.isEmpty() ) return;
|
if ( fileName.isEmpty() ) return;
|
||||||
|
|
||||||
RifFractureModelPlotExporter::writeToFile( fractureModelPlot, fileName );
|
RifFractureModelPlotExporter::writeToFile( fractureModelPlot,
|
||||||
|
fractureModelPlot->fractureModel()->useDetailedFluidLoss(),
|
||||||
|
fileName );
|
||||||
|
|
||||||
// Remember the path to next time
|
// Remember the path to next time
|
||||||
app->setLastUsedDialogDirectory( "FRACTURE_MODEL_PLOT", QFileInfo( fileName ).absolutePath() );
|
app->setLastUsedDialogDirectory( "FRACTURE_MODEL_PLOT", QFileInfo( fileName ).absolutePath() );
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RifFractureModelPlotExporter::writeToFile( RimFractureModelPlot* plot, const QString& filepath )
|
bool RifFractureModelPlotExporter::writeToFile( RimFractureModelPlot* plot, bool useDetailedLoss, const QString& filepath )
|
||||||
{
|
{
|
||||||
std::vector<QString> labels;
|
std::vector<QString> labels;
|
||||||
// TVD depth of top of zone (ft)
|
// TVD depth of top of zone (ft)
|
||||||
@@ -56,13 +56,15 @@ bool RifFractureModelPlotExporter::writeToFile( RimFractureModelPlot* plot, cons
|
|||||||
// Proppand Embedmeent (lb/ft^2)
|
// Proppand Embedmeent (lb/ft^2)
|
||||||
labels.push_back( "pembed" );
|
labels.push_back( "pembed" );
|
||||||
|
|
||||||
bool useDetailedLoss = false;
|
|
||||||
if ( useDetailedLoss )
|
if ( useDetailedLoss )
|
||||||
{
|
{
|
||||||
// B2 Detailed Loss
|
// B2 Detailed Loss
|
||||||
// Reservoir Pressure (psi)
|
// Reservoir Pressure (psi)
|
||||||
labels.push_back( "zoneResPres" );
|
labels.push_back( "zoneResPres" );
|
||||||
|
|
||||||
|
// Immobile Fluid Saturation (fraction)
|
||||||
|
labels.push_back( "zoneWaterSat" );
|
||||||
|
|
||||||
// Porosity (fraction)
|
// Porosity (fraction)
|
||||||
labels.push_back( "zonePorosity" );
|
labels.push_back( "zonePorosity" );
|
||||||
|
|
||||||
@@ -71,22 +73,39 @@ bool RifFractureModelPlotExporter::writeToFile( RimFractureModelPlot* plot, cons
|
|||||||
|
|
||||||
// Vertical Perm (md)
|
// Vertical Perm (md)
|
||||||
labels.push_back( "zoneVertPerm" );
|
labels.push_back( "zoneVertPerm" );
|
||||||
|
|
||||||
|
// Temperature (F)
|
||||||
|
labels.push_back( "zoneTemp" );
|
||||||
|
|
||||||
|
// Relative permeability
|
||||||
|
labels.push_back( "zoneRelPerm" );
|
||||||
|
|
||||||
|
// Poro-Elastic constant
|
||||||
|
labels.push_back( "zonePoroElas" );
|
||||||
|
|
||||||
|
// Thermal Epansion Coefficient (1/F)
|
||||||
|
labels.push_back( "zoneThermalExp" );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<QString, std::vector<double>> values;
|
std::map<QString, std::vector<double>> values;
|
||||||
values["dpthlyr"] = plot->calculateTrueVerticalDepth();
|
values["dpthlyr"] = plot->calculateTrueVerticalDepth();
|
||||||
values["strs"] = plot->calculateStress();
|
values["strs"] = plot->calculateStress();
|
||||||
values["strsg"] = plot->calculateStressGradient();
|
values["strsg"] = plot->calculateStressGradient();
|
||||||
values["elyr"] = plot->calculateYoungsModulus();
|
values["elyr"] = plot->calculateYoungsModulus();
|
||||||
values["poissonr"] = plot->calculatePoissonsRatio();
|
values["poissonr"] = plot->calculatePoissonsRatio();
|
||||||
values["tuflyr"] = plot->calculateKIc();
|
values["tuflyr"] = plot->calculateKIc();
|
||||||
values["clyrc"] = plot->calculateFluidLossCoefficient();
|
values["clyrc"] = plot->calculateFluidLossCoefficient();
|
||||||
values["clyrs"] = plot->calculateSpurtLoss();
|
values["clyrs"] = plot->calculateSpurtLoss();
|
||||||
values["pembed"] = plot->calculateProppandEmbedment();
|
values["pembed"] = plot->calculateProppandEmbedment();
|
||||||
values["zoneResPres"] = plot->calculateReservoirPressure();
|
values["zoneResPres"] = plot->calculateReservoirPressure();
|
||||||
values["zonePorosity"] = plot->calculatePorosity();
|
values["zoneWaterSat"] = plot->calculateImmobileFluidSaturation();
|
||||||
values["zoneHorizPerm"] = plot->calculateHorizontalPermeability();
|
values["zonePorosity"] = plot->calculatePorosity();
|
||||||
values["zoneVertPerm"] = plot->calculateVerticalPermeability();
|
values["zoneHorizPerm"] = plot->calculateHorizontalPermeability();
|
||||||
|
values["zoneVertPerm"] = plot->calculateVerticalPermeability();
|
||||||
|
values["zoneTemp"] = plot->calculateTemperature();
|
||||||
|
values["zoneRelPerm"] = plot->calculateRelativePermeabilityFactor();
|
||||||
|
values["zonePoroElas"] = plot->calculatePoroElasticConstant();
|
||||||
|
values["zoneThermalExp"] = plot->calculateThermalExpansionCoefficient();
|
||||||
|
|
||||||
QFile data( filepath );
|
QFile data( filepath );
|
||||||
if ( !data.open( QFile::WriteOnly | QFile::Truncate ) )
|
if ( !data.open( QFile::WriteOnly | QFile::Truncate ) )
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class QTextStream;
|
|||||||
class RifFractureModelPlotExporter
|
class RifFractureModelPlotExporter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool writeToFile( RimFractureModelPlot* plot, const QString& filepath );
|
static bool writeToFile( RimFractureModelPlot* plot, bool useDetailedFluidLoss, const QString& filepath );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void appendToStream( QTextStream& stream, const QString& label, const std::vector<double>& values );
|
static void appendToStream( QTextStream& stream, const QString& label, const std::vector<double>& values );
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ RimFractureModel::RimFractureModel()
|
|||||||
"",
|
"",
|
||||||
"" );
|
"" );
|
||||||
|
|
||||||
|
CAF_PDM_InitScriptableField( &m_useDetailedFluidLoss, "UseDetailedFluidLoss", true, "Use Detailed Fluid Loss", "", "", "" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableFieldNoDefault( &m_elasticProperties, "ElasticProperties", "Elastic Properties", "", "", "" );
|
CAF_PDM_InitScriptableFieldNoDefault( &m_elasticProperties, "ElasticProperties", "Elastic Properties", "", "", "" );
|
||||||
m_elasticProperties.uiCapability()->setUiHidden( true );
|
m_elasticProperties.uiCapability()->setUiHidden( true );
|
||||||
m_elasticProperties.uiCapability()->setUiTreeHidden( true );
|
m_elasticProperties.uiCapability()->setUiTreeHidden( true );
|
||||||
@@ -188,6 +190,14 @@ bool RimFractureModel::isEnabled() const
|
|||||||
return isChecked();
|
return isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimFractureModel::useDetailedFluidLoss() const
|
||||||
|
{
|
||||||
|
return m_useDetailedFluidLoss();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ public:
|
|||||||
QString underburdenFormation() const;
|
QString underburdenFormation() const;
|
||||||
QString underburdenFacies() const;
|
QString underburdenFacies() const;
|
||||||
|
|
||||||
|
bool useDetailedFluidLoss() const;
|
||||||
|
|
||||||
// RimWellPathCompletionsInterface overrides.
|
// RimWellPathCompletionsInterface overrides.
|
||||||
RiaDefines::WellPathComponentType componentType() const override;
|
RiaDefines::WellPathComponentType componentType() const override;
|
||||||
QString componentLabel() const override;
|
QString componentLabel() const override;
|
||||||
@@ -151,4 +153,5 @@ protected:
|
|||||||
caf::PdmField<QString> m_underburdenFormation;
|
caf::PdmField<QString> m_underburdenFormation;
|
||||||
caf::PdmField<QString> m_underburdenFacies;
|
caf::PdmField<QString> m_underburdenFacies;
|
||||||
caf::PdmField<double> m_underburdenFluidDensity;
|
caf::PdmField<double> m_underburdenFluidDensity;
|
||||||
|
caf::PdmField<bool> m_useDetailedFluidLoss;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -59,6 +59,14 @@ void RimFractureModelPlot::setFractureModel( RimFractureModel* fractureModel )
|
|||||||
m_fractureModel = fractureModel;
|
m_fractureModel = fractureModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimFractureModel* RimFractureModelPlot::fractureModel()
|
||||||
|
{
|
||||||
|
return m_fractureModel;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -526,3 +534,43 @@ std::vector<double> RimFractureModelPlot::calculateProppandEmbedment() const
|
|||||||
{
|
{
|
||||||
return findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty::PROPPANT_EMBEDMENT );
|
return findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty::PROPPANT_EMBEDMENT );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::calculateImmobileFluidSaturation() const
|
||||||
|
{
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::calculateTemperature() const
|
||||||
|
{
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::calculateRelativePermeabilityFactor() const
|
||||||
|
{
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::calculatePoroElasticConstant() const
|
||||||
|
{
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<double> RimFractureModelPlot::calculateThermalExpansionCoefficient() const
|
||||||
|
{
|
||||||
|
return std::vector<double>();
|
||||||
|
}
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ public:
|
|||||||
|
|
||||||
RimFractureModelPlot();
|
RimFractureModelPlot();
|
||||||
|
|
||||||
void setFractureModel( RimFractureModel* fractureModel );
|
void setFractureModel( RimFractureModel* fractureModel );
|
||||||
|
RimFractureModel* fractureModel();
|
||||||
|
|
||||||
void getPorosityValues( std::vector<double>& values ) const;
|
void getPorosityValues( std::vector<double>& values ) const;
|
||||||
void getFaciesValues( std::vector<double>& values ) const;
|
void getFaciesValues( std::vector<double>& values ) const;
|
||||||
@@ -76,6 +77,12 @@ public:
|
|||||||
std::vector<double> calculateSpurtLoss() const;
|
std::vector<double> calculateSpurtLoss() const;
|
||||||
std::vector<double> calculateProppandEmbedment() const;
|
std::vector<double> calculateProppandEmbedment() const;
|
||||||
|
|
||||||
|
std::vector<double> calculateImmobileFluidSaturation() const;
|
||||||
|
std::vector<double> calculateTemperature() const;
|
||||||
|
std::vector<double> calculateRelativePermeabilityFactor() const;
|
||||||
|
std::vector<double> calculatePoroElasticConstant() const;
|
||||||
|
std::vector<double> calculateThermalExpansionCoefficient() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::vector<double> findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty curveProperty ) const;
|
std::vector<double> findCurveAndComputeLayeredAverage( RiaDefines::CurveProperty curveProperty ) const;
|
||||||
std::vector<double> findCurveXValuesByProperty( RiaDefines::CurveProperty curveProperty ) const;
|
std::vector<double> findCurveXValuesByProperty( RiaDefines::CurveProperty curveProperty ) const;
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ caf::PdmObjectHandle* RimcFractureModelPlot_exportToFile::execute()
|
|||||||
{
|
{
|
||||||
RimFractureModelPlot* fractureModelPlot = self<RimFractureModelPlot>();
|
RimFractureModelPlot* fractureModelPlot = self<RimFractureModelPlot>();
|
||||||
|
|
||||||
RifFractureModelPlotExporter::writeToFile( fractureModelPlot, m_filePath() );
|
RifFractureModelPlotExporter::writeToFile( fractureModelPlot,
|
||||||
|
fractureModelPlot->fractureModel()->useDetailedFluidLoss(),
|
||||||
|
m_filePath() );
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user