Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimWellPath.h"
|
2013-10-24 00:28:45 -05:00
|
|
|
|
2018-10-11 09:03:49 -05:00
|
|
|
#include "RiaColorTables.h"
|
2018-11-05 07:28:07 -06:00
|
|
|
#include "RiaFieldHandleTools.h"
|
2017-12-07 07:51:58 -06:00
|
|
|
#include "RiaSimWellBranchTools.h"
|
|
|
|
#include "RiaWellNameComparer.h"
|
|
|
|
|
2019-10-09 02:21:28 -05:00
|
|
|
#include "RicfCommandObject.h"
|
|
|
|
|
2017-11-24 03:01:05 -06:00
|
|
|
#include "RifWellPathFormationsImporter.h"
|
2017-05-10 05:19:46 -05:00
|
|
|
#include "RifWellPathImporter.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
#include "RigWellPath.h"
|
|
|
|
|
2018-03-07 04:32:24 -06:00
|
|
|
#include "Rim3dWellLogCurve.h"
|
2018-03-07 08:12:27 -06:00
|
|
|
#include "Rim3dWellLogCurveCollection.h"
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimFishbones.h"
|
|
|
|
#include "RimFishbonesCollection.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RimMainPlotCollection.h"
|
2021-04-20 08:35:20 -05:00
|
|
|
#include "RimMswCompletionParameters.h"
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimPerforationCollection.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RimProject.h"
|
2020-11-04 06:46:17 -06:00
|
|
|
#include "RimStimPlanModelCollection.h"
|
2013-10-24 02:50:16 -05:00
|
|
|
#include "RimTools.h"
|
2015-09-16 09:06:06 -05:00
|
|
|
#include "RimWellLogFile.h"
|
2018-08-22 03:35:30 -05:00
|
|
|
#include "RimWellLogFileChannel.h"
|
2015-10-22 04:31:34 -05:00
|
|
|
#include "RimWellLogPlotCollection.h"
|
2018-08-06 00:52:02 -05:00
|
|
|
#include "RimWellPathAttributeCollection.h"
|
2017-02-24 07:31:06 -06:00
|
|
|
#include "RimWellPathCollection.h"
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimWellPathCompletionSettings.h"
|
2017-11-24 03:01:05 -06:00
|
|
|
#include "RimWellPathCompletions.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RimWellPathFracture.h"
|
2017-01-02 04:59:30 -06:00
|
|
|
#include "RimWellPathFractureCollection.h"
|
2021-04-13 00:22:56 -05:00
|
|
|
#include "RimWellPathTieIn.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
|
2015-09-24 02:37:26 -05:00
|
|
|
#include "RiuMainWindow.h"
|
|
|
|
|
2020-08-21 04:13:07 -05:00
|
|
|
#include "cafPdmFieldScriptingCapability.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
2021-05-10 08:12:29 -05:00
|
|
|
#include "cafPdmUiTreeViewEditor.h"
|
2017-05-15 06:40:13 -05:00
|
|
|
#include "cafUtils.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
|
|
|
|
#include <QDateTime>
|
2014-07-24 03:11:43 -05:00
|
|
|
#include <QDir>
|
|
|
|
#include <QFileInfo>
|
2017-11-24 03:01:05 -06:00
|
|
|
#include <QString>
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2017-10-17 10:07:51 -05:00
|
|
|
#include <regex>
|
|
|
|
|
2020-02-24 08:42:23 -06:00
|
|
|
CAF_PDM_SOURCE_INIT( RimWellPath, "WellPathBase" );
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-13 04:18:53 -05:00
|
|
|
const char RimWellPath::SIM_WELL_NONE_UI_TEXT[] = "None";
|
2017-10-11 06:52:29 -05:00
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPath::RimWellPath()
|
2020-10-20 06:01:46 -05:00
|
|
|
: nameChanged( this )
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
{
|
2020-10-20 06:01:46 -05:00
|
|
|
CAF_PDM_InitScriptableObjectWithNameAndComment( "WellPath", ":/Well.svg", "", "", "WellPath", "A ResInsight Well Path" );
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2020-08-21 04:13:07 -05:00
|
|
|
CAF_PDM_InitScriptableFieldNoDefault( &m_name, "Name", "Name", "", "", "" );
|
2020-02-25 08:52:10 -06:00
|
|
|
m_name.registerKeywordAlias( "WellPathName" );
|
2019-09-06 03:40:57 -05:00
|
|
|
m_name.uiCapability()->setUiReadOnly( true );
|
|
|
|
m_name.uiCapability()->setUiHidden( true );
|
2018-11-05 07:27:34 -06:00
|
|
|
m_name.xmlCapability()->disableIO();
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2020-02-06 09:18:50 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_airGap, "AirGap", "Air Gap", "", "", "" );
|
|
|
|
m_airGap.registerGetMethod( this, &RimWellPath::airGap );
|
|
|
|
m_airGap.uiCapability()->setUiReadOnly( true );
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_datumElevation, "DatumElevation", "Datum Elevation", "", "", "" );
|
2020-02-06 09:18:50 -06:00
|
|
|
m_datumElevation.registerGetMethod( this, &RimWellPath::datumElevation );
|
2019-09-06 03:40:57 -05:00
|
|
|
m_datumElevation.uiCapability()->setUiReadOnly( true );
|
2016-10-25 08:52:52 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_unitSystem, "UnitSystem", "Unit System", "", "", "" );
|
|
|
|
m_unitSystem.uiCapability()->setUiReadOnly( true );
|
2017-06-07 04:57:25 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &m_simWellName, "SimWellName", QString( "" ), "Well", "", "", "" );
|
|
|
|
CAF_PDM_InitField( &m_branchIndex, "SimBranchIndex", 0, "Branch", "", "", "" );
|
2017-10-11 06:52:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &m_showWellPathLabel, "ShowWellPathLabel", true, "Show Well Path Label", "", "", "" );
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &m_showWellPath, "ShowWellPath", true, "Show Well Path", "", "", "" );
|
|
|
|
m_showWellPath.uiCapability()->setUiHidden( true );
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &m_wellPathRadiusScaleFactor, "WellPathRadiusScale", 1.0, "Well Path Radius Scale", "", "", "" );
|
2020-02-12 04:43:15 -06:00
|
|
|
CAF_PDM_InitField( &m_wellPathColor, "WellPathColor", cvf::Color3f( 0.999f, 0.333f, 0.999f ), "Well Path Color", "", "", "" );
|
2017-05-10 10:09:54 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_completions, "Completions", "Completions", "", "", "" );
|
2017-05-19 07:04:01 -05:00
|
|
|
m_completions = new RimWellPathCompletions;
|
2019-09-06 03:40:57 -05:00
|
|
|
m_completions.uiCapability()->setUiTreeHidden( true );
|
2017-05-19 07:04:01 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_completionSettings, "CompletionSettings", "Completion Settings", "", "", "" );
|
|
|
|
m_completionSettings = new RimWellPathCompletionSettings;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_wellLogFiles, "WellLogFiles", "Well Log Files", "", "", "" );
|
|
|
|
m_wellLogFiles.uiCapability()->setUiTreeHidden( true );
|
2017-10-19 09:12:22 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_3dWellLogCurves, "CollectionOf3dWellLogCurves", "3D Track", "", "", "" );
|
2018-03-07 08:12:27 -06:00
|
|
|
m_3dWellLogCurves = new Rim3dWellLogCurveCollection;
|
2019-09-06 03:40:57 -05:00
|
|
|
m_3dWellLogCurves.uiCapability()->setUiTreeHidden( true );
|
2018-03-07 04:32:24 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &m_formationKeyInFile, "WellPathFormationKeyInFile", QString( "" ), "Key in File", "", "", "" );
|
|
|
|
m_formationKeyInFile.uiCapability()->setUiReadOnly( true );
|
2017-11-27 03:33:41 -06:00
|
|
|
|
2019-12-11 01:23:37 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_wellPathFormationFilePath, "WellPathFormationFilePath", "File Path", "", "", "" );
|
2019-09-06 03:40:57 -05:00
|
|
|
m_wellPathFormationFilePath.uiCapability()->setUiReadOnly( true );
|
2017-11-27 03:33:41 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_wellPathAttributes, "WellPathAttributes", "Casing Design Rubbish", "", "", "" );
|
2018-08-06 00:52:02 -05:00
|
|
|
m_wellPathAttributes = new RimWellPathAttributeCollection;
|
2019-09-06 03:40:57 -05:00
|
|
|
m_wellPathAttributes->uiCapability()->setUiTreeHidden( true );
|
2018-08-06 00:52:02 -05:00
|
|
|
|
2021-04-13 00:22:56 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_wellPathTieIn, "WellPathTieIn", "well Path Tie-In", "", "", "" );
|
2021-05-10 08:12:29 -05:00
|
|
|
m_wellPathTieIn = new RimWellPathTieIn;
|
|
|
|
m_wellPathTieIn->connectWellPaths( nullptr, this, 0.0 );
|
2021-04-13 00:22:56 -05:00
|
|
|
|
2020-10-07 09:18:24 -05:00
|
|
|
this->setDeletable( true );
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPath::~RimWellPath()
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( const auto& file : m_wellLogFiles() )
|
2015-09-14 09:33:28 -05:00
|
|
|
{
|
2017-10-19 09:12:22 -05:00
|
|
|
delete file;
|
2015-09-14 09:33:28 -05:00
|
|
|
}
|
2015-10-22 04:31:34 -05:00
|
|
|
|
|
|
|
RimProject* project;
|
2019-09-06 03:40:57 -05:00
|
|
|
firstAncestorOrThisOfType( project );
|
|
|
|
if ( project )
|
2015-10-22 04:31:34 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( project->mainPlotCollection() )
|
2015-10-22 04:31:34 -05:00
|
|
|
{
|
|
|
|
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( plotCollection )
|
2015-10-22 04:31:34 -05:00
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
plotCollection->removeExtractors( m_wellPathGeometry.p() );
|
2015-10-22 04:31:34 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
|
|
|
{
|
2017-06-14 06:13:48 -05:00
|
|
|
return &m_name;
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
2018-01-19 06:30:58 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-01-19 06:30:58 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
double RimWellPath::wellPathRadius( double characteristicCellSize ) const
|
2018-01-19 06:30:58 -06:00
|
|
|
{
|
2018-06-18 10:13:30 -05:00
|
|
|
double radius = characteristicCellSize * m_wellPathRadiusScaleFactor();
|
2018-01-19 06:30:58 -06:00
|
|
|
|
|
|
|
RimWellPathCollection* coll = nullptr;
|
2019-09-06 03:40:57 -05:00
|
|
|
this->firstAncestorOrThisOfType( coll );
|
|
|
|
if ( coll )
|
2018-01-19 06:30:58 -06:00
|
|
|
{
|
|
|
|
radius *= coll->wellPathRadiusScaleFactor();
|
|
|
|
}
|
|
|
|
|
|
|
|
return radius;
|
|
|
|
}
|
|
|
|
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::wellPathRadiusScaleFactor() const
|
|
|
|
{
|
|
|
|
return m_wellPathRadiusScaleFactor();
|
|
|
|
}
|
|
|
|
|
2018-11-22 05:57:11 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::isEnabled() const
|
|
|
|
{
|
|
|
|
return m_showWellPath;
|
|
|
|
}
|
|
|
|
|
2018-10-11 09:03:49 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiaDefines::WellPathComponentType RimWellPath::componentType() const
|
|
|
|
{
|
2020-04-24 00:13:33 -05:00
|
|
|
return RiaDefines::WellPathComponentType::WELL_PATH;
|
2018-10-11 09:03:49 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RimWellPath::componentLabel() const
|
|
|
|
{
|
|
|
|
return name();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RimWellPath::componentTypeLabel() const
|
|
|
|
{
|
|
|
|
return "Well Path";
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
cvf::Color3f RimWellPath::defaultComponentColor() const
|
|
|
|
{
|
|
|
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
|
|
|
}
|
|
|
|
|
2017-05-19 08:44:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-19 08:44:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimFishbonesCollection* RimWellPath::fishbonesCollection()
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-05-19 08:44:32 -05:00
|
|
|
|
|
|
|
return m_completions->fishbonesCollection();
|
|
|
|
}
|
|
|
|
|
2017-05-29 05:56:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-29 05:56:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
const RimFishbonesCollection* RimWellPath::fishbonesCollection() const
|
2017-05-29 05:56:40 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-05-29 05:56:40 -05:00
|
|
|
|
|
|
|
return m_completions->fishbonesCollection();
|
|
|
|
}
|
|
|
|
|
2017-05-19 08:44:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-19 08:44:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimPerforationCollection* RimWellPath::perforationIntervalCollection()
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-05-19 08:44:32 -05:00
|
|
|
|
|
|
|
return m_completions->perforationCollection();
|
|
|
|
}
|
|
|
|
|
2017-05-29 05:56:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-29 05:56:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimPerforationCollection* RimWellPath::perforationIntervalCollection() const
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-05-29 05:56:40 -05:00
|
|
|
|
|
|
|
return m_completions->perforationCollection();
|
|
|
|
}
|
|
|
|
|
2017-06-14 06:43:56 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-14 06:43:56 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimWellPathCompletions* RimWellPath::completions() const
|
|
|
|
{
|
|
|
|
return m_completions();
|
|
|
|
}
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-04-20 08:35:20 -05:00
|
|
|
/// Returns top-level completion settings
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimWellPathCompletionSettings* RimWellPath::completionSettings() const
|
|
|
|
{
|
2021-04-13 00:22:56 -05:00
|
|
|
if ( isTopLevelWellPath() ) return m_completionSettings();
|
|
|
|
|
|
|
|
return topLevelWellPath()->completionSettings();
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-04-20 08:35:20 -05:00
|
|
|
/// Returns top-level completion settings
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPathCompletionSettings* RimWellPath::completionSettings()
|
|
|
|
{
|
2021-04-13 00:22:56 -05:00
|
|
|
if ( isTopLevelWellPath() ) return m_completionSettings();
|
|
|
|
|
|
|
|
return topLevelWellPath()->completionSettings();
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimMswCompletionParameters* RimWellPath::mswCompletionParameters()
|
|
|
|
{
|
|
|
|
auto params = m_completionSettings->mswCompletionParameters();
|
|
|
|
if ( !isTopLevelWellPath() )
|
|
|
|
{
|
|
|
|
auto topMsw = topLevelWellPath()->mswCompletionParameters();
|
|
|
|
|
|
|
|
// Propagate most settings from top level well into lateral parameters
|
|
|
|
params->updateFromTopLevelWell( topMsw );
|
|
|
|
}
|
|
|
|
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimMswCompletionParameters* RimWellPath::mswCompletionParameters() const
|
|
|
|
{
|
|
|
|
auto params = m_completionSettings->mswCompletionParameters();
|
|
|
|
if ( !isTopLevelWellPath() )
|
|
|
|
{
|
|
|
|
auto topMsw = topLevelWellPath()->mswCompletionParameters();
|
|
|
|
|
|
|
|
// Propagate most settings from top level well into lateral parameters
|
|
|
|
params->updateFromTopLevelWell( topMsw );
|
|
|
|
}
|
|
|
|
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
|
2017-05-26 06:01:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-26 06:01:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPathFractureCollection* RimWellPath::fractureCollection()
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-05-26 06:01:28 -05:00
|
|
|
|
|
|
|
return m_completions->fractureCollection();
|
|
|
|
}
|
|
|
|
|
2017-06-16 02:44:39 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-16 02:44:39 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
const RimWellPathFractureCollection* RimWellPath::fractureCollection() const
|
2017-06-16 02:44:39 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_completions );
|
2017-06-16 02:44:39 -05:00
|
|
|
|
|
|
|
return m_completions->fractureCollection();
|
|
|
|
}
|
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
RimStimPlanModelCollection* RimWellPath::stimPlanModelCollection()
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
|
|
|
CVF_ASSERT( m_completions );
|
|
|
|
|
2020-11-04 06:46:17 -06:00
|
|
|
return m_completions->stimPlanModelCollection();
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-11-04 06:46:17 -06:00
|
|
|
const RimStimPlanModelCollection* RimWellPath::stimPlanModelCollection() const
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
|
|
|
CVF_ASSERT( m_completions );
|
|
|
|
|
2020-11-04 06:46:17 -06:00
|
|
|
return m_completions->stimPlanModelCollection();
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-02-24 07:31:06 -06:00
|
|
|
RigWellPath* RimWellPath::wellPathGeometry()
|
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
return m_wellPathGeometry.p();
|
2017-02-24 07:31:06 -06:00
|
|
|
}
|
|
|
|
|
2015-12-03 12:31:34 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-12-03 12:31:34 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-05-22 11:11:03 -05:00
|
|
|
const RigWellPath* RimWellPath::wellPathGeometry() const
|
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
return m_wellPathGeometry.p();
|
2017-05-22 11:11:03 -05:00
|
|
|
}
|
|
|
|
|
2020-10-06 08:00:39 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::startMD() const
|
|
|
|
{
|
|
|
|
if ( wellPathGeometry() )
|
|
|
|
{
|
|
|
|
return wellPathGeometry()->measuredDepths().front();
|
|
|
|
}
|
|
|
|
return std::numeric_limits<double>::infinity();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::endMD() const
|
|
|
|
{
|
|
|
|
if ( wellPathGeometry() )
|
|
|
|
{
|
|
|
|
return wellPathGeometry()->measuredDepths().back();
|
|
|
|
}
|
|
|
|
return std::numeric_limits<double>::infinity();
|
|
|
|
}
|
|
|
|
|
2021-01-04 04:09:01 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::uniqueStartMD() const
|
|
|
|
{
|
|
|
|
if ( wellPathGeometry() )
|
|
|
|
{
|
|
|
|
auto uniqueMDs = wellPathGeometry()->uniqueMeasuredDepths();
|
|
|
|
if ( !uniqueMDs.empty() ) return uniqueMDs.front();
|
|
|
|
}
|
|
|
|
return std::numeric_limits<double>::infinity();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::uniqueEndMD() const
|
|
|
|
{
|
|
|
|
if ( wellPathGeometry() )
|
|
|
|
{
|
|
|
|
auto uniqueMDs = wellPathGeometry()->uniqueMeasuredDepths();
|
|
|
|
if ( !uniqueMDs.empty() ) return uniqueMDs.back();
|
|
|
|
}
|
|
|
|
return std::numeric_limits<double>::infinity();
|
|
|
|
}
|
|
|
|
|
2017-05-22 11:11:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-22 11:11:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-12 04:43:15 -06:00
|
|
|
void RimWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
{
|
2015-12-01 05:27:19 -06:00
|
|
|
RimProject* proj;
|
2019-09-06 03:40:57 -05:00
|
|
|
this->firstAncestorOrThisOfTypeAsserted( proj );
|
|
|
|
if ( changedField == &m_showWellPath )
|
2017-06-01 05:54:37 -05:00
|
|
|
{
|
2017-06-02 03:35:52 -05:00
|
|
|
proj->reloadCompletionTypeResultsInAllViews();
|
2017-06-01 05:54:37 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( changedField == &m_name )
|
2019-02-07 01:44:12 -06:00
|
|
|
{
|
|
|
|
QString previousName = oldValue.toString();
|
2019-09-06 03:40:57 -05:00
|
|
|
QString newName = newValue.toString();
|
2021-02-26 07:27:59 -06:00
|
|
|
m_completionSettings->updateWellPathNameHasChanged( newName, previousName );
|
2019-02-07 01:44:12 -06:00
|
|
|
}
|
2017-06-01 05:54:37 -05:00
|
|
|
else
|
|
|
|
{
|
2018-09-11 05:41:45 -05:00
|
|
|
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
2017-06-01 05:54:37 -05:00
|
|
|
}
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> RimWellPath::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
|
|
|
QList<caf::PdmOptionItemInfo> options;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( fieldNeedingOptions == &m_simWellName )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
2020-05-12 02:50:38 -05:00
|
|
|
RimProject* proj = RimProject::current();
|
2017-10-25 02:55:00 -05:00
|
|
|
|
|
|
|
// Find simulation wells already assigned to a well path
|
|
|
|
std::set<QString> associatedSimWells;
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( const auto& wellPath : proj->allWellPaths() )
|
2017-10-25 02:55:00 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( wellPath->isAssociatedWithSimulationWell() && wellPath != this )
|
2017-10-25 02:55:00 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
associatedSimWells.insert( wellPath->associatedSimulationWellName() );
|
2017-10-25 02:55:00 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
options.push_back( caf::PdmOptionItemInfo( SIM_WELL_NONE_UI_TEXT, "" ) );
|
|
|
|
for ( const auto& wellName : proj->simulationWellNames() )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( associatedSimWells.count( wellName ) > 0 ) continue;
|
2017-10-25 02:55:00 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
options.push_back( caf::PdmOptionItemInfo( wellName, wellName ) );
|
2017-10-11 06:52:29 -05:00
|
|
|
}
|
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( fieldNeedingOptions == &m_branchIndex )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
size_t branchCount = RimWellPath::simulationWellBranchCount( m_simWellName );
|
2017-10-11 06:52:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( branchCount == 0 ) branchCount = 1;
|
2017-10-11 06:52:29 -05:00
|
|
|
|
2017-10-12 03:00:32 -05:00
|
|
|
size_t index = 0;
|
2019-09-06 03:40:57 -05:00
|
|
|
while ( index < branchCount )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
QString uiText = QString( "Branch %1" ).arg( QString::number( index + 1 ) );
|
|
|
|
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( index ) ) );
|
2017-10-11 06:52:29 -05:00
|
|
|
index++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
|
2017-06-14 06:13:48 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-14 06:13:48 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
void RimWellPath::initAfterRead()
|
|
|
|
{
|
|
|
|
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2020.10.1" ) )
|
|
|
|
{
|
2021-03-10 04:32:42 -06:00
|
|
|
if ( m_completionSettings->wellNameForExport().isEmpty() )
|
2021-02-26 07:27:59 -06:00
|
|
|
{
|
2021-03-10 04:32:42 -06:00
|
|
|
m_completionSettings->setWellNameForExport( name() );
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------- -----------------------------
|
2017-06-14 06:13:48 -05:00
|
|
|
QString RimWellPath::name() const
|
|
|
|
{
|
|
|
|
return m_name();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------- -----------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::setName( const QString& name )
|
2017-06-14 06:13:48 -05:00
|
|
|
{
|
2020-05-22 05:25:25 -05:00
|
|
|
setNameNoUpdateOfExportName( name );
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
m_completionSettings->setWellNameForExport( name );
|
2020-05-22 05:25:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::setNameNoUpdateOfExportName( const QString& name )
|
|
|
|
{
|
|
|
|
m_name = name;
|
2017-10-11 08:23:14 -05:00
|
|
|
tryAssociateWithSimulationWell();
|
2020-10-20 06:01:46 -05:00
|
|
|
nameChanged.send();
|
2017-06-14 06:13:48 -05:00
|
|
|
}
|
|
|
|
|
2017-09-29 04:24:18 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-09-29 04:24:18 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-19 09:12:22 -05:00
|
|
|
std::vector<RimWellLogFile*> RimWellPath::wellLogFiles() const
|
2017-09-29 04:24:18 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
return std::vector<RimWellLogFile*>( m_wellLogFiles.begin(), m_wellLogFiles.end() );
|
2017-09-29 04:24:18 -05:00
|
|
|
}
|
2018-08-22 03:35:30 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
RimWellLogFile* RimWellPath::firstWellLogFileMatchingChannelName( const QString& channelName ) const
|
2018-08-22 03:35:30 -05:00
|
|
|
{
|
|
|
|
std::vector<RimWellLogFile*> allWellLogFiles = wellLogFiles();
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( RimWellLogFile* logFile : allWellLogFiles )
|
2018-08-22 03:35:30 -05:00
|
|
|
{
|
|
|
|
std::vector<RimWellLogFileChannel*> channels = logFile->wellLogChannels();
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( RimWellLogFileChannel* channel : channels )
|
2018-08-22 03:35:30 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( channel->name() == channelName )
|
2018-08-22 03:35:30 -05:00
|
|
|
{
|
|
|
|
return logFile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2018-10-10 04:10:56 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPathAttributeCollection* RimWellPath::attributeCollection()
|
|
|
|
{
|
|
|
|
return m_wellPathAttributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimWellPathAttributeCollection* RimWellPath::attributeCollection() const
|
|
|
|
{
|
|
|
|
return m_wellPathAttributes;
|
|
|
|
}
|
|
|
|
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::showWellPathLabel() const
|
|
|
|
{
|
|
|
|
return m_showWellPathLabel();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::showWellPath() const
|
|
|
|
{
|
|
|
|
return m_showWellPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
cvf::Color3f RimWellPath::wellPathColor() const
|
|
|
|
{
|
|
|
|
return m_wellPathColor;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-18 10:13:30 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::setWellPathColor( const cvf::Color3f& color )
|
2018-06-18 10:13:30 -05:00
|
|
|
{
|
|
|
|
m_wellPathColor = color;
|
|
|
|
}
|
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
caf::PdmFieldHandle* RimWellPath::objectToggleField()
|
|
|
|
{
|
2018-06-18 10:13:30 -05:00
|
|
|
return &m_showWellPath;
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::setWellPathGeometry( RigWellPath* wellPathModel )
|
2017-02-24 07:31:06 -06:00
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
m_wellPathGeometry = wellPathModel;
|
2017-02-24 07:31:06 -06:00
|
|
|
}
|
|
|
|
|
2013-10-17 06:37:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2013-10-17 06:37:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
2013-10-17 06:37:59 -05:00
|
|
|
{
|
2021-04-13 00:22:56 -05:00
|
|
|
if ( m_wellPathTieIn() )
|
|
|
|
{
|
|
|
|
m_wellPathTieIn->uiOrdering( uiConfigName, uiOrdering );
|
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_simWellName().isEmpty() )
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
|
|
|
// Try to set default simulation well name
|
2017-10-11 08:23:14 -05:00
|
|
|
tryAssociateWithSimulationWell();
|
2017-10-11 06:52:29 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* appGroup = uiOrdering.addNewGroup( "Appearance" );
|
|
|
|
appGroup->add( &m_showWellPathLabel );
|
|
|
|
appGroup->add( &m_wellPathColor );
|
|
|
|
appGroup->add( &m_wellPathRadiusScaleFactor );
|
2013-10-17 06:37:59 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* simWellGroup = uiOrdering.addNewGroup( "Simulation Well" );
|
|
|
|
simWellGroup->add( &m_simWellName );
|
2013-10-17 06:37:59 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( simulationWellBranchCount( m_simWellName ) > 1 )
|
2017-12-07 07:51:58 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
simWellGroup->add( &m_branchIndex );
|
2017-12-07 07:51:58 -06:00
|
|
|
}
|
2017-10-11 06:52:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* ssihubGroup = uiOrdering.addNewGroup( "Well Info" );
|
2018-06-20 01:55:27 -05:00
|
|
|
|
2020-10-06 05:37:16 -05:00
|
|
|
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->rkbDiff() > 0.0 )
|
2016-10-25 08:52:52 -05:00
|
|
|
{
|
2020-02-06 09:18:50 -06:00
|
|
|
ssihubGroup->add( &m_airGap );
|
2016-10-25 08:52:52 -05:00
|
|
|
}
|
2020-02-06 09:18:50 -06:00
|
|
|
|
2020-10-06 05:37:16 -05:00
|
|
|
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->hasDatumElevation() )
|
2016-10-25 08:52:52 -05:00
|
|
|
{
|
2020-02-06 09:18:50 -06:00
|
|
|
ssihubGroup->add( &m_datumElevation );
|
2016-10-25 08:52:52 -05:00
|
|
|
}
|
2020-02-06 09:18:50 -06:00
|
|
|
ssihubGroup->add( &m_unitSystem );
|
2017-10-11 06:52:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* formationFileInfoGroup = uiOrdering.addNewGroup( "Well Picks" );
|
|
|
|
formationFileInfoGroup->add( &m_wellPathFormationFilePath );
|
|
|
|
formationFileInfoGroup->add( &m_formationKeyInFile );
|
2017-11-27 03:33:41 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.skipRemainingFields( true );
|
2013-10-17 06:37:59 -05:00
|
|
|
}
|
2013-10-24 00:28:45 -05:00
|
|
|
|
2017-05-10 10:09:54 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-10 10:09:54 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add( &m_wellLogFiles );
|
2017-06-16 08:36:59 -05:00
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
if ( m_completionSettings() && !allCompletionsRecursively().empty() )
|
2017-06-16 08:36:59 -05:00
|
|
|
{
|
2021-04-20 08:35:20 -05:00
|
|
|
uiTreeOrdering.add( m_completionSettings() );
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( m_completions->fishbonesCollection()->hasFishbones() )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add( m_completions->fishbonesCollection() );
|
|
|
|
}
|
|
|
|
if ( m_completions->fractureCollection()->hasFractures() )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add( m_completions->fractureCollection() );
|
|
|
|
}
|
|
|
|
if ( m_completions->perforationCollection()->hasPerforations() )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add( m_completions->perforationCollection() );
|
|
|
|
}
|
|
|
|
if ( m_completions->stimPlanModelCollection()->hasStimPlanModels() )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add( m_completions->stimPlanModelCollection() );
|
2017-06-16 08:36:59 -05:00
|
|
|
}
|
2017-06-20 06:26:52 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_3dWellLogCurves->has3dWellLogCurves() )
|
2018-03-07 04:32:24 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( m_3dWellLogCurves() );
|
2018-10-19 09:29:46 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !m_wellPathAttributes->attributes().empty() )
|
2018-10-19 09:29:46 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( m_wellPathAttributes() );
|
2018-03-07 04:32:24 -06:00
|
|
|
}
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.skipRemainingChildren( true );
|
2017-05-10 10:09:54 -05:00
|
|
|
}
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::copyCompletionSettings( RimWellPath* from, RimWellPath* to )
|
|
|
|
{
|
|
|
|
if ( !from->m_completionSettings ) return;
|
|
|
|
|
|
|
|
if ( !to->m_completionSettings )
|
|
|
|
{
|
|
|
|
to->m_completionSettings = new RimWellPathCompletionSettings( *from->m_completionSettings() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*( to->m_completionSettings() ) = *( from->m_completionSettings() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-10 08:12:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
|
|
|
{
|
|
|
|
auto myAttr = dynamic_cast<caf::PdmUiTreeViewEditorAttribute*>( attribute );
|
|
|
|
if ( myAttr )
|
|
|
|
{
|
|
|
|
// The nodes for well paths are created by the well path collection object. When a well path object is asked to
|
|
|
|
// be updated in the project tree, always rebuild the tree from the well path collection object.
|
|
|
|
|
|
|
|
myAttr->objectForUpdateOfUiTree = RimTools::wellPathCollection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-07 07:51:58 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-12-07 07:51:58 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
size_t RimWellPath::simulationWellBranchCount( const QString& simWellName )
|
2017-12-07 07:51:58 -06:00
|
|
|
{
|
|
|
|
bool detectBranches = true;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
auto branches = RiaSimWellBranchTools::simulationWellBranches( simWellName, detectBranches );
|
2017-12-07 07:51:58 -06:00
|
|
|
|
|
|
|
return branches.size();
|
|
|
|
}
|
|
|
|
|
2018-06-20 01:55:27 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-06-20 01:55:27 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath )
|
2018-06-20 01:55:27 -05:00
|
|
|
{
|
2013-10-24 02:50:16 -05:00
|
|
|
}
|
|
|
|
|
2017-05-05 04:21:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-05 04:21:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::combinedScaleFactor() const
|
|
|
|
{
|
|
|
|
RimWellPathCollection* wellPathColl = nullptr;
|
2019-09-06 03:40:57 -05:00
|
|
|
this->firstAncestorOrThisOfTypeAsserted( wellPathColl );
|
2017-05-05 04:21:40 -05:00
|
|
|
|
2018-06-18 10:13:30 -05:00
|
|
|
return this->m_wellPathRadiusScaleFactor() * wellPathColl->wellPathRadiusScaleFactor();
|
2017-05-05 04:21:40 -05:00
|
|
|
}
|
|
|
|
|
2017-06-07 04:57:25 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-07 04:57:25 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-01-21 05:58:46 -06:00
|
|
|
void RimWellPath::setUnitSystem( RiaDefines::EclipseUnitSystem unitSystem )
|
2017-06-07 04:57:25 -05:00
|
|
|
{
|
|
|
|
m_unitSystem = unitSystem;
|
2017-06-20 05:36:12 -05:00
|
|
|
|
|
|
|
m_completions->setUnitSystemSpecificDefaults();
|
2021-03-10 04:32:42 -06:00
|
|
|
|
|
|
|
std::vector<RimMswCompletionParameters*> mswParameters;
|
|
|
|
descendantsOfType( mswParameters );
|
|
|
|
for ( auto mswParams : mswParameters )
|
|
|
|
{
|
|
|
|
mswParams->setUnitSystemSpecificDefaults();
|
|
|
|
}
|
2017-06-07 04:57:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-07 04:57:25 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-01-21 05:58:46 -06:00
|
|
|
RiaDefines::EclipseUnitSystem RimWellPath::unitSystem() const
|
2017-06-07 04:57:25 -05:00
|
|
|
{
|
|
|
|
return m_unitSystem();
|
|
|
|
}
|
|
|
|
|
2015-09-14 09:33:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-06 09:18:50 -06:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::airGap() const
|
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->rkbDiff() > 0.0 )
|
2020-02-06 09:18:50 -06:00
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
return m_wellPathGeometry->rkbDiff();
|
2020-02-06 09:18:50 -06:00
|
|
|
}
|
|
|
|
return 0.0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
double RimWellPath::datumElevation() const
|
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
if ( m_wellPathGeometry.notNull() && m_wellPathGeometry->hasDatumElevation() )
|
2020-02-06 09:18:50 -06:00
|
|
|
{
|
2020-10-06 05:37:16 -05:00
|
|
|
return m_wellPathGeometry->datumElevation();
|
2020-02-06 09:18:50 -06:00
|
|
|
}
|
|
|
|
return 0.0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2015-09-14 09:33:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::addWellLogFile( RimWellLogFile* logFileInfo )
|
2015-09-14 09:33:28 -05:00
|
|
|
{
|
2017-10-27 08:01:55 -05:00
|
|
|
// Prevent the same file from being loaded more than once
|
2019-09-06 03:40:57 -05:00
|
|
|
auto itr = std::find_if( m_wellLogFiles.begin(), m_wellLogFiles.end(), [&]( const RimWellLogFile* file ) {
|
|
|
|
return QString::compare( file->fileName(), logFileInfo->fileName(), Qt::CaseInsensitive ) == 0;
|
|
|
|
} );
|
2015-09-14 09:33:28 -05:00
|
|
|
|
2017-10-19 09:12:22 -05:00
|
|
|
// Todo: Verify well name to ensure all well log files having the same well name
|
2015-09-14 09:33:28 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( itr == m_wellLogFiles.end() )
|
2017-10-19 09:12:22 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_wellLogFiles.push_back( logFileInfo );
|
2017-10-19 09:12:22 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_wellLogFiles.size() == 1 && name().isEmpty() )
|
2017-10-19 09:12:22 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
setName( m_wellLogFiles[0]->wellName() );
|
2017-10-19 09:12:22 -05:00
|
|
|
}
|
|
|
|
}
|
2015-09-14 09:33:28 -05:00
|
|
|
}
|
2017-09-29 04:24:18 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-09-29 04:24:18 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::deleteWellLogFile( RimWellLogFile* logFileInfo )
|
2017-11-18 18:12:39 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
detachWellLogFile( logFileInfo );
|
2017-11-18 18:12:39 -06:00
|
|
|
delete logFileInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-18 18:12:39 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::detachWellLogFile( RimWellLogFile* logFileInfo )
|
2017-10-25 04:30:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
auto pdmObject = dynamic_cast<caf::PdmObjectHandle*>( logFileInfo );
|
|
|
|
for ( size_t i = 0; i < m_wellLogFiles.size(); i++ )
|
2017-10-25 04:30:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_wellLogFiles[i] == pdmObject )
|
2017-10-25 04:30:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_wellLogFiles.removeChildObject( pdmObject );
|
2017-10-25 04:30:10 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-24 03:01:05 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-24 03:01:05 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::setFormationsGeometry( cvf::ref<RigWellPathFormations> wellPathFormations )
|
2017-11-24 03:01:05 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_wellPathFormations = wellPathFormations;
|
2017-11-27 03:33:41 -06:00
|
|
|
m_wellPathFormationFilePath = wellPathFormations->filePath();
|
2019-09-06 03:40:57 -05:00
|
|
|
m_formationKeyInFile = wellPathFormations->keyInFile();
|
2017-11-24 03:01:05 -06:00
|
|
|
|
2017-11-27 03:33:41 -06:00
|
|
|
updateConnectedEditors();
|
2017-11-24 03:01:05 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-24 03:01:05 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool RimWellPath::readWellPathFormationsFile( QString* errorMessage,
|
|
|
|
RifWellPathFormationsImporter* wellPathFormationsImporter )
|
2017-11-24 03:01:05 -06:00
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( m_wellPathFormationFilePath().path().isEmpty() )
|
2017-11-27 03:33:41 -06:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( caf::Utils::fileExists( m_wellPathFormationFilePath().path() ) )
|
2017-11-24 03:01:05 -06:00
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
m_wellPathFormations = wellPathFormationsImporter->readWellPathFormations( m_wellPathFormationFilePath().path(),
|
2019-09-06 03:40:57 -05:00
|
|
|
m_formationKeyInFile() );
|
|
|
|
if ( m_name().isEmpty() )
|
2017-11-27 03:33:41 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
setName( m_formationKeyInFile() );
|
2017-11-27 03:33:41 -06:00
|
|
|
}
|
2017-11-24 03:01:05 -06:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( errorMessage )
|
|
|
|
( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
2017-12-06 05:01:15 -06:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-12-06 05:01:15 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
bool RimWellPath::reloadWellPathFormationsFile( QString* errorMessage,
|
|
|
|
RifWellPathFormationsImporter* wellPathFormationsImporter )
|
2017-12-06 05:01:15 -06:00
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( m_wellPathFormationFilePath().path().isEmpty() )
|
2017-12-06 05:01:15 -06:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( caf::Utils::fileExists( m_wellPathFormationFilePath().path() ) )
|
2017-12-06 05:01:15 -06:00
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
m_wellPathFormations = wellPathFormationsImporter->reloadWellPathFormations( m_wellPathFormationFilePath().path(),
|
2019-09-06 03:40:57 -05:00
|
|
|
m_formationKeyInFile() );
|
2017-12-07 02:31:13 -06:00
|
|
|
return true;
|
2017-12-06 05:01:15 -06:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-12-11 01:23:37 -06:00
|
|
|
if ( errorMessage )
|
|
|
|
( *errorMessage ) = "Could not find the well pick file: " + m_wellPathFormationFilePath().path();
|
2017-11-24 03:01:05 -06:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-27 07:36:19 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-27 07:36:19 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::hasFormations() const
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( m_wellPathFormations.isNull() )
|
2017-11-27 07:36:19 -06:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-11-27 07:36:19 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RigWellPathFormations* RimWellPath::formationsGeometry() const
|
|
|
|
{
|
|
|
|
return m_wellPathFormations.p();
|
|
|
|
}
|
|
|
|
|
2018-03-07 04:32:24 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-03-07 04:32:24 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPath::add3dWellLogCurve( Rim3dWellLogCurve* rim3dWellLogCurve )
|
2018-03-07 04:32:24 -06:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_3dWellLogCurves->add3dWellLogCurve( rim3dWellLogCurve );
|
2018-03-07 04:32:24 -06:00
|
|
|
}
|
|
|
|
|
2018-03-20 05:29:46 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-03-20 05:29:46 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
Rim3dWellLogCurveCollection* RimWellPath::rim3dWellLogCurveCollection() const
|
|
|
|
{
|
|
|
|
return m_3dWellLogCurves();
|
|
|
|
}
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::vector<const RimWellPathComponentInterface*> RimWellPath::allCompletionsRecursively() const
|
|
|
|
{
|
|
|
|
std::vector<const RimWellPathComponentInterface*> allCompletions;
|
|
|
|
|
2021-05-27 04:44:26 -05:00
|
|
|
auto laterals = allWellPathLaterals();
|
|
|
|
for ( auto w : laterals )
|
2021-02-26 07:27:59 -06:00
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
auto completions = w->completions()->allCompletions();
|
|
|
|
allCompletions.insert( allCompletions.end(), completions.begin(), completions.end() );
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
return allCompletions;
|
|
|
|
}
|
|
|
|
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-11-17 08:35:07 -06:00
|
|
|
const QString RimWellPath::associatedSimulationWellName() const
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
|
|
|
return m_simWellName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-25 02:55:00 -05:00
|
|
|
int RimWellPath::associatedSimulationWellBranch() const
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
|
|
|
return m_branchIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 06:52:29 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2017-10-11 08:23:14 -05:00
|
|
|
bool RimWellPath::tryAssociateWithSimulationWell()
|
2017-10-11 06:52:29 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !m_simWellName().isEmpty() ) return false;
|
|
|
|
|
|
|
|
QString matchedSimWell = RiaWellNameComparer::tryFindMatchingSimWellName( m_name );
|
2017-10-17 10:07:51 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !matchedSimWell.isEmpty() )
|
2017-10-27 08:01:55 -05:00
|
|
|
{
|
|
|
|
m_simWellName = matchedSimWell;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2017-10-11 08:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-10-11 08:23:14 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::isAssociatedWithSimulationWell() const
|
|
|
|
{
|
2017-10-13 04:18:53 -05:00
|
|
|
return !m_simWellName().isEmpty();
|
2017-10-11 06:52:29 -05:00
|
|
|
}
|
2020-05-18 09:02:27 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
|
|
|
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
|
|
|
{
|
2021-03-05 08:19:55 -06:00
|
|
|
RimProject::current()->reloadCompletionTypeResultsInAllViews();
|
|
|
|
|
2020-05-18 09:02:27 -05:00
|
|
|
updateConnectedEditors();
|
|
|
|
}
|
2021-02-26 07:27:59 -06:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::isTopLevelWellPath() const
|
|
|
|
{
|
|
|
|
return this == topLevelWellPath();
|
|
|
|
}
|
|
|
|
|
2021-03-10 04:32:42 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::isMultiLateralWellPath() const
|
|
|
|
{
|
|
|
|
auto top = topLevelWellPath();
|
|
|
|
|
|
|
|
std::vector<RimWellPath*> wells;
|
|
|
|
top->descendantsIncludingThisOfType( wells );
|
|
|
|
|
|
|
|
return wells.size() > 1;
|
|
|
|
}
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-04-13 00:22:56 -05:00
|
|
|
RimWellPath* RimWellPath::topLevelWellPath()
|
2021-02-26 07:27:59 -06:00
|
|
|
{
|
2021-04-13 00:22:56 -05:00
|
|
|
if ( m_wellPathTieIn() && m_wellPathTieIn->parentWell() )
|
|
|
|
{
|
2021-05-10 08:12:29 -05:00
|
|
|
if ( m_wellPathTieIn->parentWell() == this ) return this;
|
|
|
|
|
2021-04-13 00:22:56 -05:00
|
|
|
return m_wellPathTieIn()->parentWell()->topLevelWellPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RimWellPath* RimWellPath::topLevelWellPath() const
|
|
|
|
{
|
|
|
|
if ( m_wellPathTieIn() && m_wellPathTieIn->parentWell() )
|
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
if ( m_wellPathTieIn->parentWell() == this ) return this;
|
|
|
|
|
2021-04-13 00:22:56 -05:00
|
|
|
return m_wellPathTieIn()->parentWell()->topLevelWellPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
return this;
|
2021-02-26 07:27:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-05-27 04:44:26 -05:00
|
|
|
void RimWellPath::wellPathLateralsRecursively( std::vector<RimWellPath*>& wellPathLaterals ) const
|
2021-02-26 07:27:59 -06:00
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
wellPathLaterals.push_back( const_cast<RimWellPath*>( this ) );
|
2021-04-13 00:22:56 -05:00
|
|
|
|
2021-05-27 04:44:26 -05:00
|
|
|
std::vector<caf::PdmObjectHandle*> referringObjects;
|
|
|
|
this->objectsWithReferringPtrFields( referringObjects );
|
|
|
|
for ( auto obj : referringObjects )
|
2021-04-13 00:22:56 -05:00
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
if ( auto tieIn = dynamic_cast<RimWellPathTieIn*>( obj ) )
|
2021-04-13 00:22:56 -05:00
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
auto tieInWellPath = tieIn->childWell();
|
|
|
|
if ( tieInWellPath )
|
2021-04-13 00:22:56 -05:00
|
|
|
{
|
2021-05-27 04:44:26 -05:00
|
|
|
if ( std::find( wellPathLaterals.begin(), wellPathLaterals.end(), tieInWellPath ) == wellPathLaterals.end() )
|
|
|
|
{
|
|
|
|
tieInWellPath->wellPathLateralsRecursively( wellPathLaterals );
|
|
|
|
}
|
2021-04-13 00:22:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-27 04:44:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::vector<RimWellPath*> RimWellPath::allWellPathLaterals() const
|
|
|
|
{
|
|
|
|
std::vector<RimWellPath*> laterals;
|
|
|
|
|
|
|
|
this->wellPathLateralsRecursively( laterals );
|
2021-04-13 00:22:56 -05:00
|
|
|
|
2021-05-27 04:44:26 -05:00
|
|
|
return laterals;
|
2021-04-13 00:22:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPathTieIn* RimWellPath::wellPathTieIn() const
|
|
|
|
{
|
|
|
|
return m_wellPathTieIn();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::connectWellPaths( RimWellPath* parentWell, double parentTieInMeasuredDepth )
|
|
|
|
{
|
2021-05-10 08:12:29 -05:00
|
|
|
CVF_ASSERT( parentWell != this );
|
2021-04-13 00:22:56 -05:00
|
|
|
|
2021-05-10 08:12:29 -05:00
|
|
|
if ( parentWell != this )
|
|
|
|
{
|
|
|
|
if ( !m_wellPathTieIn() ) m_wellPathTieIn = new RimWellPathTieIn;
|
|
|
|
|
|
|
|
m_wellPathTieIn->connectWellPaths( parentWell, this, parentTieInMeasuredDepth );
|
|
|
|
m_wellPathTieIn->updateFirstTargetFromParentWell();
|
|
|
|
}
|
2021-04-13 00:22:56 -05:00
|
|
|
}
|