opm-simulators
Loading...
Searching...
No Matches
Opm::WellState< Scalar, IndexTraits > Class Template Reference

The state of a set of wells, tailored for use by the fully implicit blackoil simulator. More...

#include <WellState.hpp>

Classes

struct  RsConstInfo

Public Member Functions

 WellState (const ParallelWellInfo< Scalar > &pinfo)
 WellState (const PhaseUsageInfo< IndexTraits > &pu)
std::size_t size () const
std::vector< std::string > wells () const
int numWells () const
const PhaseUsageInfo< IndexTraits > & phaseUsageInfo () const
const ParallelWellInfo< Scalar > & parallelWellInfo (std::size_t well_index) const
void init (const std::vector< Scalar > &cellPressures, const std::vector< Scalar > &cellTemperatures, const Schedule &schedule, const std::vector< Well > &wells_ecl, const std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > &parallel_well_info, const int report_step, const WellState *prevState, const std::vector< std::vector< PerforationData< Scalar > > > &well_perf_data, const SummaryState &summary_state, const bool enableDistributedWells)
 Allocate and initialize if wells is non-null.
void resize (const std::vector< Well > &wells_ecl, const std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > &parallel_well_info, const Schedule &schedule, const bool handle_ms_well, const std::size_t numCells, const std::vector< std::vector< PerforationData< Scalar > > > &well_perf_data, const SummaryState &summary_state, const bool enable_distributed_wells)
void setCurrentWellRates (const std::string &wellName, const std::vector< Scalar > &new_rates)
const std::vector< Scalar > & currentWellRates (const std::string &wellName) const
bool hasWellRates (const std::string &wellName) const
void clearWellRates ()
void gatherVectorsOnRoot (const std::vector< data::Connection > &from_connections, std::vector< data::Connection > &to_connections, const Parallel::Communication &comm) const
data::Wells report (const int *globalCellIdxMap, const std::function< bool(const int)> &wasDynamicallyClosed, const RsConstInfo &rsConst=RsConstInfo{}) const
void reportConnections (std::vector< data::Connection > &connections, std::size_t well_index, const int *globalCellIdxMap) const
void initWellStateMSWell (const std::vector< Well > &wells_ecl, const WellState *prev_well_state)
 init the MS well related.
void communicateGroupRates (const Parallel::Communication &comm)
void updateGlobalIsGrup (const Parallel::Communication &comm, const std::vector< WellStatus > &well_status)
void updateEfficiencyScalingFactor (const std::string &wellName, const Scalar value)
bool isInjectionGrup (const std::string &name) const
bool isProductionGrup (const std::string &name) const
bool isOpen (const std::string &name) const
Scalar getGlobalEfficiencyScalingFactor (const std::string &name) const
void updateWellsDefaultALQ (const Schedule &schedule, const int report_step, const SummaryState &summary_state)
void gliftTimeStepInit ()
int wellNameToGlobalIdx (const std::string &name)
std::string globalIdxToWellName (const int index)
bool wellIsOwned (std::size_t well_index, const std::string &wellName) const
bool wellIsOwned (const std::string &wellName) const
bool isRank0 () const
void updateStatus (int well_index, WellStatus status)
void openWell (int well_index)
void shutWell (int well_index)
void stopWell (int well_index)
constexpr int numPhases () const
 The number of phases present.
std::vector< Scalar > & wellRates (std::size_t well_index)
 One rate per well and phase.
const std::vector< Scalar > & wellRates (std::size_t well_index) const
const std::string & name (std::size_t well_index) const
std::optional< std::size_t > index (const std::string &well_name) const
const SingleWellState< Scalar, IndexTraits > & operator[] (std::size_t well_index) const
const SingleWellState< Scalar, IndexTraits > & operator[] (const std::string &well_name) const
SingleWellState< Scalar, IndexTraits > & operator[] (std::size_t well_index)
SingleWellState< Scalar, IndexTraits > & operator[] (const std::string &well_name)
const SingleWellState< Scalar, IndexTraits > & well (std::size_t well_index) const
const SingleWellState< Scalar, IndexTraits > & well (const std::string &well_name) const
SingleWellState< Scalar, IndexTraits > & well (std::size_t well_index)
SingleWellState< Scalar, IndexTraits > & well (const std::string &well_name)
bool has (const std::string &well_name) const
bool operator== (const WellState &) const
template<class Serializer>
void serializeOp (Serializer &serializer)
bool is_permanently_inactive_well (const std::string &wname) const

Static Public Member Functions

static WellState serializationTestObject (const ParallelWellInfo< Scalar > &pinfo)
static void calculateSegmentRates (const ParallelWellInfo< Scalar > &pw_info, const std::vector< std::vector< int > > &segment_inlets, const std::vector< std::vector< int > > &segment_perforations, const std::vector< Scalar > &perforation_rates, const int np, const int segment, std::vector< Scalar > &segment_rates)

Static Public Attributes

static const std::uint64_t event_mask
static const int waterPhaseIdx = IndexTraits::waterPhaseIdx
static const int oilPhaseIdx = IndexTraits::oilPhaseIdx
static const int gasPhaseIdx = IndexTraits::gasPhaseIdx

Detailed Description

template<typename Scalar, typename IndexTraits>
class Opm::WellState< Scalar, IndexTraits >

The state of a set of wells, tailored for use by the fully implicit blackoil simulator.

Member Function Documentation

◆ init()

template<typename Scalar, typename IndexTraits>
void Opm::WellState< Scalar, IndexTraits >::init ( const std::vector< Scalar > & cellPressures,
const std::vector< Scalar > & cellTemperatures,
const Schedule & schedule,
const std::vector< Well > & wells_ecl,
const std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > & parallel_well_info,
const int report_step,
const WellState< Scalar, IndexTraits > * prevState,
const std::vector< std::vector< PerforationData< Scalar > > > & well_perf_data,
const SummaryState & summary_state,
const bool enableDistributedWells )

Allocate and initialize if wells is non-null.

Also tries to give useful initial values to the bhp(), wellRates() and perfPhaseRatesORG() fields, depending on controls

Member Data Documentation

◆ event_mask

template<typename Scalar, typename IndexTraits>
const std::uint64_t Opm::WellState< Scalar, IndexTraits >::event_mask
static
Initial value:
= ScheduleEvents::WELL_STATUS_CHANGE
| ScheduleEvents::PRODUCTION_UPDATE
| ScheduleEvents::INJECTION_UPDATE

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