mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
#14958 Sim Events: Move PRESSURE_COMPONENTS to WELSPECS
Move Pressure Drop and Length and Depth from the segment collection to the well path completion settings. PRESSURE_COMPONENTS is now a dated WELSPECS attribute used for the WELSEGS header at export, and is rejected on SEGMENT events.
This commit is contained in:
1 parent
2f86d4c210
commit
c56e921160
21 files changed
+326
-186
No files matched your search
@@ -50,29 +50,6 @@ void RimSegmentCollection::ReferenceMDEnum::setUp()
|
||||
setDefault( RimSegmentCollection::ReferenceMDType::AUTO_REFERENCE_MD );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
void RimSegmentCollection::PressureDropEnum::setUp()
|
||||
{
|
||||
addItem( RimSegmentCollection::PressureDropType::HYDROSTATIC, "H--", "Hydrostatic" );
|
||||
addItem( RimSegmentCollection::PressureDropType::HYDROSTATIC_FRICTION, "HF-", "Hydrostatic + Friction" );
|
||||
addItem( RimSegmentCollection::PressureDropType::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration" );
|
||||
setDefault( RimSegmentCollection::PressureDropType::HYDROSTATIC_FRICTION );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
void RimSegmentCollection::LengthAndDepthEnum::setUp()
|
||||
{
|
||||
addItem( RimSegmentCollection::LengthAndDepthType::INC, "INC", "Incremental" );
|
||||
addItem( RimSegmentCollection::LengthAndDepthType::ABS, "ABS", "Absolute" );
|
||||
setDefault( RimSegmentCollection::LengthAndDepthType::ABS );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -104,8 +81,6 @@ RimSegmentCollection::RimSegmentCollection()
|
||||
CAF_PDM_InitScriptableField( &m_roughnessFactor, "RoughnessFactor", defaultRoughnessFactor( unitSystem ), "Roughness Factor" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_segmentIntervals, "Intervals", "Segment Intervals" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_pressureDrop, "PressureDrop", "Pressure Drop" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_lengthAndDepth, "LengthAndDepth", "Length and Depth" );
|
||||
CAF_PDM_InitScriptableField( &m_enforceMaxSegmentLength, "EnforceMaxSegmentLength", false, "Enforce Max Segment Length" );
|
||||
CAF_PDM_InitScriptableField( &m_maxSegmentLength, "MaxSegmentLength", 200.0, "Max Segment Length" );
|
||||
m_maxSegmentLength.uiCapability()->setUiHidden( true );
|
||||
@@ -200,22 +175,6 @@ double RimSegmentCollection::roughnessFactor() const
|
||||
return m_roughnessFactor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSegmentCollection::PressureDropEnum RimSegmentCollection::pressureDrop() const
|
||||
{
|
||||
return m_pressureDrop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSegmentCollection::LengthAndDepthEnum RimSegmentCollection::lengthAndDepth() const
|
||||
{
|
||||
return m_lengthAndDepth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -304,22 +263,6 @@ void RimSegmentCollection::setRoughnessFactor( double roughnessFactor )
|
||||
m_roughnessFactor = roughnessFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSegmentCollection::setPressureDrop( PressureDropType pressureDropType )
|
||||
{
|
||||
m_pressureDrop = pressureDropType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSegmentCollection::setLengthAndDepth( LengthAndDepthType lengthAndDepthType )
|
||||
{
|
||||
m_lengthAndDepth = lengthAndDepthType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -501,8 +444,6 @@ void RimSegmentCollection::updateFromTopLevelWell( const RimSegmentCollection* t
|
||||
{
|
||||
m_refMDType = topLevelWellParameters->m_refMDType();
|
||||
m_refMD = topLevelWellParameters->m_refMD();
|
||||
m_pressureDrop = topLevelWellParameters->m_pressureDrop();
|
||||
m_lengthAndDepth = topLevelWellParameters->m_lengthAndDepth();
|
||||
m_enforceMaxSegmentLength = topLevelWellParameters->m_enforceMaxSegmentLength();
|
||||
m_maxSegmentLength = topLevelWellParameters->m_maxSegmentLength();
|
||||
m_compsegsSegmentNumber = topLevelWellParameters->m_compsegsSegmentNumber();
|
||||
@@ -522,22 +463,16 @@ void RimSegmentCollection::importLegacyData( const RimMswCompletionParameters* l
|
||||
legacyParameters->linerDiameter() != defaultLinerDiameter( RiaDefines::EclipseUnitSystem::UNITS_METRIC ) ||
|
||||
legacyParameters->roughnessFactor() != defaultRoughnessFactor( RiaDefines::EclipseUnitSystem::UNITS_METRIC ) ||
|
||||
legacyParameters->diameterRoughnessMode() != RimMswCompletionParameters::DiameterRoughnessMode::UNIFORM ||
|
||||
legacyParameters->pressureDrop() != RimMswCompletionParameters::PressureDropType::HYDROSTATIC_FRICTION ||
|
||||
legacyParameters->lengthAndDepth() != RimMswCompletionParameters::LengthAndDepthType::ABS ||
|
||||
legacyParameters->enforceMaxSegmentLength() || legacyParameters->storedMaxSegmentLength() != 200.0 ||
|
||||
!legacyParameters->diameterRoughnessIntervals()->intervals().empty() ||
|
||||
!legacyParameters->customSegmentIntervals()->intervals().empty();
|
||||
if ( !hasLegacyData ) return;
|
||||
|
||||
m_refMDType = static_cast<ReferenceMDType>( static_cast<int>( legacyParameters->referenceMDType() ) );
|
||||
m_refMD = legacyParameters->storedReferenceMD();
|
||||
m_customValuesForLateral = legacyParameters->customValuesForLateral();
|
||||
m_linerDiameter = legacyParameters->linerDiameter();
|
||||
m_roughnessFactor = legacyParameters->roughnessFactor();
|
||||
m_pressureDrop = static_cast<PressureDropType>(
|
||||
static_cast<int>( static_cast<RimMswCompletionParameters::PressureDropType>( legacyParameters->pressureDrop() ) ) );
|
||||
m_lengthAndDepth = static_cast<LengthAndDepthType>(
|
||||
static_cast<int>( static_cast<RimMswCompletionParameters::LengthAndDepthType>( legacyParameters->lengthAndDepth() ) ) );
|
||||
m_refMDType = static_cast<ReferenceMDType>( static_cast<int>( legacyParameters->referenceMDType() ) );
|
||||
m_refMD = legacyParameters->storedReferenceMD();
|
||||
m_customValuesForLateral = legacyParameters->customValuesForLateral();
|
||||
m_linerDiameter = legacyParameters->linerDiameter();
|
||||
m_roughnessFactor = legacyParameters->roughnessFactor();
|
||||
m_enforceMaxSegmentLength = legacyParameters->enforceMaxSegmentLength();
|
||||
m_maxSegmentLength = legacyParameters->storedMaxSegmentLength();
|
||||
|
||||
@@ -636,8 +571,6 @@ void RimSegmentCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd
|
||||
|
||||
if ( wellPath->isTopLevelWellPath() )
|
||||
{
|
||||
uiOrdering.add( &m_pressureDrop );
|
||||
uiOrdering.add( &m_lengthAndDepth );
|
||||
uiOrdering.add( &m_compsegsSegmentNumber );
|
||||
|
||||
auto* segmentationGroup = uiOrdering.addNewGroup( "Segmentation" );
|
||||
|
||||
@@ -47,19 +47,6 @@ public:
|
||||
MANUAL_REFERENCE_MD
|
||||
};
|
||||
|
||||
enum class PressureDropType
|
||||
{
|
||||
HYDROSTATIC,
|
||||
HYDROSTATIC_FRICTION,
|
||||
HYDROSTATIC_FRICTION_ACCELERATION
|
||||
};
|
||||
|
||||
enum class LengthAndDepthType
|
||||
{
|
||||
ABS,
|
||||
INC
|
||||
};
|
||||
|
||||
enum class CompsegsSegmentNumberType
|
||||
{
|
||||
ASSIGNED_BY_SIMULATOR,
|
||||
@@ -67,31 +54,25 @@ public:
|
||||
};
|
||||
|
||||
using ReferenceMDEnum = caf::AppEnum<ReferenceMDType>;
|
||||
using PressureDropEnum = caf::AppEnum<PressureDropType>;
|
||||
using LengthAndDepthEnum = caf::AppEnum<LengthAndDepthType>;
|
||||
using CompsegsSegmentNumberEnum = caf::AppEnum<CompsegsSegmentNumberType>;
|
||||
|
||||
RimSegmentCollection();
|
||||
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
PressureDropEnum pressureDrop() const;
|
||||
LengthAndDepthEnum lengthAndDepth() const;
|
||||
double maxSegmentLength() const;
|
||||
bool singleSegmentBeforeFirstPerforation() const;
|
||||
bool singleSegmentAfterLastPerforation() const;
|
||||
bool exportCompsegsSegmentNumber() const;
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double maxSegmentLength() const;
|
||||
bool singleSegmentBeforeFirstPerforation() const;
|
||||
bool singleSegmentAfterLastPerforation() const;
|
||||
bool exportCompsegsSegmentNumber() const;
|
||||
|
||||
void setReferenceMDType( ReferenceMDType refType );
|
||||
void setManualReferenceMD( double manualRefMD );
|
||||
void setLinerDiameter( double diameter );
|
||||
void setRoughnessFactor( double roughnessFactor );
|
||||
void setPressureDrop( PressureDropType pressureDropType );
|
||||
void setLengthAndDepth( LengthAndDepthType lengthAndDepthType );
|
||||
void setCompsegsSegmentNumber( CompsegsSegmentNumberType segmentNumberType );
|
||||
void setSingleSegmentBeforeFirstPerforation( bool enable );
|
||||
void setSingleSegmentAfterLastPerforation( bool enable );
|
||||
@@ -142,12 +123,10 @@ private:
|
||||
|
||||
caf::PdmChildArrayField<RimSegmentInterval*> m_segmentIntervals;
|
||||
|
||||
caf::PdmField<PressureDropEnum> m_pressureDrop;
|
||||
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
|
||||
caf::PdmField<bool> m_enforceMaxSegmentLength;
|
||||
caf::PdmField<double> m_maxSegmentLength;
|
||||
caf::PdmField<bool> m_singleSegmentBeforeFirstPerforation;
|
||||
caf::PdmField<bool> m_singleSegmentAfterLastPerforation;
|
||||
caf::PdmField<bool> m_enforceMaxSegmentLength;
|
||||
caf::PdmField<double> m_maxSegmentLength;
|
||||
caf::PdmField<bool> m_singleSegmentBeforeFirstPerforation;
|
||||
caf::PdmField<bool> m_singleSegmentAfterLastPerforation;
|
||||
|
||||
caf::PdmField<CompsegsSegmentNumberEnum> m_compsegsSegmentNumber;
|
||||
};
|
||||
@@ -74,6 +74,23 @@ void RimWellPathCompletionSettings::HydrostaticDensityEnum::setUp()
|
||||
setDefault( RimWellPathCompletionSettings::SEGMENTED );
|
||||
}
|
||||
|
||||
template <>
|
||||
void RimWellPathCompletionSettings::PressureDropEnum::setUp()
|
||||
{
|
||||
addItem( RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC, "H--", "Hydrostatic" );
|
||||
addItem( RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC_FRICTION, "HF-", "Hydrostatic + Friction" );
|
||||
addItem( RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC_FRICTION_ACCELERATION, "HFA", "Hydrostatic + Friction + Acceleration" );
|
||||
setDefault( RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC_FRICTION );
|
||||
}
|
||||
|
||||
template <>
|
||||
void RimWellPathCompletionSettings::LengthAndDepthEnum::setUp()
|
||||
{
|
||||
addItem( RimWellPathCompletionSettings::LengthAndDepthType::INC, "INC", "Incremental" );
|
||||
addItem( RimWellPathCompletionSettings::LengthAndDepthType::ABS, "ABS", "Absolute" );
|
||||
setDefault( RimWellPathCompletionSettings::LengthAndDepthType::ABS );
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
namespace
|
||||
@@ -120,6 +137,9 @@ RimWellPathCompletionSettings::RimWellPathCompletionSettings()
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_hydrostaticDensity, "HydrostaticDensity", "Hydrostatic Density" );
|
||||
CAF_PDM_InitScriptableField( &m_fluidInPlaceRegion, "FluidInPlaceRegion", 0, "Fluid In-Place Region" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_pressureDrop, "PressureDrop", "Pressure Drop" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_lengthAndDepth, "LengthAndDepth", "Length and Depth" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_mswParameters, "MswParameters", "Multi Segment Well Parameters" );
|
||||
m_mswParameters = new RimMswCompletionParameters;
|
||||
m_mswParameters.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
@@ -190,6 +210,8 @@ RimWellPathCompletionSettings& RimWellPathCompletionSettings::operator=( const R
|
||||
m_wellBoreFluidPVTTable = rhs.m_wellBoreFluidPVTTable;
|
||||
m_hydrostaticDensity = rhs.m_hydrostaticDensity;
|
||||
m_fluidInPlaceRegion = rhs.m_fluidInPlaceRegion;
|
||||
m_pressureDrop = rhs.m_pressureDrop;
|
||||
m_lengthAndDepth = rhs.m_lengthAndDepth;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -427,6 +449,38 @@ int RimWellPathCompletionSettings::fluidInPlaceRegion() const
|
||||
return m_fluidInPlaceRegion();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCompletionSettings::PressureDropEnum RimWellPathCompletionSettings::pressureDrop() const
|
||||
{
|
||||
return m_pressureDrop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathCompletionSettings::LengthAndDepthEnum RimWellPathCompletionSettings::lengthAndDepth() const
|
||||
{
|
||||
return m_lengthAndDepth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletionSettings::setPressureDrop( PressureDropType pressureDropType )
|
||||
{
|
||||
m_pressureDrop = pressureDropType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletionSettings::setLengthAndDepth( LengthAndDepthType lengthAndDepthType )
|
||||
{
|
||||
m_lengthAndDepth = lengthAndDepthType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -443,6 +497,26 @@ RimMswCompletionParameters* RimWellPathCompletionSettings::mswCompletionParamete
|
||||
return m_mswParameters();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Copy WELSEGS header settings from legacy MSW parameters, if they differ from the defaults
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletionSettings::importLegacyMswData( const RimMswCompletionParameters* legacyParameters )
|
||||
{
|
||||
if ( !legacyParameters ) return;
|
||||
|
||||
const auto legacyPressureDrop = static_cast<RimMswCompletionParameters::PressureDropType>( legacyParameters->pressureDrop() );
|
||||
if ( legacyPressureDrop != RimMswCompletionParameters::PressureDropType::HYDROSTATIC_FRICTION )
|
||||
{
|
||||
m_pressureDrop = static_cast<PressureDropType>( static_cast<int>( legacyPressureDrop ) );
|
||||
}
|
||||
|
||||
const auto legacyLengthAndDepth = static_cast<RimMswCompletionParameters::LengthAndDepthType>( legacyParameters->lengthAndDepth() );
|
||||
if ( legacyLengthAndDepth != RimMswCompletionParameters::LengthAndDepthType::ABS )
|
||||
{
|
||||
m_lengthAndDepth = static_cast<LengthAndDepthType>( static_cast<int>( legacyLengthAndDepth ) );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -464,6 +538,10 @@ void RimWellPathCompletionSettings::defineUiOrdering( QString uiConfigName, caf:
|
||||
compExportGroup->add( &m_wellBoreFluidPVTTable );
|
||||
compExportGroup->add( &m_hydrostaticDensity );
|
||||
compExportGroup->add( &m_fluidInPlaceRegion );
|
||||
|
||||
caf::PdmUiGroup* mswGroup = uiOrdering.addNewGroup( "Multi Segment Well (WELSEGS)" );
|
||||
mswGroup->add( &m_pressureDrop );
|
||||
mswGroup->add( &m_lengthAndDepth );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
|
||||
@@ -65,6 +65,21 @@ public:
|
||||
};
|
||||
using HydrostaticDensityEnum = caf::AppEnum<HydrostaticDensity>;
|
||||
|
||||
enum class PressureDropType
|
||||
{
|
||||
HYDROSTATIC,
|
||||
HYDROSTATIC_FRICTION,
|
||||
HYDROSTATIC_FRICTION_ACCELERATION
|
||||
};
|
||||
using PressureDropEnum = caf::AppEnum<PressureDropType>;
|
||||
|
||||
enum class LengthAndDepthType
|
||||
{
|
||||
ABS,
|
||||
INC
|
||||
};
|
||||
using LengthAndDepthEnum = caf::AppEnum<LengthAndDepthType>;
|
||||
|
||||
public:
|
||||
RimWellPathCompletionSettings();
|
||||
RimWellPathCompletionSettings( const RimWellPathCompletionSettings& rhs );
|
||||
@@ -75,10 +90,15 @@ public:
|
||||
WellType wellType() const;
|
||||
bool allowWellCrossFlow() const;
|
||||
|
||||
PressureDropEnum pressureDrop() const;
|
||||
LengthAndDepthEnum lengthAndDepth() const;
|
||||
|
||||
void setGroupName( const QString& name );
|
||||
void setReferenceDepth( std::optional<double> depth );
|
||||
void setWellType( WellType wellType );
|
||||
void setAllowWellCrossFlow( bool allowCrossFlow );
|
||||
void setPressureDrop( PressureDropType pressureDropType );
|
||||
void setLengthAndDepth( LengthAndDepthType lengthAndDepthType );
|
||||
|
||||
void setWellNameForExport( const QString& name );
|
||||
void updateWellPathNameHasChanged( const QString& newWellPathName, const QString& previousWellPathName );
|
||||
@@ -103,6 +123,7 @@ public:
|
||||
static QRegularExpression wellNameForExportRegExp();
|
||||
|
||||
RimMswCompletionParameters* mswCompletionParameters() const;
|
||||
void importLegacyMswData( const RimMswCompletionParameters* legacyParameters );
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
@@ -127,6 +148,9 @@ private:
|
||||
caf::PdmField<HydrostaticDensityEnum> m_hydrostaticDensity;
|
||||
caf::PdmField<int> m_fluidInPlaceRegion;
|
||||
|
||||
caf::PdmField<PressureDropEnum> m_pressureDrop;
|
||||
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
|
||||
|
||||
caf::PdmChildField<RimMswCompletionParameters*> m_mswParameters;
|
||||
|
||||
// OBSOLETE fields - kept for backward compatibility when reading old files
|
||||
|
||||
@@ -295,7 +295,8 @@ RimWellEventWellSpec* RimWellEventTimeline::addWellSpecEvent( RimWellPath* wellP
|
||||
if ( wellPath && wellPath->completionSettings() )
|
||||
{
|
||||
auto* settings = wellPath->completionSettings();
|
||||
event->setBaselineData( { settings->groupName(), settings->allowWellCrossFlow(), settings->referenceDepth(), settings->wellType() } );
|
||||
event->setBaselineData(
|
||||
{ settings->groupName(), settings->allowWellCrossFlow(), settings->referenceDepth(), settings->wellType(), settings->pressureDrop() } );
|
||||
}
|
||||
|
||||
m_events.push_back( event );
|
||||
@@ -531,6 +532,7 @@ bool RimWellEventTimeline::applyWellSpecEvent( const RimWellEventWellSpec& event
|
||||
settings->setAllowWellCrossFlow( data.allowCrossFlow );
|
||||
settings->setReferenceDepth( data.referenceDepth );
|
||||
settings->setWellType( data.wellType );
|
||||
settings->setPressureDrop( data.pressureDrop );
|
||||
settings->updateConnectedEditors();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ RimWellEventWellSpec::RimWellEventWellSpec()
|
||||
"WellType",
|
||||
caf::AppEnum<RimWellPathCompletionSettings::WellType>( RimWellPathCompletionSettings::OIL ),
|
||||
"Preferred Fluid Phase" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_pressureDrop, "PressureDrop", "Pressure Drop" );
|
||||
|
||||
CAF_PDM_InitField( &m_baselineGroupName, "BaselineGroupName", QString(), "Baseline Group Name" );
|
||||
CAF_PDM_InitField( &m_baselineAllowCrossFlow, "BaselineAllowCrossFlow", true, "Baseline Allow Cross-Flow" );
|
||||
@@ -46,6 +47,7 @@ RimWellEventWellSpec::RimWellEventWellSpec()
|
||||
"BaselineWellType",
|
||||
caf::AppEnum<RimWellPathCompletionSettings::WellType>( RimWellPathCompletionSettings::OIL ),
|
||||
"Baseline Preferred Fluid Phase" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_baselinePressureDrop, "BaselinePressureDrop", "Baseline Pressure Drop" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
@@ -62,7 +64,7 @@ RimWellEventWellSpec::~RimWellEventWellSpec()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellSpecData RimWellEventWellSpec::wellSpecData() const
|
||||
{
|
||||
return { m_groupName(), m_allowCrossFlow(), m_referenceDepth(), m_wellType() };
|
||||
return { m_groupName(), m_allowCrossFlow(), m_referenceDepth(), m_wellType(), m_pressureDrop() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -70,7 +72,7 @@ RimWellSpecData RimWellEventWellSpec::wellSpecData() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellSpecData RimWellEventWellSpec::baselineData() const
|
||||
{
|
||||
return { m_baselineGroupName(), m_baselineAllowCrossFlow(), m_baselineReferenceDepth(), m_baselineWellType() };
|
||||
return { m_baselineGroupName(), m_baselineAllowCrossFlow(), m_baselineReferenceDepth(), m_baselineWellType(), m_baselinePressureDrop() };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -82,6 +84,7 @@ void RimWellEventWellSpec::setWellSpecData( const RimWellSpecData& data )
|
||||
m_allowCrossFlow = data.allowCrossFlow;
|
||||
m_referenceDepth = data.referenceDepth;
|
||||
m_wellType = data.wellType;
|
||||
m_pressureDrop = data.pressureDrop;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -93,6 +96,7 @@ void RimWellEventWellSpec::setBaselineData( const RimWellSpecData& data )
|
||||
m_baselineAllowCrossFlow = data.allowCrossFlow;
|
||||
m_baselineReferenceDepth = data.referenceDepth;
|
||||
m_baselineWellType = data.wellType;
|
||||
m_baselinePressureDrop = data.pressureDrop;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -121,6 +125,7 @@ void RimWellEventWellSpec::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd
|
||||
uiOrdering.add( &m_allowCrossFlow );
|
||||
uiOrdering.add( &m_referenceDepth );
|
||||
uiOrdering.add( &m_wellType );
|
||||
uiOrdering.add( &m_pressureDrop );
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
|
||||
struct RimWellSpecData
|
||||
{
|
||||
QString groupName;
|
||||
bool allowCrossFlow = true;
|
||||
std::optional<double> referenceDepth;
|
||||
RimWellPathCompletionSettings::WellType wellType = RimWellPathCompletionSettings::OIL;
|
||||
QString groupName;
|
||||
bool allowCrossFlow = true;
|
||||
std::optional<double> referenceDepth;
|
||||
RimWellPathCompletionSettings::WellType wellType = RimWellPathCompletionSettings::OIL;
|
||||
RimWellPathCompletionSettings::PressureDropType pressureDrop = RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC_FRICTION;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@@ -64,8 +65,10 @@ private:
|
||||
caf::PdmField<bool> m_allowCrossFlow;
|
||||
caf::PdmField<std::optional<double>> m_referenceDepth;
|
||||
caf::PdmField<caf::AppEnum<RimWellPathCompletionSettings::WellType>> m_wellType;
|
||||
caf::PdmField<RimWellPathCompletionSettings::PressureDropEnum> m_pressureDrop;
|
||||
caf::PdmField<QString> m_baselineGroupName;
|
||||
caf::PdmField<bool> m_baselineAllowCrossFlow;
|
||||
caf::PdmField<std::optional<double>> m_baselineReferenceDepth;
|
||||
caf::PdmField<caf::AppEnum<RimWellPathCompletionSettings::WellType>> m_baselineWellType;
|
||||
caf::PdmField<RimWellPathCompletionSettings::PressureDropEnum> m_baselinePressureDrop;
|
||||
};
|
||||
@@ -583,6 +583,7 @@ void RimWellPath::initAfterRead()
|
||||
}
|
||||
|
||||
m_completions->segmentCollection()->importLegacyData( m_completionSettings->mswCompletionParameters() );
|
||||
m_completionSettings->importLegacyMswData( m_completionSettings->mswCompletionParameters() );
|
||||
|
||||
// Migrate an old direct file path reference into the project-level well formations collection.
|
||||
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2026.09.2" ) && !m_wellFormationsFile() &&
|
||||
|
||||
Reference in new issue
Block a user