My Project
Loading...
Searching...
No Matches
Opm::BlackoilWellModelGeneric< Scalar > Class Template Referenceabstract

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

#include <BlackoilWellModelGeneric.hpp>

Classes

class  ConnectionIndexMap
 Connection index mappings. More...
 

Public Types

using GLiftOptWells = std::map< std::string, std::unique_ptr< GasLiftSingleWellGeneric< Scalar > > >
 
using GLiftProdWells = std::map< std::string, const WellInterfaceGeneric< Scalar > * >
 
using GLiftWellStateMap = std::map< std::string, std::unique_ptr< GasLiftWellState< Scalar > > >
 

Public Member Functions

 BlackoilWellModelGeneric (Schedule &schedule, const SummaryState &summaryState, const EclipseState &eclState, const PhaseUsage &phase_usage, const Parallel::Communication &comm)
 
int numLocalWells () const
 
int numLocalWellsEnd () const
 
int numLocalNonshutWells () const
 
int numPhases () const
 
bool wellsActive () const
 return true if wells are available in the reservoir
 
bool hasWell (const std::string &wname) const
 
bool networkActive () const
 return true if network is active (at least one network well in prediction mode)
 
bool anyMSWellOpenLocal () const
 
const WellgetWellEcl (const std::string &well_name) const
 
std::vector< WellgetLocalWells (const int timeStepIdx) const
 
const Scheduleschedule () const
 
const PhaseUsagephaseUsage () const
 
const GroupState< Scalar > & groupState () const
 
std::vector< const WellInterfaceGeneric< Scalar > * > genericWells () const
 
const WellState< Scalar > & wellState () const
 
WellState< Scalar > & wellState ()
 
const WellState< Scalar > & nupcolWellState () const
 
GroupState< Scalar > & groupState ()
 
WellTestStatewellTestState ()
 
const WellTestStatewellTestState () 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)
 
void prepareDeserialize (int report_step, const std::size_t numCells, bool handle_ms_well)
 
void commitWGState ()
 
data::GroupAndNetworkValues groupAndNetworkData (const int reportStepIdx) const
 
bool hasTHPConstraints () const
 Return true if any well has a THP constraint.
 
void updateNetworkActiveState (const int report_step)
 Checks if network is active (at least one network well on prediction).
 
bool needPreStepNetworkRebalance (const int report_step) const
 Checks if there are reasons to perform a pre-step network re-balance.
 
bool forceShutWellByName (const std::string &wellname, const double simulation_time)
 Shut down any single well Returns true if the well was actually found and shut.
 
const std::vector< PerforationData< Scalar > > & perfData (const int well_idx) const
 
const Parallel::Communication & comm () const
 
const EclipseState & eclipseState () const
 
const SummaryStatesummaryState () const
 
const GuideRateguideRate () 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
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
bool operator== (const BlackoilWellModelGeneric &rhs) const
 

Protected Types

using WellTracerRates = std::map< std::pair< std::string, std::string >, Scalar >
 
using MswTracerRates = std::map< std::tuple< std::string, std::string, std::size_t >, Scalar >
 

Protected Member Functions

const WellState< Scalar > & prevWellState () const
 
const WGState< Scalar > & prevWGState () const
 
void commitWGState (WGState< Scalar > wgstate)
 
void resetWGState ()
 
void updateNupcolWGState ()
 
std::vector< std::reference_wrapper< ParallelWellInfo< Scalar > > > createLocalParallelWellInfo (const std::vector< Well > &wells)
 Create the parallel well information.
 
void initializeWellProdIndCalculators ()
 
void initializeWellPerfData ()
 
bool wasDynamicallyShutThisTimeStep (const int well_index) const
 
Scalar updateNetworkPressures (const int reportStepIdx)
 
void updateWsolvent (const Group &group, const int reportStepIdx, const WellState< Scalar > &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 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 > &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)
 
void updateAndCommunicateGroupData (const int reportStepIdx, const int iterationIdx)
 
void inferLocalShutWells ()
 
void setRepRadiusPerfLength ()
 
void gliftDebug (const std::string &msg, DeferredLogger &deferred_logger) const
 
void gliftDebugShowALQ (DeferredLogger &deferred_logger)
 
void gasLiftOptimizationStage2 (DeferredLogger &deferred_logger, GLiftProdWells &prod_wells, GLiftOptWells &glift_wells, GasLiftGroupInfo< Scalar > &group_info, GLiftWellStateMap &map, const int episodeIndex)
 
virtual void computePotentials (const std::size_t widx, const WellState< Scalar > &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
 
std::vector< intgetCellsForConnections (const Well &well) const
 
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
 
void assignMswTracerRates (data::Wells &wsrpt, const MswTracerRates &mswTracerRates) const
 
void assignMassGasRate (data::Wells &wsrpt, const Scalar &gasDensity) const
 

Protected Attributes

Scheduleschedule_
 
const SummaryStatesummaryState_
 
const EclipseState & eclState_
 
const Parallel::Communication & comm_
 
PhaseUsage phase_usage_
 
bool terminal_output_ {false}
 
bool wells_active_ {false}
 
bool network_active_ {false}
 
bool initial_step_ {}
 
bool report_step_starts_ {}
 
std::optional< intlast_run_wellpi_ {}
 
std::vector< Wellwells_ecl_
 
std::vector< std::vector< PerforationData< Scalar > > > well_perf_data_
 
std::vector< ConnectionIndexMapconn_idx_map_ {}
 
std::function< bool(const Well &)> not_on_process_ {}
 
std::vector< WellInterfaceGeneric< Scalar > * > well_container_generic_ {}
 
std::vector< intlocal_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_
 
ParallelWBPCalculation< Scalar > wbpCalculationService_
 
std::vector< intpvt_region_idx_
 
std::unordered_set< std::string > closed_this_step_
 
GuideRate guideRate_
 
std::unique_ptr< VFPProperties< Scalar > > vfp_properties_ {}
 
std::map< std::string, Scalar > node_pressures_
 
std::unordered_map< std::string, std::vector< Scalar > > prev_inj_multipliers_
 
std::unordered_map< std::string, WellFilterCake< Scalar > > filter_cake_
 
WGState< Scalar > active_wgstate_
 
WGState< Scalar > last_valid_wgstate_
 
WGState< Scalar > nupcol_wgstate_
 
bool glift_debug = false
 
double last_glift_opt_time_ = -1.0
 
bool wellStructureChangedDynamically_ {false}
 
std::map< std::string, std::string > switched_prod_groups_
 
std::map< std::pair< std::string, Phase >, std::string > switched_inj_groups_
 
std::map< std::string, std::pair< std::string, std::string > > closed_offending_wells_
 

Detailed Description

template<class Scalar>
class Opm::BlackoilWellModelGeneric< Scalar >

Class for handling the blackoil well model.

Member Function Documentation

◆ compressedIndexForInterior()

template<class Scalar >
virtual int Opm::BlackoilWellModelGeneric< Scalar >::compressedIndexForInterior ( int  cartesian_cell_idx) const
protectedpure virtual

get compressed index for interior cells (-1, otherwise

Implemented in Opm::BlackoilWellModel< TypeTag >.

◆ createLocalParallelWellInfo()

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

Create the parallel well information.

Parameters
localWellsThe local wells from ECL schedule

◆ needPreStepNetworkRebalance()

template<class Scalar >
bool Opm::BlackoilWellModelGeneric< Scalar >::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.)


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