2017-05-19 07:04:01 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2017-05-19 07:04:01 -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
|
|
|
//
|
2017-05-19 07:04:01 -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>
|
2017-05-19 07:04:01 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimWellPathCompletions.h"
|
|
|
|
|
2018-08-31 09:08:03 -05:00
|
|
|
#include "RiaStdStringTools.h"
|
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimFishbones.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RimFishbonesCollection.h"
|
2017-05-19 08:44:32 -05:00
|
|
|
#include "RimPerforationCollection.h"
|
2018-10-09 04:06:10 -05:00
|
|
|
#include "RimPerforationInterval.h"
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimProject.h"
|
2020-11-04 06:46:17 -06:00
|
|
|
#include "RimStimPlanModel.h"
|
|
|
|
#include "RimStimPlanModelCollection.h"
|
2021-02-26 07:27:59 -06:00
|
|
|
#include "RimWellPath.h"
|
2018-10-09 06:42:03 -05:00
|
|
|
#include "RimWellPathComponentInterface.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RimWellPathFracture.h"
|
|
|
|
#include "RimWellPathFractureCollection.h"
|
2018-10-10 04:10:56 -05:00
|
|
|
#include "RimWellPathValve.h"
|
2017-05-19 08:44:32 -05:00
|
|
|
|
2017-05-20 07:31:25 -05:00
|
|
|
#include "cvfAssert.h"
|
|
|
|
|
2019-01-29 03:05:57 -06:00
|
|
|
#include "cafPdmDoubleStringValidator.h"
|
|
|
|
#include "cafPdmUiDoubleValueEditor.h"
|
2018-12-18 03:58:07 -06:00
|
|
|
#include "cafPdmUiLineEditor.h"
|
2017-06-16 08:36:59 -05:00
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
|
|
|
|
2018-08-31 09:08:03 -05:00
|
|
|
#include <cmath>
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RimWellPathCompletions, "WellPathCompletions" );
|
2017-05-19 07:04:01 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-05-19 07:04:01 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPathCompletions::RimWellPathCompletions()
|
|
|
|
{
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitObject( "Completions", ":/CompletionsSymbol16x16.png" );
|
2017-05-19 08:44:32 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_perforationCollection, "Perforations", "Perforations" );
|
2017-05-19 08:44:32 -05:00
|
|
|
m_perforationCollection = new RimPerforationCollection;
|
2021-10-13 06:39:46 -05:00
|
|
|
m_perforationCollection.uiCapability()->setUiTreeHidden( true );
|
2017-05-19 08:44:32 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_fishbonesCollection, "Fishbones", "Fishbones" );
|
2017-05-19 08:44:32 -05:00
|
|
|
m_fishbonesCollection = new RimFishbonesCollection;
|
2021-10-13 06:39:46 -05:00
|
|
|
m_fishbonesCollection.uiCapability()->setUiTreeHidden( true );
|
2017-05-26 06:01:28 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_fractureCollection, "Fractures", "Fractures" );
|
2017-05-26 06:01:28 -05:00
|
|
|
m_fractureCollection = new RimWellPathFractureCollection;
|
2021-10-13 06:39:46 -05:00
|
|
|
m_fractureCollection.uiCapability()->setUiTreeHidden( true );
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_stimPlanModelCollection, "StimPlanModels", "StimPlan Models" );
|
2020-11-04 06:46:17 -06:00
|
|
|
m_stimPlanModelCollection = new RimStimPlanModelCollection;
|
2021-10-13 06:39:46 -05:00
|
|
|
m_stimPlanModelCollection.uiCapability()->setUiTreeHidden( true );
|
2020-05-13 23:39:55 -05:00
|
|
|
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_wellNameForExport_OBSOLETE, "WellNameForExport", QString(), "Well Name" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_wellNameForExport_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_wellGroupName_OBSOLETE, "WellGroupNameForExport", QString(), "Well Group Name" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_wellGroupName_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_referenceDepth_OBSOLETE, "ReferenceDepthForExport", QString(), "Reference Depth for BHP" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_referenceDepth_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_preferredFluidPhase_OBSOLETE, "WellTypeForExport", "Preferred Fluid Phase" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_preferredFluidPhase_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitField( &m_drainageRadiusForPI_OBSOLETE, "DrainageRadiusForPI", QString( "0.0" ), "Drainage Radius for PI" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_drainageRadiusForPI_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_gasInflowEquation_OBSOLETE, "GasInflowEq", "Gas Inflow Equation" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_gasInflowEquation_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_automaticWellShutIn_OBSOLETE, "AutoWellShutIn", "Automatic well shut-in" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_automaticWellShutIn_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_allowWellCrossFlow_OBSOLETE, "AllowWellCrossFlow", true, "Allow Well Cross-Flow" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_allowWellCrossFlow_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_wellBoreFluidPVTTable_OBSOLETE, "WellBoreFluidPVTTable", 0, "Wellbore Fluid PVT table" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_wellBoreFluidPVTTable_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_hydrostaticDensity_OBSOLETE, "HydrostaticDensity", "Hydrostatic Density" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_hydrostaticDensity_OBSOLETE.xmlCapability()->setIOWritable( false );
|
2021-11-14 07:15:12 -06:00
|
|
|
CAF_PDM_InitField( &m_fluidInPlaceRegion_OBSOLETE, "FluidInPlaceRegion", 0, "Fluid In-Place Region" );
|
2021-02-26 07:27:59 -06:00
|
|
|
m_fluidInPlaceRegion_OBSOLETE.xmlCapability()->setIOWritable( false );
|
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* RimWellPathCompletions::fishbonesCollection() const
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_fishbonesCollection );
|
2017-05-20 07:31:25 -05:00
|
|
|
|
2017-05-19 08:44:32 -05:00
|
|
|
return m_fishbonesCollection;
|
2017-05-19 07:04:01 -05:00
|
|
|
}
|
|
|
|
|
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* RimWellPathCompletions::perforationCollection() const
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CVF_ASSERT( m_perforationCollection );
|
2017-05-20 07:31:25 -05:00
|
|
|
|
2017-05-19 08:44:32 -05:00
|
|
|
return m_perforationCollection;
|
|
|
|
}
|
2017-05-19 07:04:01 -05:00
|
|
|
|
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
|
|
|
RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() const
|
2017-06-14 06:13:48 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
CVF_ASSERT( m_fractureCollection );
|
2017-06-14 06:13:48 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
return m_fractureCollection;
|
2019-02-07 01:44:12 -06:00
|
|
|
}
|
|
|
|
|
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
|
|
|
RimStimPlanModelCollection* RimWellPathCompletions::stimPlanModelCollection() const
|
2017-06-14 06:13:48 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
CVF_ASSERT( m_stimPlanModelCollection );
|
|
|
|
|
|
|
|
return m_stimPlanModelCollection;
|
2017-06-14 06:13:48 -05:00
|
|
|
}
|
|
|
|
|
2017-05-26 06:01:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-08-29 06:36:33 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
std::vector<RimWellPathValve*> RimWellPathCompletions::valves() const
|
2018-08-29 06:36:33 -05:00
|
|
|
{
|
2023-05-12 14:41:34 -05:00
|
|
|
return descendantsIncludingThisOfType<RimWellPathValve>();
|
2018-08-29 06:36:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-08-29 06:36:33 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
std::vector<RimWellPathFracture*> RimWellPathCompletions::allFractures() const
|
2018-08-29 06:36:33 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( m_fractureCollection->isChecked() )
|
2018-08-31 09:08:03 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
return m_fractureCollection->allFractures();
|
2018-08-31 09:08:03 -05:00
|
|
|
}
|
2021-02-26 07:27:59 -06:00
|
|
|
return {};
|
2018-08-29 06:36:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-08-29 06:36:33 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
std::vector<RimWellPathFracture*> RimWellPathCompletions::activeFractures() const
|
2018-08-29 06:36:33 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( m_fractureCollection->isChecked() )
|
2018-08-31 09:08:03 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
return m_fractureCollection->activeFractures();
|
2018-08-31 09:08:03 -05:00
|
|
|
}
|
2021-02-26 07:27:59 -06:00
|
|
|
return {};
|
2018-10-10 04:10:56 -05:00
|
|
|
}
|
|
|
|
|
2021-06-28 06:10:57 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::vector<RimWellPathComponentInterface*> RimWellPathCompletions::allCompletionsNoConst() const
|
|
|
|
{
|
|
|
|
std::vector<RimWellPathComponentInterface*> completions;
|
|
|
|
|
|
|
|
for ( RimWellPathFracture* fracture : m_fractureCollection->allFractures() )
|
|
|
|
{
|
|
|
|
completions.push_back( fracture );
|
|
|
|
}
|
|
|
|
for ( RimFishbones* fishbones : m_fishbonesCollection->allFishbonesSubs() )
|
|
|
|
{
|
|
|
|
completions.push_back( fishbones );
|
|
|
|
}
|
|
|
|
for ( RimPerforationInterval* perforation : m_perforationCollection->perforationsNoConst() )
|
|
|
|
{
|
|
|
|
completions.push_back( perforation );
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<RimWellPathValve*> allValves = valves();
|
|
|
|
for ( RimWellPathValve* valve : allValves )
|
|
|
|
{
|
|
|
|
completions.push_back( valve );
|
|
|
|
}
|
|
|
|
|
|
|
|
return completions;
|
|
|
|
}
|
|
|
|
|
2017-06-16 08:36:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2018-10-09 04:06:10 -05:00
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2018-10-09 06:42:03 -05:00
|
|
|
std::vector<const RimWellPathComponentInterface*> RimWellPathCompletions::allCompletions() const
|
2018-10-09 04:06:10 -05:00
|
|
|
{
|
2018-10-09 06:42:03 -05:00
|
|
|
std::vector<const RimWellPathComponentInterface*> completions;
|
2018-10-09 04:06:10 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
for ( const RimWellPathFracture* fracture : m_fractureCollection->allFractures() )
|
2018-10-09 04:06:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
completions.push_back( fracture );
|
2018-10-09 04:06:10 -05:00
|
|
|
}
|
2021-02-26 07:27:59 -06:00
|
|
|
for ( const RimFishbones* fishbones : m_fishbonesCollection->allFishbonesSubs() )
|
2018-10-09 04:06:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
completions.push_back( fishbones );
|
2018-10-09 04:06:10 -05:00
|
|
|
}
|
2021-02-26 07:27:59 -06:00
|
|
|
for ( const RimPerforationInterval* perforation : m_perforationCollection->perforations() )
|
2018-10-09 04:06:10 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
completions.push_back( perforation );
|
2018-10-09 04:06:10 -05:00
|
|
|
}
|
|
|
|
|
2018-10-10 04:10:56 -05:00
|
|
|
std::vector<RimWellPathValve*> allValves = valves();
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( const RimWellPathValve* valve : allValves )
|
2018-10-10 04:10:56 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
completions.push_back( valve );
|
2018-10-10 04:10:56 -05:00
|
|
|
}
|
|
|
|
|
2018-10-09 04:06:10 -05:00
|
|
|
return completions;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-16 08:36:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPathCompletions::hasCompletions() const
|
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( !m_fractureCollection->allFractures().empty() || !m_stimPlanModelCollection->allStimPlanModels().empty() )
|
2017-08-21 08:24:20 -05:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-04-13 00:22:56 -05:00
|
|
|
return !m_fishbonesCollection->allFishbonesSubs().empty() || !m_perforationCollection->perforations().empty();
|
2019-01-29 03:05:57 -06:00
|
|
|
}
|
|
|
|
|
2017-06-20 05:36:12 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-20 05:36:12 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPathCompletions::setUnitSystemSpecificDefaults()
|
|
|
|
{
|
|
|
|
m_fishbonesCollection->setUnitSystemSpecificDefaults();
|
2018-12-19 06:57:37 -06:00
|
|
|
}
|
|
|
|
|
2019-01-29 03:05:57 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPathCompletions::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
uiOrdering.skipRemainingFields( true );
|
2019-01-29 03:05:57 -06:00
|
|
|
}
|
|
|
|
|
2017-06-16 08:36:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-06-16 08:36:59 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimWellPathCompletions::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName )
|
|
|
|
{
|
|
|
|
uiTreeOrdering.skipRemainingChildren( true );
|
2017-06-16 08:36:59 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( !m_perforationCollection->perforations().empty() )
|
2017-06-16 08:36:59 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( &m_perforationCollection );
|
2017-06-16 08:36:59 -05:00
|
|
|
}
|
|
|
|
|
2021-04-13 00:22:56 -05:00
|
|
|
if ( !m_fishbonesCollection->allFishbonesSubs().empty() )
|
2017-06-16 08:36:59 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( &m_fishbonesCollection );
|
2017-06-16 08:36:59 -05:00
|
|
|
}
|
2017-06-20 06:38:27 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( !m_fractureCollection->allFractures().empty() )
|
2017-06-20 06:38:27 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiTreeOrdering.add( &m_fractureCollection );
|
2017-06-20 06:38:27 -05:00
|
|
|
}
|
2020-05-13 23:39:55 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( !m_stimPlanModelCollection->allStimPlanModels().empty() )
|
2020-05-13 23:39:55 -05:00
|
|
|
{
|
2020-11-04 06:46:17 -06:00
|
|
|
uiTreeOrdering.add( &m_stimPlanModelCollection );
|
2020-05-13 23:39:55 -05:00
|
|
|
}
|
2017-06-16 08:36:59 -05:00
|
|
|
}
|
2018-08-31 09:08:03 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-08-31 09:08:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
void RimWellPathCompletions::initAfterRead()
|
2018-08-31 09:08:03 -05:00
|
|
|
{
|
2021-02-26 07:27:59 -06:00
|
|
|
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2020.10.1.2" ) )
|
2018-08-31 09:08:03 -05:00
|
|
|
{
|
2023-05-12 14:41:34 -05:00
|
|
|
std::vector<RimWellPath*> wellPathHierarchy = allAncestorsOrThisOfType<RimWellPath>();
|
|
|
|
RimWellPath* topLevelWellPath = wellPathHierarchy.back();
|
|
|
|
auto settings = topLevelWellPath->completionSettings();
|
2018-08-31 09:08:03 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
applyToSettings( settings );
|
|
|
|
};
|
2018-12-18 03:58:07 -06:00
|
|
|
}
|
|
|
|
|
2018-08-31 09:08:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-08-31 09:08:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2021-02-26 07:27:59 -06:00
|
|
|
void RimWellPathCompletions::applyToSettings( gsl::not_null<RimWellPathCompletionSettings*> settings )
|
|
|
|
{
|
|
|
|
settings->m_wellNameForExport = m_wellNameForExport_OBSOLETE;
|
|
|
|
settings->m_referenceDepth = m_referenceDepth_OBSOLETE;
|
|
|
|
settings->m_preferredFluidPhase = m_preferredFluidPhase_OBSOLETE;
|
|
|
|
settings->m_drainageRadiusForPI = m_drainageRadiusForPI_OBSOLETE;
|
|
|
|
settings->m_gasInflowEquation = m_gasInflowEquation_OBSOLETE;
|
|
|
|
settings->m_automaticWellShutIn = m_automaticWellShutIn_OBSOLETE;
|
|
|
|
settings->m_allowWellCrossFlow = m_allowWellCrossFlow_OBSOLETE;
|
|
|
|
settings->m_wellBoreFluidPVTTable = m_wellBoreFluidPVTTable_OBSOLETE;
|
|
|
|
settings->m_hydrostaticDensity = m_hydrostaticDensity_OBSOLETE;
|
|
|
|
settings->m_fluidInPlaceRegion = m_fluidInPlaceRegion_OBSOLETE;
|
2018-08-31 09:08:03 -05:00
|
|
|
}
|