OPM / opm-simulators

Simulator programs and utilities for automatic differentiation.
http://www.opm-project.org
GNU General Public License v3.0
112 stars 122 forks source link

GCONPROD not running using GRAT #1689

Open ghost opened 5 years ago

ghost commented 5 years ago

I added a simple network to the SPE3 model and tried to add the GCONPROD keyword. However, using GRAT as control mode the Flow simulator does not run. Using ORAT the results from Eclipse and Flow are identical. The two .DATA files are attached as .txt files.

SPE3CASE1_GRAT.txt SPE3CASE1_ORAT.txt opm_error fopr

atgeirr commented 5 years ago

This looks like a simple bug, I will try a small modification and see if that is sufficient.

GitPaean commented 5 years ago

Probably, you can try to add GRAT to

 485     void WellsGroup::applyProdGroupControls()
 486     {
 487         ProductionSpecification::ControlMode prod_mode = prodSpec().control_mode_;
 488         switch (prod_mode) {
 489         case ProductionSpecification::ORAT:
 490         case ProductionSpecification::WRAT:
 491         case ProductionSpecification::LRAT:
 492         case ProductionSpecification::RESV:
atgeirr commented 5 years ago

I tested that, and it seems to work. I do however get some time step cutting, and oscillation in the well. It is hard to see if the Ecl output above suffers from the same, the oscillation is quite small, see the uploaded picture:

oscillatingwell.pdf

I will make a small PR to change the buggy line.

ghost commented 5 years ago

I made a figure which shows the WOPR on the same scale than the oscillatingwell.pdf. Eclipse has no oscillation behavior. I also included the time step in the figure. For the ECL the time stepping is one month. OPM seems to chop time steps. I am not concerned with the difference in ORAT. However, the chopping in time steps due to oscillations might be a problem in real size simulations prod_grat

GitPaean commented 5 years ago

It looks the closing of the issue happened through some automatic way. We need to keep it open a little longer.