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

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

#include <BlackoilWellModelGeneric.hpp>

Public Member Functions

 BlackoilWellModelGeneric (Schedule &schedule, BlackoilWellModelGasLiftGeneric< Scalar, IndexTraits > &gaslift, BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > &network, const SummaryState &summaryState, const EclipseState &eclState, const PhaseUsageInfo< IndexTraits > &phase_usage, const Parallel::Communication &comm)
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
bool hasLocalWell (const std::string &wname) const
 Returns true if well is defined and has connections on current rank.
bool hasOpenLocalWell (const std::string &well_name) const
 Returns true if well is defined, open and has connections on current rank.
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
WellState< Scalar, IndexTraits > & nupcolWellState ()
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
bool 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.
const std::vector< PerforationData< Scalar > > & perfData (const int well_idx) const
const Parallel::Communication & comm () 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
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)
GroupStateHelperType & groupStateHelper ()
const GroupStateHelperType & groupStateHelper () const
std::pair< int, int > getGroupFipnumAndPvtreg () const
virtual void calcResvCoeff (const int fipnum, const int pvtreg, const std::vector< Scalar > &production_rates, std::vector< Scalar > &resv_coeff) const =0
virtual void calcInjResvCoeff (const int fipnum, const int pvtreg, std::vector< Scalar > &resv_coeff) const =0
const VFPProperties< Scalar, IndexTraits > & getVFPProperties () const
void updateAndCommunicateGroupData (const int reportStepIdx, const NewtonIterationContext &iterCtx, const Scalar tol_nupcol, const bool update_wellgrouptarget)
const EclipseState & eclState () const

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.
void initializeWellProdIndCalculators ()
void initializeWellPerfData ()
bool wasDynamicallyShutThisTimeStep (const int well_index) const
void updateWsolvent (const Group &group, const int reportStepIdx, const WellState< Scalar, IndexTraits > &wellState)
void setWsolvent (const Group &group, const int reportStepIdx, Scalar wsolvent)
void assignDynamicWellStatus (data::Wells &wsrpt) const
 Assign dynamic well status for each well owned by current rank.
void assignShutConnections (data::Wells &wsrpt, const int reportStepIndex) const
 Assign basic result quantities for shut connections of wells owned by current rank.
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 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 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)=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< 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::Communication & comm_
BlackoilWellModelGasLiftGeneric< Scalar, IndexTraits > & gen_gaslift_
BlackoilWellModelWBP< Scalar, IndexTraits > wbp_
const PhaseUsageInfo< IndexTraits > & phase_usage_info_
bool terminal_output_ {false}
bool wells_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::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_
GroupStateHelperType group_state_helper_
WellGroupEvents report_step_start_events_
 Well group events at start of report step.
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_
BlackoilWellModelNetworkGeneric< Scalar, IndexTraits > & genNetwork_

Detailed Description

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

Class for handling the blackoil well model.

Member Function Documentation

◆ 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
.

◆ 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.

◆ 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 >.

◆ 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

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