mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 13:47:12 -05:00
#13273 Well Event: Support completion number on perforation events for COMPLUMP
Add a completion_number parameter to the add_perf_event Python API (AddPerfEvent scriptable method) and a matching field on RimWellEventPerf. When a timeline perforation event is materialised into a RimPerforationInterval, a non-zero completion number is copied across, so it flows through the existing completion-data path onto RigCompletionData. The schedule generator now emits COMPLUMP alongside COMPDAT: COMPDAT generation is folded into generateCompletionsForWell, which computes the completion data once and builds both keywords from it via the existing RimKeywordFactory::complumpKeyword (added in #13273). COMPLUMP only produces records for perforations that have a completion number and is merged across wells like COMPDAT.
This commit is contained in:
@@ -47,6 +47,7 @@ RimWellEventPerf::RimWellEventPerf()
|
||||
CAF_PDM_InitScriptableField( &m_diameter, "Diameter", 0.216, "Diameter" );
|
||||
CAF_PDM_InitScriptableField( &m_skinFactor, "SkinFactor", 0.0, "Skin Factor" );
|
||||
CAF_PDM_InitScriptableField( &m_state, "State", caf::AppEnum<State>( State::OPEN ), "State" );
|
||||
CAF_PDM_InitScriptableField( &m_completionNumber, "CompletionNumber", 0, "Completion Number" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
@@ -98,6 +99,14 @@ RimWellEventPerf::State RimWellEventPerf::state() const
|
||||
return m_state();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellEventPerf::completionNumber() const
|
||||
{
|
||||
return m_completionNumber();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -138,6 +147,14 @@ void RimWellEventPerf::setState( State state )
|
||||
m_state = state;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellEventPerf::setCompletionNumber( int completionNumber )
|
||||
{
|
||||
m_completionNumber = completionNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -181,6 +198,7 @@ void RimWellEventPerf::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
uiOrdering.add( &m_diameter );
|
||||
uiOrdering.add( &m_skinFactor );
|
||||
uiOrdering.add( &m_state );
|
||||
uiOrdering.add( &m_completionNumber );
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
double diameter() const;
|
||||
double skinFactor() const;
|
||||
State state() const;
|
||||
int completionNumber() const;
|
||||
|
||||
// Setters
|
||||
void setStartMD( double md );
|
||||
@@ -55,6 +56,7 @@ public:
|
||||
void setDiameter( double diameter );
|
||||
void setSkinFactor( double skinFactor );
|
||||
void setState( State state );
|
||||
void setCompletionNumber( int completionNumber );
|
||||
|
||||
// Override from RimWellEvent
|
||||
EventType eventType() const override;
|
||||
@@ -70,6 +72,7 @@ private:
|
||||
caf::PdmField<double> m_diameter;
|
||||
caf::PdmField<double> m_skinFactor;
|
||||
caf::PdmField<caf::AppEnum<State>> m_state;
|
||||
caf::PdmField<int> m_completionNumber;
|
||||
};
|
||||
|
||||
namespace caf
|
||||
|
||||
@@ -489,6 +489,12 @@ bool RimWellEventTimeline::applyPerfEvent( const RimWellEventPerf& event, RimWel
|
||||
perfInterval->setSkinFactor( event.skinFactor() );
|
||||
perfInterval->setUnitSystemSpecificDefaults();
|
||||
|
||||
// A non-zero completion number drives COMPLUMP generation downstream.
|
||||
if ( event.completionNumber() > 0 )
|
||||
{
|
||||
perfInterval->setCompletionNumber( event.completionNumber() );
|
||||
}
|
||||
|
||||
// Set the custom start date based on the event date
|
||||
perfInterval->enableCustomStartDate( true );
|
||||
perfInterval->setCustomStartDate( event.eventDate().date() );
|
||||
|
||||
Reference in New Issue
Block a user