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

Comparison with four simulators in SCAL

Open Ruslan1541 opened this issue 1 year ago • 13 comments

Hello there!

I conducted an experiment to compare OPM with other non-commercial simulators using the example of numerical modeling on a core model. I took the data from the article: Lenormand, Roland, et al. "Comparison of four numerical simulators for SCAL experiments." Petrophysics 58.01 (2017): 48-56. I took the parameters of case 4 and tried to rewrite them in OPM format, then after modeling I got a close result, but there is a problem with matching fluid extraction and a slight deviation in pressure drop. After a certain period of water injection, water should start to be produced at the production well since there is almost no oil left in the model, but in this case this is not the case and oil production still continues to grow (even after several hours of modeling). I've experimented with a lot of parameters, but the result is the same. Does anyone know why this is the case? Maybe I should add a few extra keywords because I'm working on a lab scale (I guess this is a bottleneck)? Below are the comparison images and input data. image case_4.zip

Ruslan1541 avatar Dec 03 '24 12:12 Ruslan1541

the input file seems to be a template.

akva2 avatar Dec 03 '24 12:12 akva2

sorry for that, here correct archive. case_4_output.zip

Ruslan1541 avatar Dec 03 '24 13:12 Ruslan1541

that zip file has a CASE3 including files from INCLUDE/ that is not in the zip.

akva2 avatar Dec 03 '24 13:12 akva2

update: case_4.zip

Ruslan1541 avatar Dec 03 '24 13:12 Ruslan1541

please try the file before sending.

Error: 
An error occurred while creating the reservoir properties
Internal error: Fundamental error with keyword: PERMZ at: CASE4.DATA, line: 85 got 1000 elements - expected : 100


Error: Unrecoverable errors while loading input:
Fundamental error with keyword: PERMZ at: CASE4.DATA, line: 85 got 1000 elements - expected : 100

akva2 avatar Dec 03 '24 13:12 akva2

sorry, that is the correct version case_4.zip

Ruslan1541 avatar Dec 03 '24 13:12 Ruslan1541

An update to this issue: I tried to run the abovementioned case in other reservoir simulators (Eclipse and t-navigator), and my oil and water production figures came close to the figures in the article (although I run the same .DATA file as in the OPM) Below are screenshots from t-nav and eclipse image image

Hence, there is some problem with SCAL-model simulation in OPM.

Ruslan1541 avatar Dec 09 '24 14:12 Ruslan1541

We have a bug preventing time steps of less than 1 second from working correctly. The cause has been identified and a fix will come soon.

So far, I have not even been able to run the deck due to the above mentioned bug, I do not understand how you were able to get results for the case. I will retry after fixing the time bug, and see if I then reproduce the (wrong) results or not.

atgeirr avatar Dec 10 '24 10:12 atgeirr

but in the .DATA file time step is a little over 1 second.

Ruslan1541 avatar Dec 10 '24 10:12 Ruslan1541

hmm really? timesteps are in hours with LAB so you have 0.0002 * 60(mins) * 60(s) = 0.72s unless i am missing something...

akva2 avatar Dec 10 '24 10:12 akva2

Yes, you're right Despite this, if you try to increase the time step, the conclusion from the above comparison with t-nav and eclipse will be the same: something is wrong with production rate.

Ruslan1541 avatar Dec 10 '24 10:12 Ruslan1541

There is a fix incoming for the sub second problem: https://github.com/OPM/opm-common/pull/4374

Despite this, if you try to increase the time step, the conclusion from the above comparison with t-nav and eclipse will be the same: something is wrong with production rate.

True, this is a separate problem. One at a time!

atgeirr avatar Dec 11 '24 15:12 atgeirr

With the fix for the sub second problem in the above mentioned PR, we were able to get correct results. However, it required modifying the tolerances and other options in extreme ways! Clearly we have some defaults that are good for reservoirs but not for lab scale. For example, the standard well model is regularized by assigning a small volume to the wellbore. This is 0.1 cubic feet, which is not small at all when dealing with a lab case, in fact it is almost 1000x larger than the combined pore volume in your case. Furthermore, we reduced many tolerances A LOT and managed to get ok results. (The case still ran fast.)

I believe we should use this case as a standard lab scale test to ensure we have good defaults for small scales. What numbers to change is not 100% clear to me now. In the end, we ran with the following options (and the PR OPM/opm-common#4374 which will be merged soonish):

flow CASE4.DATA \
    --output-dir=output_tighttolerances \
    --relaxed-max-pv-fraction=0 \
    --tolerance-cnv=1e-12 \
    --strict-inner-iter-wells=0 \
    --regularization-factor-wells=0.00000000001 \
    --tolerance-wells=1e-14 \
    --tolerance-mb=1e-14 \
    --strict-outer-iter-wells=50

You need to scroll right to see them all... Copy to your own terminal to test it. Now I am not sure which ones are actually necessary, out of all these parameters, or how we should change defaults to depend on scale (I believe it would be wrong to use the unit system to decide, one could easily define a tiny case using METRIC or FIELD units). But at least we have a test case to guide us.

atgeirr avatar Dec 12 '24 13:12 atgeirr