Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@akva2
Copy link
Member

@akva2 akva2 commented Dec 5, 2024

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.

@akva2 akva2 marked this pull request as draft December 5, 2024 14:59
@akva2 akva2 force-pushed the wcycle branch 2 times, most recently from b717b5b to 6668195 Compare December 11, 2024 12:02
@akva2 akva2 marked this pull request as ready for review December 11, 2024 12:53
@akva2
Copy link
Member Author

akva2 commented Dec 11, 2024

jenkins build this opm-simulators=5792 please

@akva2 akva2 marked this pull request as draft December 12, 2024 13:11
@akva2 akva2 marked this pull request as ready for review December 16, 2024 09:18
@akva2
Copy link
Member Author

akva2 commented Dec 16, 2024

This is now ready for review

@akva2
Copy link
Member Author

akva2 commented Dec 16, 2024

jenkins build this opm-simulators=5792 opm-tests=1264 please

Copy link
Member

@bska bska left a 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.

@akva2
Copy link
Member Author

akva2 commented Dec 16, 2024

jenkins build this please

Copy link
Member

@bska bska left a 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);
Copy link
Member

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.

Copy link
Member Author

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))
Copy link
Member

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?

Copy link
Member Author

@akva2 akva2 Dec 16, 2024

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.

Copy link
Member

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.

Copy link
Member

@bska bska left a 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.

@bska bska merged commit 0298e41 into OPM:master Dec 16, 2024
@akva2 akva2 deleted the wcycle branch December 16, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants