-
Notifications
You must be signed in to change notification settings - Fork 130
Using IPR in gaslift optimization #6653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ namespace Opm { | |
|
|
||
| template<typename TypeTag> | ||
| GasLiftSingleWell<TypeTag>:: | ||
| GasLiftSingleWell(const WellInterface<TypeTag>& well, | ||
| GasLiftSingleWell(WellInterface<TypeTag>& well, | ||
| const Simulator& simulator, | ||
| const SummaryState& summary_state, | ||
| DeferredLogger& deferred_logger, | ||
|
|
@@ -112,7 +112,7 @@ GasLiftSingleWell(const WellInterface<TypeTag>& well, | |
| ****************************************/ | ||
|
|
||
| template<typename TypeTag> | ||
| typename GasLiftSingleWell<TypeTag>::BasicRates | ||
| typename GasLiftSingleWell<TypeTag>::RatesAndBhp | ||
| GasLiftSingleWell<TypeTag>:: | ||
| computeWellRates_(Scalar bhp, bool bhp_is_limited, bool debug_output ) const | ||
| { | ||
|
|
@@ -136,24 +136,27 @@ computeWellRates_(Scalar bhp, bool bhp_is_limited, bool debug_output ) const | |
| return {-potentials[this->oil_pos_], | ||
| -potentials[this->gas_pos_], | ||
| -potentials[this->water_pos_], | ||
| bhp, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now returns
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we rename to something like BasicWellState or LimitedWellState? However, that may be confused with the well state? Any other suggestions?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about |
||
| bhp_is_limited | ||
| }; | ||
| } | ||
|
|
||
| template<typename TypeTag> | ||
| std::optional<typename GasLiftSingleWell<TypeTag>::Scalar> | ||
| GasLiftSingleWell<TypeTag>:: | ||
| computeBhpAtThpLimit_(Scalar alq, bool debug_output) const | ||
| computeBhpAtThpLimit_(Scalar alq, Scalar current_bhp, bool debug_output) const | ||
| { | ||
| OPM_TIMEFUNCTION(); | ||
| const auto& groupStateHelper = this->simulator_.problem().wellModel().groupStateHelper(); | ||
| auto bhp_at_thp_limit = this->well_.computeBhpAtThpLimitProdWithAlq( | ||
| // we compute new bhp value based on the alq rate by finding the intersection | ||
| // between the vfp curve and the IPR. The IPR is computed using the current bhp | ||
| // value | ||
| auto bhp_at_thp_limit = this->well_.computeBhpAtThpLimitProdWithAlqUsingIPR( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a comment why we now are using |
||
| this->simulator_, | ||
| groupStateHelper, | ||
| this->well_state_, | ||
| current_bhp, | ||
| this->summary_state_, | ||
| alq, | ||
| this->deferred_logger_, | ||
| /*iterate_if_no_solution */ false); | ||
| this->deferred_logger_); | ||
| if (bhp_at_thp_limit) { | ||
| if (*bhp_at_thp_limit < this->controls_.bhp_limit) { | ||
| if (debug_output && this->debug) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to earlier comment about the name
BasicRatesand includingbhpas a member.