OPM / opm-simulators

OPM Flow and experimental simulators, including components such as well models etc.
http://www.opm-project.org
GNU General Public License v3.0
121 stars 121 forks source link

Wells created/modified via ActionX not treated correctly in parallel. #3757

Open blattms opened 2 years ago

blattms commented 2 years ago

Triggered by OPM/opm-grid#564.

It is highly doubtful that modifying wells with ActionX works in parallel for all cases with flow. (Let's hope someone proves me wrong...)

The problem is that the simulator assumes that the information about all possible perforations is available when starting the simulator (Schedule::getWellatEnd()) and that the distribution of wells is static as in "no new perforations appear.

~At the moment my assumption are rather theoretic, meaning that I have not checked the code fully.~

Loadbalance approach that keeps all perforations of a well on one process

This is the default in flow. Before load balancing we inspect the return value of Schedule::getWellsatEnd() and use that information to make sure that no well is split. Unfortunately, neither new perforations added to wells or new wells added via ActionX will be taken into account.

Loadbalance approach that supports distributed wells

Even in this case we currently assume that we know upfront the names of all wells and for each well which processes might have perforated cells.

Sparsity Pattern with --matrix-add-well-contributions=true

This also only uses the information from Schedule::getWellatEnd() and connections for appearing wells and perforations will be missing. I would expect segmentation faults if connections/wells appear.

Possible solutions

Precompute and make sure that Schedule::getWellatEnd()` or similar holds all information when starting the simulator.

No changes needed in the rest of the simulator. Will work with --matrix-add-well-contributions=true

Make parallel simulator aware of appearing wells/perforations.

Besides the first step this is what needs to be done for adaptive gridding.

Intermediate solution

At least in parallel prevent adding new wells/perforations.

blattms commented 3 weeks ago

@lisajulia Would you comment here what of this is fixed now and what still might be an issue? Thanks a lot.