Files
ResInsight/ApplicationLibCode/ProjectDataModel/WellEvents/RimWellEventPerf.h
T
Kristian Bendiksen 9515e6c277 #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.
2026-05-29 15:43:30 +02:00

83 lines
2.5 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2025- Equinor ASA
//
// 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.
//
// 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.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimWellEvent.h"
#include "cafAppEnum.h"
#include "cafPdmField.h"
//==================================================================================================
///
/// Perforation event - defines when a perforation interval opens or closes
///
//==================================================================================================
class RimWellEventPerf : public RimWellEvent
{
CAF_PDM_HEADER_INIT;
public:
enum class State
{
OPEN,
SHUT
};
RimWellEventPerf();
~RimWellEventPerf() override;
// Getters
double startMD() const;
double endMD() const;
double diameter() const;
double skinFactor() const;
State state() const;
int completionNumber() const;
// Setters
void setStartMD( double md );
void setEndMD( double md );
void setDiameter( double diameter );
void setSkinFactor( double skinFactor );
void setState( State state );
void setCompletionNumber( int completionNumber );
// Override from RimWellEvent
EventType eventType() const override;
QString generateScheduleKeyword( const QString& wellName ) const override;
protected:
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
private:
caf::PdmField<double> m_startMD;
caf::PdmField<double> m_endMD;
caf::PdmField<double> m_diameter;
caf::PdmField<double> m_skinFactor;
caf::PdmField<caf::AppEnum<State>> m_state;
caf::PdmField<int> m_completionNumber;
};
namespace caf
{
template <>
void caf::AppEnum<RimWellEventPerf::State>::setUp();
} // namespace caf