BlackoilWellModel.hpp
Go to the documentation of this file.
121 constexpr static std::size_t pressureVarIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
315 ConvergenceReport getWellConvergence(const std::vector<Scalar>& B_avg, const bool checkWellGroupControls = false) const;
333 // it should be able to go to prepareTimeStep(), however, the updateWellControls() and initPrimaryVariablesEvaluation()
334 // makes it a little more difficult. unless we introduce if (iterationIdx != 0) to avoid doing the above functions
346 updateWellControls(const bool mandatory_network_balance, DeferredLogger& deferred_logger, const bool relax_network_tolerance = false);
362 void addWellPressureEquations(PressureMatrix& jacobian, const BVector& weights,const bool use_well_weights) const;
409 WellInterfacePtr createWellForWellTest(const std::string& well_name, const int report_step, DeferredLogger& deferred_logger) const;
421 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>> regionalAveragePressureCalculator_{};
433 // Pre-step network solve at static reservoir conditions (group and well states might be updated)
461 // the returned two booleans are {continue_due_to_network, well_group_control_changed}, respectively
462 std::pair<bool, bool> updateWellControlsAndNetworkIteration(const bool mandatory_network_balance,
526 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger& deferred_logger) override;
537 void assembleWellEqDomain(const double dt, const Domain& domain, DeferredLogger& deferred_logger);
568 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger& deferred_logger);
Base class for specifying auxiliary equations. Definition: baseauxiliarymodule.hh:56 std::set< unsigned > NeighborSet Definition: baseauxiliarymodule.hh:63 Contains the high level supplements required to extend the black oil model by MICP. Definition: blackoilmicpmodules.hh:49 Contains the high level supplements required to extend the black oil model by polymer. Definition: blackoilpolymermodules.hh:54 Class for handling the blackoil well model. Definition: BlackoilWellModelGeneric.hpp:83 std::map< std::string, const WellInterfaceGeneric< Scalar > * > GLiftProdWells Definition: BlackoilWellModelGeneric.hpp:87 void assignWellTracerRates(data::Wells &wsrpt, const WellTracerRates &wellTracerRates) const void assignShutConnections(data::Wells &wsrpt, const int reportStepIndex) const const WellState< GetPropType< TypeTag, Properties::Scalar > > & wellState() const Definition: BlackoilWellModelGeneric.hpp:124 void assignMassGasRate(data::Wells &wsrpt, const GetPropType< TypeTag, Properties::Scalar > &gasDensity) const std::map< std::string, std::unique_ptr< GasLiftSingleWellGeneric< Scalar > > > GLiftOptWells Definition: BlackoilWellModelGeneric.hpp:86 std::map< std::string, std::unique_ptr< GasLiftWellState< Scalar > > > GLiftWellStateMap Definition: BlackoilWellModelGeneric.hpp:88 WellTestState & wellTestState() Definition: BlackoilWellModelGeneric.hpp:147 void assignMswTracerRates(data::Wells &wsrpt, const MswTracerRates &mswTracerRates) const void assignWellTargets(data::Wells &wsrpt) const Class for handling the guide rates in the blackoil well model. Definition: BlackoilWellModelGuideRates.hpp:46 void assignWellGuideRates(data::Wells &wsrpt, const int reportStepIdx) const Assign well guide rates. Class for handling the blackoil well model. Definition: BlackoilWellModel.hpp:98 void initializeGroupStructure(const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:371 void apply(BVector &r) const Definition: BlackoilWellModel_impl.hpp:1713 void prepareTimeStep(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:2509 bool updateGroupControls(const Group &group, DeferredLogger &deferred_logger, const int reportStepIdx, const int iterationIdx) Definition: BlackoilWellModel_impl.hpp:2337 void serialize(Restarter &) This method writes the complete state of the well to the harddisk. Definition: BlackoilWellModel.hpp:194 BlackOilMICPModule< TypeTag > MICPModule Definition: BlackoilWellModel.hpp:137 WellInterfacePtr createWellPointer(const int wellID, const int report_step) const Definition: BlackoilWellModel_impl.hpp:1013 const EclipseState & eclState() const Definition: BlackoilWellModel.hpp:450 WellInterfacePtr getWell(const std::string &well_name) const Definition: BlackoilWellModel_impl.hpp:2658 void calcInjResvCoeff(const int fipnum, const int pvtreg, std::vector< Scalar > &resv_coeff) override Definition: BlackoilWellModel_impl.hpp:2713 BlackOilPolymerModule< TypeTag > PolymerModule Definition: BlackoilWellModel.hpp:136 const std::vector< WellInterfacePtr > & localNonshutWells() const Get list of local nonshut wells. Definition: BlackoilWellModel.hpp:369 void prepareDeserialize(const int report_step) Definition: BlackoilWellModel.hpp:250 typename BlackoilWellModelGeneric< Scalar >::GLiftProdWells GLiftProdWells Definition: BlackoilWellModel.hpp:113 void calcResvCoeff(const int fipnum, const int pvtreg, const std::vector< Scalar > &production_rates, std::vector< Scalar > &resv_coeff) override Definition: BlackoilWellModel_impl.hpp:2702 void updateAndCommunicate(const int reportStepIdx, const int iterationIdx, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:2315 std::size_t global_num_cells_ Definition: BlackoilWellModel.hpp:413 std::map< std::string, Scalar > well_group_thp_calc_ Definition: BlackoilWellModel.hpp:419 void doPreStepNetworkRebalance(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1091 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: BlackoilWellModel.hpp:107 SimulatorReportSingle last_report_ Definition: BlackoilWellModel.hpp:431 void postSolveDomain(GlobalEqVector &deltaX, const Domain &domain) Definition: BlackoilWellModel.hpp:174 std::vector< Scalar > getPrimaryVarsDomain(const Domain &domain) const Definition: BlackoilWellModel_impl.hpp:2805 static const int solventSaturationIdx Definition: BlackoilWellModel.hpp:125 std::vector< WBPCalcID > wbpCalcMap_ Definition: BlackoilWellModel.hpp:429 typename GasLiftGroupInfo< Scalar >::GLiftEclWells GLiftEclWells Definition: BlackoilWellModel.hpp:116 void initWellContainer(const int reportStepIdx) override Definition: BlackoilWellModel_impl.hpp:173 void addReservoirSourceTerms(GlobalEqVector &residual, std::vector< typename SparseMatrixAdapter::MatrixBlock * > &diagMatAddress) const Definition: BlackoilWellModel_impl.hpp:1820 void beginReportStep(const int time_step) Definition: BlackoilWellModel_impl.hpp:274 typename WellInterface< TypeTag >::GasLiftSingleWell GasLiftSingleWell Definition: BlackoilWellModel.hpp:111 GetPropType< TypeTag, Properties::FluidSystem > FluidSystem Definition: BlackoilWellModel.hpp:103 void assembleWellEqDomain(const double dt, const Domain &domain, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1670 void applyScaleAdd(const Scalar alpha, const BVector &x, BVector &Ax) const Definition: BlackoilWellModel_impl.hpp:1774 void initFromRestartFile(const RestartValue &restartValues) Definition: BlackoilWellModel.hpp:241 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: BlackoilWellModel.hpp:104 GetPropType< TypeTag, Properties::Grid > Grid Definition: BlackoilWellModel.hpp:101 void updateWellControlsDomain(DeferredLogger &deferred_logger, const Domain &domain) Definition: BlackoilWellModel_impl.hpp:2146 GetPropType< TypeTag, Properties::EquilGrid > EquilGrid Definition: BlackoilWellModel.hpp:102 void assembleWellEq(const double dt, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1659 void postSolve(GlobalEqVector &deltaX) override This method is called after the linear solver has been called but before the solution is updated for ... Definition: BlackoilWellModel.hpp:169 void gasLiftOptimizationStage1SingleWell(WellInterface< TypeTag > *well, DeferredLogger &deferred_logger, GLiftProdWells &prod_wells, GLiftOptWells &glift_wells, GasLiftGroupInfo< Scalar > &group_info, GLiftWellStateMap &state_map, GLiftSyncGroups &groups_to_sync) Definition: BlackoilWellModel_impl.hpp:1619 void linearizeDomain(const Domain &domain, SparseMatrixAdapter &jacobian, GlobalEqVector &res) Definition: BlackoilWellModel_impl.hpp:251 BaseAuxiliaryModule< TypeTag >::NeighborSet NeighborSet Definition: BlackoilWellModel.hpp:122 static constexpr bool has_polymer_ Definition: BlackoilWellModel.hpp:127 int reportStepIndex() const Definition: BlackoilWellModel_impl.hpp:2690 void calculateProductivityIndexValues(DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:2450 void extractLegacyDepth_() Definition: BlackoilWellModel_impl.hpp:2646 void extractLegacyCellPvtRegionIndex_() Definition: BlackoilWellModel_impl.hpp:2613 void updateAverageFormationFactor() Definition: BlackoilWellModel_impl.hpp:2555 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: BlackoilWellModel.hpp:106 void initializeWellState(const int timeStepIdx) Definition: BlackoilWellModel_impl.hpp:829 void assemble(const int iterationIdx, const double dt) Definition: BlackoilWellModel_impl.hpp:1129 void computeWellTemperature() Definition: BlackoilWellModel_impl.hpp:2724 void addWellPressureEquations(PressureMatrix &jacobian, const BVector &weights, const bool use_well_weights) const Definition: BlackoilWellModel_impl.hpp:1804 void logPrimaryVars() const Definition: BlackoilWellModel_impl.hpp:2786 const SimulatorReportSingle & lastReport() const Definition: BlackoilWellModel_impl.hpp:680 bool updateWellControlsAndNetwork(const bool mandatory_network_balance, const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1189 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: BlackoilWellModel.hpp:110 void addWellContributions(SparseMatrixAdapter &jacobian) const Definition: BlackoilWellModel_impl.hpp:1794 const EquilGrid & equilGrid() const Definition: BlackoilWellModel.hpp:447 WellInterfacePtr createWellForWellTest(const std::string &well_name, const int report_step, DeferredLogger &deferred_logger) const Definition: BlackoilWellModel_impl.hpp:1064 std::map< std::string, int > well_domain_ Definition: BlackoilWellModel.hpp:442 void deserialize(Restarter &) Definition: BlackoilWellModel.hpp:184 GetPropType< TypeTag, Properties::Indices > Indices Definition: BlackoilWellModel.hpp:105 typename BlackoilWellModelGeneric< Scalar >::GLiftOptWells GLiftOptWells Definition: BlackoilWellModel.hpp:112 void computePotentials(const std::size_t widx, const WellState< Scalar > &well_state_copy, std::string &exc_msg, ExceptionType::ExcEnum &exc_type, DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:2415 std::pair< bool, bool > updateWellControls(const bool mandatory_network_balance, DeferredLogger &deferred_logger, const bool relax_network_tolerance=false) Definition: BlackoilWellModel_impl.hpp:2055 void recoverWellSolutionAndUpdateWellStateDomain(const BVector &x, const Domain &domain) Definition: BlackoilWellModel_impl.hpp:1891 void applyInitial() override Set the initial condition of the auxiliary module in the solution vector. Definition: BlackoilWellModel.hpp:163 typename GasLiftSingleWellGeneric< Scalar >::GLiftSyncGroups GLiftSyncGroups Definition: BlackoilWellModel.hpp:117 void assembleDomain(const int iterationIdx, const double dt, const Domain &domain) Definition: BlackoilWellModel_impl.hpp:1413 bool hasWell(const std::string &well_name) const Definition: BlackoilWellModel_impl.hpp:2675 ParallelWBPCalculation< Scalar >::EvaluatorFactory makeWellSourceEvaluatorFactory(const std::vector< Well >::size_type wellIdx) const Definition: BlackoilWellModel_impl.hpp:2243 void assembleWellEqWithoutIteration(const double dt, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1694 data::WellBlockAveragePressures computeWellBlockAveragePressures() const Definition: BlackoilWellModel_impl.hpp:2197 std::vector< WellInterfacePtr > well_container_ Definition: BlackoilWellModel.hpp:391 static constexpr std::size_t pressureVarIndex Definition: BlackoilWellModel.hpp:121 void initPrimaryVariablesEvaluation() const Definition: BlackoilWellModel_impl.hpp:1915 Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 1, 1 > > PressureMatrix Definition: BlackoilWellModel.hpp:360 void computeTotalRatesForDof(RateVector &rate, unsigned globalIdx) const Definition: BlackoilWellModel_impl.hpp:792 unsigned numDofs() const override Returns the number of additional degrees of freedom required for the auxiliary module. Definition: BlackoilWellModel.hpp:157 const std::vector< Scalar > & wellPerfEfficiencyFactors() const GetPropType< TypeTag, Properties::RateVector > RateVector Definition: BlackoilWellModel.hpp:108 void calculateExplicitQuantities(DeferredLogger &deferred_logger) const Definition: BlackoilWellModel_impl.hpp:2040 std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > regionalAveragePressureCalculator_ Definition: BlackoilWellModel.hpp:421 Dune::FieldVector< Scalar, numEq > VectorBlockType Definition: BlackoilWellModel.hpp:133 void updatePrimaryVariables(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:2604 GetPropType< TypeTag, Properties::GlobalEqVector > GlobalEqVector Definition: BlackoilWellModel.hpp:109 void initializeLocalWellStructure(const int reportStepIdx, const bool enableWellPIScaling) Definition: BlackoilWellModel_impl.hpp:326 static constexpr bool has_solvent_ Definition: BlackoilWellModel.hpp:126 std::pair< bool, bool > updateWellControlsAndNetworkIteration(const bool mandatory_network_balance, const bool relax_network_tolerance, const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1225 void addNeighbors(std::vector< NeighborSet > &neighbors) const override Specify the additional neighboring correlations caused by the auxiliary module. Definition: BlackoilWellModel_impl.hpp:189 static constexpr bool has_micp_ Definition: BlackoilWellModel.hpp:129 std::unique_ptr< RateConverterType > rateConverter_ Definition: BlackoilWellModel.hpp:420 BlackoilWellModel(Simulator &simulator) Definition: BlackoilWellModel_impl.hpp:146 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:613 std::vector< bool > is_cell_perforated_ Definition: BlackoilWellModel.hpp:393 ConvergenceReport getWellConvergence(const std::vector< Scalar > &B_avg, const bool checkWellGroupControls=false) const Definition: BlackoilWellModel_impl.hpp:1988 void registerOpenWellsForWBPCalculation() Definition: BlackoilWellModel_impl.hpp:2294 void linearize(SparseMatrixAdapter &jacobian, GlobalEqVector &res) override Linearize the auxiliary equation. Definition: BlackoilWellModel_impl.hpp:230 data::WellBlockAveragePressures wellBlockAveragePressures() const Definition: BlackoilWellModel.hpp:295 std::size_t local_num_cells_ Definition: BlackoilWellModel.hpp:415 void initGliftEclWellMap(GLiftEclWells &ecl_well_map) Definition: BlackoilWellModel_impl.hpp:1647 void gasLiftOptimizationStage1(DeferredLogger &deferred_logger, GLiftProdWells &prod_wells, GLiftOptWells &glift_wells, GasLiftGroupInfo< Scalar > &group_info, GLiftWellStateMap &state_map) Definition: BlackoilWellModel_impl.hpp:1511 bool alternative_well_rate_init_ Definition: BlackoilWellModel.hpp:418 void timeStepSucceeded(const double simulationTime, const double dt) Definition: BlackoilWellModel_impl.hpp:690 std::unique_ptr< WellType > createTypedWellPointer(const int wellID, const int time_step) const Definition: BlackoilWellModel_impl.hpp:1033 void setPrimaryVarsDomain(const Domain &domain, const std::vector< Scalar > &vars) Definition: BlackoilWellModel_impl.hpp:2822 std::shared_ptr< WellInterface< TypeTag > > WellInterfacePtr Definition: BlackoilWellModel.hpp:238 void createWellContainer(const int report_step) override Definition: BlackoilWellModel_impl.hpp:872 Dune::BlockVector< VectorBlockType > BVector Definition: BlackoilWellModel.hpp:134 bool maybeDoGasLiftOptimize(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1453 void computeWellGroupThp(const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1278 void updateWellTestState(const double &simulationTime, WellTestState &wellTestState) const upate the wellTestState related to economic limits Definition: BlackoilWellModel_impl.hpp:2375 ConvergenceReport getDomainWellConvergence(const Domain &domain, const std::vector< Scalar > &B_avg, DeferredLogger &local_deferredLogger) const Definition: BlackoilWellModel_impl.hpp:1943 void initializeWBPCalculationService() Definition: BlackoilWellModel_impl.hpp:2169 int compressedIndexForInterior(int cartesian_cell_idx) const override get compressed index for interior cells (-1, otherwise Definition: BlackoilWellModel.hpp:581 void initPrimaryVariablesEvaluationDomain(const Domain &domain) const Definition: BlackoilWellModel_impl.hpp:1926 static constexpr bool has_energy_ Definition: BlackoilWellModel.hpp:128 void recoverWellSolutionAndUpdateWellState(const BVector &x) Definition: BlackoilWellModel_impl.hpp:1873 void setupDomains(const std::vector< Domain > &domains) Definition: BlackoilWellModel_impl.hpp:2839 void addWellPressureEquationsStruct(PressureMatrix &jacobian) const Definition: BlackoilWellModel_impl.hpp:1850 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:2464 void prepareWellsBeforeAssembling(const double dt, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1683 typename BlackoilWellModelGeneric< Scalar >::GLiftWellStateMap GLiftWellStateMap Definition: BlackoilWellModel.hpp:115 int numComponents() const Definition: BlackoilWellModel_impl.hpp:2629 Definition: ConvergenceReport.hpp:38 Definition: DeferredLogger.hpp:57 Definition: GasLiftGroupInfo.hpp:46 std::map< std::string, std::pair< const Well *, int > > GLiftEclWells Definition: GasLiftGroupInfo.hpp:70 std::set< int > GLiftSyncGroups Definition: GasLiftSingleWellGeneric.hpp:59 Definition: GasLiftSingleWell.hpp:36 std::function< Evaluator()> EvaluatorFactory Definition: ParallelWBPCalculation.hpp:63 Definition: RateConverter.hpp:71 Definition: RegionAverageCalculator.hpp:60 Manages the initializing and running of time dependent problems. Definition: simulator.hh:92 Definition: WellContributions.hpp:53 Definition: WellInterface.hpp:73 Definition: WellState.hpp:62 data::Wells report(const int *globalCellIdxMap, const std::function< bool(const int)> &wasDynamicallyClosed) const Definition: blackoilnewtonmethodparams.hpp:31 Definition: blackoilboundaryratevector.hh:37 typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(.... Definition: propertysystem.hh:235 Solver parameters for the BlackoilModel. Definition: BlackoilModelParameters.hpp:147 bool use_multisegment_well_ Definition: BlackoilModelParameters.hpp:238 Definition: BlackoilWellModel.hpp:424 std::optional< typename std::vector< WellInterfacePtr >::size_type > openWellIdx_ Definition: BlackoilWellModel.hpp:425 std::size_t wbpCalcIdx_ Definition: BlackoilWellModel.hpp:426 Definition: BlackoilWellModel.hpp:83 static constexpr bool value Definition: BlackoilWellModel.hpp:83 Definition: BlackoilPhases.hpp:46 A struct for returning timing data from a simulator to its caller. Definition: SimulatorReport.hpp:34 Definition: SubDomain.hpp:62 |