-
Notifications
You must be signed in to change notification settings - Fork 116
add parsing and schedule integration for WCYCLE #4371
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
Conversation
b717b5b to
6668195
Compare
|
jenkins build this opm-simulators=5792 please |
|
This is now ready for review |
|
jenkins build this opm-simulators=5792 opm-tests=1264 please |
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 a lot. Other than a couple of minor points I think this should go into the master branch as is.
|
jenkins build this please |
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.
Sorry about this back-and-forth. I had another look at WCYCLE.cpp and noticed one missing header and a potential performance problem.
| target_time < current_time + next_dt && | ||
| !opens_this_step(w)) | ||
| { | ||
| next_dt = std::min(next_dt, target_time - current_time); |
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.
Sorry for not catching this earlier. You should #include <algorithm> for std::min(). Right now I suspect we get the header through some transitive include statement.
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.
remedied.
| const double target_time = otime_it->second + wce.on_time; | ||
| if (target_time > current_time && | ||
| target_time < current_time + next_dt && | ||
| !opens_this_step(w)) |
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.
What's the cost of opens_this_step() if we somehow end up calling the function multiple times with the same well name?
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 should be fairly cheap. currently it calls into the schedule, extracts the well events at the report step and checks if there is an opening event, OPM/opm-simulators@86fb2f3#diff-b17d026083f7ee29a4d9aa8ad05a54bda193055d6f313dd7bbc16f1d7ea83bf0R361
i cannot pass it up front because that would mean resolving the wlist up front which would be more costly i believe, and i didn't want to add an explicit circular dependency back to the schedule class.
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 should be fairly cheap. currently it calls into the schedule, extracts the well events at the report step and checks if there is an opening event,
Cool. We might consider adding some kind of caching/memoization later on if it turns out to be a bottleneck.
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 a lot for the updates. This looks good to me and I'll merge into master.
This adds support for a scaling factor for well efficiency factor and the ability to add an even to a ScheduleState. These are two functionalities needed to implement WCYCLE, which the final commits parses and integrates into the Schedule.