|
BlackoilWellModel.hpp
Go to the documentation of this file.
95 class BlackoilWellModel : public WellConnectionAuxiliaryModule<TypeTag, BlackoilWellModel<TypeTag>>
113 using WellConnectionModule = WellConnectionAuxiliaryModule<TypeTag, BlackoilWellModel<TypeTag>>;
117 constexpr static std::size_t pressureVarIndex = GetPropType<TypeTag, Properties::Indices>::pressureSwitchIdx;
123 static constexpr EnergyModules energyModuleType_ = getPropValue<TypeTag, Properties::EnergyModuleType>();
252 ConvergenceReport getWellConvergence(const std::vector<Scalar>& B_avg, const bool checkWellGroupControlsAndNetwork = false) const;
343 int compressedIndexForInteriorLGR(const std::string& lgr_tag, const Connection& conn) const override
461 static Scalar computeTemperatureWeightFactor(const int perf_index, const int np, const FluidState& fs, const SingleWellState& ws)
476 weight_factor += cellDensity * (perfPhaseRate / cellBinv) * (cellInternalEnergy / cellTemperatures);
515 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>> regionalAveragePressureCalculator_{};
539 // the returned two booleans are {continue_due_to_network, well_group_control_changed}, respectively
540 std::tuple<bool, bool, Scalar> updateWellControlsAndNetworkIteration(const bool mandatory_network_balance,
580 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger& deferred_logger) override;
601 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger& deferred_logger);
625 // Store cell rates after assembling to avoid iterating all wells and connections for every element
Contains the high level supplements required to extend the black oil model by bioeffects. Definition: blackoilbioeffectsmodules.hh:95 Contains the high level supplements required to extend the black oil model by polymer. Definition: blackoilpolymermodules.hh:65 Class for handling the gaslift in the blackoil well model. Definition: BlackoilWellModelGasLift.hpp:96 Class for handling the blackoil well model. Definition: BlackoilWellModelGeneric.hpp:97 GroupStateHelperType & groupStateHelper() Definition: BlackoilWellModelGeneric.hpp:290 const GroupState< GetPropType< TypeTag, Properties::Scalar > > & groupState() const Definition: BlackoilWellModelGeneric.hpp:142 void assignDynamicWellStatus(data::Wells &wsrpt) const void assignWellTargets(data::Wells &wsrpt) const BlackoilWellModelWBP< GetPropType< TypeTag, Properties::Scalar >, GetPropType< TypeTag, Properties::FluidSystem >::IndexTraitsType > wbp_ Definition: BlackoilWellModelGeneric.hpp:518 WellTestState & wellTestState() Definition: BlackoilWellModelGeneric.hpp:183 void assignShutConnections(data::Wells &wsrpt, const int reportStepIndex) const const WellState< GetPropType< TypeTag, Properties::Scalar >, GetPropType< TypeTag, Properties::FluidSystem >::IndexTraitsType > & wellState() const Definition: BlackoilWellModelGeneric.hpp:152 void assignMassGasRate(data::Wells &wsrpt, const GetPropType< TypeTag, Properties::Scalar > gasDensity) 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:98 ReservoirCoupling::Proxy< Scalar > & rescoup() Get the reservoir coupling proxy. Definition: BlackoilWellModel.hpp:375 void initializeGroupStructure(const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:294 bool network_needs_more_balancing_force_another_newton_iteration_ Definition: BlackoilWellModel.hpp:522 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:2155 ReservoirCouplingMaster< Scalar > & reservoirCouplingMaster() Get reference to reservoir coupling master. Definition: BlackoilWellModel.hpp:401 void prepareTimeStep(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1974 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:1288 WellInterfacePtr createWellPointer(const int wellID, const int report_step) const Definition: BlackoilWellModel_impl.hpp:1084 GuideRateHandler< Scalar, IndexTraits > guide_rate_handler_ Definition: BlackoilWellModel.hpp:518 const EclipseState & eclState() const Definition: BlackoilWellModel.hpp:529 void prepareWellsBeforeAssembling(const double dt) Definition: BlackoilWellModel_impl.hpp:1364 const std::vector< WellInterfacePtr > & localNonshutWells() const Get list of local nonshut wells. Definition: BlackoilWellModel.hpp:306 void prepareDeserialize(const int report_step) Definition: BlackoilWellModel.hpp:199 void setNlddAdapter(BlackoilWellModelNldd< TypeTag > *mod) Definition: BlackoilWellModel.hpp:369 const Simulator & simulator() const Definition: BlackoilWellModel.hpp:366 static constexpr EnergyModules energyModuleType_ Definition: BlackoilWellModel.hpp:123 std::size_t global_num_cells_ Definition: BlackoilWellModel.hpp:508 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: BlackoilWellModel.hpp:107 const std::vector< Scalar > & B_avg() const Definition: BlackoilWellModel.hpp:453 SimulatorReportSingle last_report_ Definition: BlackoilWellModel.hpp:517 static const int solventSaturationIdx Definition: BlackoilWellModel.hpp:120 void initWellContainer(const int reportStepIdx) override Definition: BlackoilWellModel_impl.hpp:182 void beginReportStep(const int time_step) Definition: BlackoilWellModel_impl.hpp:199 const WellInterface< TypeTag > & getWell(const std::string &well_name) const Definition: BlackoilWellModel_impl.hpp:2127 GetPropType< TypeTag, Properties::FluidSystem > FluidSystem Definition: BlackoilWellModel.hpp:103 bool isReservoirCouplingMaster() const Check if this process is a reservoir coupling master. Definition: BlackoilWellModel.hpp:394 Dune::FieldVector< Scalar, numEq > VectorBlockType Definition: BlackoilWellModel.hpp:129 void initFromRestartFile(const RestartValue &restartValues) Definition: BlackoilWellModel.hpp:189 GetPropType< TypeTag, Properties::ElementContext > ElementContext Definition: BlackoilWellModel.hpp:104 GetPropType< TypeTag, Properties::Grid > Grid Definition: BlackoilWellModel.hpp:101 GetPropType< TypeTag, Properties::EquilGrid > EquilGrid Definition: BlackoilWellModel.hpp:102 int numConservationQuantities() const Definition: BlackoilWellModel_impl.hpp:2099 const std::map< std::string, int > & well_domain() const Definition: BlackoilWellModel.hpp:319 bool updateWellControls(DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:1651 static constexpr bool has_polymer_ Definition: BlackoilWellModel.hpp:122 int reportStepIndex() const Definition: BlackoilWellModel_impl.hpp:2143 void calculateProductivityIndexValues(DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:1916 void extractLegacyDepth_() Definition: BlackoilWellModel_impl.hpp:2115 void extractLegacyCellPvtRegionIndex_() Definition: BlackoilWellModel_impl.hpp:2083 void recoverWellSolutionAndUpdateWellStateDomain(const BVector &x, const int domainIdx) Definition: BlackoilWellModel_impl.hpp:1572 void updateAverageFormationFactor() Definition: BlackoilWellModel_impl.hpp:2026 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: BlackoilWellModel.hpp:106 bool isReservoirCouplingSlave() const Check if this process is a reservoir coupling slave. Definition: BlackoilWellModel.hpp:397 void initializeWellState(const int timeStepIdx) Definition: BlackoilWellModel_impl.hpp:832 void updatePrimaryVariables() Definition: BlackoilWellModel_impl.hpp:2074 const ReservoirCoupling::Proxy< Scalar > & rescoup() const Definition: BlackoilWellModel.hpp:376 void computeWellTemperature() Definition: BlackoilWellModel_impl.hpp:2177 void addWellPressureEquations(PressureMatrix &jacobian, const BVector &weights, const bool use_well_weights) const Definition: BlackoilWellModel_impl.hpp:1473 const SimulatorReportSingle & lastReport() const Definition: BlackoilWellModel_impl.hpp:711 bool updateWellControlsAndNetwork(const bool mandatory_network_balance, const double dt, DeferredLogger &local_deferredLogger) Definition: BlackoilWellModel_impl.hpp:1229 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: BlackoilWellModel.hpp:110 void addWellContributions(SparseMatrixAdapter &jacobian) const Definition: BlackoilWellModel_impl.hpp:1463 const EquilGrid & equilGrid() const Definition: BlackoilWellModel.hpp:526 void assembleWellEq(const double dt) Definition: BlackoilWellModel_impl.hpp:1352 WellInterfacePtr createWellForWellTest(const std::string &well_name, const int report_step, DeferredLogger &deferred_logger) const Definition: BlackoilWellModel_impl.hpp:1135 GetPropType< TypeTag, Properties::Indices > Indices Definition: BlackoilWellModel.hpp:105 int compressedIndexForInteriorLGR(const std::string &lgr_tag, const Connection &conn) const override Definition: BlackoilWellModel.hpp:343 void calculateExplicitQuantities() const Definition: BlackoilWellModel_impl.hpp:1636 std::vector< WellInterfacePtr > well_container_ Definition: BlackoilWellModel.hpp:485 static constexpr std::size_t pressureVarIndex Definition: BlackoilWellModel.hpp:117 void updateAndCommunicate(const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:1731 Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 1, 1 > > PressureMatrix Definition: BlackoilWellModel.hpp:285 void computeTotalRatesForDof(RateVector &rate, unsigned globalIdx) const Definition: BlackoilWellModel_impl.hpp:795 bool addMatrixContributions() const Definition: BlackoilWellModel.hpp:332 const std::vector< Scalar > & wellPerfEfficiencyFactors() const GetPropType< TypeTag, Properties::RateVector > RateVector Definition: BlackoilWellModel.hpp:108 bool updateGroupControls(const Group &group, DeferredLogger &deferred_logger, const int reportStepIdx) Definition: BlackoilWellModel_impl.hpp:1765 std::map< std::string, std::unique_ptr< AverageRegionalPressureType > > regionalAveragePressureCalculator_ Definition: BlackoilWellModel.hpp:515 void calcInjResvCoeff(const int fipnum, const int pvtreg, std::vector< Scalar > &resv_coeff) const override Definition: BlackoilWellModel_impl.hpp:2166 static Scalar computeTemperatureWeightFactor(const int perf_index, const int np, const FluidState &fs, const SingleWellState &ws) Definition: BlackoilWellModel.hpp:461 GetPropType< TypeTag, Properties::GlobalEqVector > GlobalEqVector Definition: BlackoilWellModel.hpp:109 void initializeLocalWellStructure(const int reportStepIdx, const bool enableWellPIScaling) Definition: BlackoilWellModel_impl.hpp:248 static constexpr bool has_solvent_ Definition: BlackoilWellModel.hpp:121 Dune::BlockVector< VectorBlockType > BVector Definition: BlackoilWellModel.hpp:130 static constexpr bool has_micp_ Definition: BlackoilWellModel.hpp:125 std::unique_ptr< RateConverterType > rateConverter_ Definition: BlackoilWellModel.hpp:514 BlackoilWellModel(Simulator &simulator) Definition: BlackoilWellModel_impl.hpp:76 const SparseTable< int > & well_local_cells() const Definition: BlackoilWellModel.hpp:311 void wellTesting(const int timeStepIdx, const double simulationTime, DeferredLogger &deferred_logger) Definition: BlackoilWellModel_impl.hpp:634 std::vector< bool > is_cell_perforated_ Definition: BlackoilWellModel.hpp:487 ConvergenceReport getWellConvergence(const std::vector< Scalar > &B_avg, const bool checkWellGroupControlsAndNetwork=false) const Definition: BlackoilWellModel_impl.hpp:1585 int numStrictIterations() const Definition: BlackoilWellModel.hpp:335 typename FluidSystem::IndexTraitsType IndexTraits Definition: BlackoilWellModel.hpp:114 void updateCellRatesForDomain(int domainIndex, const std::map< std::string, int > &well_domain_map) Definition: BlackoilWellModel_impl.hpp:1410 data::WellBlockAveragePressures wellBlockAveragePressures() const Definition: BlackoilWellModel.hpp:241 void assembleWellEqWithoutIteration(const double dt) Definition: BlackoilWellModel_impl.hpp:1378 void updateCellRates() Definition: BlackoilWellModel_impl.hpp:1398 void assemble(const double dt) Definition: BlackoilWellModel_impl.hpp:1160 std::size_t local_num_cells_ Definition: BlackoilWellModel.hpp:510 bool alternative_well_rate_init_ Definition: BlackoilWellModel.hpp:513 void timeStepSucceeded(const double simulationTime, const double dt) Definition: BlackoilWellModel_impl.hpp:721 std::unique_ptr< WellType > createTypedWellPointer(const int wellID, const int time_step) const Definition: BlackoilWellModel_impl.hpp:1104 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:1881 void updateGuideRates(const int report_step_idx, const double sim_time) Update guide rates for all wells and groups. Definition: BlackoilWellModel.hpp:385 ReservoirCoupling::Proxy< Scalar > rescoup_ Definition: BlackoilWellModel.hpp:519 void createWellContainer(const int report_step) override Definition: BlackoilWellModel_impl.hpp:875 std::unique_ptr< WellInterface< TypeTag > > WellInterfacePtr Definition: BlackoilWellModel.hpp:186 ReservoirCouplingSlave< Scalar > & reservoirCouplingSlave() Get reference to reservoir coupling slave. Definition: BlackoilWellModel.hpp:407 const ModelParameters & param() const Definition: BlackoilWellModel.hpp:456 void updateWellTestState(const double simulationTime, WellTestState &wellTestState) upate the wellTestState related to economic limits Definition: BlackoilWellModel_impl.hpp:1810 void addWellPressureEquationsDomain(PressureMatrix &jacobian, const BVector &weights, const bool use_well_weights, const int domainIndex) const Definition: BlackoilWellModel.hpp:291 void addReservoirSourceTerms(GlobalEqVector &residual, const std::vector< typename SparseMatrixAdapter::MatrixBlock * > &diagMatAddress) const Definition: BlackoilWellModel_impl.hpp:1495 int compressedIndexForInterior(int cartesian_cell_idx) const override get compressed index for interior cells (-1, otherwise Definition: BlackoilWellModel.hpp:338 static constexpr bool has_energy_ Definition: BlackoilWellModel.hpp:124 void recoverWellSolutionAndUpdateWellState(const BVector &x) Definition: BlackoilWellModel_impl.hpp:1548 void addWellPressureEquationsStruct(PressureMatrix &jacobian) const Definition: BlackoilWellModel_impl.hpp:1525 void calculateProductivityIndexValuesShutWells(const int reportStepIdx, DeferredLogger &deferred_logger) override Definition: BlackoilWellModel_impl.hpp:1930 data::WellBlockAveragePressures computeWellBlockAveragePressures(const Scalar gravity) const Definition: ConvergenceReport.hpp:38 Definition: DeferredLogger.hpp:57 Definition: GroupStateHelper.hpp:57 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:43 Definition: BlackoilWellModel.hpp:87 Definition: WellConnectionAuxiliaryModule.hpp:39 Definition: WellContributions.hpp:51 Definition: WellInterface.hpp:77 Definition: WellState.hpp:66 data::Wells report(const int *globalCellIdxMap, const std::function< bool(const int)> &wasDynamicallyClosed) const 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 BlackoilModel. Definition: BlackoilModelParameters.hpp:194 bool matrix_add_well_contributions_ Whether to add influences of wells between cells to the matrix and preconditioner matrix. Definition: BlackoilModelParameters.hpp:308 bool use_multisegment_well_ Definition: BlackoilModelParameters.hpp:302 int strict_outer_iter_wells_ Newton iteration where wells are stricly convergent. Definition: BlackoilModelParameters.hpp:258 A struct for returning timing data from a simulator to its caller. Definition: SimulatorReport.hpp:34 |