Opm::WellPerformanceEventTracker Class Reference

#include <WellPerformanceEventTracker.hpp>

Public Member Functions

void beginTimeStep (const Schedule &schedule, int reportStep, WellStatusSnapshot snapshot)
 
void commitTimeStep (const Schedule &schedule, int reportStep)
 
void applyDeckChanges (WellStatusSnapshot snapshot)
 
void recordWellStatusChangeForRetry (const std::string &wellName, WellStatus status)
 
void accumulate (WellStatusSnapshot current)
 
const data::WellPerformanceEvents & events (const std::string &wellName) const
 
bool operator== (const WellPerformanceEventTracker &rhs) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static WellPerformanceEventTracker serializationTestObject ()
 

Detailed Description

Accumulates the well and connection status changes that back the WPWE0 to WPWE7 summary vectors.

The tracker forms the event values by comparing snapshots of dynamic status as the time step progresses. Connection changes are reported regardless of source: an economic-limit workover, a well test, or a deck keyword such as WELOPEN or COMPDAT. The exception is connections closed only by the reach of a '+CON' workover below the offending connection; WPWE2 excludes those closures. Well-status changes are reported only when made by the simulator: a well shut or stopped by the deck is not a WPWE4 or WPWE7 event. Injector/producer conversions come from the schedule and are tracked whether introduced directly by a keyword or through ACTIONX.

The values cover a single time step – they are discarded when the next one starts – so a summary written after a step reports exactly the events of that step, which is what the WPWE indicators denote. A well test that reopens a well and a limit check that closes it again in the same step are both reported, rather than netted against each other.

WPWE0, the drilled indicator, is not supported yet and stays zero. It reports a well taken off the drilling queue defined by QDRILL and WDRILTIM. Because QDRILL is unsupported, no run reaches this tracker with a drilling queue. Introducing a well through WELSPECS is not a drilling event.

Member Function Documentation

◆ accumulate()

void Opm::WellPerformanceEventTracker::accumulate ( WellStatusSnapshot  current)

Record the changes between the reference status and current, and adopt current as the new reference.

Parameters
[in]currentDynamic status at the end of a successful time step.

◆ applyDeckChanges()

void Opm::WellPerformanceEventTracker::applyDeckChanges ( WellStatusSnapshot  snapshot)

Record the connection changes the deck has just made, and adopt snapshot as the new reference status.

Well status changes are absorbed rather than reported: WPWE4 and WPWE7 denote the simulator's own decisions, not the deck's.

◆ beginTimeStep()

void Opm::WellPerformanceEventTracker::beginTimeStep ( const Schedule &  schedule,
int  reportStep,
WellStatusSnapshot  snapshot 
)

Start a new time step.

Discards the counters of the previous step and adopts snapshot as the reference status, reporting the connection changes the schedule has made since the last step.

Injector/producer switches (WPWE5, WPWE6) are checked on every step, including ACTIONX changes within a report step.

Parameters
[in]scheduleSimulation schedule.
[in]reportStepZero-based index of the current report step.
[in]snapshotDynamic status at the start of the time step.

◆ commitTimeStep()

void Opm::WellPerformanceEventTracker::commitTimeStep ( const Schedule &  schedule,
int  reportStep 
)

Accept the current snapshot and injector/producer types after a successful time step. Call before applying any ACTIONX changes for the next time step. Failed attempts must not advance this baseline: beginTimeStep() will then report the same conversion again when the step is retried.

◆ events()

const data::WellPerformanceEvents & Opm::WellPerformanceEventTracker::events ( const std::string &  wellName) const

Event values accumulated for wellName in the current time step.

Returns a zeroed record for a well that has seen no events.

◆ operator==()

bool Opm::WellPerformanceEventTracker::operator== ( const WellPerformanceEventTracker &  rhs) const
inline

◆ recordWellStatusChangeForRetry()

void Opm::WellPerformanceEventTracker::recordWellStatusChangeForRetry ( const std::string &  wellName,
WellStatus  status 
)

Preserve a simulator-driven status change across time-step retries.

A convergence failure may close a well and commit that decision before the time step is retried. The next beginTimeStep() sees the resulting status in its starting snapshot, where ordinary status differences are treated as deck changes. Keep the event separately until the retried time step is accepted so WPWE4 or WPWE7 is still reported.

◆ serializationTestObject()

static WellPerformanceEventTracker Opm::WellPerformanceEventTracker::serializationTestObject ( )
static

◆ serializeOp()

template<class Serializer >
void Opm::WellPerformanceEventTracker::serializeOp ( Serializer &  serializer)
inline

The documentation for this class was generated from the following file: