-
Notifications
You must be signed in to change notification settings - Fork 121
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
Convergence monitors #5590
Convergence monitors #5590
Conversation
This first version implements the following convergence monitors:
If the total penalty cards if above a given cut-off limit (default 30), cut the timestep. I tested this on Norne, where we observe a slight decrease in nonlinear and linear iterations. But other cases are probably more suited since Norne does not fail a lot to begin with. (Ignore the zero wasted, I am not exiting the timestep cut gracefully yet). |
} | ||
|
||
template <typename Serializer> | ||
void serializeOp(Serializer& serializer) |
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.
maybe this will change, but I don't see any situation where this needs to be serialized, obviously not in the initial eclipse state broadcast, and as restart-serialization happens at report steps, there is also no reason to serialize as afaict this is reset at each nonlinear iteration, right?
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.
You are perhaps correct. I just followed the class structure of the other classes but was unsure if I actually needed this part. Subject to change, I am planning that for each report there is a penalty card. Such that at the end of the simulation, I can add the counts to the INFORITER (or similar) for analysis. Do I need the serializer for that?
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.
Just picking up this point now, sorry for the delayed response.
I don't see any situation where this needs to be serialized,
I switched to using the serializeOp()
protocol for the ConvergenceReport
object in commit 0b40277 (PR #5338). As long as this information is intended for output to the .INFOITER
file, it needs to have a serializeOp()
member function.
In the second version, the implementation should be the same as the paper, given that the tolerance for adding a card for too large well residual, is the same as OPM default such that the well is unconverged. The reporting has also been fixed, such that the wasted iterations coming from the convergence monitoring is counted. (This fix also involved making sure that failed iterations from NaN and too large residuals errors are counted). When tested on Norne, the results are currently similar to without using convergence monitoring |
e134c32
to
fa8564a
Compare
Depends on OPM/opm-common#4244. |
Note that the well convergence metric is not used at the moment. But the plan is to also include well convergence metrics in the convergence monitoring. However, this requires two things:
|
fa8564a
to
ff20c1f
Compare
jenkins build this opm-common=4244 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.
Nice, just some small fry to fix.
jenkins build this please |
All good, all green! Merging. |
Implement Convergence Monitoring
This PR introduces a new convergence monitoring feature to improve the robustness and efficiency of the simulator. It is based on the following publication:
Lie, K., Moyner, O., Klemetsdal, Ø., Skaflestad, B., Moncorgé, A., & Kippe, V. (2024). Enhancing Performance of Complex Reservoir Models via Convergence Monitors. ECMOR, 2024(1), 1-9. (https://doi.org/10.3997/2214-4609.202437057)
The convergence monitoring system tracks the convergence behaviour across iterations, applying penalties for non-convergence. If the total penalty count exceeds the specified cut-off limit, the simulator will cut the timestep.
This feature allows early-exiting for steps that are not converging, saving wasted iterations and assembly.
This is the first version that will be iterated on before considering to merge it.