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

WIP: Enabling automatic choke to model a sub-sea manifold in an extended network

Open plgbrts opened this issue 2 years ago • 17 comments

This PR is work in progress and not ready for merging. Its purpose for now is to share and test. It is a first step to model a well group in an extended network that acts as a so-called sub-sea manifold: the wells of such group operate on a common THP (equal to the manifold pressure) and such that the total (e.g. oil) rate of the wells obeys an imposed constraint set via GCONPROD.

To define a network node to be a subsea-manifold, item 3 of NODEPROP is set to YES.

In the figure below the simulation results of a simple case is shown and compared to a reference simulator. In this test case, group B1 a subsea manifold with two wells B-1H and B-2H. From the figure: -B-1H and B-2H operates on the same THP and -the group B1 satisfies the imposed constraint of oil production rate equals 3500 sm3/day. -results are in agreement with a reference simulator

image

The simple test case is attached: CHECK_COMMONTHP_NETWORK_OPM.zip

plgbrts avatar Oct 18 '23 10:10 plgbrts

jenkins build this please

plgbrts avatar Oct 18 '23 10:10 plgbrts

Thanks for the good result. I might leave some comments for discussion, not necessarily suggesting code change yet.

GitPaean avatar Oct 27 '23 14:10 GitPaean

Thanks for the good work. It helps us to understand the auto-choke much better. Will come with concrete suggestion about the code.

GitPaean avatar Oct 27 '23 15:10 GitPaean

The test case 5_NETWORK_MODEL5_STDW_AUTOCHK_6000_CHKNODE_TEST1_OPM.zip considered below has a subsea manifold (auto choke group) with 3 wells (B-1H, B-2H, B-3H). The group constraint is ORAT=6000 SM3/DAY and the wells have individual well constraints of ORAT=2500 SM3/DAY.

Simulation with Flow (with --enable-tuning=true and --local-well-solve-control-switching=true ): image

Simulation with reference simulator: image

Some observations:

  • Initial all 3 wells of the subsea manifold group run on common THP (control mode=6 for the 3 wells) and deliver the group oil rate target of 6000 SM3/DAY
  • When well B-2H meets its individual oil rate constraint of 2500 SM3/DAY) (control mode=1 for B-2H) it runs on this constraint and the THP is derived independently of the other two wells that remain on THP control with common THP value.
  • As long as the common THP stays above the group nodal pressure the group target of 6000 can be met. When the common THP calculation gets below the nodal pressure value the well will operate on the nodal pressure and the target cannot be satisfied
  • Note that for the reference simulation the well B-1H is shut-in at some moment while in OPM-flow the well stays open.

plgbrts avatar Jan 22 '24 13:01 plgbrts

jenkins build this please

GitPaean avatar Feb 02 '24 15:02 GitPaean

jenkins build this please

plgbrts avatar Feb 05 '24 09:02 plgbrts

jenkins build this please

plgbrts avatar Feb 05 '24 15:02 plgbrts

jenkins build this please

plgbrts avatar Feb 05 '24 21:02 plgbrts

jenkins build this please

GitPaean avatar Feb 19 '24 09:02 GitPaean

jenkins build this please

plgbrts avatar Feb 19 '24 21:02 plgbrts

Thanks for the update. I am looking into the function computeWellGroupThp now. Hopefully, we are close to get it in after that.

GitPaean avatar Feb 20 '24 09:02 GitPaean

Hei, @plgbrts , I believe the tests you are testing is the case opm-tests/network/NETWORK_MODEL5_STDW_AUTOCHK.DATA in opm-tests.

Can you add a regression test?

GitPaean avatar Feb 20 '24 09:02 GitPaean

Hei, @plgbrts , I believe the tests you are testing is the case opm-tests/network/NETWORK_MODEL5_STDW_AUTOCHK.DATA in opm-tests. Can you add a regression test?

That is indeed the example case but not yet fit for regression test as the simulation takes too long time. I will have a look into this.

plgbrts avatar Feb 20 '24 09:02 plgbrts

jenkins build this please

plgbrts avatar Feb 26 '24 09:02 plgbrts

jenkins build this please

plgbrts avatar Mar 25 '24 15:03 plgbrts

jenkins build this please

plgbrts avatar Mar 25 '24 17:03 plgbrts

jenkins build this please

plgbrts avatar Apr 28 '24 17:04 plgbrts

jenkins build this please

plgbrts avatar May 13 '24 14:05 plgbrts

jenkins build this please

plgbrts avatar May 24 '24 11:05 plgbrts

jenkins build this please

GitPaean avatar May 28 '24 06:05 GitPaean

Sorry for the delay. I will test and check this PR today (some) and tomorrow.

GitPaean avatar May 28 '24 14:05 GitPaean

jenkins build this please

plgbrts avatar Jun 25 '24 09:06 plgbrts

jenkins build this please

plgbrts avatar Jul 02 '24 10:07 plgbrts

Does the jenkins failure indicate there is some problem with the CUDA setup?

  #$ "/usr/lib/ccache"/g++-12 -D__CUDA_ARCH__=520 -D__CUDA_ARCH_LIST__=520 -E
  -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__
  -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=8
  -D__CUDACC_VER_BUILD__=89 -D__CUDA_API_VER_MAJOR__=11
  -D__CUDA_API_VER_MINOR__=8 -D__NVCC_DIAG_PRAGMA_SUPPORT__=1 -include
  "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" -o
  "tmp/CMakeCUDACompilerId.cpp1.ii"

  In file included from /usr/include/cuda_runtime.h:83,

                   from <command-line>:

  /usr/include/crt/host_config.h:132:2: error: #error -- unsupported GNU
  version! gcc versions later than 11 are not supported! The nvcc flag
  '-allow-unsupported-compiler' can be used to override this version check;
  however, using an unsupported host compiler may cause compilation failure
  or incorrect run time execution.  Use at your own risk.

    132 | #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
        |  ^~~~~

  # --error 0x1 --

@akva2

GitPaean avatar Jul 02 '24 11:07 GitPaean

well, it indicates that people are triggering builds while i'm hard at work updating jenkins. i have not announced that jenkins is ready yet, because it is not ready yet.

akva2 avatar Jul 02 '24 11:07 akva2

well, it indicates that people are triggering builds while i'm hard at work updating jenkins. i have not announced that jenkins is ready yet, because it is not ready yet.

Thanks for the hard work. There is no intention of pushing.

GitPaean avatar Jul 02 '24 11:07 GitPaean

Thanks for the update. I tested the code, the results are following what was reported. The bracketing of the thp pressure range, the solve for the manifold THPs and so on, many operations in this PR involves a lot of solving of the VFP table related, which is also prune to failures, which makes the change or doing the proper logic is difficult because of unexpected failures.

The PR introduces one way solve the auto-choke pressure and it works for the case it provides. We can always improve this part with more cases going on.

GitPaean avatar Jul 03 '24 12:07 GitPaean

jenkins build this please

GitPaean avatar Jul 03 '24 12:07 GitPaean

jenkins build this please

plgbrts avatar Jul 03 '24 15:07 plgbrts

Thanks for the update. It provides some design for the auto-choke solution and it works for some cases. We will benefit from this development. As we discussed previously, with more testing cases, it is a field that we need to improve continuously in the future.

Jenkins approves, I am getting it in now.

GitPaean avatar Jul 03 '24 19:07 GitPaean