mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4931 Add available diameters to casing design and split casing and liner.
This commit is contained in:
@@ -151,6 +151,35 @@ double RimWellPathAttribute::endMD() const
|
|||||||
return m_endMD();
|
return m_endMD();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::set<double> RimWellPathAttribute::supportedDiameters( RiaDefines::WellPathComponentType type )
|
||||||
|
{
|
||||||
|
CAF_ASSERT( type == RiaDefines::CASING || type == RiaDefines::LINER );
|
||||||
|
std::set<double> values;
|
||||||
|
if ( type == RiaDefines::CASING )
|
||||||
|
{
|
||||||
|
values = { MAX_DIAMETER_IN_INCHES,
|
||||||
|
26.0,
|
||||||
|
22.0,
|
||||||
|
20.0,
|
||||||
|
18.0 + 5.0 / 8.0,
|
||||||
|
16.0,
|
||||||
|
14.0,
|
||||||
|
13.0 + 3.0 / 8.0,
|
||||||
|
10.0 + 3.0 / 4.0,
|
||||||
|
9.0 + 7.0 / 8.0,
|
||||||
|
9.0 + 5.0 / 8.0,
|
||||||
|
MIN_DIAMETER_IN_INCHES };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
values = { 9.0 + 7.0 / 8.0, 9.0 + 5.0 / 8.0, 7.0, 5.5, 5.0, 4.5, 3.5 };
|
||||||
|
}
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -180,21 +209,11 @@ QList<caf::PdmOptionItemInfo> RimWellPathAttribute::calculateValueOptions( const
|
|||||||
{
|
{
|
||||||
if ( isDiameterSupported() )
|
if ( isDiameterSupported() )
|
||||||
{
|
{
|
||||||
std::vector<double> values = {MAX_DIAMETER_IN_INCHES,
|
std::set<double> values = supportedDiameters( m_type() );
|
||||||
22.0,
|
|
||||||
20.0,
|
|
||||||
18.0 + 5.0 / 8.0,
|
|
||||||
16.0,
|
|
||||||
14.0,
|
|
||||||
13.0 + 3.0 / 8.0,
|
|
||||||
10.0 + 3.0 / 4.0,
|
|
||||||
9.0 + 7.0 / 8.0,
|
|
||||||
9.0 + 5.0 / 8.0,
|
|
||||||
MIN_DIAMETER_IN_INCHES};
|
|
||||||
|
|
||||||
for ( double value : values )
|
for ( auto it = values.rbegin(); it != values.rend(); ++it )
|
||||||
{
|
{
|
||||||
options.push_back( caf::PdmOptionItemInfo( generateInchesLabel( value ), value ) );
|
options.push_back( caf::PdmOptionItemInfo( generateInchesLabel( *it ), *it ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -236,6 +255,18 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
|||||||
RimWellPath* wellPath = nullptr;
|
RimWellPath* wellPath = nullptr;
|
||||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||||
|
|
||||||
|
if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) )
|
||||||
|
{
|
||||||
|
m_diameterInInches = *( supportedDiameters( m_type() ).begin() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( m_type() == RiaDefines::LINER )
|
||||||
|
{
|
||||||
|
if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) )
|
||||||
|
{
|
||||||
|
m_diameterInInches = *( supportedDiameters( m_type() ).rbegin() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ( m_type() == RiaDefines::PACKER )
|
else if ( m_type() == RiaDefines::PACKER )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ public:
|
|||||||
double endMD() const override;
|
double endMD() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static std::set<double> supportedDiameters( RiaDefines::WellPathComponentType type );
|
||||||
|
|
||||||
bool isDiameterSupported() const;
|
bool isDiameterSupported() const;
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly ) override;
|
bool* useOptionsOnly ) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user