-
Notifications
You must be signed in to change notification settings - Fork 127
Allow change of target constraint #6313
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
base: master
Are you sure you want to change the base?
Conversation
jenkins build this opm-common=4622 please |
Thanks for the contribution. Can you share the complete the setup of the case so we can understand the exact situation the PR is trying to solve? Furthermore, it is probably a good idea to have a regression test since this is a new feature/new scenario can OPM-flow can handle. Regression test can prevent the development from getting broken by others. |
std::vector<Scalar>& groupTargetReduction) | ||
{ | ||
OPM_TIMEFUNCTION(); | ||
bool has_choke = schedule.hasChoke(group.name(), reportStepIdx); |
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.
const bool
here. And also, it is good to define the variable as close as possible to the actual usage. Since the usage is within a for loop, you can define it right before the for loop that actually use the variable to avoid repeated evaluation.
{ | ||
OPM_TIMEFUNCTION(); | ||
const Group& group = schedule.getGroup(group_name, report_step); | ||
bool has_choke = schedule.hasChoke(group_name, report_step); |
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.
same comment as previous comment.
Good points. I created a small test case: In the example case the parent group |
Hei, @plgbrts , thanks for the sharing the case. Testing with the case it looks like bool has_choke = schedule.hasChoke(group.name(), reportStepIdx); is working the same with Furthermore, during testing, it looks like the master branch produces the same results with this PR. Is it something that you have understanding with it? And also, testing shows that the first if condition The above is some observation from my side for your information. Please let me know if you saw things differently and I can re-test it. |
jenkins build this opm-common=4622 failure_report please |
This PR enhances current functionality for the situation of having autochoke groups in the network. Besides a rate target additional rate constraints may be specified for a parent group in
GCONPROD
. For exampleHere parent group AB has an oil rate target of 10000 m3/day and a water rate constraint of 5500 m3/day. The children groups may be auto choke groups. If the water rate constraint gets broken it becomes the target.
This behavior has been tested on a field case.
The PR depends on the upstream PR OPM/opm-common#4622 .