mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Specify part id for well extraction from geomech data (#10240)
* Specify part id for well extraction from geomech data * Make sure we clear curve data if there isn't any valid input data
This commit is contained in:
@@ -40,14 +40,14 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId )
|
||||||
{
|
{
|
||||||
if ( !( wellPath && geomCase ) ) return nullptr;
|
if ( !( wellPath && geomCase ) ) return nullptr;
|
||||||
|
|
||||||
auto wlPlotCollection = wellLogPlotCollection();
|
auto wlPlotCollection = wellLogPlotCollection();
|
||||||
if ( !wlPlotCollection ) return nullptr;
|
if ( !wlPlotCollection ) return nullptr;
|
||||||
|
|
||||||
return wlPlotCollection->findOrCreateExtractor( wellPath, geomCase );
|
return wlPlotCollection->findOrCreateExtractor( wellPath, geomCase, partId );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class QString;
|
|||||||
namespace RiaExtractionTools
|
namespace RiaExtractionTools
|
||||||
{
|
{
|
||||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase );
|
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId = 0 );
|
||||||
|
|
||||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
|||||||
|
|
||||||
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
std::string errorIdName = ( wellPath->name() + " " + eclCase->caseUserDescription() ).toStdString();
|
||||||
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor( eclCaseData, wellPathGeometry, errorIdName );
|
||||||
|
|
||||||
m_extractors.push_back( extractor.p() );
|
m_extractors.push_back( extractor.p() );
|
||||||
|
|
||||||
return extractor.p();
|
return extractor.p();
|
||||||
@@ -112,8 +113,8 @@ RigEclipseWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
RigGeoMechWellLogExtractor*
|
||||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
RimPltPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId )
|
||||||
{
|
{
|
||||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||||
{
|
{
|
||||||
@@ -124,17 +125,23 @@ RigGeoMechWellLogExtractor* RimPltPlotCollection::findOrCreateExtractor( gsl::no
|
|||||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||||
{
|
{
|
||||||
if ( m_geomExtractors[exIdx]->caseData() == geomCaseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
if ( ( m_geomExtractors[exIdx]->caseData() == geomCaseData ) &&
|
||||||
|
( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) && ( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||||
{
|
{
|
||||||
return m_geomExtractors[exIdx].p();
|
return m_geomExtractors[exIdx].p();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( geomCaseData, wellPathGeometry, errorIdName );
|
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( geomCaseData, partId, wellPathGeometry, errorIdName );
|
||||||
m_geomExtractors.push_back( extractor.p() );
|
|
||||||
|
|
||||||
return extractor.p();
|
if ( extractor->valid() )
|
||||||
|
{
|
||||||
|
m_geomExtractors.push_back( extractor.p() );
|
||||||
|
return extractor.p();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ public:
|
|||||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||||
|
|
||||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
||||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> eclCase );
|
RigGeoMechWellLogExtractor*
|
||||||
|
findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId );
|
||||||
|
|
||||||
void removeExtractors( const RigWellPath* wellPath );
|
void removeExtractors( const RigWellPath* wellPath );
|
||||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ RigEclipseWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::no
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath,
|
RigGeoMechWellLogExtractor*
|
||||||
gsl::not_null<RimGeoMechCase*> geomCase )
|
RimRftPlotCollection::findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId )
|
||||||
{
|
{
|
||||||
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
if ( !( wellPath && geomCase && wellPath->wellPathGeometry() && geomCase->geoMechData() ) )
|
||||||
{
|
{
|
||||||
@@ -124,17 +124,23 @@ RigGeoMechWellLogExtractor* RimRftPlotCollection::findOrCreateExtractor( gsl::no
|
|||||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||||
{
|
{
|
||||||
if ( m_geomExtractors[exIdx]->caseData() == caseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
if ( ( m_geomExtractors[exIdx]->caseData() == caseData ) && ( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) &&
|
||||||
|
( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||||
{
|
{
|
||||||
return m_geomExtractors[exIdx].p();
|
return m_geomExtractors[exIdx].p();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
std::string errorIdName = ( wellPath->name() + " " + geomCase->caseUserDescription() ).toStdString();
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, partId, wellPathGeometry, errorIdName );
|
||||||
m_geomExtractors.push_back( extractor.p() );
|
|
||||||
|
|
||||||
return extractor.p();
|
if ( extractor->valid() )
|
||||||
|
{
|
||||||
|
m_geomExtractors.push_back( extractor.p() );
|
||||||
|
return extractor.p();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ public:
|
|||||||
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
gsl::not_null<const RigEclipseCaseData*> eclCaseData );
|
||||||
|
|
||||||
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
RigEclipseWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimEclipseCase*> eclCase );
|
||||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> eclCase );
|
RigGeoMechWellLogExtractor*
|
||||||
|
findOrCreateExtractor( gsl::not_null<RimWellPath*> wellPath, gsl::not_null<RimGeoMechCase*> geomCase, int partId );
|
||||||
|
|
||||||
void removeExtractors( const RigWellPath* wellPath );
|
void removeExtractors( const RigWellPath* wellPath );
|
||||||
void removeExtractors( const RigEclipseCaseData* caseData );
|
void removeExtractors( const RigEclipseCaseData* caseData );
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ Rim3dWellLogExtractionCurve::Rim3dWellLogExtractionCurve()
|
|||||||
m_case = nullptr;
|
m_case = nullptr;
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", -1, "Time Step" );
|
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", -1, "Time Step" );
|
||||||
|
CAF_PDM_InitField( &m_geomPartId, "GeomPartId", 0, "Part Id" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_eclipseResultDefinition, "CurveEclipseResult", "" );
|
CAF_PDM_InitFieldNoDefault( &m_eclipseResultDefinition, "CurveEclipseResult", "" );
|
||||||
m_eclipseResultDefinition.uiCapability()->setUiTreeHidden( true );
|
m_eclipseResultDefinition.uiCapability()->setUiTreeHidden( true );
|
||||||
@@ -208,7 +209,8 @@ void Rim3dWellLogExtractionCurve::curveValuesAndMdsAtTimeStep( std::vector<doubl
|
|||||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case() );
|
||||||
if ( geomCase )
|
if ( geomCase )
|
||||||
{
|
{
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, geomCase );
|
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor =
|
||||||
|
RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, geomCase, m_geomPartId );
|
||||||
|
|
||||||
if ( geomExtractor.notNull() )
|
if ( geomExtractor.notNull() )
|
||||||
{
|
{
|
||||||
@@ -439,7 +441,7 @@ void Rim3dWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* c
|
|||||||
this->resetMinMaxValues();
|
this->resetMinMaxValues();
|
||||||
this->updateConnectedEditors();
|
this->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_timeStep )
|
else if ( ( changedField == &m_timeStep ) || ( changedField == &m_geomPartId ) )
|
||||||
{
|
{
|
||||||
this->resetMinMaxValues();
|
this->resetMinMaxValues();
|
||||||
this->updateConnectedEditors();
|
this->updateConnectedEditors();
|
||||||
@@ -491,6 +493,7 @@ void Rim3dWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::P
|
|||||||
}
|
}
|
||||||
else if ( geomCase )
|
else if ( geomCase )
|
||||||
{
|
{
|
||||||
|
curveDataGroup->add( &m_geomPartId );
|
||||||
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
caf::PdmPtrField<RimCase*> m_case;
|
caf::PdmPtrField<RimCase*> m_case;
|
||||||
caf::PdmField<int> m_timeStep;
|
caf::PdmField<int> m_timeStep;
|
||||||
|
caf::PdmField<int> m_geomPartId;
|
||||||
|
|
||||||
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||||
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve()
|
|||||||
m_geomResultDefinition->setAddWellPathDerivedResults( true );
|
m_geomResultDefinition->setAddWellPathDerivedResults( true );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", 0, "Time Step" );
|
CAF_PDM_InitField( &m_timeStep, "CurveTimeStep", 0, "Time Step" );
|
||||||
|
CAF_PDM_InitField( &m_geomPartId, "GeomPartId", 0, "Part Id" );
|
||||||
|
|
||||||
// Add some space before name to indicate these belong to the Auto Name field
|
// Add some space before name to indicate these belong to the Auto Name field
|
||||||
CAF_PDM_InitField( &m_addCaseNameToCurveName, "AddCaseNameToCurveName", true, " Case Name" );
|
CAF_PDM_InitField( &m_addCaseNameToCurveName, "AddCaseNameToCurveName", true, " Case Name" );
|
||||||
@@ -308,30 +309,17 @@ void RimWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
|||||||
if ( m_wellPath == m_refWellPath ) m_refWellPath = nullptr;
|
if ( m_wellPath == m_refWellPath ) m_refWellPath = nullptr;
|
||||||
this->loadDataAndUpdate( true );
|
this->loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_refWellPath )
|
else if ( ( changedField == &m_refWellPath ) || ( changedField == &m_timeStep ) || ( changedField == &m_trajectoryType ) ||
|
||||||
|
( changedField == &m_geomPartId ) )
|
||||||
{
|
{
|
||||||
this->loadDataAndUpdate( true );
|
this->loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_simWellName )
|
else if ( ( changedField == &m_branchDetection ) || ( changedField == &m_branchIndex ) || ( changedField == &m_simWellName ) )
|
||||||
{
|
{
|
||||||
clearGeneratedSimWellPaths();
|
clearGeneratedSimWellPaths();
|
||||||
|
|
||||||
this->loadDataAndUpdate( true );
|
this->loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_trajectoryType )
|
|
||||||
{
|
|
||||||
this->loadDataAndUpdate( true );
|
|
||||||
}
|
|
||||||
else if ( changedField == &m_branchDetection || changedField == &m_branchIndex )
|
|
||||||
{
|
|
||||||
clearGeneratedSimWellPaths();
|
|
||||||
|
|
||||||
this->loadDataAndUpdate( true );
|
|
||||||
}
|
|
||||||
else if ( changedField == &m_timeStep )
|
|
||||||
{
|
|
||||||
this->loadDataAndUpdate( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( changedField == &m_addCaseNameToCurveName || changedField == &m_addPropertyToCurveName ||
|
if ( changedField == &m_addCaseNameToCurveName || changedField == &m_addPropertyToCurveName ||
|
||||||
changedField == &m_addWellNameToCurveName || changedField == &m_addTimestepToCurveName || changedField == &m_addDateToCurveName )
|
changedField == &m_addWellNameToCurveName || changedField == &m_addTimestepToCurveName || changedField == &m_addDateToCurveName )
|
||||||
@@ -513,6 +501,10 @@ void RimWellLogExtractionCurve::extractData( bool* isUsin
|
|||||||
curveData.xUnits );
|
curveData.xUnits );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clearCurveData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -638,18 +630,26 @@ RimWellLogExtractionCurve::WellLogExtractionCurveData
|
|||||||
if ( caseData && wellPathGeometry )
|
if ( caseData && wellPathGeometry )
|
||||||
{
|
{
|
||||||
std::string errorIdName = ( m_wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
std::string errorIdName = ( m_wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
||||||
wellExtractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
wellExtractor = new RigGeoMechWellLogExtractor( caseData, m_geomPartId, wellPathGeometry, errorIdName );
|
||||||
|
|
||||||
// make sure the resampling of the well path is done before the extraction of the curve data
|
if ( wellExtractor->valid() )
|
||||||
wellExtractor->resampleIntersections( maxDistanceBetweenCurvePoints.value() );
|
{
|
||||||
|
// make sure the resampling of the well path is done before the extraction of the curve data
|
||||||
|
wellExtractor->resampleIntersections( maxDistanceBetweenCurvePoints.value() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return curveData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wellExtractor = wellLogCollection->findOrCreateExtractor( m_wellPath, geoMechCase );
|
wellExtractor = wellLogCollection->findOrCreateExtractor( m_wellPath, geoMechCase, m_geomPartId );
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> refWellExtractor = wellLogCollection->findOrCreateExtractor( m_refWellPath, geoMechCase );
|
cvf::ref<RigGeoMechWellLogExtractor> refWellExtractor =
|
||||||
|
wellLogCollection->findOrCreateExtractor( m_refWellPath, geoMechCase, m_geomPartId );
|
||||||
|
|
||||||
auto [timeStepIdx, frameIdx] = geoMechCase->geoMechData()->femPartResults()->stepListIndexToTimeStepAndDataFrameIndex( m_timeStep );
|
auto [timeStepIdx, frameIdx] = geoMechCase->geoMechData()->femPartResults()->stepListIndexToTimeStepAndDataFrameIndex( m_timeStep );
|
||||||
|
|
||||||
@@ -1062,6 +1062,7 @@ void RimWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|||||||
}
|
}
|
||||||
else if ( geomCase )
|
else if ( geomCase )
|
||||||
{
|
{
|
||||||
|
curveDataGroup->add( &m_geomPartId );
|
||||||
curveDataGroup->add( &m_wellPath );
|
curveDataGroup->add( &m_wellPath );
|
||||||
curveDataGroup->add( &m_refWellPath );
|
curveDataGroup->add( &m_refWellPath );
|
||||||
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||||
@@ -1394,6 +1395,22 @@ void RimWellLogExtractionCurve::setGeoMechResultAddress( const RigFemResultAddre
|
|||||||
m_geomResultDefinition->setResultAddress( resAddr );
|
m_geomResultDefinition->setResultAddress( resAddr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogExtractionCurve::setGeoMechPart( int partId )
|
||||||
|
{
|
||||||
|
m_geomPartId = partId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RimWellLogExtractionCurve::geoMechPart() const
|
||||||
|
{
|
||||||
|
return m_geomPartId;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ public:
|
|||||||
void setEclipseResultCategory( RiaDefines::ResultCatType catType );
|
void setEclipseResultCategory( RiaDefines::ResultCatType catType );
|
||||||
|
|
||||||
void setGeoMechResultAddress( const RigFemResultAddress& resAddr );
|
void setGeoMechResultAddress( const RigFemResultAddress& resAddr );
|
||||||
|
void setGeoMechPart( int partId );
|
||||||
|
int geoMechPart() const;
|
||||||
|
|
||||||
void setTrajectoryType( TrajectoryType trajectoryType );
|
void setTrajectoryType( TrajectoryType trajectoryType );
|
||||||
void setWellName( QString wellName );
|
void setWellName( QString wellName );
|
||||||
@@ -136,6 +138,7 @@ protected:
|
|||||||
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
caf::PdmChildField<RimEclipseResultDefinition*> m_eclipseResultDefinition;
|
||||||
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
caf::PdmChildField<RimGeoMechResultDefinition*> m_geomResultDefinition;
|
||||||
caf::PdmField<int> m_timeStep;
|
caf::PdmField<int> m_timeStep;
|
||||||
|
caf::PdmField<int> m_geomPartId;
|
||||||
|
|
||||||
caf::PdmField<bool> m_addCaseNameToCurveName;
|
caf::PdmField<bool> m_addCaseNameToCurveName;
|
||||||
caf::PdmField<bool> m_addPropertyToCurveName;
|
caf::PdmField<bool> m_addPropertyToCurveName;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ RigEclipseWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase )
|
RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase, int partId )
|
||||||
{
|
{
|
||||||
if ( !( wellPath && geoMechCase ) ) return nullptr;
|
if ( !( wellPath && geoMechCase ) ) return nullptr;
|
||||||
|
|
||||||
@@ -124,17 +124,22 @@ RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor( Rim
|
|||||||
|
|
||||||
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
for ( size_t exIdx = 0; exIdx < m_geomExtractors.size(); ++exIdx )
|
||||||
{
|
{
|
||||||
if ( m_geomExtractors[exIdx]->caseData() == caseData && m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry )
|
if ( ( m_geomExtractors[exIdx]->caseData() == caseData ) && ( m_geomExtractors[exIdx]->wellPathGeometry() == wellPathGeometry ) &&
|
||||||
|
( m_geomExtractors[exIdx]->partId() == partId ) )
|
||||||
{
|
{
|
||||||
return m_geomExtractors[exIdx].p();
|
return m_geomExtractors[exIdx].p();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string errorIdName = ( wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
std::string errorIdName = ( wellPath->name() + " " + geoMechCase->caseUserDescription() ).toStdString();
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, wellPathGeometry, errorIdName );
|
cvf::ref<RigGeoMechWellLogExtractor> extractor = new RigGeoMechWellLogExtractor( caseData, partId, wellPathGeometry, errorIdName );
|
||||||
m_geomExtractors.push_back( extractor.p() );
|
if ( extractor->valid() )
|
||||||
|
{
|
||||||
|
m_geomExtractors.push_back( extractor.p() );
|
||||||
|
return extractor.p();
|
||||||
|
}
|
||||||
|
|
||||||
return extractor.p();
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
const RigEclipseCaseData* eclCaseData );
|
const RigEclipseCaseData* eclCaseData );
|
||||||
|
|
||||||
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
RigEclipseWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimEclipseCase* eclCase );
|
||||||
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase );
|
RigGeoMechWellLogExtractor* findOrCreateExtractor( RimWellPath* wellPath, RimGeoMechCase* geoMechCase, int partId = 0 );
|
||||||
|
|
||||||
std::vector<RimWellLogPlot*> wellLogPlots() const;
|
std::vector<RimWellLogPlot*> wellLogPlots() const;
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,16 @@ const double RigGeoMechWellLogExtractor::GRAVITY_ACCEL = 9.81; // m /
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
RigGeoMechWellLogExtractor::RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||||
|
int partId,
|
||||||
gsl::not_null<const RigWellPath*> wellpath,
|
gsl::not_null<const RigWellPath*> wellpath,
|
||||||
const std::string& wellCaseErrorMsgName )
|
const std::string& wellCaseErrorMsgName )
|
||||||
: RigWellLogExtractor( wellpath, wellCaseErrorMsgName )
|
: RigWellLogExtractor( wellpath, wellCaseErrorMsgName )
|
||||||
, m_caseData( aCase )
|
, m_caseData( aCase )
|
||||||
|
, m_partId( partId )
|
||||||
{
|
{
|
||||||
|
m_valid = ( ( partId < m_caseData->femParts()->partCount() ) && ( partId >= 0 ) );
|
||||||
|
if ( !valid() ) return;
|
||||||
|
|
||||||
calculateIntersection();
|
calculateIntersection();
|
||||||
|
|
||||||
m_waterDepth = calculateWaterDepth();
|
m_waterDepth = calculateWaterDepth();
|
||||||
@@ -90,8 +95,8 @@ void RigGeoMechWellLogExtractor::performCurveDataSmoothing( int
|
|||||||
RigFemResultAddress shAddr( RIG_ELEMENT_NODAL, "ST", "S3" );
|
RigFemResultAddress shAddr( RIG_ELEMENT_NODAL, "ST", "S3" );
|
||||||
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, "POR-Bar", "" );
|
||||||
|
|
||||||
const std::vector<float>& unscaledShValues = resultCollection->resultValues( shAddr, 0, timeStepIndex, frameIndex );
|
const std::vector<float>& unscaledShValues = resultCollection->resultValues( shAddr, m_partId, timeStepIndex, frameIndex );
|
||||||
const std::vector<float>& porePressures = resultCollection->resultValues( porBarResAddr, 0, timeStepIndex, frameIndex );
|
const std::vector<float>& porePressures = resultCollection->resultValues( porBarResAddr, m_partId, timeStepIndex, frameIndex );
|
||||||
|
|
||||||
std::vector<float> interfaceShValues = interpolateInterfaceValues( shAddr, timeStepIndex, frameIndex, unscaledShValues );
|
std::vector<float> interfaceShValues = interpolateInterfaceValues( shAddr, timeStepIndex, frameIndex, unscaledShValues );
|
||||||
std::vector<float> interfacePorePressures = interpolateInterfaceValues( porBarResAddr, timeStepIndex, frameIndex, porePressures );
|
std::vector<float> interfacePorePressures = interpolateInterfaceValues( porBarResAddr, timeStepIndex, frameIndex, porePressures );
|
||||||
@@ -210,7 +215,7 @@ QString RigGeoMechWellLogExtractor::curveData( const RigFemResultAddress& resAdd
|
|||||||
|
|
||||||
CVF_ASSERT( resAddr.resultPosType != RIG_WELLPATH_DERIVED );
|
CVF_ASSERT( resAddr.resultPosType != RIG_WELLPATH_DERIVED );
|
||||||
|
|
||||||
const std::vector<float>& resultValues = m_caseData->femPartResults()->resultValues( convResAddr, 0, timeStepIndex, frameIndex );
|
const std::vector<float>& resultValues = m_caseData->femPartResults()->resultValues( convResAddr, m_partId, timeStepIndex, frameIndex );
|
||||||
|
|
||||||
if ( !resultValues.empty() )
|
if ( !resultValues.empty() )
|
||||||
{
|
{
|
||||||
@@ -261,7 +266,7 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
|
|||||||
{
|
{
|
||||||
RigFemResultAddress nativeAddr = parameter.femAddress( RigWbsParameter::GRID );
|
RigFemResultAddress nativeAddr = parameter.femAddress( RigWbsParameter::GRID );
|
||||||
|
|
||||||
const std::vector<float>& unscaledResultValues = resultCollection->resultValues( nativeAddr, 0, timeStepIndex, frameIndex );
|
const std::vector<float>& unscaledResultValues = resultCollection->resultValues( nativeAddr, m_partId, timeStepIndex, frameIndex );
|
||||||
std::vector<float> interpolatedInterfaceValues =
|
std::vector<float> interpolatedInterfaceValues =
|
||||||
interpolateInterfaceValues( nativeAddr, timeStepIndex, frameIndex, unscaledResultValues );
|
interpolateInterfaceValues( nativeAddr, timeStepIndex, frameIndex, unscaledResultValues );
|
||||||
gridValues.resize( intersections().size(), std::numeric_limits<double>::infinity() );
|
gridValues.resize( intersections().size(), std::numeric_limits<double>::infinity() );
|
||||||
@@ -292,7 +297,7 @@ std::vector<RigGeoMechWellLogExtractor::WbsParameterSource>
|
|||||||
tvdRKBs.push_back( tvdValue + m_wellPathGeometry->rkbDiff() );
|
tvdRKBs.push_back( tvdValue + m_wellPathGeometry->rkbDiff() );
|
||||||
}
|
}
|
||||||
RigFemResultAddress elementPropertyAddr = parameter.femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
RigFemResultAddress elementPropertyAddr = parameter.femAddress( RigWbsParameter::ELEMENT_PROPERTY_TABLE );
|
||||||
elementPropertyValuesInput = &( resultCollection->resultValues( elementPropertyAddr, 0, timeStepIndex, frameIndex ) );
|
elementPropertyValuesInput = &( resultCollection->resultValues( elementPropertyAddr, m_partId, timeStepIndex, frameIndex ) );
|
||||||
if ( elementPropertyValuesInput )
|
if ( elementPropertyValuesInput )
|
||||||
{
|
{
|
||||||
RiaWellLogUnitTools<float>::convertValues( tvdRKBs,
|
RiaWellLogUnitTools<float>::convertValues( tvdRKBs,
|
||||||
@@ -591,7 +596,7 @@ void RigGeoMechWellLogExtractor::wellBoreWallCurveData( const RigFemResultAddres
|
|||||||
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
RigFemPartResultsCollection* resultCollection = m_caseData->femPartResults();
|
||||||
|
|
||||||
// Load results
|
// Load results
|
||||||
std::vector<caf::Ten3f> vertexStressesFloat = resultCollection->tensors( stressResAddr, 0, timeStepIndex, frameIndex );
|
std::vector<caf::Ten3f> vertexStressesFloat = resultCollection->tensors( stressResAddr, m_partId, timeStepIndex, frameIndex );
|
||||||
if ( !vertexStressesFloat.size() ) return;
|
if ( !vertexStressesFloat.size() ) return;
|
||||||
|
|
||||||
std::vector<caf::Ten3d> vertexStresses;
|
std::vector<caf::Ten3d> vertexStresses;
|
||||||
@@ -867,7 +872,7 @@ T RigGeoMechWellLogExtractor::interpolateGridResultValue( RigFemResultPosEnum
|
|||||||
const std::vector<T>& gridResultValues,
|
const std::vector<T>& gridResultValues,
|
||||||
int64_t intersectionIdx ) const
|
int64_t intersectionIdx ) const
|
||||||
{
|
{
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||||
|
|
||||||
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
||||||
@@ -963,11 +968,9 @@ size_t RigGeoMechWellLogExtractor::gridResultIndexFace( size_t elementIdx, cvf::
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigGeoMechWellLogExtractor::calculateIntersection()
|
void RigGeoMechWellLogExtractor::calculateIntersection()
|
||||||
{
|
{
|
||||||
CVF_ASSERT( m_caseData->femParts()->partCount() == 1 );
|
|
||||||
|
|
||||||
std::map<RigMDCellIdxEnterLeaveKey, HexIntersectionInfo> uniqueIntersections;
|
std::map<RigMDCellIdxEnterLeaveKey, HexIntersectionInfo> uniqueIntersections;
|
||||||
|
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||||
|
|
||||||
for ( size_t wpp = 0; wpp < m_wellPathGeometry->wellPathPoints().size() - 1; ++wpp )
|
for ( size_t wpp = 0; wpp < m_wellPathGeometry->wellPathPoints().size() - 1; ++wpp )
|
||||||
@@ -1030,7 +1033,7 @@ std::vector<size_t> RigGeoMechWellLogExtractor::findCloseCells( const cvf::Bound
|
|||||||
|
|
||||||
if ( m_caseData->femParts()->partCount() )
|
if ( m_caseData->femParts()->partCount() )
|
||||||
{
|
{
|
||||||
m_caseData->femParts()->part( 0 )->findIntersectingCells( bb, &closeCells );
|
m_caseData->femParts()->part( m_partId )->findIntersectingCells( bb, &closeCells );
|
||||||
}
|
}
|
||||||
return closeCells;
|
return closeCells;
|
||||||
}
|
}
|
||||||
@@ -1042,7 +1045,7 @@ cvf::Vec3d RigGeoMechWellLogExtractor::calculateLengthInCell( size_t cellIndex,
|
|||||||
{
|
{
|
||||||
std::array<cvf::Vec3d, 8> hexCorners;
|
std::array<cvf::Vec3d, 8> hexCorners;
|
||||||
|
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||||
const int* cornerIndices = femPart->connectivities( cellIndex );
|
const int* cornerIndices = femPart->connectivities( cellIndex );
|
||||||
|
|
||||||
@@ -1105,7 +1108,7 @@ caf::Ten3d RigGeoMechWellLogExtractor::transformTensorToWellPathOrientation( con
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid( size_t intersectionIdx ) const
|
cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid( size_t intersectionIdx ) const
|
||||||
{
|
{
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoords = femPart->nodes().coordinates;
|
||||||
|
|
||||||
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
size_t elmIdx = intersectedCellsGlobIdx()[intersectionIdx];
|
||||||
@@ -1243,7 +1246,7 @@ std::vector<T> RigGeoMechWellLogExtractor::interpolateInterfaceValues( RigFemRes
|
|||||||
std::vector<T> interpolatedInterfaceValues;
|
std::vector<T> interpolatedInterfaceValues;
|
||||||
initializeResultValues( interpolatedInterfaceValues, intersections().size() );
|
initializeResultValues( interpolatedInterfaceValues, intersections().size() );
|
||||||
|
|
||||||
const RigFemPart* femPart = m_caseData->femParts()->part( 0 );
|
const RigFemPart* femPart = m_caseData->femParts()->part( m_partId );
|
||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
for ( int64_t intersectionIdx = 0; intersectionIdx < static_cast<int64_t>( intersections().size() ); ++intersectionIdx )
|
for ( int64_t intersectionIdx = 0; intersectionIdx < static_cast<int64_t>( intersections().size() ); ++intersectionIdx )
|
||||||
@@ -1472,3 +1475,19 @@ double RigGeoMechWellLogExtractor::waterDepth() const
|
|||||||
{
|
{
|
||||||
return m_waterDepth;
|
return m_waterDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RigGeoMechWellLogExtractor::partId() const
|
||||||
|
{
|
||||||
|
return m_partId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RigGeoMechWellLogExtractor::valid() const
|
||||||
|
{
|
||||||
|
return m_valid;
|
||||||
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
RigGeoMechWellLogExtractor( gsl::not_null<RigGeoMechCaseData*> aCase,
|
||||||
|
int partId,
|
||||||
gsl::not_null<const RigWellPath*> wellpath,
|
gsl::not_null<const RigWellPath*> wellpath,
|
||||||
const std::string& wellCaseErrorMsgName );
|
const std::string& wellCaseErrorMsgName );
|
||||||
|
|
||||||
@@ -88,6 +89,9 @@ public:
|
|||||||
double waterDepth() const;
|
double waterDepth() const;
|
||||||
double estimateWaterDepth() const;
|
double estimateWaterDepth() const;
|
||||||
|
|
||||||
|
int partId() const;
|
||||||
|
bool valid() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum WellPathTangentCalculation
|
enum WellPathTangentCalculation
|
||||||
{
|
{
|
||||||
@@ -178,4 +182,6 @@ private:
|
|||||||
std::map<RigWbsParameter, double> m_userDefinedValues;
|
std::map<RigWbsParameter, double> m_userDefinedValues;
|
||||||
|
|
||||||
double m_waterDepth;
|
double m_waterDepth;
|
||||||
|
int m_partId;
|
||||||
|
bool m_valid;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user