opm-common icon indicating copy to clipboard operation
opm-common copied to clipboard

ACTIONX Test but Issue in Main Deck with WELSEGS

Open OPMUSER opened this issue 4 years ago • 6 comments

This case test the WELSPECS keyword in the ACTIONX block and is similar to the previous test, except the WCONPROD keywords etc are in the ACTION block and the WELSEGS keywords are moved to the main deck. This results in the following error:

Error: Problem with keyword WELSEGS
In /media/sf_D_DRIVE/Linux/OPM/OPM-TESTS-DBX/wsegvalv/include/prod1_msw_wsegvalv_data.inc line 1.
Internal error: _Map_base::at

Error: Problem with keyword WELSEGS
In /media/sf_D_DRIVE/Linux/OPM/OPM-TESTS-DBX/wsegvalv/include/prod1_msw_wsegvalv_data.inc line 1.
Internal error: _Map_base::at

Error: Unrecoverable errors were encountered while loading input

Test deck attached

ACTIONX_WELSPECS.zip

OPMUSER avatar Dec 09 '21 06:12 OPMUSER

Well - that makes sense; the well does not exist (i e. not defined with WELSPECS) when WELSEGS is encountered.

joakim-hove avatar Dec 09 '21 07:12 joakim-hove

I don't think so.

The well is defined by the ACTIONX keyword at Feb 1, 2021 and the WELSEGS data etc. is defined in the deck at Mar 1, 2021. So this should work.

OPMUSER avatar Dec 09 '21 07:12 OPMUSER

Ok - I understand your point and agree it should work, but as the main father of this code I also understand that it does not work currently - a quite significant effort to make it work😕

joakim-hove avatar Dec 09 '21 07:12 joakim-hove

This still fails after https://github.com/OPM/opm-common/pull/2895 commit.

Initializing report step 4/25 at 2021-03-01 (31 DAYS) line 443
Reading from: /media/sf_D_DRIVE/Linux/OPM/OPM-TESTS-DBX/wsegvalv/include/prod1_msw_wsegvalv_data.inc line 1
Processing keyword WELSEGS at line 1

Error: Problem with keyword WELSEGS
In /media/sf_D_DRIVE/Linux/OPM/OPM-TESTS-DBX/wsegvalv/include/prod1_msw_wsegvalv_data.inc line 1.
Internal error: _Map_base::at

Error: Problem with keyword WELSEGS
In /media/sf_D_DRIVE/Linux/OPM/OPM-TESTS-DBX/wsegvalv/include/prod1_msw_wsegvalv_data.inc line 1.
Internal error: _Map_base::at

Error: Unrecoverable errors were encountered while loading input

The well is defined in an ACTIONX blocke before the WELSEGS and COMPSEGS are introduced in the main deck. This works fine in the commercial simulator.

Test case attached.

ACTIONX_WELSPECS.zip

OPMUSER avatar Dec 17 '21 03:12 OPMUSER

The well is defined in an ACTIONX blocke before the WELSEGS and COMPSEGS are introduced in the main deck. This works fine in the commercial simulator.

Fix here: https://github.com/OPM/opm-common/pull/2907 - although unfortunately new problems arise. Have not looked into those.

joakim-hove avatar Dec 17 '21 10:12 joakim-hove

This and the behaviour of the commercial simulator is interesting. It seems to me that the other simulator directly puts the well information it receives in an ActionX block to the usual place where it stores well information (in our case what gets returned by Schedule::getWellsatEnd()). Hence the well is available as usual to the Deck once it is defined by ActionX.

Somehow this seems related to OPM/opm-simulators#3757 as having the well information from ActionX available at this place would solve the problems outlined there.

When "internalizing" the ActionX stuff, well defintions could be added to Schedule and adding a well could be interpreted as opening all/some perforations, adding a perforation as opening it.

blattms avatar Jan 05 '22 07:01 blattms