-
Notifications
You must be signed in to change notification settings - Fork 116
Support WECON item 9 #4507
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
Support WECON item 9 #4507
Conversation
|
jenkins build this opm-simulators=6050 please |
|
jenkins build this opm-simulators=6050 please |
| std::unordered_map<std::string, WTestWell> wells; | ||
| std::unordered_map<std::string, std::unordered_map<int, ClosedCompletion>> completions; | ||
|
|
||
| std::vector<std::string> follow_on_wells; |
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.
I am not sure that I understand everything correct, so excuse me if I see things wrong.
I think with item 9 of WECON, we establish a relationship/mapping between one well A and another well B (which should be SHUT).
In case the well A is shut due to economic limits or physical limit, we open the well B.
But if we put them in a std::vector for all the wells, how do we manage the relationship between the well A -> well B?
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.
Now I see that it is only added when the specific wells are shut. You can discard the above comment.
|
I agree with @GitPaean. You need something stronger than a linear array to maintain the inter-well relationships implied by Suppose we have If well |
bska
left a comment
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.
It's not obvious to me that this does what it claims to do. Please add a lot of unit tests and documentation here to justify the choice of data structures.
| std::unordered_map<std::string, WTestWell> wells; | ||
| std::unordered_map<std::string, std::unordered_map<int, ClosedCompletion>> completions; | ||
|
|
||
| std::vector<std::string> follow_on_wells; |
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.
The follow-on well concept is input from the WECON keyword in the SCHEDULE, it is static. WellTestState is dynamic.
With the current implementation, this list is the wells that will be opened the next time step as a follow-on well.
Maybe something like pending_follow_on_wells or to_open_follow_on_wells will be more accurate or informational.
Note that the inter-well relationship is taken care of by the simulator. This list gives all wells that the simulator opens at any point due to WECON. |
|
jenkins build this opm-simulators=6050 please |
|
I changed the implementation significantly and I am not yet finished so I will make it draft. Just want some help from Jenkins to sort out the missing parts. |
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
5 similar comments
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
GitPaean
left a comment
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.
It looks generally fine. The following line probably can put inside a function to reduce duplication of the code and avoid inconsistency.
if (handlerContext.getWellStatus(well_name) == WellStatus::OPEN) {
handlerContext.state().wellgroup_events().addEvent( well_name, ScheduleEvents::REQUEST_OPEN_WELL);
handlerContext.state().wellgroup_events().clearEvent( well_name, ScheduleEvents::REQUEST_SHUT_WELL);
}
if (handlerContext.getWellStatus(well_name) == WellStatus::SHUT) {
handlerContext.state().wellgroup_events().addEvent( well_name, ScheduleEvents::REQUEST_SHUT_WELL);
handlerContext.state().wellgroup_events().clearEvent( well_name, ScheduleEvents::REQUEST_OPEN_WELL);
}And furthermore, to qualify as a follow on well, the well needs to be a valid SHUT well when parsing, the master branch does not deal with that yet.
| } | ||
| if (handlerContext.state().wells.get( well_name ).getStatus() == Well::Status::SHUT) { | ||
| handlerContext.state().wellgroup_events().addEvent(well_name, ScheduleEvents::REQUEST_SHUT_WELL); | ||
| } |
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.
Why is this one different from the other occasions without clearing?
|
jenkins build this opm-simulators=6050 please |
I guess checking this on the parser level is less trivial than checking it on the simulator level when it is activated. Is this an abort simulation condition or just a warning? |
I think we can treat it as a warning and disqualify the follow on well.
It is fair to say that. If we want to do at the parsing stage, the well needs to be valid and is SHUT in the schedule when parsing WECON. And checking at the simulator stage probably allowing more flexibility. |
Thanks for the review! |
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 failure_report please |
GitPaean
left a comment
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.
Thanks for the update. It looks good to me.
|
jenkins build this opm-simulators=6050 please |
|
jenkins build this opm-simulators=6050 failure_report please |
1 similar comment
|
jenkins build this opm-simulators=6050 failure_report please |
|
jenkins build this opm-simulators=6050 update_data please |
1 similar comment
|
jenkins build this opm-simulators=6050 update_data please |
PR OPM/opm-simulators#6050 Reason: PR OPM/opm-common#4507 PR OPM/opm-simulators#6050 opm-common = c62ecb474d75a3453f48521e0d5a4a5d6b699e50 opm-grid = 3106eb85512718be5c5541ee8fd37b2372abe93a opm-simulators = c62ecb474d75a3453f48521e0d5a4a5d6b699e50 ### Changed Tests ### * 3dwecon9
|
jenkins build this opm-simulators=6050 opm-tests=1393 please |
|
@GitPaean Any reasons for not merging this? |
|
jenkins build this opm-simulators=6050 opm-tests=1393 please |
|
jenkins build this opm-simulators=6050 update_data please |
PR OPM/opm-simulators#6050 Reason: PR OPM/opm-common#4507 PR OPM/opm-simulators#6050 opm-common = 49104d7e0e492d4980243d6def64c35939626a59 opm-grid = 3106eb85512718be5c5541ee8fd37b2372abe93a opm-simulators = 49104d7e0e492d4980243d6def64c35939626a59 ### Changed Tests ### * 3dwecon9
|
jenkins build this opm-simulators=6050 opm-tests=1399 please |
…simulators_6050 Automatic Reference Data Update for PR OPM/opm-common#4507
No description provided.