Opm::BlackoilWellModelGeneric< Scalar, IndexTraits > Class Template Referenceabstract

Class for handling the blackoil well model. More...

#include <BlackoilWellModelGeneric.hpp>

Inheritance diagram for Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >:
Inheritance graph

Public Member Functions

 BlackoilWellModelGeneric (Schedule &schedule, BlackoilWellModelGasLiftGeneric< Scalar, IndexTraits > &gaslift, const SummaryState &summaryState, const EclipseState &eclState, const PhaseUsageInfo< IndexTraits > &phase_usage, const Parallel::Communication &comm)
 
virtual ~BlackoilWellModelGeneric ()=default
 
virtual int compressedIndexForInteriorLGR (const std::string &lgr_tag, const Connection &conn) const
 
int numLocalWells () const
 
int numLocalWellsEnd () const
 
int numLocalNonshutWells () const
 
int numPhases () const
 
bool wellsActive () const
 return true if wells are available in the reservoir More...
 
bool hasLocalWell (const std::string &wname) const
 Returns true if well is defined and has connections on current rank. More...
 
bool hasOpenLocalWell (const std::string &well_name) const
 Returns true if well is defined, open and has connections on current rank. More...
 
bool networkActive () const
 return true if network is active (at least one network well in prediction mode) More...
 
bool anyMSWellOpenLocal () const
 
const std::vector< Well > & eclWells () const
 
bool terminalOutput () const
 
const Well & getWellEcl (const std::string &well_name) const
 
std::vector< Well > getLocalWells (const int timeStepIdx) const
 
const Schedule & schedule () const
 
const PhaseUsageInfo< IndexTraits > & phaseUsage () const
 
const GroupState< Scalar > & groupState () const
 
std::vector< const WellInterfaceGeneric< Scalar, IndexTraits > * > genericWells () const
 
std::vector< WellInterfaceGeneric< Scalar, IndexTraits > * > genericWells ()
 
const WellState< Scalar, IndexTraits > & wellState () const
 
WellState< Scalar, IndexTraits > & wellState ()
 
const WellState< Scalar, IndexTraits > & nupcolWellState () const
 
GroupState< Scalar > & groupState ()
 
WellTestState & wellTestState ()
 
const WellTestState & wellTestState () const
 
Scalar wellPI (const int well_index) const
 
Scalar wellPI (const std::string &well_name) const
 
void updateEclWells (const int timeStepIdx, const SimulatorUpdate &sim_update, const SummaryState &st)
 
void initFromRestartFile (const RestartValue &restartValues, std::unique_ptr< WellTestState > wtestState, const std::size_t numCells, bool handle_ms_well, bool enable_distributed_wells)
 
void prepareDeserialize (int report_step, const std::size_t numCells, bool handle_ms_well, bool enable_distributed_wells)
 
void commitWGState ()
 
data::GroupAndNetworkValues groupAndNetworkData (const int reportStepIdx) const
 
void updateNetworkActiveState (const int report_step)
 Checks if network is active (at least one network well on prediction). More...
 
bool needPreStepNetworkRebalance (const int report_step) const
 
bool forceShutWellByName (const std::string &wellname, const double simulation_time, const bool dont_shut_grup_wells)
 
const std::vector< PerforationData< Scalar > > & perfData (const int well_idx) const
 
const Parallel::Communicationcomm () const
 
const EclipseState & eclipseState () const
 
const SummaryState & summaryState () const
 
const GuideRate & guideRate () const
 
GuideRate & guideRate ()
 
const std::map< std::string, double > & wellOpenTimes () const
 
const std::map< std::string, double > & wellCloseTimes () const
 
const WellGroupEvents & reportStepStartEvents () const
 
std::vector< int > getCellsForConnections (const Well &well) const
 
bool reportStepStarts () const
 
bool shouldBalanceNetwork (const int reportStepIndex, const int iterationIdx) const
 
void updateClosedWellsThisStep (const std::string &well_name) const
 
bool wasDynamicallyShutThisTimeStep (const std::string &well_name) const
 
void logPrimaryVars () const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const BlackoilWellModelGeneric &rhs) const
 
const ParallelWellInfo< Scalar > & parallelWellInfo (const std::size_t idx) const
 
bool isOwner (const std::string &wname) const
 
bool hasLocalCells (const std::string &wname) const
 
const ConnectionIndexMapconnectionIndexMap (const std::size_t idx)
 

Protected Types

using WellTracerRates = std::unordered_map< int, std::vector< WellTracerRate< Scalar > > >
 
using MswTracerRates = std::unordered_map< int, std::vector< MSWellTracerRate< Scalar > > >
 

Protected Member Functions

const WellState< Scalar, IndexTraits > & prevWellState () const
 
const WGState< Scalar, IndexTraits > & prevWGState () const
 
void commitWGState (WGState< Scalar, IndexTraits > wgstate)
 
void resetWGState ()
 
void updateNupcolWGState ()
 
void reportGroupSwitching (DeferredLogger &local_deferredLogger) const
 
std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > createLocalParallelWellInfo (const std::vector< Well > &wells)
 Create the parallel well information. More...
 
void initializeWellProdIndCalculators ()
 
void initializeWellPerfData ()
 
bool wasDynamicallyShutThisTimeStep (const int well_index) const
 
Scalar updateNetworkPressures (const int reportStepIdx, const Scalar damping_factor, const Scalar update_upper_bound)
 
void updateWsolvent (const Group &group, const int reportStepIdx, const WellState< Scalar, IndexTraits > &wellState)
 
void setWsolvent (const Group &group, const int reportStepIdx, Scalar wsolvent)
 
virtual void calcResvCoeff (const int fipnum, const int pvtreg, const std::vector< Scalar > &production_rates, std::vector< Scalar > &resv_coeff)=0
 
virtual void calcInjResvCoeff (const int fipnum, const int pvtreg, std::vector< Scalar > &resv_coeff)=0
 
void assignDynamicWellStatus (data::Wells &wsrpt) const
 
void assignShutConnections (data::Wells &wsrpt, const int reportStepIndex) const
 
void assignWellTargets (data::Wells &wsrpt) const
 
void assignProductionWellTargets (const Well &well, data::WellControlLimits &limits) const
 
void assignInjectionWellTargets (const Well &well, data::WellControlLimits &limits) const
 
void assignGroupControl (const Group &group, data::GroupData &gdata) const
 
void assignGroupValues (const int reportStepIdx, std::map< std::string, data::GroupData > &gvalues) const
 
void assignNodeValues (std::map< std::string, data::NodeData > &nodevalues, const int reportStepIdx) const
 
void calculateEfficiencyFactors (const int reportStepIdx)
 
void checkGconsaleLimits (const Group &group, WellState< Scalar, IndexTraits > &well_state, const int reportStepIdx, DeferredLogger &deferred_logger)
 
void checkGEconLimits (const Group &group, const double simulation_time, const int report_step_idx, DeferredLogger &deferred_logger)
 
bool checkGroupHigherConstraints (const Group &group, DeferredLogger &deferred_logger, const int reportStepIdx, const int max_number_of_group_switch, const bool update_group_switching_log)
 
void updateAndCommunicateGroupData (const int reportStepIdx, const int iterationIdx, const Scalar tol_nupcol, const bool update_wellgrouptarget, DeferredLogger &deferred_logger)
 
void inferLocalShutWells ()
 
void setRepRadiusPerfLength ()
 
virtual void computePotentials (const std::size_t widx, const WellState< Scalar, IndexTraits > &well_state_copy, std::string &exc_msg, ExceptionType::ExcEnum &exc_type, DeferredLogger &deferred_logger)=0
 
void updateWellPotentials (const int reportStepIdx, const bool onlyAfterEvent, const SummaryConfig &summaryConfig, DeferredLogger &deferred_logger)
 
void initInjMult ()
 
void updateInjMult (DeferredLogger &deferred_logger)
 
void updateInjFCMult (DeferredLogger &deferred_logger)
 
void updateFiltrationModelsPostStep (const double dt, const std::size_t water_index, DeferredLogger &deferred_logger)
 
void updateFiltrationModelsPreStep (DeferredLogger &deferred_logger)
 
virtual void createWellContainer (const int time_step)=0
 
virtual void initWellContainer (const int reportStepIdx)=0
 
virtual void calculateProductivityIndexValuesShutWells (const int reportStepIdx, DeferredLogger &deferred_logger)=0
 
virtual void calculateProductivityIndexValues (DeferredLogger &deferred_logger)=0
 
void runWellPIScaling (const int reportStepIdx, DeferredLogger &local_deferredLogger)
 
virtual int compressedIndexForInterior (int cartesian_cell_idx) const =0
 get compressed index for interior cells (-1, otherwise More...
 
std::vector< std::vector< int > > getMaxWellConnections () const
 
std::vector< std::string > getWellsForTesting (const int timeStepIdx, const double simulationTime)
 
void assignWellTracerRates (data::Wells &wsrpt, const WellTracerRates &wellTracerRates, const unsigned reportStep) const
 
void assignMswTracerRates (data::Wells &wsrpt, const MswTracerRates &mswTracerRates, const unsigned reportStep) const
 
void assignMassGasRate (data::Wells &wsrpt, const Scalar gasDensity) const
 

Protected Attributes

Schedule & schedule_
 
const SummaryState & summaryState_
 
const EclipseState & eclState_
 
const Parallel::Communicationcomm_
 
BlackoilWellModelGasLiftGeneric< Scalar, IndexTraits > & gen_gaslift_
 
BlackoilWellModelWBP< Scalar, IndexTraits > wbp_
 
const PhaseUsageInfo< IndexTraits > & phase_usage_info_
 
bool terminal_output_ {false}
 
bool wells_active_ {false}
 
bool network_active_ {false}
 
bool initial_step_ {}
 
bool report_step_starts_ {}
 
std::optional< int > last_run_wellpi_ {}
 
std::vector< Well > wells_ecl_
 
std::vector< std::vector< PerforationData< Scalar > > > well_perf_data_
 
std::map< std::string, double > well_open_times_
 
std::map< std::string, double > well_close_times_
 
std::vector< ConnectionIndexMapconn_idx_map_ {}
 
std::function< bool(const std::string &)> not_on_process_ {}
 
std::vector< WellInterfaceGeneric< Scalar, IndexTraits > * > well_container_generic_ {}
 
std::vector< int > local_shut_wells_ {}
 
std::vector< ParallelWellInfo< Scalar > > parallel_well_info_
 
std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > local_parallel_well_info_
 
std::vector< WellProdIndexCalculator< Scalar > > prod_index_calc_
 
std::vector< int > pvt_region_idx_
 
std::unordered_set< std::string > closed_this_step_
 
GuideRate guideRate_
 
std::unique_ptr< VFPProperties< Scalar, IndexTraits > > vfp_properties_ {}
 
std::map< std::string, Scalar > node_pressures_
 
std::map< std::string, Scalar > last_valid_node_pressures_
 
std::unordered_map< std::string, std::vector< Scalar > > prev_inj_multipliers_
 
std::unordered_map< std::string, WellFilterCake< Scalar, IndexTraits > > filter_cake_
 
WGState< Scalar, IndexTraits > active_wgstate_
 
WGState< Scalar, IndexTraits > last_valid_wgstate_
 
WGState< Scalar, IndexTraits > nupcol_wgstate_
 
WellGroupEvents report_step_start_events_
 Well group events at start of report step. More...
 
bool wellStructureChangedDynamically_ {false}
 
std::map< std::string, std::vector< Group::ProductionCMode > > switched_prod_groups_
 
std::map< std::string, std::array< std::vector< Group::InjectionCMode >, 3 > > switched_inj_groups_
 
std::map< std::string, std::pair< std::string, std::string > > closed_offending_wells_
 

Detailed Description

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

Class for handling the blackoil well model.

Member Typedef Documentation

◆ MswTracerRates

template<typename Scalar , typename IndexTraits >
using Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::MswTracerRates = std::unordered_map<int, std::vector<MSWellTracerRate<Scalar> >>
protected

◆ WellTracerRates

template<typename Scalar , typename IndexTraits >
using Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::WellTracerRates = std::unordered_map<int, std::vector<WellTracerRate<Scalar> >>
protected

Constructor & Destructor Documentation

◆ BlackoilWellModelGeneric()

template<typename Scalar , typename IndexTraits >
Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::BlackoilWellModelGeneric ( Schedule &  schedule,
BlackoilWellModelGasLiftGeneric< Scalar, IndexTraits > &  gaslift,
const SummaryState &  summaryState,
const EclipseState &  eclState,
const PhaseUsageInfo< IndexTraits > &  phase_usage,
const Parallel::Communication comm 
)

◆ ~BlackoilWellModelGeneric()

template<typename Scalar , typename IndexTraits >
virtual Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::~BlackoilWellModelGeneric ( )
virtualdefault

Member Function Documentation

◆ anyMSWellOpenLocal()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::anyMSWellOpenLocal ( ) const

◆ assignDynamicWellStatus()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignDynamicWellStatus ( data::Wells &  wsrpt) const
protected

Assign dynamic well status for each well owned by current rank

Parameters
[in,out]wsrptWell solution object. On exit, holds current values for
data::Well::dynamicStatus
.

◆ assignGroupControl()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignGroupControl ( const Group &  group,
data::GroupData &  gdata 
) const
protected

◆ assignGroupValues()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignGroupValues ( const int  reportStepIdx,
std::map< std::string, data::GroupData > &  gvalues 
) const
protected

◆ assignInjectionWellTargets()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignInjectionWellTargets ( const Well &  well,
data::WellControlLimits &  limits 
) const
protected

◆ assignMassGasRate()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignMassGasRate ( data::Wells &  wsrpt,
const Scalar  gasDensity 
) const
protected

◆ assignMswTracerRates()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignMswTracerRates ( data::Wells &  wsrpt,
const MswTracerRates mswTracerRates,
const unsigned  reportStep 
) const
protected

◆ assignNodeValues()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignNodeValues ( std::map< std::string, data::NodeData > &  nodevalues,
const int  reportStepIdx 
) const
protected

◆ assignProductionWellTargets()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignProductionWellTargets ( const Well &  well,
data::WellControlLimits &  limits 
) const
protected

◆ assignShutConnections()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignShutConnections ( data::Wells &  wsrpt,
const int  reportStepIndex 
) const
protected

Assign basic result quantities for shut connections of wells owned by current rank.

Mostly provided for summary file output purposes. Applies to fully shut/stopped wells and shut connections of open/flowing wells.

Parameters
[in,out]wsrptWell solution object. On exit, also contains a few quantities, like the D factor, the Kh product and the CTF, for shut connections.
[in]reportStepIndexZero-based index of current report step.

◆ assignWellTargets()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignWellTargets ( data::Wells &  wsrpt) const
protected

◆ assignWellTracerRates()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::assignWellTracerRates ( data::Wells &  wsrpt,
const WellTracerRates wellTracerRates,
const unsigned  reportStep 
) const
protected

◆ calcInjResvCoeff()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::calcInjResvCoeff ( const int  fipnum,
const int  pvtreg,
std::vector< Scalar > &  resv_coeff 
)
protectedpure virtual

◆ calcResvCoeff()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::calcResvCoeff ( const int  fipnum,
const int  pvtreg,
const std::vector< Scalar > &  production_rates,
std::vector< Scalar > &  resv_coeff 
)
protectedpure virtual

◆ calculateEfficiencyFactors()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::calculateEfficiencyFactors ( const int  reportStepIdx)
protected

◆ calculateProductivityIndexValues()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::calculateProductivityIndexValues ( DeferredLogger deferred_logger)
protectedpure virtual

◆ calculateProductivityIndexValuesShutWells()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::calculateProductivityIndexValuesShutWells ( const int  reportStepIdx,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ checkGconsaleLimits()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::checkGconsaleLimits ( const Group &  group,
WellState< Scalar, IndexTraits > &  well_state,
const int  reportStepIdx,
DeferredLogger deferred_logger 
)
protected

◆ checkGEconLimits()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::checkGEconLimits ( const Group &  group,
const double  simulation_time,
const int  report_step_idx,
DeferredLogger deferred_logger 
)
protected

◆ checkGroupHigherConstraints()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::checkGroupHigherConstraints ( const Group &  group,
DeferredLogger deferred_logger,
const int  reportStepIdx,
const int  max_number_of_group_switch,
const bool  update_group_switching_log 
)
protected

◆ comm()

template<typename Scalar , typename IndexTraits >
const Parallel::Communication & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::comm ( ) const
inline

◆ commitWGState() [1/2]

◆ commitWGState() [2/2]

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::commitWGState ( WGState< Scalar, IndexTraits >  wgstate)
inlineprotected

◆ compressedIndexForInterior()

template<typename Scalar , typename IndexTraits >
virtual int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::compressedIndexForInterior ( int  cartesian_cell_idx) const
protectedpure virtual

get compressed index for interior cells (-1, otherwise

Implemented in Opm::BlackoilWellModel< TypeTag >.

◆ compressedIndexForInteriorLGR()

template<typename Scalar , typename IndexTraits >
virtual int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::compressedIndexForInteriorLGR ( const std::string &  lgr_tag,
const Connection &  conn 
) const
inlinevirtual

◆ computePotentials()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::computePotentials ( const std::size_t  widx,
const WellState< Scalar, IndexTraits > &  well_state_copy,
std::string &  exc_msg,
ExceptionType::ExcEnum exc_type,
DeferredLogger deferred_logger 
)
protectedpure virtual

◆ connectionIndexMap()

template<typename Scalar , typename IndexTraits >
const ConnectionIndexMap & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::connectionIndexMap ( const std::size_t  idx)
inline

◆ createLocalParallelWellInfo()

template<typename Scalar , typename IndexTraits >
std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::createLocalParallelWellInfo ( const std::vector< Well > &  wells)
protected

Create the parallel well information.

Parameters
wellsThe local wells from ECL schedule

◆ createWellContainer()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::createWellContainer ( const int  time_step)
protectedpure virtual

◆ eclipseState()

template<typename Scalar , typename IndexTraits >
const EclipseState & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::eclipseState ( ) const
inline

◆ eclWells()

template<typename Scalar , typename IndexTraits >
const std::vector< Well > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::eclWells ( ) const
inline

◆ forceShutWellByName()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::forceShutWellByName ( const std::string &  wellname,
const double  simulation_time,
const bool  dont_shut_grup_wells 
)

Shut down any single well Returns true if the well was actually found and shut.

◆ genericWells() [1/2]

template<typename Scalar , typename IndexTraits >
std::vector< WellInterfaceGeneric< Scalar, IndexTraits > * > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::genericWells ( )
inline

◆ genericWells() [2/2]

template<typename Scalar , typename IndexTraits >
std::vector< const WellInterfaceGeneric< Scalar, IndexTraits > * > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::genericWells ( ) const
inline

◆ getCellsForConnections()

template<typename Scalar , typename IndexTraits >
std::vector< int > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::getCellsForConnections ( const Well &  well) const

◆ getLocalWells()

template<typename Scalar , typename IndexTraits >
std::vector< Well > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::getLocalWells ( const int  timeStepIdx) const

◆ getMaxWellConnections()

template<typename Scalar , typename IndexTraits >
std::vector< std::vector< int > > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::getMaxWellConnections ( ) const
protected

◆ getWellEcl()

template<typename Scalar , typename IndexTraits >
const Well & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::getWellEcl ( const std::string &  well_name) const

◆ getWellsForTesting()

template<typename Scalar , typename IndexTraits >
std::vector< std::string > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::getWellsForTesting ( const int  timeStepIdx,
const double  simulationTime 
)
protected

◆ groupAndNetworkData()

template<typename Scalar , typename IndexTraits >
data::GroupAndNetworkValues Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::groupAndNetworkData ( const int  reportStepIdx) const

◆ groupState() [1/2]

template<typename Scalar , typename IndexTraits >
GroupState< Scalar > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::groupState ( )
inline

◆ groupState() [2/2]

template<typename Scalar , typename IndexTraits >
const GroupState< Scalar > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::groupState ( ) const
inline

◆ guideRate() [1/2]

template<typename Scalar , typename IndexTraits >
GuideRate & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::guideRate ( )
inline

◆ guideRate() [2/2]

template<typename Scalar , typename IndexTraits >
const GuideRate & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::guideRate ( ) const
inline

◆ hasLocalCells()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::hasLocalCells ( const std::string &  wname) const
inline

◆ hasLocalWell()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::hasLocalWell ( const std::string &  wname) const

Returns true if well is defined and has connections on current rank.

◆ hasOpenLocalWell()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::hasOpenLocalWell ( const std::string &  well_name) const

Returns true if well is defined, open and has connections on current rank.

◆ inferLocalShutWells()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::inferLocalShutWells ( )
protected

◆ initFromRestartFile()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initFromRestartFile ( const RestartValue &  restartValues,
std::unique_ptr< WellTestState >  wtestState,
const std::size_t  numCells,
bool  handle_ms_well,
bool  enable_distributed_wells 
)

◆ initializeWellPerfData()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initializeWellPerfData ( )
protected

◆ initializeWellProdIndCalculators()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initializeWellProdIndCalculators ( )
protected

◆ initInjMult()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initInjMult ( )
protected

◆ initWellContainer()

template<typename Scalar , typename IndexTraits >
virtual void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initWellContainer ( const int  reportStepIdx)
protectedpure virtual

◆ isOwner()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::isOwner ( const std::string &  wname) const
inline

◆ logPrimaryVars()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::logPrimaryVars ( ) const

◆ needPreStepNetworkRebalance()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::needPreStepNetworkRebalance ( const int  report_step) const

Checks if there are reasons to perform a pre-step network re-balance. (Currently, the only reasons are network well status changes.) (TODO: Consider if adding network change events would be helpful.)

◆ networkActive()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::networkActive ( ) const

return true if network is active (at least one network well in prediction mode)

◆ numLocalNonshutWells()

template<typename Scalar , typename IndexTraits >
int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::numLocalNonshutWells ( ) const

◆ numLocalWells()

template<typename Scalar , typename IndexTraits >
int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::numLocalWells ( ) const

◆ numLocalWellsEnd()

template<typename Scalar , typename IndexTraits >
int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::numLocalWellsEnd ( ) const

◆ numPhases()

template<typename Scalar , typename IndexTraits >
int Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::numPhases ( ) const

◆ nupcolWellState()

template<typename Scalar , typename IndexTraits >
const WellState< Scalar, IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::nupcolWellState ( ) const
inline

◆ operator==()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::operator== ( const BlackoilWellModelGeneric< Scalar, IndexTraits > &  rhs) const

◆ parallelWellInfo()

template<typename Scalar , typename IndexTraits >
const ParallelWellInfo< Scalar > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::parallelWellInfo ( const std::size_t  idx) const
inline

◆ perfData()

template<typename Scalar , typename IndexTraits >
const std::vector< PerforationData< Scalar > > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::perfData ( const int  well_idx) const
inline

◆ phaseUsage()

template<typename Scalar , typename IndexTraits >
const PhaseUsageInfo< IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::phaseUsage ( ) const
inline

◆ prepareDeserialize()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::prepareDeserialize ( int  report_step,
const std::size_t  numCells,
bool  handle_ms_well,
bool  enable_distributed_wells 
)

◆ prevWellState()

template<typename Scalar , typename IndexTraits >
const WellState< Scalar, IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::prevWellState ( ) const
inlineprotected

◆ prevWGState()

template<typename Scalar , typename IndexTraits >
const WGState< Scalar, IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::prevWGState ( ) const
inlineprotected

◆ reportGroupSwitching()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::reportGroupSwitching ( DeferredLogger local_deferredLogger) const
protected

◆ reportStepStartEvents()

template<typename Scalar , typename IndexTraits >
const WellGroupEvents & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::reportStepStartEvents ( ) const
inline

◆ reportStepStarts()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::reportStepStarts ( ) const
inline

◆ resetWGState()

◆ runWellPIScaling()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::runWellPIScaling ( const int  reportStepIdx,
DeferredLogger local_deferredLogger 
)
protected

◆ schedule()

template<typename Scalar , typename IndexTraits >
const Schedule & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::schedule ( ) const
inline

◆ serializeOp()

◆ setRepRadiusPerfLength()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::setRepRadiusPerfLength ( )
protected

◆ setWsolvent()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::setWsolvent ( const Group &  group,
const int  reportStepIdx,
Scalar  wsolvent 
)
protected

◆ shouldBalanceNetwork()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::shouldBalanceNetwork ( const int  reportStepIndex,
const int  iterationIdx 
) const

◆ summaryState()

template<typename Scalar , typename IndexTraits >
const SummaryState & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::summaryState ( ) const
inline

◆ terminalOutput()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::terminalOutput ( ) const
inline

◆ updateAndCommunicateGroupData()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateAndCommunicateGroupData ( const int  reportStepIdx,
const int  iterationIdx,
const Scalar  tol_nupcol,
const bool  update_wellgrouptarget,
DeferredLogger deferred_logger 
)
protected

◆ updateClosedWellsThisStep()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateClosedWellsThisStep ( const std::string &  well_name) const
inline

◆ updateEclWells()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateEclWells ( const int  timeStepIdx,
const SimulatorUpdate &  sim_update,
const SummaryState &  st 
)

◆ updateFiltrationModelsPostStep()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateFiltrationModelsPostStep ( const double  dt,
const std::size_t  water_index,
DeferredLogger deferred_logger 
)
protected

◆ updateFiltrationModelsPreStep()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateFiltrationModelsPreStep ( DeferredLogger deferred_logger)
protected

◆ updateInjFCMult()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateInjFCMult ( DeferredLogger deferred_logger)
protected

◆ updateInjMult()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateInjMult ( DeferredLogger deferred_logger)
protected

◆ updateNetworkActiveState()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateNetworkActiveState ( const int  report_step)

Checks if network is active (at least one network well on prediction).

◆ updateNetworkPressures()

template<typename Scalar , typename IndexTraits >
Scalar Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateNetworkPressures ( const int  reportStepIdx,
const Scalar  damping_factor,
const Scalar  update_upper_bound 
)
protected

◆ updateNupcolWGState()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateNupcolWGState ( )
inlineprotected

◆ updateWellPotentials()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateWellPotentials ( const int  reportStepIdx,
const bool  onlyAfterEvent,
const SummaryConfig &  summaryConfig,
DeferredLogger deferred_logger 
)
protected

◆ updateWsolvent()

template<typename Scalar , typename IndexTraits >
void Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::updateWsolvent ( const Group &  group,
const int  reportStepIdx,
const WellState< Scalar, IndexTraits > &  wellState 
)
protected

◆ wasDynamicallyShutThisTimeStep() [1/2]

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wasDynamicallyShutThisTimeStep ( const int  well_index) const
protected

◆ wasDynamicallyShutThisTimeStep() [2/2]

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wasDynamicallyShutThisTimeStep ( const std::string &  well_name) const

◆ wellCloseTimes()

template<typename Scalar , typename IndexTraits >
const std::map< std::string, double > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellCloseTimes ( ) const
inline

◆ wellOpenTimes()

template<typename Scalar , typename IndexTraits >
const std::map< std::string, double > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellOpenTimes ( ) const
inline

◆ wellPI() [1/2]

template<typename Scalar , typename IndexTraits >
Scalar Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellPI ( const int  well_index) const

◆ wellPI() [2/2]

template<typename Scalar , typename IndexTraits >
Scalar Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellPI ( const std::string &  well_name) const

◆ wellsActive()

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellsActive ( ) const

return true if wells are available in the reservoir

◆ wellState() [1/2]

template<typename Scalar , typename IndexTraits >
WellState< Scalar, IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellState ( )
inline

◆ wellState() [2/2]

template<typename Scalar , typename IndexTraits >
const WellState< Scalar, IndexTraits > & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellState ( ) const
inline

◆ wellTestState() [1/2]

template<typename Scalar , typename IndexTraits >
WellTestState & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellTestState ( )
inline

◆ wellTestState() [2/2]

template<typename Scalar , typename IndexTraits >
const WellTestState & Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellTestState ( ) const
inline

Member Data Documentation

◆ active_wgstate_

◆ closed_offending_wells_

template<typename Scalar , typename IndexTraits >
std::map<std::string, std::pair<std::string, std::string> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::closed_offending_wells_
protected

◆ closed_this_step_

template<typename Scalar , typename IndexTraits >
std::unordered_set<std::string> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::closed_this_step_
mutableprotected

◆ comm_

template<typename Scalar , typename IndexTraits >
const Parallel::Communication& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::comm_
protected

◆ conn_idx_map_

template<typename Scalar , typename IndexTraits >
std::vector<ConnectionIndexMap> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::conn_idx_map_ {}
protected

◆ eclState_

template<typename Scalar , typename IndexTraits >
const EclipseState& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::eclState_
protected

◆ filter_cake_

template<typename Scalar , typename IndexTraits >
std::unordered_map<std::string, WellFilterCake<Scalar, IndexTraits> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::filter_cake_
protected

◆ gen_gaslift_

template<typename Scalar , typename IndexTraits >
BlackoilWellModelGasLiftGeneric<Scalar, IndexTraits>& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::gen_gaslift_
protected

◆ guideRate_

template<typename Scalar , typename IndexTraits >
GuideRate Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::guideRate_
protected

◆ initial_step_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::initial_step_ {}
protected

◆ last_run_wellpi_

template<typename Scalar , typename IndexTraits >
std::optional<int> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::last_run_wellpi_ {}
protected

◆ last_valid_node_pressures_

template<typename Scalar , typename IndexTraits >
std::map<std::string, Scalar> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::last_valid_node_pressures_
protected

◆ last_valid_wgstate_

◆ local_parallel_well_info_

template<typename Scalar , typename IndexTraits >
std::vector<std::reference_wrapper<ParallelWellInfo<Scalar> > > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::local_parallel_well_info_
protected

◆ local_shut_wells_

template<typename Scalar , typename IndexTraits >
std::vector<int> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::local_shut_wells_ {}
protected

◆ network_active_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::network_active_ {false}
protected

◆ node_pressures_

template<typename Scalar , typename IndexTraits >
std::map<std::string, Scalar> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::node_pressures_
protected

◆ not_on_process_

template<typename Scalar , typename IndexTraits >
std::function<bool(const std::string&)> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::not_on_process_ {}
protected

◆ nupcol_wgstate_

◆ parallel_well_info_

template<typename Scalar , typename IndexTraits >
std::vector<ParallelWellInfo<Scalar> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::parallel_well_info_
protected

◆ phase_usage_info_

template<typename Scalar , typename IndexTraits >
const PhaseUsageInfo<IndexTraits>& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::phase_usage_info_
protected

◆ prev_inj_multipliers_

template<typename Scalar , typename IndexTraits >
std::unordered_map<std::string, std::vector<Scalar> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::prev_inj_multipliers_
protected

◆ prod_index_calc_

template<typename Scalar , typename IndexTraits >
std::vector<WellProdIndexCalculator<Scalar> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::prod_index_calc_
protected

◆ pvt_region_idx_

template<typename Scalar , typename IndexTraits >
std::vector<int> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::pvt_region_idx_
protected

◆ report_step_start_events_

template<typename Scalar , typename IndexTraits >
WellGroupEvents Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::report_step_start_events_
protected

Well group events at start of report step.

Referenced by Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::reportStepStartEvents().

◆ report_step_starts_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::report_step_starts_ {}
protected

◆ schedule_

template<typename Scalar , typename IndexTraits >
Schedule& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::schedule_
protected

◆ summaryState_

template<typename Scalar , typename IndexTraits >
const SummaryState& Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::summaryState_
protected

◆ switched_inj_groups_

template<typename Scalar , typename IndexTraits >
std::map<std::string, std::array<std::vector<Group::InjectionCMode>, 3> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::switched_inj_groups_
protected

◆ switched_prod_groups_

template<typename Scalar , typename IndexTraits >
std::map<std::string, std::vector<Group::ProductionCMode> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::switched_prod_groups_
protected

◆ terminal_output_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::terminal_output_ {false}
protected

◆ vfp_properties_

template<typename Scalar , typename IndexTraits >
std::unique_ptr<VFPProperties<Scalar, IndexTraits> > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::vfp_properties_ {}
protected

◆ wbp_

template<typename Scalar , typename IndexTraits >
BlackoilWellModelWBP<Scalar, IndexTraits> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wbp_
protected

◆ well_close_times_

template<typename Scalar , typename IndexTraits >
std::map<std::string, double> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::well_close_times_
protected

◆ well_container_generic_

template<typename Scalar , typename IndexTraits >
std::vector<WellInterfaceGeneric<Scalar, IndexTraits>*> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::well_container_generic_ {}
protected

◆ well_open_times_

template<typename Scalar , typename IndexTraits >
std::map<std::string, double> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::well_open_times_
protected

◆ well_perf_data_

template<typename Scalar , typename IndexTraits >
std::vector<std::vector<PerforationData<Scalar> > > Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::well_perf_data_
protected

◆ wells_active_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wells_active_ {false}
protected

◆ wells_ecl_

template<typename Scalar , typename IndexTraits >
std::vector<Well> Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wells_ecl_
protected

◆ wellStructureChangedDynamically_

template<typename Scalar , typename IndexTraits >
bool Opm::BlackoilWellModelGeneric< Scalar, IndexTraits >::wellStructureChangedDynamically_ {false}
protected

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