Add Support for Initialising Constant Flux Aquifers from Restart#4520
Conversation
|
This PR depends on, and contains, PR #4519. It must not be merged into the master branch until the upstream PR has been merged. I will keep this in "draft" mode until that time. |
|
When combined with upstream PR OPM/opm-common#3437 I am able to restart the simple
|
|
This PR has been tested on a full field model in Equinor and results has been check. Looking forward to see this PR merged into master. |
4be2d1b to
51c4a01
Compare
51c4a01 to
a5177f0
Compare
| { | ||
| this->initializeConnections(); | ||
| const auto connected_face_area = this->initializeConnections(); | ||
| this->area_fraction_ = this->computeFaceAreaFraction(connected_face_area); |
There was a problem hiding this comment.
At least in one build, the area_fraction_ caused problem for the parallel restarting. But I have not got clear understanding of the issue. Will post more later.
There was a problem hiding this comment.
I need to check whether it is my building is problematic since the output is not very reasonable.
There was a problem hiding this comment.
I need to check whether it is my building is problematic
Yes please. For what it's worth, we need something like the area fraction for parallel restart if the set of aquifer connections happens to be split among multiple processes.
since the output is not very reasonable.
What kind of symptoms do you see?
There was a problem hiding this comment.
Using the following code to output inside function computeFaceAreaFraction,
const double fraction =(tot_face_area > 0.0)
? connected_face_area / tot_face_area
: 0.0;
const auto rank = this->ebos_simulator_.vanguard()
.grid().comm().rank();
std::cout << " id " << this->aquiferID() << " rank " << rank << " connected_face_area " << connected_face_area << " total_face_area " << tot_face_area << " fraction " << fraction << std::endl;For running with 1 process computeFaceAreaFraction, (the first number is line number, you can ignore it.)
1234 id 2 rank 0 connected_face_area 25000 total_face_area 25000 fraction 1
1235 id 1 rank 0 connected_face_area 25000 total_face_area 25000 fraction 1
For running with 5 processes
1252 id 2 rank 0 connected_face_area 20000 total_face_area 45000 fraction 0.444444
1253 id 1 rank 4 connected_face_area 0 total_face_area 45000 fraction 0
1254 id 1 rank 1 connected_face_area 0 total_face_area 45000 fraction 0
1255 id 1 rank 2 connected_face_area 0 total_face_area 45000 fraction 0
1256 id 1 rank 3 connected_face_area 25000 total_face_area 45000 fraction 0.555556
1257 id 2 rank 2 connected_face_area 0 total_face_area 5000 fraction 0
1258 id 1 rank 0 connected_face_area 0 total_face_area 5000 fraction 0
1259 id 2 rank 3 connected_face_area 5000 total_face_area 5000 fraction 1
1260 id 2 rank 4 connected_face_area 0 total_face_area 5000 fraction 0
1261 id 2 rank 1 connected_face_area 0 total_face_area 5000 fraction 0
It is a build with clang from CLION, so I need to double check with other build. I will send you the case through slack.
e5242d4 to
230af27
Compare
If we always keep the accumulative values (AAQT) and total values (AAQR) the same across the processes, then we might not need this fraction. Just need to remember to communicate when update them. How do you think? But I still think we should have a understanding how the tricky output was resulted. |
I think that's more work than just having this fraction.
Probably contributions from unrelated aquifers. The current code is correct when there's just a single aquifer in the model. |
I think it is the same both in term of computation and code. We need to |
Sure, but
It's still not clear to me why the aquifer objects need to track their total produced volumes. If we defer that work to the summary state (or similar), then there's no problem at all and we can dispense with all of this. |
0286557 to
d8b4d6c
Compare
|
I will try to add the AQUFLUX case I am referring to opm-tests tomorrow. |
|
I have open a PR to add the case mentioned above to opm-tests. Maybe we should have the parallel restart tests with that one. |
Thanks. I'll update this PR to add that case for restart testing too. In the meantime I'll reset this back to "draft" mode to prevent inadvertent merging. |
1c01b64 to
9dce129
Compare
|
jenkins build this please |
|
one question here, for the parallel restarting running, how many processes will be used? |
|
jenkins build this update_data please |
|
if nothing is specified; 4. |
|
jenkins build this update_data please |
Sorry, I forgot to register the new regression test. I'll update right away. |
9dce129 to
d0cd248
Compare
|
jenkins build this update_data please |
d0cd248 to
7a8bfd9
Compare
Reason: PR OPM/opm-simulators#4520 opm-common = 4e1333deda7808216da451941a150226fb1e1236 opm-grid = 43bcc8646f3017586719901e1f034eed065908d9 opm-models = fb2a4030f57a4e19b71a7555776a582abad3cb5f opm-simulators = 952fe86aad463229e85fb9fe73fd44769e908b7a ### Changed Tests ### * aquflux_02
|
jenkins build this opm-tests=977 please |
In particular, form constant flux aquifer objects from the restart step's collection if available and properly initialise their total produced volume.
Uses the example models AQUFLUX-01 and AQUFLUX-02 from OPM-Tests. Both sequential and parallel modes activated for both models.
7a8bfd9 to
f156bc9
Compare
|
I consider this work complete now and I'm to merge this so I'm marking it "ready for review". |
|
jenkins build this opm-tests=977 please |
|
Note #4667 if you still want those timesteps reduced. |
Automatic Reference Data Update for PR OPM/opm-simulators#4520
|
The reference update OPM/opm-tests#977 is in, I am getting this in now. |



In particular, form constant flux aquifer objects from the restart step's collection if available and properly initialise their total produced volume. To that end also calculate the local face area fraction for the aquifer's connections which handles the constant flux aquifer from the restart file in the case that the aquifer's connections are split across multiple MPI ranks.