|
BlackoilWellModel.hpp
Go to the documentation of this file.
98 class BlackoilWellModel : public WellConnectionAuxiliaryModule<TypeTag, BlackoilWellModel<TypeTag>>
116 using WellConnectionModule = WellConnectionAuxiliaryModule<TypeTag, BlackoilWellModel<TypeTag>>;
120 constexpr static std::size_t pressureVarIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
126 static constexpr EnergyModules energyModuleType_ = getPropValue<TypeTag, Properties::EnergyModuleType>();
264 ConvergenceReport getWellConvergence(const std::vector<Scalar>& B_avg, const bool checkWellGroupControlsAndNetwork = false) const;
367 int compressedIndexForInteriorLGR(const std::string& lgr_tag, const Connection& conn) const override
549 static Scalar computeTemperatureWeightFactor(const int perf_index, const int np, const FluidState& fs, const SingleWellState& ws)
564 weight_factor += cellDensity * (perfPhaseRate / cellBinv) * (cellInternalEnergy / cellTemperatures);
603 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>> regionalAveragePressureCalculator_{};
637 // the returned two booleans are {continue_due_to_network, well_group_control_changed}, respectively
638 std::tuple<bool, bool, Scalar> updateWellControlsAndNetworkIteration(const bool mandatory_network_balance,
681 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger& deferred_logger) override;
702 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger& deferred_logger);
802 // Store cell rates after assembling to avoid iterating all wells and connections for every element
Class for handling the gaslift in the blackoil well model. Definition: BlackoilWellModelGasLift.hpp:96 Class for handling the blackoil well model. Definition: BlackoilWellModelGeneric.hpp:100 BlackoilWellModelWBP< Scalar, IndexTraits > wbp_ Definition: BlackoilWellModelGeneric.hpp:609 GroupStateHelperType & groupStateHelper() Definition: BlackoilWellModelGeneric.hpp:335 const GroupState< Scalar > & groupState() const Definition: BlackoilWellModelGeneric.hpp:149 void assignWellTargets(data::Wells &wsrpt) const void assignDynamicWellStatus(data::Wells &wsrpt) const void assignWellPerformanceEventTracker(data::Wells &wsrpt) const WellTestState & wellTestState() Definition: BlackoilWellModelGeneric.hpp:190 void assignMassGasRate(data::Wells &wsrpt, const Scalar gasDensity) const const WellState< Scalar, IndexTraits > & wellState() const Definition: BlackoilWellModelGeneric.hpp:159 void assignShutConnections(data::Wells &wsrpt, const int reportStepIndex) const Class for handling the guide rates in the blackoil well model. Definition: BlackoilWellModelGuideRates.hpp:47 void assignWellGuideRates(data::Wells &wsrpt, const int reportStepIdx) const Assign well guide rates. Class for handling the blackoil well network model. Definition: BlackoilWellModelNetwork.hpp:47 Class for handling the blackoil well model in a NLDD solver. Definition: BlackoilWellModelNldd.hpp:80 Class for handling the blackoil well model. Definition: BlackoilWellModel.hpp:101 ReservoirCoupling::Proxy< Scalar > & rescoup() Get the reservoir coupling proxy. Definition: BlackoilWellModel.hpp:413 void initializeGroupStructure(const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:308 bool network_needs_more_balancing_force_another_newton_iteration_ Definition: BlackoilWellModel.hpp:611 Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, numWellDofs, numWellDofs > > DMatrix Definition: BlackoilWellModel.hpp:299 void calcResvCoeff(const int fipnum, const int pvtreg, const std::vector< Scalar > &production_rates, std::vector< Scalar > &resv_coeff) const override Definition: BlackoilWellModel_impl.hpp:2340 ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster() Get reference to reservoir coupling master. Definition: BlackoilWellModel.hpp:448 void prepareTimeStep(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:2160 std::tuple< bool, bool, Scalar > updateWellControlsAndNetworkIteration(const bool mandatory_network_balance, const bool relax_network_tolerance, const bool optimize_gas_lift, const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1403 static constexpr bool has_bioeffects_ Definition: BlackoilWellModel.hpp:130 Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, numWellDofs, numResDofs > > BMatrix Definition: BlackoilWellModel.hpp:297 WellInterfacePtr createWellPointer(const int wellID, const int report_step) const Definition: BlackoilWellModel_impl.hpp:1126 GuideRateHandler< Scalar, IndexTraits > guide_rate_handler_ Definition: BlackoilWellModel.hpp:607 const EclipseState & eclState() const Definition: BlackoilWellModel.hpp:618 void prepareWellsBeforeAssembling(const double dt) Definition: BlackoilWellModel_impl.hpp:1526 const std::vector< WellInterfacePtr > & localNonshutWells() const Get list of local nonshut wells. Definition: BlackoilWellModel.hpp:330 void prepareDeserialize(const int report_step) Definition: BlackoilWellModel.hpp:207 void setNlddAdapter(BlackoilWellModelNldd< TypeTag > *mod) Definition: BlackoilWellModel.hpp:401 const Simulator & simulator() const Definition: BlackoilWellModel.hpp:390 static constexpr bool has_geochem_ Definition: BlackoilWellModel.hpp:129 static constexpr EnergyModules energyModuleType_ Definition: BlackoilWellModel.hpp:126 std::size_t global_num_cells_ Definition: BlackoilWellModel.hpp:596 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: BlackoilWellModel.hpp:110 const std::vector< Scalar > & B_avg() const Definition: BlackoilWellModel.hpp:528 SimulatorReportSingle last_report_ Definition: BlackoilWellModel.hpp:605 static const int solventSaturationIdx Definition: BlackoilWellModel.hpp:123 void initWellContainer(const int reportStepIdx) override Definition: BlackoilWellModel_impl.hpp:185 void beginReportStep(const int time_step) Definition: BlackoilWellModel_impl.hpp:202 static constexpr int numResDofs Definition: BlackoilWellModel.hpp:295 const WellInterface< TypeTag > & getWell(const std::string &well_name) const Definition: BlackoilWellModel_impl.hpp:2312 bool useTightRcNetworkCoupling() const True when tight (per-sub-iteration) reservoir-coupling network coupling is in effect.... Definition: BlackoilWellModel.hpp:537 GetPropType< TypeTag, Properties::FluidSystem > FluidSystem Definition: BlackoilWellModel.hpp:106 bool isReservoirCouplingMaster() const Check if this process is a reservoir coupling master. Definition: BlackoilWellModel.hpp:432 Dune::FieldVector< Scalar, numEq > VectorBlockType Definition: BlackoilWellModel.hpp:134 const BlackoilWellModelNetwork< TypeTag > & network() const Definition: BlackoilWellModel.hpp:396 void initFromRestartFile(const RestartValue &restartValues) Definition: BlackoilWellModel.hpp:198 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: BlackoilWellModel.hpp:107 GetPropType< TypeTag, Properties::Grid > Grid Definition: BlackoilWellModel.hpp:104 GetPropType< TypeTag, Properties::EquilGrid > EquilGrid Definition: BlackoilWellModel.hpp:105 static constexpr int numWellDofs Definition: BlackoilWellModel.hpp:296 int numConservationQuantities() const Definition: BlackoilWellModel_impl.hpp:2281 const std::map< std::string, int > & well_domain() const Definition: BlackoilWellModel.hpp:343 const ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave() const Definition: BlackoilWellModel.hpp:460 bool updateWellControls(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1823 static constexpr bool has_polymer_ Definition: BlackoilWellModel.hpp:125 WellInterface< TypeTag >::WellSolveStats pending_solve_stats_ Definition: BlackoilWellModel.hpp:606 int reportStepIndex() const Definition: BlackoilWellModel_impl.hpp:2328 void calculateProductivityIndexValues(DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:2102 void extractLegacyDepth_() Definition: BlackoilWellModel_impl.hpp:2300 void extractLegacyCellPvtRegionIndex_() Definition: BlackoilWellModel_impl.hpp:2265 std::vector< WellInterfacePtr > & wellContainer() Definition: BlackoilWellModel.hpp:398 void recoverWellSolutionAndUpdateWellStateDomain(const BVector &x, const int domainIdx) Definition: BlackoilWellModel_impl.hpp:1744 void updateAverageFormationFactor() Definition: BlackoilWellModel_impl.hpp:2208 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: BlackoilWellModel.hpp:109 BlackoilWellModel(Simulator &simulator, const NewtonIterationContext &iter_ctx) Definition: BlackoilWellModel_impl.hpp:73 bool isReservoirCouplingSlave() const Check if this process is a reservoir coupling slave. Definition: BlackoilWellModel.hpp:435 const ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster() const Definition: BlackoilWellModel.hpp:451 void initializeWellState(const int timeStepIdx) Definition: BlackoilWellModel_impl.hpp:828 void updatePrimaryVariables() Definition: BlackoilWellModel_impl.hpp:2256 const ReservoirCoupling::Proxy< Scalar > & rescoup() const Definition: BlackoilWellModel.hpp:414 BlackOilPolymerModule< TypeTag, has_polymer_ > PolymerModule Definition: BlackoilWellModel.hpp:137 void computeWellTemperature() Definition: BlackoilWellModel_impl.hpp:2362 void addWellPressureEquations(PressureMatrix &jacobian, const BVector &weights, const bool use_well_weights) const Definition: BlackoilWellModel_impl.hpp:1648 const SimulatorReportSingle & lastReport() const Definition: BlackoilWellModel_impl.hpp:688 bool updateWellControlsAndNetwork(const bool mandatory_network_balance, const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1337 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: BlackoilWellModel.hpp:113 void assembleWellEqAtRestoredState(const double dt) Assemble the well equations at an already-converged state that the caller has restored,... Definition: BlackoilWellModel.hpp:517 void addWellContributions(SparseMatrixAdapter &jacobian) const Definition: BlackoilWellModel_impl.hpp:1625 const EquilGrid & equilGrid() const Definition: BlackoilWellModel.hpp:615 void assembleWellEq(const double dt) Definition: BlackoilWellModel_impl.hpp:1514 WellInterfacePtr createWellForWellTest(const std::string &well_name, const int report_step, DeferredLogger &deferred_logger) const Definition: BlackoilWellModel_impl.hpp:1177 GetPropType< TypeTag, Properties::Indices > Indices Definition: BlackoilWellModel.hpp:108 int compressedIndexForInteriorLGR(const std::string &lgr_tag, const Connection &conn) const override Definition: BlackoilWellModel.hpp:367 void calculateExplicitQuantities() const Definition: BlackoilWellModel_impl.hpp:1808 BlackoilWellModelNetwork< TypeTag > & network() Definition: BlackoilWellModel.hpp:395 Dune::BlockVector< Dune::FieldVector< Scalar, numWellDofs > > WVector Definition: BlackoilWellModel.hpp:300 std::vector< WellInterfacePtr > well_container_ Definition: BlackoilWellModel.hpp:573 void collectWellSolveStats() Definition: BlackoilWellModel_impl.hpp:1292 static constexpr std::size_t pressureVarIndex Definition: BlackoilWellModel.hpp:120 void updateAndCommunicate(const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:1921 Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 1, 1 > > PressureMatrix Definition: BlackoilWellModel.hpp:309 void computeTotalRatesForDof(RateVector &rate, unsigned globalIdx) const Definition: BlackoilWellModel_impl.hpp:791 void stashWellSolveStats() Definition: BlackoilWellModel_impl.hpp:1308 bool addMatrixContributions() const Definition: BlackoilWellModel.hpp:356 const std::vector< Scalar > & wellPerfEfficiencyFactors() const GetPropType< TypeTag, Properties::RateVector > RateVector Definition: BlackoilWellModel.hpp:111 bool updateGroupControls(const Group &group, DeferredLogger &deferred_logger, const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:1948 void initializeLocalWellStructure(const int reportStepIdx, const bool enableWellPIScaling, const bool initializeWellState) Definition: BlackoilWellModel_impl.hpp:254 std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > regionalAveragePressureCalculator_ Definition: BlackoilWellModel.hpp:603 void calcInjResvCoeff(const int fipnum, const int pvtreg, std::vector< Scalar > &resv_coeff) const override Definition: BlackoilWellModel_impl.hpp:2351 static Scalar computeTemperatureWeightFactor(const int perf_index, const int np, const FluidState &fs, const SingleWellState &ws) Definition: BlackoilWellModel.hpp:549 GetPropType< TypeTag, Properties::GlobalEqVector > GlobalEqVector Definition: BlackoilWellModel.hpp:112 GuideRateHandler< Scalar, IndexTraits > & guideRateHandler() Definition: BlackoilWellModel.hpp:404 static constexpr bool has_solvent_ Definition: BlackoilWellModel.hpp:124 Dune::BlockVector< VectorBlockType > BVector Definition: BlackoilWellModel.hpp:135 static constexpr bool has_micp_ Definition: BlackoilWellModel.hpp:128 std::unique_ptr< RateConverterType > rateConverter_ Definition: BlackoilWellModel.hpp:602 const SparseTable< int > & well_local_cells() const Definition: BlackoilWellModel.hpp:335 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:612 std::vector< bool > is_cell_perforated_ Definition: BlackoilWellModel.hpp:575 ConvergenceReport getWellConvergence(const std::vector< Scalar > &B_avg, const bool checkWellGroupControlsAndNetwork=false) const Definition: BlackoilWellModel_impl.hpp:1757 int numStrictIterations() const Definition: BlackoilWellModel.hpp:359 typename FluidSystem::IndexTraitsType IndexTraits Definition: BlackoilWellModel.hpp:117 void updateCellRatesForDomain(int domainIndex, const std::map< std::string, int > &well_domain_map) Definition: BlackoilWellModel_impl.hpp:1572 data::WellBlockAveragePressures wellBlockAveragePressures() const Definition: BlackoilWellModel.hpp:253 void assembleWellEqWithoutIteration(const double dt) Definition: BlackoilWellModel_impl.hpp:1540 void updateCellRates() Definition: BlackoilWellModel_impl.hpp:1560 void assemble(const double dt) Definition: BlackoilWellModel_impl.hpp:1202 std::size_t local_num_cells_ Definition: BlackoilWellModel.hpp:598 BlackOilBioeffectsModule< TypeTag, has_bioeffects_ > BioeffectsModule Definition: BlackoilWellModel.hpp:138 bool alternative_well_rate_init_ Definition: BlackoilWellModel.hpp:601 void timeStepSucceeded(const double simulationTime, const double dt) Definition: BlackoilWellModel_impl.hpp:698 std::unique_ptr< WellType > createTypedWellPointer(const int wellID, const int time_step) const Definition: BlackoilWellModel_impl.hpp:1146 void computePotentials(const std::size_t widx, const WellState< Scalar, IndexTraits > &well_state_copy, std::string &exc_msg, ExceptionType::ExcEnum &exc_type) override Definition: BlackoilWellModel_impl.hpp:2067 void updateGuideRates(const int report_step_idx, const double sim_time) Update guide rates for all wells and groups. Definition: BlackoilWellModel.hpp:423 ReservoirCoupling::Proxy< Scalar > rescoup_ Definition: BlackoilWellModel.hpp:608 void createWellContainer(const int report_step) override Definition: BlackoilWellModel_impl.hpp:871 std::unique_ptr< WellInterface< TypeTag > > WellInterfacePtr Definition: BlackoilWellModel.hpp:195 ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave() Get reference to reservoir coupling slave. Definition: BlackoilWellModel.hpp:457 const ModelParameters & param() const Definition: BlackoilWellModel.hpp:531 void updateWellTestState(const double simulationTime, WellTestState &wellTestState) upate the wellTestState related to economic limits Definition: BlackoilWellModel_impl.hpp:1993 void addWellPressureEquationsDomain(PressureMatrix &jacobian, const BVector &weights, const bool use_well_weights, const int domainIndex) const Definition: BlackoilWellModel.hpp:315 bool isReservoirCouplingMasterGroup(const std::string &group_name) const Check if a group is a reservoir coupling master group. Definition: BlackoilWellModel.hpp:442 void addBCDMatrix(std::vector< BMatrix > &b_matrices, std::vector< CMatrix > &c_matrices, std::vector< DMatrix > &d_matrices, Opm::SparseTable< int > &wcells) const Definition: BlackoilWellModel_impl.hpp:1634 const GuideRateHandler< Scalar, IndexTraits > & guideRateHandler() const Definition: BlackoilWellModel.hpp:407 void addSolveStats(const WellInterface< TypeTag > &well) Definition: BlackoilWellModel_impl.hpp:1318 void addReservoirSourceTerms(GlobalEqVector &residual, const std::vector< typename SparseMatrixAdapter::MatrixBlock * > &diagMatAddress) const Definition: BlackoilWellModel_impl.hpp:1670 int compressedIndexForInterior(int cartesian_cell_idx) const override get compressed index for interior cells (-1, otherwise Definition: BlackoilWellModel.hpp:362 Dune::BCRSMatrix< Dune::FieldMatrix< Scalar, numResDofs, numWellDofs > > CMatrix Definition: BlackoilWellModel.hpp:298 static constexpr bool has_energy_ Definition: BlackoilWellModel.hpp:127 void recoverWellSolutionAndUpdateWellState(const BVector &x) Definition: BlackoilWellModel_impl.hpp:1720 void addWellPressureEquationsStruct(PressureMatrix &jacobian) const Definition: BlackoilWellModel_impl.hpp:1700 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:2116 void advanceTimeLevel() Definition: BlackoilWellModel_impl.hpp:605 const std::vector< WellInterfacePtr > & wellContainer() const Definition: BlackoilWellModel.hpp:399 Definition: ConvergenceReport.hpp:38 Definition: DeferredLogger.hpp:57 Definition: GroupStateHelper.hpp:56 ScopedLoggerGuard pushLogger(bool do_mpi_gather=true) const Push a new logger onto the stack with auto-cleanup on destruction. Definition: GroupStateHelper.hpp:363 Handles computation and reporting of guide rates for wells and groups. Definition: GuideRateHandler.hpp:46 Definition: RateConverter.hpp:70 Definition: RegionAverageCalculator.hpp:60 Thin proxy for reservoir coupling master/slave pointers. Definition: RescoupProxy.hpp:54 Definition: ReservoirCouplingMaster.hpp:38 Definition: ReservoirCouplingSlave.hpp:40 Definition: SingleWellState.hpp:44 Definition: BlackoilWellModel.hpp:90 Definition: WellConnectionAuxiliaryModule.hpp:39 Definition: WellContributions.hpp:51 Definition: WellInterface.hpp:79 Definition: WellState.hpp:68 Definition: blackoilbioeffectsmodules.hh:45 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:233 Solver parameters for the NonlinearSystemBlackOilReservoir. Definition: BlackoilModelParameters.hpp:207 bool matrix_add_well_contributions_ Whether to add influences of wells between cells to the matrix and preconditioner matrix. Definition: BlackoilModelParameters.hpp:321 int strict_outer_iter_wells_ Newton iteration where wells are stricly convergent. Definition: BlackoilModelParameters.hpp:271 bool rc_network_loose_coupling_ Definition: BlackoilModelParameters.hpp:363 Context for iteration-dependent decisions in the Newton solver. Definition: NewtonIterationContext.hpp:43 A struct for returning timing data from a simulator to its caller. Definition: SimulatorReport.hpp:34 |