mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Additional refactoring for POR-Bar result handling
* Always use element-nodal for POR calculations * Add RigFemAddressDefines Add special handling for "POR-Bar" result, always use element_nodal * 9362 Show unit text "sg" when normalized by hydrostatic pressure
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaResultNames.h"
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
#include "RiaWellLogUnitTools.h"
|
||||
|
||||
#include "RigFemPart.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
@@ -34,7 +35,7 @@
|
||||
#include "RigGeoMechBoreHoleStressCalculator.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
|
||||
#include "RiaWellLogUnitTools.h"
|
||||
#include "RigFemAddressDefines.h"
|
||||
#include "RigWellLogExtractionTools.h"
|
||||
#include "RigWellPath.h"
|
||||
#include "RigWellPathGeometryTools.h"
|
||||
@@ -93,7 +94,7 @@ void RigGeoMechWellLogExtractor::performCurveDataSmoothing( int
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||
|
||||
RigFemResultAddress shAddr( RIG_ELEMENT_NODAL, "ST", "S3" );
|
||||
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
||||
RigFemResultAddress porBarResAddr = RigFemAddressDefines::elementNodalPorBarAddress();
|
||||
|
||||
const std::vector<float>& unscaledShValues = resultCollection->resultValues( shAddr, m_partId, timeStepIndex, frameIndex );
|
||||
const std::vector<float>& porePressures = resultCollection->resultValues( porBarResAddr, m_partId, timeStepIndex, frameIndex );
|
||||
@@ -206,12 +207,7 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd
|
||||
}
|
||||
else if ( resAddr.isValid() )
|
||||
{
|
||||
RigFemResultAddress convResAddr = resAddr;
|
||||
|
||||
// When showing POR results, always use the element nodal result,
|
||||
// to get correct handling of elements without POR results
|
||||
|
||||
if ( convResAddr.fieldName == "POR-Bar" ) convResAddr.resultPosType = RIG_ELEMENT_NODAL;
|
||||
RigFemResultAddress convResAddr = RigFemAddressDefines::getResultLookupAddress( resAddr );
|
||||
|
||||
CVF_ASSERT( resAddr.resultPosType != RIG_WELLPATH_DERIVED );
|
||||
|
||||
@@ -591,7 +587,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData( const RigFemResultAddres
|
||||
|
||||
// The result addresses needed
|
||||
RigFemResultAddress stressResAddr( RIG_ELEMENT_NODAL, "ST", "" );
|
||||
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
||||
RigFemResultAddress porBarResAddr = RigFemAddressDefines::elementNodalPorBarAddress();
|
||||
|
||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "RigWbsParameter.h"
|
||||
|
||||
#include "RiaWellLogUnitTools.h"
|
||||
#include "RigFemAddressDefines.h"
|
||||
|
||||
#include "cafAssert.h"
|
||||
|
||||
@@ -234,12 +235,13 @@ bool RigWbsParameter::operator<( const RigWbsParameter& rhs ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigWbsParameter RigWbsParameter::PP_Reservoir()
|
||||
{
|
||||
SourceVector sources = { { GRID, SourceAddress( "POR-Bar", "", RiaWellLogUnitTools<double>::barUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "PP_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "PP_RES_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "POR_RES_INP", "", RiaWellLogUnitTools<double>::gPerCm3UnitString() ) },
|
||||
{ ELEMENT_PROPERTY_TABLE, SourceAddress( "POR_INP", "", RiaWellLogUnitTools<double>::pascalUnitString() ) },
|
||||
{ ELEMENT_PROPERTY_TABLE, SourceAddress( "PP_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) } };
|
||||
SourceVector sources =
|
||||
{ { GRID, SourceAddress( QString::fromStdString( RigFemAddressDefines::porBar() ), "", RiaWellLogUnitTools<double>::barUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "PP_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "PP_RES_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) },
|
||||
{ LAS_FILE, SourceAddress( "POR_RES_INP", "", RiaWellLogUnitTools<double>::gPerCm3UnitString() ) },
|
||||
{ ELEMENT_PROPERTY_TABLE, SourceAddress( "POR_INP", "", RiaWellLogUnitTools<double>::pascalUnitString() ) },
|
||||
{ ELEMENT_PROPERTY_TABLE, SourceAddress( "PP_INP", "", RiaWellLogUnitTools<double>::sg_emwUnitString() ) } };
|
||||
return RigWbsParameter( "PP_Reservoir", true, sources );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user