|
WellInterface.hpp
Go to the documentation of this file.
116 static constexpr bool has_energy = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::FullyImplicitThermal;
117 static const bool has_temperature = getPropValue<TypeTag, Properties::EnergyModuleType>() == EnergyModules::ConstantTemperature
124 static constexpr bool has_disgas_in_water = getPropValue<TypeTag, Properties::EnableDisgasInWater>();
125 static constexpr bool has_saltPrecip = getPropValue<TypeTag, Properties::EnableSaltPrecipitation>();
Declares the properties required by the black oil model. Definition: ConvergenceReport.hpp:38 Definition: DeferredLogger.hpp:57 std::map< std::string, std::pair< const Well *, int > > GLiftEclWells Definition: GasLiftGroupInfo.hpp:64 Definition: GasLiftSingleWell.hpp:39 Definition: GroupState.hpp:41 Class encapsulating some information about parallel wells. Definition: ParallelWellInfo.hpp:198 Definition: RateConverter.hpp:70 Manages the initializing and running of time dependent problems. Definition: simulator.hh:84 Definition: SingleWellState.hpp:43 Definition: WellGroupHelper.hpp:51 Definition: WellInterfaceFluidSystem.hpp:50 static constexpr int Oil Definition: WellInterfaceFluidSystem.hpp:65 static constexpr int Water Definition: WellInterfaceFluidSystem.hpp:64 static constexpr int Gas Definition: WellInterfaceFluidSystem.hpp:66 int pvtRegionIdx() const Definition: WellInterfaceGeneric.hpp:130 const std::vector< FluidSystem::Scalar > & wellIndex() const Definition: WellInterfaceGeneric.hpp:152 Definition: WellInterfaceIndices.hpp:34 typename WellInterfaceFluidSystem< GetPropType< TypeTag, Properties::FluidSystem > >::ModelParameters ModelParameters Definition: WellInterfaceIndices.hpp:41 DenseAd::Evaluation< Scalar, Indices::numEq > Eval Definition: WellInterfaceIndices.hpp:40 Definition: WellInterface.hpp:77 virtual std::vector< Scalar > computeCurrentWellRates(const Simulator &simulator, DeferredLogger &deferred_logger) const =0 std::optional< Scalar > estimateOperableBhp(const Simulator &ebos_simulator, const double dt, const WellGroupHelperType &wgHelper, const SummaryState &summary_state, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:695 GetPropType< TypeTag, Properties::Simulator > Simulator Definition: WellInterface.hpp:82 bool updateWellOperabilityFromWellEq(const Simulator &simulator, const WellGroupHelperType &wgHelper, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:1249 virtual void updateWellStateWithTarget(const Simulator &simulator, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:1280 Scalar computeConnectionDFactor(const int perf, const IntensiveQuantities &intQuants, const SingleWellStateType &ws) const Definition: WellInterface_impl.hpp:1963 virtual void computeWellRatesWithBhp(const Simulator &ebosSimulator, const Scalar &bhp, std::vector< Scalar > &well_flux, DeferredLogger &deferred_logger) const =0 virtual void addWellContributions(SparseMatrixAdapter &) const =0 typename WellInterfaceFluidSystem< FluidSystem >::RateConverterType RateConverterType Definition: WellInterface.hpp:105 const std::vector< RateVector > & connectionRates() const Definition: WellInterface.hpp:351 BlackOilFluidState< Eval, FluidSystem, has_temperature, has_energy, Indices::compositionSwitchIdx >=0, has_watVapor, has_brine, has_saltPrecip, has_disgas_in_water, Indices::numPhases > FluidState Definition: WellInterface.hpp:139 virtual void updateIPR(const Simulator &simulator, DeferredLogger &deferred_logger) const =0 std::vector< RateVector > connectionRates_ Definition: WellInterface.hpp:378 void computeConnLevelProdInd(const FluidState &fs, const std::function< Scalar(const Scalar)> &connPICalc, const std::vector< Scalar > &mobility, Scalar *connPI) const Definition: WellInterface_impl.hpp:2159 bool solveWellForTesting(const Simulator &simulator, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:811 Dune::BCRSMatrix< Opm::MatrixBlock< Scalar, 1, 1 > > PressureMatrix Definition: WellInterface.hpp:98 bool solveWellWithBhp(const Simulator &simulator, const double dt, const Scalar bhp, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:733 void gliftBeginTimeStepWellTestUpdateALQ(const Simulator &simulator, WellStateType &well_state, const GroupState< Scalar > &group_state, GLiftEclWells &ecl_well_map, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:1149 Scalar volumetricSurfaceRateForConnection(int cellIdx, int phaseIdx) const Definition: WellInterface_impl.hpp:1101 virtual void init(const std::vector< Scalar > &depth_arg, const Scalar gravity_arg, const std::vector< Scalar > &B_avg, const bool changed_to_open_this_step) Definition: WellInterface_impl.hpp:95 virtual void checkOperabilityUnderTHPLimit(const Simulator &simulator, const WellStateType &well_state, const WellGroupHelperType &wgHelper, DeferredLogger &deferred_logger)=0 bool iterateWellEquations(const Simulator &simulator, const double dt, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:513 void getMobility(const Simulator &simulator, const int local_perf_index, std::vector< Value > &mob, Callback &extendEval, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:2049 void solveWellEquation(const Simulator &simulator, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:863 void assembleWellEq(const Simulator &simulator, const double dt, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:925 void assembleWellEqWithoutIteration(const Simulator &simulator, const double dt, WellStateType &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:942 virtual void apply(const BVector &x, BVector &Ax) const =0 Ax = Ax - C D^-1 B x. static const bool has_temperature Definition: WellInterface.hpp:117 GetPropType< TypeTag, Properties::IntensiveQuantities > IntensiveQuantities Definition: WellInterface.hpp:87 virtual void computeWellPotentials(const Simulator &simulator, const WellStateType &well_state, const WellGroupHelperType &wgHelper, std::vector< Scalar > &well_potentials, DeferredLogger &deferred_logger)=0 GetPropType< TypeTag, Properties::Scalar > Scalar Definition: WellInterface.hpp:83 std::vector< Scalar > initialWellRateFractions(const Simulator &ebosSimulator, const WellStateType &well_state) const Definition: WellInterface_impl.hpp:1725 void updateConnectionDFactor(const Simulator &simulator, SingleWellStateType &ws) const Definition: WellInterface_impl.hpp:1943 virtual void updateWaterThroughput(const double dt, WellStateType &well_state) const =0 GetPropType< TypeTag, Properties::MaterialLaw > MaterialLaw Definition: WellInterface.hpp:88 virtual Scalar getRefDensity() const =0 typename FluidSystem::IndexTraitsType IndexTraits Definition: WellInterface.hpp:85 Eval getPerfCellPressure(const FluidState &fs) const Definition: WellInterface_impl.hpp:2034 Dune::BlockVector< VectorBlockType > BVector Definition: WellInterface.hpp:97 void initializeProducerWellState(const Simulator &simulator, WellStateType &well_state, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:1775 static constexpr bool has_bioeffects Definition: WellInterface.hpp:126 bool changed_to_stopped_this_step_ Definition: WellInterface.hpp:380 static constexpr bool has_polymermw Definition: WellInterface.hpp:120 virtual void calculateExplicitQuantities(const Simulator &simulator, const WellStateType &well_state, DeferredLogger &deferred_logger)=0 virtual bool iterateWellEqWithControl(const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger)=0 void addCellRates(std::map< int, RateVector > &cellRates_) const Definition: WellInterface_impl.hpp:1082 GetPropType< TypeTag, Properties::Grid > Grid Definition: WellInterface.hpp:81 bool wellUnderZeroGroupRateTarget(const Simulator &simulator, const WellStateType &well_state, DeferredLogger &deferred_logger, std::optional< bool > group_control=std::nullopt) const Definition: WellInterface_impl.hpp:1693 typename Base::ModelParameters ModelParameters Definition: WellInterface.hpp:111 virtual void updatePrimaryVariables(const Simulator &simulator, const WellStateType &well_state, DeferredLogger &deferred_logger)=0 GetPropType< TypeTag, Properties::FluidSystem > FluidSystem Definition: WellInterface.hpp:84 virtual void assembleWellEqWithoutIteration(const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, WellStateType &well_state, const GroupState< Scalar > &group_state, DeferredLogger &deferred_logger)=0 static constexpr bool has_disgas_in_water Definition: WellInterface.hpp:124 static constexpr bool has_saltPrecip Definition: WellInterface.hpp:125 virtual void checkOperabilityUnderBHPLimit(const WellStateType &well_state, const Simulator &simulator, DeferredLogger &deferred_logger)=0 WellGroupHelper< Scalar, IndexTraits > WellGroupHelperType Definition: WellInterface.hpp:102 GetPropType< TypeTag, Properties::RateVector > RateVector Definition: WellInterface.hpp:90 virtual void recoverWellSolutionAndUpdateWellState(const Simulator &simulator, const BVector &x, WellStateType &well_state, DeferredLogger &deferred_logger)=0 void updateConnectionTransmissibilityFactor(const Simulator &simulator, SingleWellStateType &ws) const Definition: WellInterface_impl.hpp:2005 void computeConnLevelInjInd(const FluidState &fs, const Phase preferred_phase, const std::function< Scalar(const Scalar)> &connIICalc, const std::vector< Scalar > &mobility, Scalar *connII, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:2193 typename GasLiftGroupInfo< Scalar, IndexTraits >::GLiftEclWells GLiftEclWells Definition: WellInterface.hpp:92 std::unique_ptr< GasLiftSingleWell > initializeGliftWellTest_(const Simulator &simulator, WellStateType &well_state, const GroupState< Scalar > &group_state, GLiftEclWells &ecl_well_map, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:2227 virtual void addWellPressureEquations(PressureMatrix &mat, const BVector &x, const int pressureVarIndex, const bool use_well_weights, const WellStateType &well_state) const =0 virtual void updateIPRImplicit(const Simulator &simulator, WellStateType &well_state, DeferredLogger &deferred_logger)=0 int number_of_well_reopenings_ Definition: WellInterface.hpp:382 virtual void solveEqAndUpdateWellState(const Simulator &simulator, WellStateType &well_state, DeferredLogger &deferred_logger)=0 virtual void computeWellRatesWithBhpIterations(const Simulator &simulator, const Scalar &bhp, const WellGroupHelperType &wgHelper, std::vector< Scalar > &well_flux, DeferredLogger &deferred_logger) const =0 bool updateWellStateWithTHPTargetProd(const Simulator &simulator, WellStateType &well_state, const WellGroupHelperType &wgHelper, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:2127 bool updateWellControlAndStatusLocalIteration(const Simulator &simulator, const WellGroupHelperType &wgHelper, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const Scalar WQTotal, WellStateType &well_state, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false) Definition: WellInterface_impl.hpp:277 Dune::FieldMatrix< Scalar, Indices::numEq, Indices::numEq > MatrixBlockType Definition: WellInterface.hpp:95 virtual std::optional< Scalar > computeBhpAtThpLimitProdWithAlq(const Simulator &ebos_simulator, const WellGroupHelperType &wgHelper, const SummaryState &summary_state, const Scalar alq_value, DeferredLogger &deferred_logger, bool iterate_if_no_solution) const =0 bool solveWellWithZeroRate(const Simulator &simulator, const double dt, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:780 bool wellUnderZeroRateTarget(const Simulator &simulator, const WellStateType &well_state, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:1675 virtual ConvergenceReport getWellConvergence(const Simulator &simulator, const WellStateType &well_state, const std::vector< Scalar > &B_avg, DeferredLogger &deferred_logger, const bool relax_tolerance) const =0 WellInterface(const Well &well, const ParallelWellInfo< Scalar > &pw_info, const int time_step, const ModelParameters ¶m, const RateConverterType &rate_converter, const int pvtRegionIdx, const int num_conservation_quantities, const int num_phases, const int index_of_well, const std::vector< PerforationData< Scalar > > &perf_data) Constructor. Definition: WellInterface_impl.hpp:58 WellState< Scalar, IndexTraits > WellStateType Definition: WellInterface.hpp:100 SingleWellState< Scalar, IndexTraits > SingleWellStateType Definition: WellInterface.hpp:101 bool updateWellControl(const Simulator &simulator, const IndividualOrGroup iog, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:189 virtual void updateProductivityIndex(const Simulator &simulator, const WellProdIndexCalculator< Scalar > &wellPICalc, WellStateType &well_state, DeferredLogger &deferred_logger) const =0 void wellTesting(const Simulator &simulator, const double simulation_time, const WellGroupHelperType &wgHelper, WellStateType &well_state, WellTestState &welltest_state, GLiftEclWells &ecl_well_map, std::map< std::string, double > &open_times, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:387 virtual bool iterateWellEqWithSwitching(const Simulator &simulator, const double dt, const WellInjectionControls &inj_controls, const WellProductionControls &prod_controls, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger, const bool fixed_control=false, const bool fixed_status=false)=0 GetPropType< TypeTag, Properties::Indices > Indices Definition: WellInterface.hpp:86 bool solveWellWithOperabilityCheck(const Simulator &simulator, const double dt, const Well::InjectionControls &inj_controls, const Well::ProductionControls &prod_controls, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:580 void checkWellOperability(const Simulator &simulator, const WellStateType &well_state, const WellGroupHelperType &wgHelper, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:1121 void updateWellOperability(const Simulator &simulator, const WellStateType &well_state, const WellGroupHelperType &wgHelper, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:1211 bool thp_update_iterations Definition: WellInterface.hpp:381 Dune::FieldVector< Scalar, Indices::numEq > VectorBlockType Definition: WellInterface.hpp:94 GetPropType< TypeTag, Properties::SparseMatrixAdapter > SparseMatrixAdapter Definition: WellInterface.hpp:89 virtual void scaleSegmentRatesAndPressure(WellStateType &well_state) const Definition: WellInterface_impl.hpp:1272 void prepareWellBeforeAssembling(const Simulator &simulator, const double dt, const WellGroupHelperType &wgHelper, WellStateType &well_state, DeferredLogger &deferred_logger) Definition: WellInterface_impl.hpp:962 static constexpr bool has_zFraction Definition: WellInterface.hpp:114 bool stoppedOrZeroRateTarget(const Simulator &simulator, const WellStateType &well_state, DeferredLogger &deferred_logger) const Definition: WellInterface_impl.hpp:1712 Definition: WellProdIndexCalculator.hpp:37 Definition: WellState.hpp:66 Declares the properties required by the black oil model. Definition: blackoilbioeffectsmodules.hh:43 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 Static data associated with a well perforation. Definition: PerforationData.hpp:30 |