mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7818 Modeled Well Path : Update location of completions
This commit is contained in:
parent
73f8046353
commit
e06e0116d8
@ -18,12 +18,15 @@
|
||||
|
||||
#include "RicCreateMultipleWellPathLaterals.h"
|
||||
|
||||
#include "RicNewWellPathLateralAtDepthFeature.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathCompletions.h"
|
||||
#include "RimWellPathGeometryDef.h"
|
||||
#include "RimWellPathTarget.h"
|
||||
#include "RimWellPathTieIn.h"
|
||||
@ -133,9 +136,12 @@ void RicCreateMultipleWellPathLaterals::slotAppendFractures()
|
||||
RimModeledWellPath* sourceLateral = m_ui->sourceLateral();
|
||||
|
||||
if ( !sourceLateral ) return;
|
||||
if ( !sourceLateral->wellPathTieIn()->parentWell() ) return;
|
||||
|
||||
auto parentWellPath = sourceLateral->wellPathTieIn()->parentWell();
|
||||
if ( !parentWellPath ) return;
|
||||
|
||||
auto sourceLocationOfFirstWellTarget = sourceLateral->geometryDefinition()->firstActiveTarget()->targetPointXYZ();
|
||||
auto sourceTieInMeasuredDepth = sourceLateral->wellPathTieIn()->tieInMeasuredDepth();
|
||||
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
if ( wellPathCollection )
|
||||
@ -146,8 +152,10 @@ void RicCreateMultipleWellPathLaterals::slotAppendFractures()
|
||||
RimModeledWellPath* newModeledWellPath = dynamic_cast<RimModeledWellPath*>(
|
||||
sourceLateral->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
QString name = sourceLateral->name() + QString( " (# %1)" ).arg( index++ );
|
||||
newModeledWellPath->setName( name );
|
||||
auto nameOfNewWell =
|
||||
RicNewWellPathLateralAtDepthFeature::updateNameOfParentAndFindNameOfSideStep( parentWellPath );
|
||||
newModeledWellPath->setName( nameOfNewWell );
|
||||
|
||||
newModeledWellPath->wellPathTieIn()->setTieInMeasuredDepth( measuredDepth );
|
||||
|
||||
wellPathCollection->addWellPath( newModeledWellPath, false );
|
||||
@ -156,12 +164,16 @@ void RicCreateMultipleWellPathLaterals::slotAppendFractures()
|
||||
newModeledWellPath->updateReferencePoint();
|
||||
|
||||
updateLocationOfTargets( newModeledWellPath, sourceLocationOfFirstWellTarget );
|
||||
updateLocationOfCompletions( newModeledWellPath, sourceTieInMeasuredDepth );
|
||||
|
||||
newModeledWellPath->updateWellPathVisualization();
|
||||
}
|
||||
|
||||
wellPathCollection->rebuildWellPathNodes();
|
||||
wellPathCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( sourceLateral );
|
||||
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
||||
m_ui->updateConnectedEditors();
|
||||
@ -191,3 +203,18 @@ void RicCreateMultipleWellPathLaterals::updateLocationOfTargets( RimModeledWellP
|
||||
wellTarget->setPointXYZ( newTargetLocationXYZ );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCreateMultipleWellPathLaterals::updateLocationOfCompletions( RimModeledWellPath* newModeledWellPath,
|
||||
const double sourceTieInMeasuredDepth )
|
||||
{
|
||||
auto tieInMeasuredDepth = newModeledWellPath->wellPathTieIn()->tieInMeasuredDepth();
|
||||
auto diffMD = tieInMeasuredDepth - sourceTieInMeasuredDepth;
|
||||
|
||||
for ( auto completion : newModeledWellPath->completions()->allCompletionsNoConst() )
|
||||
{
|
||||
completion->applyOffset( diffMD );
|
||||
}
|
||||
}
|
||||
|
@ -44,9 +44,12 @@ protected:
|
||||
private slots:
|
||||
void slotAppendFractures();
|
||||
|
||||
private:
|
||||
void updateLocationOfTargets( RimModeledWellPath* newModeledWellPath,
|
||||
const cvf::Vec3d& sourceLocationOfFirstWellTarget );
|
||||
|
||||
void updateLocationOfCompletions( RimModeledWellPath* newModeledWellPath, const double sourceTieInMeasuredDepth );
|
||||
|
||||
private:
|
||||
std::unique_ptr<RicCreateMultipleWellPathLateralsUi> m_ui;
|
||||
};
|
||||
|
@ -147,13 +147,13 @@ RiuWellPathSelectionItem* RicNewWellPathLateralAtDepthFeature::wellPathSelection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicNewWellPathLateralAtDepthFeature::updateNameOfParentAndFindNameOfSideStep( RimWellPath* parentwWellPath )
|
||||
QString RicNewWellPathLateralAtDepthFeature::updateNameOfParentAndFindNameOfSideStep( RimWellPath* parentWellPath )
|
||||
{
|
||||
if ( !parentwWellPath ) return "";
|
||||
if ( !parentWellPath ) return "";
|
||||
|
||||
QString nameOfNewWell;
|
||||
|
||||
auto topLevelWell = parentwWellPath->topLevelWellPath();
|
||||
auto topLevelWell = parentWellPath->topLevelWellPath();
|
||||
|
||||
QStringList allNames;
|
||||
{
|
||||
@ -175,7 +175,7 @@ QString RicNewWellPathLateralAtDepthFeature::updateNameOfParentAndFindNameOfSide
|
||||
|
||||
if ( allNames.size() == 1 )
|
||||
{
|
||||
QString name = parentwWellPath->name();
|
||||
QString name = parentWellPath->name();
|
||||
|
||||
if ( name.contains( "Y1" ) )
|
||||
{
|
||||
@ -183,7 +183,7 @@ QString RicNewWellPathLateralAtDepthFeature::updateNameOfParentAndFindNameOfSide
|
||||
}
|
||||
else
|
||||
{
|
||||
parentwWellPath->setNameNoUpdateOfExportName( name + " Y1" );
|
||||
parentWellPath->setNameNoUpdateOfExportName( name + " Y1" );
|
||||
nameOfNewWell = name + " Y2";
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,8 @@ public:
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
static RimWellPath* createLateralAtMeasuredDepth( RimWellPath* parentWellPath, double parentWellMD );
|
||||
static QString updateNameOfParentAndFindNameOfSideStep( RimWellPath* parentWellPath );
|
||||
|
||||
private:
|
||||
static RiuWellPathSelectionItem* wellPathSelectionItem();
|
||||
static QString updateNameOfParentAndFindNameOfSideStep( RimWellPath* parentwWellPath );
|
||||
};
|
||||
|
@ -535,6 +535,14 @@ double RimFishbones::endMD() const
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbones::applyOffset( double offsetMD )
|
||||
{
|
||||
m_valveLocations->applyOffset( offsetMD );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
public:
|
||||
caf::PdmField<cvf::Color3f> fishbonesColor;
|
||||
|
@ -217,6 +217,17 @@ void RimMultipleValveLocations::initFields( LocationType locationT
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMultipleValveLocations::applyOffset( double offset )
|
||||
{
|
||||
m_rangeStart = m_rangeStart + offset;
|
||||
m_rangeEnd = m_rangeEnd + offset;
|
||||
|
||||
computeRangesAndLocations();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -55,6 +55,8 @@ public:
|
||||
int valveCount,
|
||||
const std::vector<double>& locationOfValves );
|
||||
|
||||
void applyOffset( double offset );
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
@ -141,6 +141,21 @@ std::vector<const RimPerforationInterval*> RimPerforationCollection::perforation
|
||||
return myPerforations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPerforationInterval*> RimPerforationCollection::perforationsNoConst() const
|
||||
{
|
||||
std::vector<RimPerforationInterval*> myPerforations;
|
||||
|
||||
for ( const auto& perforation : m_perforations )
|
||||
{
|
||||
myPerforations.push_back( perforation );
|
||||
}
|
||||
|
||||
return myPerforations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
const RimNonDarcyPerforationParameters* nonDarcyParameters() const;
|
||||
void appendPerforation( RimPerforationInterval* perforation );
|
||||
std::vector<const RimPerforationInterval*> perforations() const;
|
||||
std::vector<RimPerforationInterval*> perforationsNoConst() const;
|
||||
std::vector<const RimPerforationInterval*> activePerforations() const;
|
||||
|
||||
private:
|
||||
|
@ -305,6 +305,15 @@ double RimPerforationInterval::endMD() const
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPerforationInterval::applyOffset( double offsetMD )
|
||||
{
|
||||
m_startMD = m_startMD + offsetMD;
|
||||
m_endMD = m_endMD + offsetMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
@ -155,6 +155,14 @@ bool RimSimWellFracture::isEnabled() const
|
||||
return isChecked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSimWellFracture::applyOffset( double offsetMD )
|
||||
{
|
||||
m_location = m_location + offsetMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
|
||||
bool isEnabled() const override; // RimWellPathCompletionsInterface override
|
||||
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
@ -171,6 +171,35 @@ std::vector<RimWellPathFracture*> RimWellPathCompletions::activeFractures() cons
|
||||
return {};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPathComponentInterface*> RimWellPathCompletions::allCompletionsNoConst() const
|
||||
{
|
||||
std::vector<RimWellPathComponentInterface*> completions;
|
||||
|
||||
for ( RimWellPathFracture* fracture : m_fractureCollection->allFractures() )
|
||||
{
|
||||
completions.push_back( fracture );
|
||||
}
|
||||
for ( RimFishbones* fishbones : m_fishbonesCollection->allFishbonesSubs() )
|
||||
{
|
||||
completions.push_back( fishbones );
|
||||
}
|
||||
for ( RimPerforationInterval* perforation : m_perforationCollection->perforationsNoConst() )
|
||||
{
|
||||
completions.push_back( perforation );
|
||||
}
|
||||
|
||||
std::vector<RimWellPathValve*> allValves = valves();
|
||||
for ( RimWellPathValve* valve : allValves )
|
||||
{
|
||||
completions.push_back( valve );
|
||||
}
|
||||
|
||||
return completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
RimWellPathFractureCollection* fractureCollection() const;
|
||||
RimStimPlanModelCollection* stimPlanModelCollection() const;
|
||||
|
||||
std::vector<RimWellPathComponentInterface*> allCompletionsNoConst() const;
|
||||
std::vector<const RimWellPathComponentInterface*> allCompletions() const;
|
||||
bool hasCompletions() const;
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
@ -30,11 +30,12 @@
|
||||
class RimWellPathComponentInterface
|
||||
{
|
||||
public:
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
virtual cvf::Color3f defaultComponentColor() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
virtual cvf::Color3f defaultComponentColor() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
virtual void applyOffset( double offsetMD ) = 0;
|
||||
};
|
||||
|
@ -310,3 +310,11 @@ void RimWellPathFracture::triangleGeometry( std::vector<cvf::Vec3f>* nodeCoords,
|
||||
{
|
||||
m_fractureTemplate->fractureTriangleGeometry( nodeCoords, triangleIndices, m_wellPathDepthAtFracture );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathFracture::applyOffset( double offsetMD )
|
||||
{
|
||||
m_measuredDepth = m_measuredDepth + offsetMD;
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ public:
|
||||
|
||||
void triangleGeometry( std::vector<cvf::Vec3f>* nodeCoords, std::vector<cvf::uint>* triangleIndices ) const override;
|
||||
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
|
@ -434,6 +434,14 @@ double RimWellPathValve::endMD() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathValve::applyOffset( double offsetMD )
|
||||
{
|
||||
m_measuredDepth = m_measuredDepth + offsetMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
void templateUpdated();
|
||||
|
||||
|
@ -239,6 +239,14 @@ cvf::Color3f RimWellPath::defaultComponentColor() const
|
||||
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::applyOffset( double offsetMD )
|
||||
{
|
||||
// Nothing to do here, as the offset is intended for well path completions
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -153,6 +153,7 @@ public:
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
@ -153,6 +153,15 @@ double RimWellPathAttribute::endMD() const
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttribute::applyOffset( double offsetMD )
|
||||
{
|
||||
m_startMD = m_startMD + offsetMD;
|
||||
m_endMD = m_endMD + offsetMD;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
private:
|
||||
static std::set<double> supportedDiameters( RiaDefines::WellPathComponentType type );
|
||||
|
@ -475,6 +475,14 @@ double RimStimPlanModel::endMD() const
|
||||
return m_MD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanModel::applyOffset( double offsetMD )
|
||||
{
|
||||
// Nothing to do here, this operation is inteded for well path completions
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -145,7 +145,9 @@ public:
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
bool isEnabled() const override;
|
||||
void applyOffset( double offsetMD ) override;
|
||||
|
||||
bool isEnabled() const override;
|
||||
|
||||
RimWellPath* wellPath() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user