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
125 stars 121 forks source link

2020-04-RC: OPERATE Bug in Release #2603

Open OPMUSER opened 4 years ago

OPMUSER commented 4 years ago

I'm trying to run the Volve model as test for this release. The deck has the MAXVALUE keyword which is not available in OPM Flow, so I used the OPERATE keyword instead, see below:

--
--       MATHEMATICAL OPERATIONS ON ARRAYS
--       MAXVALUE
--        PERMX  20000.0  1 108  1 100  1 63 /
--        PERMY  20000.0  1 108  1 100  1 63 /
--        PERMZ   2000.0  1 108  1 100  1 63 /  
--       / 
--
--       OUTPUT  ---------- BOX ---------  OPERATION  INPUT   ALPHA   BETA 
--       ARRAY   I1  I2   J1  J2   K1  K2  ---------  ARRAY   -----   ----          
-- OPERATE                                                                                           
--          PERMX   1*  1*   1*  1*   1*  1*  'MAXLIM'   PERMX   20E3            / MAX PERMX
--          PERMY   1*  1*   1*  1*   1*  1*  'MAXLIM'   PERMY   20E3            / MAX PERMY
--          PERMZ   1*  1*   1*  1*   1*  1*  'MAXLIM'   PERMZ   20E2            / MAX PERMZ
-- /        
OPERATE                                                                                           
         PERMX   1  108   1  100   1   63  'MAXLIM'   PERMX   20E3            / MAX PERMX
         PERMY   1  108   1  100   1   63  'MAXLIM'   PERMY   20E3            / MAX PERMY
         PERMZ   1  108   1  100   1   63  'MAXLIM'   PERMZ   20E2            / MAX PERMZ         
/                                           

But as you can see below the OPERATE keyword does not work in OPM Flow, as PERMX is above 20,000 and there are no warning messages in the printout indicating the keyword has not been applied.

image

The correct PERMX from the commercial simulator using the MAXVALUE keyword is shown below:

image

So is this suppose to work?

bska commented 4 years ago

The deck has the MAXVALUE keyword which is not available in OPM Flow

Strange. Flow is supposed to support that.

as PERMX is above 20,000 and there are no warning messages in the printout indicating the keyword has not been applied.

@joakim-hove: You revised the field property handling earlier this year. Could it be that the {MAX,MIN}VALUE handling is applied after unit conversion so the internal arrays are in SI units (permeability in metres squared, numerical values in the order of magnitude 1.0e-12) and that the limits are taken directly from the input file?

joakim-hove commented 4 years ago

But as you can see below the OPERATE keyword does not work in OPM Flow, as PERMX is above 20,000 and there are no warning messages in the printout indicating the keyword has not been applied.

I thought this worked - will look into it.

joakim-hove commented 4 years ago

Could it be that the {MAX,MIN}VALUE handling is applied after unit conversion so the internal arrays are in SI units (permeability in metres squared, numerical values in the order of magnitude 1.0e-12) and that the limits are taken directly from the input file?

That can very well be; although that would be a second bug - because in that case the OPERATE keyword should have produced @(1.0e-12) values?

OPMUSER commented 4 years ago

MAXVALUE is not supported:

Warning: Keyword 'MAXVALUE' is not supported by flow.
In file /media/sf_D_DRIVE/Linux/OPM/Volve/VOLVE/VOLVE-BASE01-OPM2004-R03.DATA, line 482

Warning: Keyword 'MAXVALUE' is not supported by flow.
In file /media/sf_D_DRIVE/Linux/OPM/Volve/VOLVE/VOLVE-BASE01-OPM2004-R03.DATA, line 608                                                                                  

MissingFeatures?

bska commented 4 years ago

MAXVALUE is not supported:

Okay, so that's definitely a misleading diagnostic. We do support MAXVALUE and it appears to behave correctly. I ran Chris Dinneen's courteously ~provided~ curated edition of the Volve dataset with the following changes to re-enable MAXVALUE

---MAXVALUE
--- PERMX  20000.0  1 108  1 100  1 63 /
--- PERMY  20000.0  1 108  1 100  1 63 /
--- PERMZ   2000.0  1 108  1 100  1 63 /  
---/ 
+MAXVALUE
+ PERMX  20000.0  1 108  1 100  1 63 /
+ PERMY  20000.0  1 108  1 100  1 63 /
+ PERMZ   2000.0  1 108  1 100  1 63 /
+/

and I got the permeability distributions below

PERMX PERMY PERMZ
VOLVE_2020_3D_View_PERMX VOLVE_2020_3D_View_PERMY VOLVE_2020_3D_View_PERMZ

These all appear to honour the upper bounds imposed by MAXVALUE. That said, I too get the diagnostic messages you quote and I've traced that back to MAXVALUE mistakenly being listed amongst the MissingFeatures. PR #2606 corrects this oversight, and I think it'd be good to have that in the 2020.04 release if at all possible.

Thanks for directing us towards an issue that confuses users.

joakim-hove commented 4 years ago

and I think it'd be good to have that in the 2020.04 release if at all possible.

I agree it would have been nice; but I draw line now. This is not important enough to warrant an addition round of rc releases - rc4 has just been created and unless big things come up that will be the last rc release.

That said we could consider making a point release in e.g. a months time. I will mark https://github.com/OPM/opm-simulators/pull/2606 as a candiate in that regard.

OPMUSER commented 4 years ago

Okay, continuing on with the Volve model. PERMX, PERMY, PERMZ, TRANX and TRANY all agree with the commercial simulator, but TRANZ is well off. Now the model users:

--
--       SET PINCH-OUT CRITERA FOR THE MODEL
--
PINCH
--       THRESHOLD   GAP      EMPTY   TRANS
--       THICKNESS   NO GAP   GAP     CALC
         0.3        'NOGAP'   1*      1*                                       / 

But OPM Flow does not support the NOGAP option. So what I did was I exported the original TRANZ data from OPM ResInsight, commented out all the EDIT section modifications and loaded the exported TRANZ file in the EDIT section.

As you can see below the results are completely different?

image

I'm I missing something here, or between OPM Flow and ResInsight we have an issue.