OPM/opm-common

2022-04: COMPDAT Connection Bug

Closed this issue · 2 comments

Another day and another bug.

It appears the error message for inactive connections is using C++ indexing, that is starting from zero; whereas, E100 (FORTRAN), like humans, starts from one as you can see below:

OPM Flow reports:

Warning: Problem with COMPDAT keyword
In SIM_PEE_Basic_Simulator_SanArdo.DATA line 535
The cell (0,6,4) in well INJ1 is not active and the connection will be ignored

Warning: Problem with COMPDAT keyword
In SIM_PEE_Basic_Simulator_SanArdo.DATA line 535
The cell (16,0,4) in well INJ2 is not active and the connection will be ignored

And E100:

 @--WARNING  AT TIME        0.0   DAYS    ( 1-OCT-2006):
 @           WELL INJ1     CONNECTS WITH A DEAD BLOCK                        
 @           (   1   7   5). THIS CONNECTION WILL BE IGNORED.                

 @--WARNING  AT TIME        0.0   DAYS    ( 1-OCT-2006):
 @           WELL INJ2     CONNECTS WITH A DEAD BLOCK                        
 @           (  17   1   5). THIS CONNECTION WILL BE IGNORED.                
   149 READING WCONINJE

This would be hard to find without checking against E100, and is very confusing for the average user.

Be good if we can fix this for the 2022-10 release.

I believe this has been fixed:

if (!cell.is_active()) {
auto msg = fmt::format(R"(Problem with COMPDAT keyword
In {} line {}
The cell ({},{},{}) in well {} is not active and the connection will be ignored)",
location.filename, location.lineno,
I + 1, J + 1, k + 1, wname);

bska commented

I believe this has been fixed:

You are correct. I fixed the message in commit 8c14efb which was part of the work to add restart file support for the WDFACCOR keyword.