diff --git a/docs/_images/drogon_generic.png b/docs/_images/drogon_generic.png index 709e175..616b74c 100644 Binary files a/docs/_images/drogon_generic.png and b/docs/_images/drogon_generic.png differ diff --git a/docs/_images/drogon_pycopm_comparison.png b/docs/_images/drogon_pycopm_comparison.png new file mode 100644 index 0000000..a1b21b1 Binary files /dev/null and b/docs/_images/drogon_pycopm_comparison.png differ diff --git a/docs/_images/sgas.gif b/docs/_images/sgas.gif new file mode 100644 index 0000000..42e89ea Binary files /dev/null and b/docs/_images/sgas.gif differ diff --git a/docs/_sources/examples.rst.txt b/docs/_sources/examples.rst.txt index 33f4dbd..0549740 100644 --- a/docs/_sources/examples.rst.txt +++ b/docs/_sources/examples.rst.txt @@ -41,11 +41,11 @@ For the `HELLO_WORLD.DATA `_ friend to generate PNG figures: @@ -96,6 +96,9 @@ We use our `plopm `_ friend to generate PNG .. tip:: You can install plopm by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git. +Drogon +------ + .. note:: In the current implementation of the **pycopm** tool, the handling of properties that require definitions of i,j,k indices (e.g., FAULTS, WELLSPECS) are assumed to be define in the main .DATA deck. Then, in order to use **pycopm** for simulation models @@ -109,19 +112,15 @@ We use our `plopm `_ friend to generate PNG are still given in the same input format in the coarse deck. In addition, SWATINIT if used in the deck, is read from the .INIT file and output for the coarse model in a new file, then one might need to give the right include path to this special case. - SECTION SCHEDULE: All keywords in this section must be in the input deck and no via include viles. + SECTION SCHEDULE: All keywords in this section must be in the input deck and no via include viles. - -Drogon ------- -Following the note above, then by downloading the `DROGON model `_, replacing the lines in -`DROGON_HIST.DATA `_ for the FAULTS (L127-128) and SCHEDULE (L242-243) with -the actual content of those include files, then by executing: +Following the note above, then by downloading the `DROGON model `_, adding the `MAPAXES `_ +to the deck, replacing the lines in `DROGON_HIST.DATA `_ for the FAULTS (L127-128) and SCHEDULE (L242-243) with the actual content of those include files, then by executing: .. code-block:: bash - pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -l C1 - pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -j 2.5 -l C2 + pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -q 1 -l C1 + pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -q 1 -j 2.5 -l C2 this would generate the following coarse model: @@ -130,14 +129,47 @@ this would generate the following coarse model: Note that the total pore volume is conserved for the coarse model. Here, we first coarse in the z direction, which reduces the number of cells from 31 to 11, and after we coarse in the y direction. -After trial and error, the jump (-j) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of -inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z directon and after coarsening -in the x and y directions. In addition, we add labels (-l) C1 and C2 to differentiate between the coarse include files. +After trial and error, the jump (**-j**) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of +inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z direction and after coarsening +in the x and y directions. Also, we add labels (**-l**) C1 and C2 to differentiate between the coarse include files. In addition, we use the +flags **-p 1 -q 1** to add the remove pore volume to the closest coarser cells and to redistribute the pore volume in the locations with +gas and oil, this results in the coarse model having the same total pore volume, field gas in place, and practically same oil and water in +place as the input model. .. note:: - Add to the generated coarse deck the missing include files in the grid section related to the region operations (e.g., + Add to the generated coarse deck the removed include files in the grid section related to the region operations (e.g., ../include/grid/drogon.multregt for this case). +Now, we also show a 2 times coarser model in all directions (referring to the previous comment about divide and conquer, for the Drogon model +it seems still ok to do a 2 times coarsening in one go): + +.. code-block:: bash + + pycopm -i DROGON_HIST.DATA -c 2,2,2 -p 1 -q 1 -j 4 -w DROGON_2TIMES_COARSER + +Here, we use the **-w** flag to give a specific name to the generated coarser deck, as well as using a higher value of **-j** to avoid generated connections across the faults. +If we run these three models using OPM Flow, then we can compare the summary vectors. To this end, we use our good old friend `plopm `_: + +.. code-block:: bash + + plopm -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -v 'FOIP,FOPR,TCPU' -tunits y -f 14 -subfigs 2,2 -delax 1 -loc empty,empty,empty,center -d 10,5 -xformat '.1f' -xlnum 6 -ylabel 'sm$^3$ sm$^3$/day seconds' -t 'Field oil in place Field oil production rate Simulation time' -labels 'DROGON DROGON 3XZ COARSER DROGON 2XYZ COARSER' -save drogon_pycopm_comparison -yformat '.2e,.0f,.0f' + +.. figure:: figs/drogon_pycopm_comparison.png + + Note that the coarse models have the same initial field oil in place as the input model. It seems the coarse properties (e.g., permeabilities) + are good initial inputs to use in a history matching framework (e.g., to history match saturation function parameters), and the lower simulation + time for the coarse models allow for more ensemble members and more iterations. + +We can also make a nice GIF by executing: + +.. code-block:: bash + + plopm -v sgas -subfigs 1,3 -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -d 16,10.5 -r 0,3 -m gif -dpi 1000 -t "DROGON DROGON 3XZ COARSER DROGON 2XYZ COARSER" -f 16 -interval 2000 -loop 1 -cformat .2f -cbsfax 0.30,0.01,0.4,0.02 -s ,,1 -rotate -30 -xunits km -yunits km -xformat .0f -yformat .0f -c cet_rainbow_bgyrm_35_85_c69 + +.. figure:: figs/sgas.gif + + Top view of the Drogon and the two coarse models + Norne ----- By downloading the `Norne model `_ (and replacing the needed include files as described in the previous @@ -145,7 +177,7 @@ example), then here we create a coarser model by removing certain pilars in orde .. code-block:: bash - pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1 + pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1 -q 1 this would generate the following coarse model: diff --git a/docs/_sources/introduction.rst.txt b/docs/_sources/introduction.rst.txt index 3768ab3..31bc074 100644 --- a/docs/_sources/introduction.rst.txt +++ b/docs/_sources/introduction.rst.txt @@ -41,8 +41,9 @@ where -z Vector of z-coarsening, see the description for -x ('' by default). -a Use `min`, `max`, or `mode` to scale the actnum, e.g., min makes the new coarser cell inactive if at least one cell is inactive, while max makes it active it at least one cell is active (`mode` by default). -n Use `min`, `max`, or `mode` to scale endnum, eqlnum, fipnum, fluxnum, imbnum, miscnum, multnum, pvtnum, rocknum, and satnum (`mode` by default). --s Use `min`, `max`, or `mean` to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz ('' by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, mean for mult(-)xyz, and the pore volume weighted mean for the rest). +-s Use `min`, `max`, or `mean` to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz ('' by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, volume weighted mean for mult(-)xyz, and the pore volume weighted mean for the rest). -p Add the removed pore volume to the closest coarser cells (`0` by default, `1` to enable). +-q Adjust the pv to the initial FGIP and FOIP from the input deck (`0` by default, `1` to enable). -r Remove CONFACT and KH from COMPDAT (`1`) and also remove PEQVR (`2`) (ITEM 13, the last entry) to compute the well transmisibility connections internally in OPM Flow using the grid properties (`2` by default; `0` to not remove). -j Tuning parameter to avoid creation of neighbouring connections in the coarser model where there are discontinuities between cells along the z direction, e.g., around faults ('' by default, i.e., nothing corrected; if need it, try with values of the order of 1). -m Execute a dry run on the input deck to generate the static properties ('prep'), generate only the coarse files ('deck'), only exectute a dry run on the generated coarse model ('dry'), 'prep_deck', 'deck_dry', or do all ('all') (`prep_deck` by default). diff --git a/docs/examples.html b/docs/examples.html index 1827955..3cd9046 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -120,21 +120,21 @@

Hello world
pycopm -i HELLO_WORLD.DATA -c 5,1,5 -m all
 
-

This would generated the following:

-
+

This would generate the following:

+
_images/hello_world_1.png
-

Dry run from the input cloned deck (left) and (right) coarsed model. Adding the flag -p 1 adds the remove pore volume to the neighbouring cells.

+

Dry run from the input cloned deck (left) and (right) coarsed model. Adding the flag -p 1 adds the remove pore volume to the neighbouring cells.

To make active the coarse cell where there is only one active cell, this can be achieve by:

pycopm -i HELLO_WORLD.DATA -c 5,1,5 -m all -a max
 
-
+
_images/hello_world_2.png
-

Dry run from the input cloned deck (left) and (right) coarsed model. The region numbers by default are given by the mode, e.g., use the flag -n max to keep the maximum integer.

+

Dry run from the input cloned deck (left) and (right) coarsed model. The region numbers by default are given by the mode, e.g., use the flag -n max to keep the maximum integer.

@@ -144,10 +144,10 @@

SPE10
pycopm -i SPE10_MODEL2.DATA -o coarser -c 4,8,2
 
-
+
_images/spe10_model2_coarser.png
-

Porosity values for the (left) original and (right) coarsed SPE10 model.

+

Porosity values for the (left) original and (right) coarsed SPE10 model.

@@ -159,21 +159,24 @@

Smeaheia

will generate a coarser model 5 times in the x direction, 4 in the y direction, and 3 in the z direction, where the coarse cell is -made inactive if at least one cell is inactive (-a min).

+made inactive if at least one cell is inactive (-a min).

We use our plopm friend to generate PNG figures:

plopm -i ' STATOIL_FEASIBILITY_SIM_MODEL_WITH_DEPLETION_KROSS_INJ_SECTOR_20_PREP_PYCOPM_DRYRUN STATOIL_FEASIBILITY_SIM_MODEL_WITH_DEPLETION_KROSS_INJ_SECTOR_20_PYCOPM' -s ,,0 -v poro -subfigs 1,2 -save smeaheia -t 'Smeaheia  Coarsed smeaheia' -xunits km -xformat .0f -yunits km -yformat .0f -d 5,5.2 -suptitle 0 -c cet_rainbow_bgyrm_35_85_c69 -cbsfax 0.30,0.01,0.4,0.02 -cformat .2f
 
-
+
_images/smeia.png
-

Top view of porosity values for the (left) original and (right) coarsed model (note that we also coarse on the z direction).

+

Top view of porosity values for the (left) original and (right) coarsed model (note that we also coarse on the z direction).

Tip

You can install plopm by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git.

+ +
+

Drogon

Note

In the current implementation of the pycopm tool, the handling of properties that require definitions of i,j,k indices @@ -187,38 +190,65 @@

Smeaheia coarse model in a new file, then one might need to give the right include path to this special case.

SECTION SCHEDULE: All keywords in this section must be in the input deck and no via include viles.

-
-
-

Drogon

-

Following the note above, then by downloading the DROGON model, replacing the lines in -DROGON_HIST.DATA for the FAULTS (L127-128) and SCHEDULE (L242-243) with -the actual content of those include files, then by executing:

-
pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -l C1
-pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -j 2.5 -l C2
+

Following the note above, then by downloading the DROGON model, adding the MAPAXES +to the deck, replacing the lines in DROGON_HIST.DATA for the FAULTS (L127-128) and SCHEDULE (L242-243) with the actual content of those include files, then by executing:

+
pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -q 1 -l C1
+pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -q 1 -j 2.5 -l C2
 

this would generate the following coarse model:

-
+
_images/drogon_generic.png
-

Note that the total pore volume is conserved for the coarse model.

+

Note that the total pore volume is conserved for the coarse model.

Here, we first coarse in the z direction, which reduces the number of cells from 31 to 11, and after we coarse in the y direction. -After trial and error, the jump (-j) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of -inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z directon and after coarsening -in the x and y directions. In addition, we add labels (-l) C1 and C2 to differentiate between the coarse include files.

+After trial and error, the jump (-j) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of +inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z direction and after coarsening +in the x and y directions. Also, we add labels (-l) C1 and C2 to differentiate between the coarse include files. In addition, we use the +flags -p 1 -q 1 to add the remove pore volume to the closest coarser cells and to redistribute the pore volume in the locations with +gas and oil, this results in the coarse model having the same total pore volume, field gas in place, and practically same oil and water in +place as the input model.

Note

-

Add to the generated coarse deck the missing include files in the grid section related to the region operations (e.g., +

Add to the generated coarse deck the removed include files in the grid section related to the region operations (e.g., ../include/grid/drogon.multregt for this case).

+

Now, we also show a 2 times coarser model in all directions (referring to the previous comment about divide and conquer, for the Drogon model +it seems still ok to do a 2 times coarsening in one go):

+
pycopm -i DROGON_HIST.DATA -c 2,2,2 -p 1 -q 1 -j 4 -w DROGON_2TIMES_COARSER
+
+
+

Here, we use the -w flag to give a specific name to the generated coarser deck, as well as using a higher value of -j to avoid generated connections across the faults. +If we run these three models using OPM Flow, then we can compare the summary vectors. To this end, we use our good old friend plopm:

+
plopm -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -v 'FOIP,FOPR,TCPU' -tunits y -f 14 -subfigs 2,2 -delax 1 -loc empty,empty,empty,center -d 10,5 -xformat '.1f' -xlnum 6 -ylabel 'sm$^3$ sm$^3$/day seconds' -t 'Field oil in place  Field oil production rate  Simulation time' -labels 'DROGON  DROGON 3XZ COARSER  DROGON 2XYZ COARSER' -save drogon_pycopm_comparison -yformat '.2e,.0f,.0f'
+
+
+
+_images/drogon_pycopm_comparison.png +
+

Note that the coarse models have the same initial field oil in place as the input model. It seems the coarse properties (e.g., permeabilities) +are good initial inputs to use in a history matching framework (e.g., to history match saturation function parameters), and the lower simulation +time for the coarse models allow for more ensemble members and more iterations.

+
+
+

We can also make a nice GIF by executing:

+
plopm -v sgas -subfigs 1,3 -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -d 16,10.5 -r 0,3 -m gif -dpi 1000 -t "DROGON  DROGON 3XZ COARSER  DROGON 2XYZ COARSER" -f 16 -interval 2000 -loop 1 -cformat .2f -cbsfax 0.30,0.01,0.4,0.02 -s ,,1 -rotate -30 -xunits km -yunits km -xformat .0f -yformat .0f -c cet_rainbow_bgyrm_35_85_c69
+
+
+
+_images/sgas.gif +
+

Top view of the Drogon and the two coarse models

+
+

Norne

By downloading the Norne model (and replacing the needed include files as described in the previous example), then here we create a coarser model by removing certain pilars in order to keep the main features of the geological model:

-
pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1
+
pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1 -q 1
 

this would generate the following coarse model:

diff --git a/docs/genindex.html b/docs/genindex.html index 7e96213..4d01dd5 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -182,10 +182,10 @@

H

  • handle_faults() (in module pycopm.utils.grid_builder)
  • - - +
    • handle_mapaxes() (in module pycopm.utils.generate_coarser_files)
    • handle_oper() (in module pycopm.utils.generate_coarser_files) @@ -195,6 +195,8 @@

      H

    • handle_pv() (in module pycopm.utils.generate_coarser_files)
    • handle_regions() (in module pycopm.utils.generate_coarser_files) +
    • +
    • handle_schedule() (in module pycopm.utils.generate_coarser_files)
    • handle_segmented_wells() (in module pycopm.utils.generate_coarser_files)
    • diff --git a/docs/introduction.html b/docs/introduction.html index 0fb442d..fe9e088 100644 --- a/docs/introduction.html +++ b/docs/introduction.html @@ -139,11 +139,14 @@

      Roadmap

      Use min, max, or mode to scale endnum, eqlnum, fipnum, fluxnum, imbnum, miscnum, multnum, pvtnum, rocknum, and satnum (mode by default).

      -s
      -

      Use min, max, or mean to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz (’’ by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, mean for mult(-)xyz, and the pore volume weighted mean for the rest).

      +

      Use min, max, or mean to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz (’’ by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, volume weighted mean for mult(-)xyz, and the pore volume weighted mean for the rest).

      -p

      Add the removed pore volume to the closest coarser cells (0 by default, 1 to enable).

      +
      -q
      +

      Adjust the pv to the initial FGIP and FOIP from the input deck (0 by default, 1 to enable).

      +
      -r

      Remove CONFACT and KH from COMPDAT (1) and also remove PEQVR (2) (ITEM 13, the last entry) to compute the well transmisibility connections internally in OPM Flow using the grid properties (2 by default; 0 to not remove).

      diff --git a/docs/objects.inv b/docs/objects.inv index aab696b..7d1a96f 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/pycopm.html b/docs/pycopm.html index d8dfb73..97b87b3 100644 --- a/docs/pycopm.html +++ b/docs/pycopm.html @@ -124,6 +124,7 @@

      Subpackageshandle_props()
    • handle_pv()
    • handle_regions()
    • +
    • handle_schedule()
    • handle_segmented_wells()
    • handle_wells()
    • handle_zcorn()
    • diff --git a/docs/pycopm.utils.generate_coarser_files.html b/docs/pycopm.utils.generate_coarser_files.html index 1497549..72b4901 100644 --- a/docs/pycopm.utils.generate_coarser_files.html +++ b/docs/pycopm.utils.generate_coarser_files.html @@ -246,6 +246,19 @@ +
      +
      +pycopm.utils.generate_coarser_files.handle_schedule(dic, nrwo)
      +

      Handle the schedule sections

      +
      +
      Args:

      dic (dict): Global dictionary

      +

      nrwo (list): Splited row from the input deck

      +
      +
      Returns:

      dic (dict): Modified global dictionary

      +
      +
      +
      +
      pycopm.utils.generate_coarser_files.handle_segmented_wells(dic, nrwo)
      @@ -299,7 +312,7 @@
      -pycopm.utils.generate_coarser_files.map_properties(dic, actnum, d_z, z_t, z_b, z_b_t)
      +pycopm.utils.generate_coarser_files.map_properties(dic, actnum, d_z, z_t, z_b, z_b_t, v_c)

      Mapping to the coarse properties

      Args:

      dic (dict): Global dictionary

      diff --git a/docs/pycopm.utils.html b/docs/pycopm.utils.html index f32e2dc..d058cbd 100644 --- a/docs/pycopm.utils.html +++ b/docs/pycopm.utils.html @@ -110,6 +110,7 @@

      Submoduleshandle_props()
    • handle_pv()
    • handle_regions()
    • +
    • handle_schedule()
    • handle_segmented_wells()
    • handle_wells()
    • handle_zcorn()
    • diff --git a/docs/searchindex.js b/docs/searchindex.js index f6c7193..e0c326d 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["about", "api", "configuration_file", "examples", "index", "installation", "introduction", "modules", "output_folder", "pycopm", "pycopm.core", "pycopm.core.pycopm", "pycopm.utils", "pycopm.utils.files_writer", "pycopm.utils.generate_coarser_files", "pycopm.utils.grid_builder", "pycopm.utils.input_values", "pycopm.utils.properties_builder", "pycopm.utils.runs_executer", "related"], "filenames": ["about.rst", "api.rst", "configuration_file.rst", "examples.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "output_folder.rst", "pycopm.rst", "pycopm.core.rst", "pycopm.core.pycopm.rst", "pycopm.utils.rst", "pycopm.utils.files_writer.rst", "pycopm.utils.generate_coarser_files.rst", "pycopm.utils.grid_builder.rst", "pycopm.utils.input_values.rst", "pycopm.utils.properties_builder.rst", "pycopm.utils.runs_executer.rst", "related.rst"], "titles": ["About pycopm", "pycopm Python API", "Configuration file", "Examples", "Welcome to pycopm\u2019s documentation!", "Installation", "Introduction", "pycopm", "Output folder", "pycopm package", "pycopm.core package", "pycopm.core.pycopm module", "pycopm.utils package", "pycopm.utils.files_writer module", "pycopm.utils.generate_coarser_files module", "pycopm.utils.grid_builder module", "pycopm.utils.input_values module", "pycopm.utils.properties_builder module", "pycopm.utils.runs_executer module", "Related"], "terms": {"tool": [0, 3, 5, 6, 8, 19], "coarsen": [0, 1, 2, 3, 6], "opm": [0, 1, 2, 4, 6, 13, 16, 18, 19], "flow": [0, 1, 2, 4, 6, 13, 18, 19], "geolog": [0, 2, 3, 6, 8], "model": [0, 2, 3, 6, 8, 19], "i": [0, 1, 2, 3, 6, 8, 14, 15], "being": 0, "fund": 0, "center": [0, 14], "sustain": 0, "subsurfac": 0, "resourc": [0, 19], "cssr": [0, 3, 5, 6], "project": [0, 5, 19], "331841": 0, "thi": [0, 2, 3, 5, 6, 8], "work": [0, 6], "progress": 0, "contribut": [0, 5], "ar": [0, 1, 2, 3, 5, 6, 8, 19], "more": 0, "than": 0, "welcom": 0, "us": [0, 1, 2, 3, 5, 6, 8, 17, 19], "fork": 0, "pull": 0, "request": 0, "approach": [0, 2], "The": [1, 2, 3, 6, 8], "main": [1, 2, 3, 9, 10, 11, 14], "script": [1, 5, 11], "execut": [1, 2, 3, 5, 6, 8, 11, 18], "locat": [1, 8], "core": [1, 5, 7, 9], "folder": [1, 3, 4, 5, 6], "differ": [1, 2], "job": 1, "call": [1, 2, 8, 14], "ert": [1, 2, 3, 6, 8, 13, 16, 18], "reference_simul": 1, "contain": [1, 3], "gener": [1, 2, 3, 6, 8, 14, 15, 17, 18, 19], "file": [1, 4, 5, 6, 13, 14, 16, 18], "after": [1, 2, 3, 5, 8], "run": [1, 2, 3, 5, 6, 8, 13, 18], "norn": [1, 2, 4, 6, 8], "drogon": [1, 2, 4, 6, 8], "case": [1, 3], "test": [1, 2, 3, 5, 6], "template_script": 1, "mako": [1, 13], "base": [1, 6, 19], "from": [1, 2, 3, 5, 6, 14, 15, 16, 19], "origin": [1, 3], "deck": [1, 2, 4, 6, 13, 14, 17], "final": [1, 2], "util": [1, 7, 9], "function": [1, 2, 3, 11, 13, 15, 16, 17, 18], "framework": [1, 6, 19], "pyocpm": 1, "packag": [1, 4, 7], "subpackag": [1, 4, 7], "submodul": [1, 7, 9], "modul": [1, 4, 5, 7, 19], "content": [1, 3, 4, 7], "allow": [2, 6], "set": [2, 3, 6, 8, 16], "integr": 2, "studi": [2, 3, 6, 8, 18, 19], "histori": [2, 6, 8], "match": [2, 6, 8], "onli": [2, 3, 5, 6, 8, 14], "To": [2, 3, 5], "pycopm": [2, 3, 5, 6, 8], "ani": 2, "given": [2, 3, 6], "coarser": [2, 3, 6, 8, 14, 17], "can": [2, 3, 5, 8], "achiev": [2, 3, 5], "without": [2, 8], "paramet": [2, 3, 6, 16, 17], "via": [2, 4, 6], "command": [2, 5], "line": [2, 3, 5, 16], "see": [2, 5, 6, 8], "overview": [2, 4], "h": 2, "definit": [2, 3], "argument": [2, 6, 11, 14], "option": [2, 6, 11], "well": [2, 6, 14, 19], "exampl": [2, 4, 8], "here": [2, 3], "we": [2, 3, 8, 14], "an": [2, 4, 5, 19], "one": [2, 3, 6, 8, 14], "txt": [2, 3, 5, 6], "first": [2, 3, 16], "input": [2, 3, 4, 6, 14, 16, 17], "full": [2, 6, 8], "path": [2, 3, 6, 8], "If": [2, 5], "your": [2, 6, 8], "write": [2, 13, 14, 17], "e": [2, 3, 5, 6, 8], "g": [2, 3, 5, 6, 8], "user": [2, 5], "dmar": 2, "github": [2, 3, 5, 6], "build": [2, 4], "simul": [2, 3, 5, 8, 9, 12, 16, 18, 19], "bin": [2, 5], "follow": [2, 3, 5, 6, 8], "delet": 2, "suffix": 2, "save": [2, 3, 6], "storag": [2, 19], "egrid": 2, "dbg": 2, "grdecl": 2, "unrst": 2, "unsmri": 2, "prt": 2, "inc": [2, 6, 16], "infostep": 2, "smspec": 2, "init": [2, 3], "you": [2, 3, 5, 8], "type": [2, 19], "each": [2, 6], "realiz": 2, "complet": 2, "order": [2, 3, 6], "memori": 2, "number": [2, 3, 16], "jump": [2, 3, 14], "2": [2, 3, 6], "4": [2, 3], "sinc": [2, 3], "implement": [2, 3, 6], "white": 2, "space": 2, "between": [2, 3, 6], "block": [2, 17], "need": [2, 3, 5, 6, 8], "next": 2, "entri": [2, 6], "defin": [2, 3, 17], "singl": 2, "0": [2, 3, 5, 6], "1": [2, 3, 5, 6], "vector": [2, 6], "x": [2, 3, 6], "coers": 2, "y": [2, 3, 6], "z": [2, 3, 6, 14, 17], "ensembl": [2, 6], "maximum": [2, 3], "parallel": 2, "mpi": [2, 5], "process": [2, 14, 16], "600": 2, "runtim": 2, "second": 2, "A": [2, 19], "valu": [2, 3, 6, 16], "mean": [2, 6], "unlimit": 2, "minimum": 2, "must": [2, 3], "have": [2, 14], "succeed": 2, "regard": 2, "success": 2, "7": 2, "specif": 2, "seed": 2, "reproduc": 2, "observations_train": 2, "name": [2, 6, 16], "observ": 2, "hm": [2, 3], "observations_test": 2, "observations_complet": 2, "select": [2, 8, 18], "which": [2, 3, 5], "default": [2, 3, 6, 8], "let": [2, 13], "sat": 2, "For": [2, 3, 5, 8], "satnum": [2, 6], "comput": [2, 6], "sandv": 2, "et": 2, "al": 2, "2022": 2, "cell": [2, 3, 6, 14, 15, 16, 17], "correct": [2, 6, 8, 17], "lost": [2, 17], "pv": 2, "boundari": [2, 17], "account": 2, "poros": [2, 3], "all": [2, 3, 6, 8, 14, 17], "initi": [2, 6, 16, 17], "equil": 2, "fine": 2, "scale": [2, 6], "error": [2, 3, 8], "wwpr": 2, "wopr": 2, "wgpr": 2, "100": 2, "100000": 2, "2005": 2, "03": 2, "01": [2, 3], "last": [2, 6, 16], "date": 2, "do": [2, 5, 6], "remov": [2, 3, 6, 14, 17], "current": [2, 3, 5, 6, 8, 14, 18], "read": [2, 3, 6, 16], "result": [2, 8], "inform": 2, "shown": 2, "termin": [2, 3, 5, 6], "instead": 2, "same": [2, 3, 8, 14, 17], "discuss": 2, "later": 2, "three": 2, "pillar": [2, 14], "direct": [2, 3, 6, 17], "respect": 2, "j": [2, 3, 6, 14, 15], "k": [2, 3, 6, 14, 15], "index": [2, 4, 14, 15, 17], "standard": 2, "data": [2, 3, 6], "pilar": [2, 3, 6, 17], "keep": [2, 3, 6, 14], "honor": 2, "shape": 2, "Then": [2, 3, 8], "provid": 2, "chang": 2, "": [2, 3, 6, 14], "add": [2, 3, 6, 14], "back": 2, "remain": 2, "mpirun": 2, "avail": [2, 5, 6], "stop": 2, "time": [2, 3, 18], "random": 2, "satur": [2, 3, 13, 16], "consid": 2, "region": [2, 3, 14], "ntg": [2, 3], "poro": [2, 3, 6], "properti": [2, 3, 6, 13, 14, 17], "modifi": [2, 5, 13, 14, 15, 16, 17, 18], "activ": [2, 3, 5, 6, 14, 17], "gui": 2, "test_run": 2, "ensemble_experi": 2, "ensemble_smooth": 2, "iterative_ensemble_smooth": 2, "es_mda": 2, "weight": [2, 6], "flag": [2, 3, 6, 14, 16], "support": [2, 5, 6, 14], "confer": 2, "document": [2, 6], "descript": [2, 6], "enabl": [2, 6], "rst": 2, "true": 2, "newton": 2, "min": [2, 3, 6], "iter": 2, "dist": 2, "distpara": 2, "lw": 2, "3": [2, 3, 5, 6], "uniform": 2, "5": [2, 3], "ew": 2, "tw": 2, "lo": 2, "eo": 2, "lg": 2, "eg": 2, "tg": 2, "log": 2, "eog": 2, "tog": 2, "lmlto": 2, "emlto": 2, "9": [2, 5], "tmlto": 2, "lmltg": 2, "emltg": 2, "tmltg": 2, "permeabl": 2, "rock": 2, "coars": [2, 3, 6, 8, 14, 15, 17], "max": [2, 3, 6], "permx": [2, 3, 6], "permi": [2, 3, 6], "permz": [2, 3, 6], "distribut": [2, 14, 17], "interv": 2, "perm_min": 2, "perm_max": 2, "correspond": [2, 6, 14], "perform": [3, 6], "insid": [3, 5], "o": [3, 6, 8, 14], "drogon_coars": 3, "norne_coars": 3, "gif": [3, 19], "introduct": [3, 4, 8], "wa": [3, 6, 8], "develop": [3, 6, 8], "focus": [3, 6], "creat": [3, 5, 6, 8, 14], "hello_world": 3, "c": [3, 6], "m": [3, 5, 6], "would": [3, 6, 8], "dry": [3, 6], "clone": [3, 5], "left": [3, 8], "right": [3, 8, 14], "ad": [3, 4, 6], "p": [3, 6], "pore": [3, 6, 14, 17], "volum": [3, 6, 14, 17], "neighbour": [3, 6, 14], "make": [3, 5, 6, 14], "where": [3, 6], "mode": [3, 6], "n": [3, 6, 14], "integ": [3, 14], "By": 3, "download": 3, "spe10_model2": 3, "8": 3, "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20": 3, "made": 3, "inact": [3, 6], "least": [3, 5, 6, 14], "our": 3, "plopm": [3, 4], "friend": 3, "png": [3, 19], "figur": [3, 8], "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20_prep_pycopm_dryrun": 3, "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20_pycopm": 3, "v": 3, "subfig": 3, "t": 3, "xunit": 3, "km": 3, "xformat": 3, "0f": 3, "yunit": 3, "yformat": 3, "d": 3, "suptitl": 3, "cet_rainbow_bgyrm_35_85_c69": 3, "cbsfax": 3, "30": 3, "02": 3, "cformat": 3, "2f": 3, "top": [3, 14], "view": [3, 14], "note": 3, "also": [3, 5, 6, 14], "instal": [3, 4], "pip": [3, 5], "git": [3, 5], "http": [3, 5, 6], "com": [3, 5, 6], "In": [3, 5, 6], "handl": [3, 14], "requir": [3, 5, 14, 16, 17], "indic": [3, 6, 14], "fault": [3, 6, 14, 15], "wellspec": 3, "assum": 3, "includ": [3, 5, 8], "replac": 3, "those": 3, "actual": 3, "some": [3, 8, 19], "relev": 3, "keyword": [3, 14], "per": 3, "section": [3, 14], "grid": [3, 5, 6, 13, 14, 15, 17], "mapax": 3, "multregt": 3, "other": [3, 8], "like": 3, "multz": 3, "oper": [3, 14], "perm": 3, "porv": [3, 6], "multx": 3, "multi": 3, "prop": [3, 14], "equal": 3, "copi": [3, 5, 8], "multipli": 3, "involv": 3, "appli": 3, "still": 3, "format": 3, "addit": [3, 5], "swatinit": [3, 6], "output": [3, 4, 6, 16], "new": [3, 6, 14], "might": [3, 8, 19], "give": [3, 6, 8], "special": 3, "schedul": 3, "vile": 3, "abov": 3, "drogon_hist": 3, "l127": 3, "128": 3, "l242": 3, "243": 3, "l": [3, 6], "c1": 3, "drogon_hist_pycopm": 3, "c2": 3, "total": 3, "conserv": 3, "reduc": 3, "31": 3, "11": 3, "trial": 3, "avoid": [3, 6], "connect": [3, 6], "across": 3, "lot": 3, "divid": 3, "conquer": 3, "apporach": 3, "recommend": [3, 8], "directon": 3, "label": 3, "differenti": 3, "miss": 3, "relat": [3, 4, 13], "describ": [3, 6, 8], "previou": [3, 5], "certain": 3, "featur": 3, "norne_atw2013": 3, "concept": 4, "roadmap": 4, "python": [4, 19], "sourc": [4, 19], "linux": 4, "window": 4, "maco": 4, "configur": [4, 6], "hello": 4, "world": 4, "spe10": [4, 8], "smeaheia": 4, "api": 4, "pyopmspe11": 4, "pyopmnearwel": 4, "exprecc": 4, "micp": 4, "pymm": 4, "about": 4, "search": [4, 14], "page": 4, "exist": 5, "environ": 5, "interest": [5, 19], "code": 5, "repositori": 5, "virtual": 5, "repo": 5, "get": 5, "cd": 5, "python3": 5, "venv": 5, "vpycopm": 5, "upgrad": 5, "setuptool": 5, "wheel": 5, "lint": 5, "dev": 5, "r": [5, 6], "org": 5, "releas": 5, "2024": 5, "04": 5, "master": 5, "branch": 5, "ci": 5, "yml": 5, "binari": 5, "subsystem": 5, "could": [5, 8], "try": [5, 6], "prerequisit": 5, "turn": 5, "should": 5, "current_directori": 5, "pwd": 5, "common": 5, "done": [5, 6], "mkdir": 5, "cmake": 5, "duse_mpi": 5, "dwith_ndebug": 5, "dcmake_build_typ": 5, "dcmake_prefix_path": 5, "j5": 5, "sh": 5, "build_opm_mpi": 5, "so": [5, 14], "built": 5, "dune": 5, "librari": 5, "macport": 5, "brew": 5, "geometri": 5, "istl": 5, "gitlab": 5, "v2": 5, "dunecontrol": 5, "dcmake_disable_find_package_mpi": 5, "dpython_execut": 5, "dopm_enable_python": 5, "ON": 5, "version": 5, "10": 5, "due": 5, "resdata": 5, "host": 6, "simplifi": 6, "flexibl": 6, "focu": [6, 8], "were": 6, "two": 6, "reservoir": 6, "manual": 6, "templat": [6, 13], "adapt": [6, 8], "favourit": [6, 8], "optim": [6, 8], "pet": [6, 8], "everest": [6, 8], "name_of_input_fil": 6, "f": 6, "just": 6, "level": 6, "dir": [6, 15], "either": 6, "ones": 6, "ha": 6, "6": 6, "while": 6, "them": [6, 19], "actnum": [6, 14], "endnum": 6, "eqlnum": [6, 17], "fipnum": [6, 17], "fluxnum": 6, "imbnum": 6, "miscnum": 6, "multnum": 6, "pvtnum": 6, "rocknum": 6, "mult": 6, "xyz": 6, "arithmet": 6, "averag": 6, "harmon": 6, "rest": 6, "closest": 6, "confact": 6, "kh": 6, "compdat": 6, "peqvr": 6, "item": 6, "13": 6, "transmis": 6, "intern": 6, "tune": 6, "creation": 6, "discontinu": 6, "along": 6, "around": 6, "noth": 6, "static": 6, "prep": 6, "exectut": 6, "prep_deck": 6, "deck_dri": 6, "w": 6, "plu": 6, "_pycopm": 6, "text": [6, 16], "befor": [6, 16], "pycopm_": 6, "pycopm_porv": 6, "etc": 6, "utf8": 6, "iso": 6, "8859": 6, "encod": 6, "jk": 6, "return": [6, 13, 14, 15, 16, 17, 18], "posit": [6, 14, 15], "empti": 6, "As": 8, "earli": 8, "screenshot": 8, "show": 8, "postprocess": 8, "directli": 8, "further": 8, "plot": [8, 9, 12, 18], "visual": 8, "resinsight": 8, "focuc": 8, "test_generic_deck": 8, "py": [8, 18], "summari": 8, "appear": 8, "find": [8, 14], "otherwis": 8, "load_pars": [9, 10, 11], "files_writ": [9, 12], "coarser_fil": [9, 12, 13], "ert_fil": [9, 12, 13], "grid_featur": [9, 12, 13], "opm_properti": [9, 12, 13], "write_let_t": [9, 12, 13], "generate_coarser_fil": [9, 12], "create_deck": [9, 12, 14], "find_neighbor": [9, 12, 14], "get_ijk": [9, 12, 14], "handle_clust": [9, 12, 14], "handle_cp_grid": [9, 12, 14], "handle_fault": [9, 12, 14, 15], "handle_grid_prop": [9, 12, 14], "handle_mapax": [9, 12, 14], "handle_op": [9, 12, 14], "handle_prop": [9, 12, 14], "handle_pv": [9, 12, 14], "handle_region": [9, 12, 14], "handle_segmented_wel": [9, 12, 14], "handle_wel": [9, 12, 14], "handle_zcorn": [9, 12, 14], "map_ijk": [9, 12, 14], "map_properti": [9, 12, 14], "process_the_deck": [9, 12, 14], "write_grid": [9, 12, 14], "write_prop": [9, 12, 14], "grid_build": [9, 12], "coarser_grid": [9, 12, 15], "handle_face_dir_im": [9, 12, 15], "handle_face_dir_ip": [9, 12, 15], "handle_face_dir_jm": [9, 12, 15], "handle_face_dir_jp": [9, 12, 15], "input_valu": [9, 12], "assign_hm_paramet": [9, 12, 16], "assign_standard_valu": [9, 12, 16], "get_number_of_lin": [9, 12, 16], "initialize_valu": [9, 12, 16], "process_input": [9, 12, 16], "read_refer": [9, 12, 16], "read_the_first_part": [9, 12, 16], "properties_build": [9, 12], "add_lost_pv_to_all_cel": [9, 12, 17], "add_lost_pv_to_all_eq_cel": [9, 12, 17], "add_lost_pv_to_all_fip_cel": [9, 12, 17], "add_lost_pv_to_boundary_cel": [9, 12, 17], "coarser_properti": [9, 12, 17], "identify_removed_pilar": [9, 12, 17], "identify_removed_pilars_zdir": [9, 12, 17], "initialize_properti": [9, 12, 17], "runs_execut": [9, 12], "utilii": [13, 14, 15, 16, 17, 18], "necessari": [13, 14], "variabl": [13, 16], "dic": [13, 14, 15, 16, 17, 18], "method": [13, 14, 15, 17], "arg": [13, 14, 15, 16, 17, 18], "dict": [13, 14, 15, 16, 17, 18], "global": [13, 14, 15, 16, 17, 18], "dictionari": [13, 14, 15, 16, 17, 18], "none": [13, 14, 18], "tabl": 13, "scrip": 14, "diffeent": 14, "ind": [14, 16], "i_d": 14, "list": [14, 16], "int": [14, 15, 16, 17], "its": 14, "increas": 14, "shift": 14, "cluster": 14, "zcord": 14, "nrwo": 14, "splite": 14, "row": 14, "map": [14, 15], "clusmin": 14, "clusmax": 14, "rmv": 14, "sure": 14, "nor": 14, "destroi": 14, "panda": 14, "datafram": 14, "mask": 14, "segment": 14, "ir": 14, "zcorn": 14, "coordin": 14, "corner": [14, 15], "d_z": 14, "z_t": 14, "z_b": 14, "z_b_t": 14, "arrai": [14, 17], "float": [14, 18], "dz": 14, "bottom": 14, "identifi": [14, 17], "point": [14, 15], "cell_index": 15, "face": 15, "refer": [15, 17], "requiri": 16, "lol": 16, "num_lin": 16, "inject": 16, "obtain": 16, "dic1": 16, "local": 16, "in_fil": 16, "str": 16, "quantiti": 16, "uncoars": 16, "29": 16, "inx": 17, "num": 17, "below": 19, "check": 19, "out": 19, "csp": 19, "spe11": 19, "benchmark": 19, "dynam": 19, "quick": 19, "vtk": 19, "expans": 19, "co2": 19, "horda": 19, "platform": 19, "leakag": 19, "remedi": 19, "microbi": 19, "induc": 19, "calcit": 19, "precipit": 19, "open": 19, "imag": 19, "cfd": 19, "microsystem": 19}, "objects": {"": [[9, 0, 0, "-", "pycopm"]], "pycopm": [[10, 0, 0, "-", "core"], [12, 0, 0, "-", "utils"]], "pycopm.core": [[11, 0, 0, "-", "pycopm"]], "pycopm.core.pycopm": [[11, 1, 1, "", "load_parser"], [11, 1, 1, "", "main"], [11, 1, 1, "", "pycopm"]], "pycopm.utils": [[13, 0, 0, "-", "files_writer"], [14, 0, 0, "-", "generate_coarser_files"], [15, 0, 0, "-", "grid_builder"], [16, 0, 0, "-", "input_values"], [17, 0, 0, "-", "properties_builder"], [18, 0, 0, "-", "runs_executer"]], "pycopm.utils.files_writer": [[13, 1, 1, "", "coarser_files"], [13, 1, 1, "", "ert_files"], [13, 1, 1, "", "grid_features"], [13, 1, 1, "", "opm_properties"], [13, 1, 1, "", "write_let_tables"]], "pycopm.utils.generate_coarser_files": [[14, 1, 1, "", "create_deck"], [14, 1, 1, "", "find_neighbors"], [14, 1, 1, "", "get_ijk"], [14, 1, 1, "", "handle_clusters"], [14, 1, 1, "", "handle_cp_grid"], [14, 1, 1, "", "handle_fault"], [14, 1, 1, "", "handle_grid_props"], [14, 1, 1, "", "handle_mapaxes"], [14, 1, 1, "", "handle_oper"], [14, 1, 1, "", "handle_props"], [14, 1, 1, "", "handle_pv"], [14, 1, 1, "", "handle_regions"], [14, 1, 1, "", "handle_segmented_wells"], [14, 1, 1, "", "handle_wells"], [14, 1, 1, "", "handle_zcorn"], [14, 1, 1, "", "map_ijk"], [14, 1, 1, "", "map_properties"], [14, 1, 1, "", "process_the_deck"], [14, 1, 1, "", "write_grid"], [14, 1, 1, "", "write_props"]], "pycopm.utils.grid_builder": [[15, 1, 1, "", "coarser_grid"], [15, 1, 1, "", "handle_face_dir_im"], [15, 1, 1, "", "handle_face_dir_ip"], [15, 1, 1, "", "handle_face_dir_jm"], [15, 1, 1, "", "handle_face_dir_jp"], [15, 1, 1, "", "handle_faults"]], "pycopm.utils.input_values": [[16, 1, 1, "", "assign_hm_parameters"], [16, 1, 1, "", "assign_standard_values"], [16, 1, 1, "", "get_number_of_lines"], [16, 1, 1, "", "initialize_values"], [16, 1, 1, "", "process_input"], [16, 1, 1, "", "read_reference"], [16, 1, 1, "", "read_the_first_part"]], "pycopm.utils.properties_builder": [[17, 1, 1, "", "add_lost_pv_to_all_cells"], [17, 1, 1, "", "add_lost_pv_to_all_eq_cells"], [17, 1, 1, "", "add_lost_pv_to_all_fip_cells"], [17, 1, 1, "", "add_lost_pv_to_boundary_cells"], [17, 1, 1, "", "coarser_properties"], [17, 1, 1, "", "identify_removed_pilars"], [17, 1, 1, "", "identify_removed_pilars_zdir"], [17, 1, 1, "", "initialize_properties"]], "pycopm.utils.runs_executer": [[18, 1, 1, "", "plotting"], [18, 1, 1, "", "simulations"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pycopm": [0, 1, 4, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "python": [1, 5], "api": 1, "configur": [2, 3, 8], "file": [2, 3, 8], "exampl": 3, "via": [3, 8], "opm": [3, 5, 8], "flow": [3, 5, 8], "deck": [3, 8], "hello": 3, "world": 3, "spe10": 3, "smeaheia": 3, "drogon": 3, "norn": 3, "welcom": 4, "": 4, "document": 4, "indic": 4, "tabl": 4, "instal": 5, "packag": [5, 9, 10, 12], "sourc": 5, "build": 5, "linux": 5, "window": 5, "maco": 5, "introduct": 6, "concept": 6, "roadmap": 6, "overview": 6, "output": 8, "folder": 8, "an": 8, "input": 8, "subpackag": 9, "modul": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "content": [9, 10, 12], "core": [10, 11], "submodul": [10, 12], "util": [12, 13, 14, 15, 16, 17, 18], "files_writ": 13, "generate_coarser_fil": 14, "grid_build": 15, "input_valu": 16, "properties_build": 17, "runs_execut": 18, "relat": 19, "pyopmspe11": 19, "pyopmnearwel": 19, "plopm": 19, "exprecc": 19, "ad": 19, "micp": 19, "pymm": 19}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"About pycopm": [[0, "about-pycopm"]], "pycopm Python API": [[1, "pycopm-python-api"]], "pycopm": [[1, "pycopm"], [7, "pycopm"]], "Configuration file": [[2, "configuration-file"]], "Examples": [[3, "examples"]], "Via configuration files": [[3, "via-configuration-files"], [8, "via-configuration-files"]], "Via OPM Flow decks": [[3, "via-opm-flow-decks"]], "Hello world": [[3, "hello-world"]], "SPE10": [[3, "spe10"]], "Smeaheia": [[3, "smeaheia"]], "Drogon": [[3, "drogon"]], "Norne": [[3, "norne"]], "Welcome to pycopm\u2019s documentation!": [[4, "welcome-to-pycopm-s-documentation"]], "Indices and tables": [[4, "indices-and-tables"]], "Installation": [[5, "installation"]], "Python package": [[5, "python-package"]], "OPM Flow": [[5, "opm-flow"]], "Source build in Linux/Windows": [[5, "source-build-in-linux-windows"]], "Source build in macOS": [[5, "source-build-in-macos"]], "Introduction": [[6, "introduction"]], "Concept": [[6, "concept"]], "Roadmap": [[6, "roadmap"]], "Overview": [[6, "overview"]], "Output folder": [[8, "output-folder"]], "Via an OPM Flow input deck": [[8, "via-an-opm-flow-input-deck"]], "pycopm package": [[9, "pycopm-package"]], "Subpackages": [[9, "subpackages"]], "Module contents": [[9, "module-pycopm"], [10, "module-pycopm.core"], [12, "module-pycopm.utils"]], "pycopm.core package": [[10, "pycopm-core-package"]], "Submodules": [[10, "submodules"], [12, "submodules"]], "pycopm.core.pycopm module": [[11, "module-pycopm.core.pycopm"]], "pycopm.utils package": [[12, "pycopm-utils-package"]], "pycopm.utils.files_writer module": [[13, "module-pycopm.utils.files_writer"]], "pycopm.utils.generate_coarser_files module": [[14, "module-pycopm.utils.generate_coarser_files"]], "pycopm.utils.grid_builder module": [[15, "module-pycopm.utils.grid_builder"]], "pycopm.utils.input_values module": [[16, "module-pycopm.utils.input_values"]], "pycopm.utils.properties_builder module": [[17, "module-pycopm.utils.properties_builder"]], "pycopm.utils.runs_executer module": [[18, "module-pycopm.utils.runs_executer"]], "Related": [[19, "related"]], "pyopmspe11": [[19, "pyopmspe11"]], "pyopmnearwell": [[19, "pyopmnearwell"]], "plopm": [[19, "plopm"]], "expreccs": [[19, "expreccs"]], "ad-micp": [[19, "ad-micp"]], "pymm": [[19, "pymm"]]}, "indexentries": {"module": [[9, "module-pycopm"], [10, "module-pycopm.core"], [11, "module-pycopm.core.pycopm"], [12, "module-pycopm.utils"], [13, "module-pycopm.utils.files_writer"], [14, "module-pycopm.utils.generate_coarser_files"], [15, "module-pycopm.utils.grid_builder"], [16, "module-pycopm.utils.input_values"], [17, "module-pycopm.utils.properties_builder"], [18, "module-pycopm.utils.runs_executer"]], "pycopm": [[9, "module-pycopm"]], "pycopm.core": [[10, "module-pycopm.core"]], "load_parser() (in module pycopm.core.pycopm)": [[11, "pycopm.core.pycopm.load_parser"]], "main() (in module pycopm.core.pycopm)": [[11, "pycopm.core.pycopm.main"]], "pycopm() (in module pycopm.core.pycopm)": [[11, "pycopm.core.pycopm.pycopm"]], "pycopm.core.pycopm": [[11, "module-pycopm.core.pycopm"]], "pycopm.utils": [[12, "module-pycopm.utils"]], "coarser_files() (in module pycopm.utils.files_writer)": [[13, "pycopm.utils.files_writer.coarser_files"]], "ert_files() (in module pycopm.utils.files_writer)": [[13, "pycopm.utils.files_writer.ert_files"]], "grid_features() (in module pycopm.utils.files_writer)": [[13, "pycopm.utils.files_writer.grid_features"]], "opm_properties() (in module pycopm.utils.files_writer)": [[13, "pycopm.utils.files_writer.opm_properties"]], "pycopm.utils.files_writer": [[13, "module-pycopm.utils.files_writer"]], "write_let_tables() (in module pycopm.utils.files_writer)": [[13, "pycopm.utils.files_writer.write_let_tables"]], "create_deck() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.create_deck"]], "find_neighbors() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.find_neighbors"]], "get_ijk() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.get_ijk"]], "handle_clusters() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_clusters"]], "handle_cp_grid() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_cp_grid"]], "handle_fault() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_fault"]], "handle_grid_props() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_grid_props"]], "handle_mapaxes() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_mapaxes"]], "handle_oper() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_oper"]], "handle_props() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_props"]], "handle_pv() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_pv"]], "handle_regions() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_regions"]], "handle_segmented_wells() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_segmented_wells"]], "handle_wells() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_wells"]], "handle_zcorn() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.handle_zcorn"]], "map_ijk() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.map_ijk"]], "map_properties() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.map_properties"]], "process_the_deck() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.process_the_deck"]], "pycopm.utils.generate_coarser_files": [[14, "module-pycopm.utils.generate_coarser_files"]], "write_grid() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.write_grid"]], "write_props() (in module pycopm.utils.generate_coarser_files)": [[14, "pycopm.utils.generate_coarser_files.write_props"]], "coarser_grid() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.coarser_grid"]], "handle_face_dir_im() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.handle_face_dir_im"]], "handle_face_dir_ip() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.handle_face_dir_ip"]], "handle_face_dir_jm() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.handle_face_dir_jm"]], "handle_face_dir_jp() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.handle_face_dir_jp"]], "handle_faults() (in module pycopm.utils.grid_builder)": [[15, "pycopm.utils.grid_builder.handle_faults"]], "pycopm.utils.grid_builder": [[15, "module-pycopm.utils.grid_builder"]], "assign_hm_parameters() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.assign_hm_parameters"]], "assign_standard_values() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.assign_standard_values"]], "get_number_of_lines() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.get_number_of_lines"]], "initialize_values() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.initialize_values"]], "process_input() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.process_input"]], "pycopm.utils.input_values": [[16, "module-pycopm.utils.input_values"]], "read_reference() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.read_reference"]], "read_the_first_part() (in module pycopm.utils.input_values)": [[16, "pycopm.utils.input_values.read_the_first_part"]], "add_lost_pv_to_all_cells() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.add_lost_pv_to_all_cells"]], "add_lost_pv_to_all_eq_cells() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.add_lost_pv_to_all_eq_cells"]], "add_lost_pv_to_all_fip_cells() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.add_lost_pv_to_all_fip_cells"]], "add_lost_pv_to_boundary_cells() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.add_lost_pv_to_boundary_cells"]], "coarser_properties() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.coarser_properties"]], "identify_removed_pilars() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.identify_removed_pilars"]], "identify_removed_pilars_zdir() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.identify_removed_pilars_zdir"]], "initialize_properties() (in module pycopm.utils.properties_builder)": [[17, "pycopm.utils.properties_builder.initialize_properties"]], "pycopm.utils.properties_builder": [[17, "module-pycopm.utils.properties_builder"]], "plotting() (in module pycopm.utils.runs_executer)": [[18, "pycopm.utils.runs_executer.plotting"]], "pycopm.utils.runs_executer": [[18, "module-pycopm.utils.runs_executer"]], "simulations() (in module pycopm.utils.runs_executer)": [[18, "pycopm.utils.runs_executer.simulations"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["about", "api", "configuration_file", "examples", "index", "installation", "introduction", "modules", "output_folder", "pycopm", "pycopm.core", "pycopm.core.pycopm", "pycopm.utils", "pycopm.utils.files_writer", "pycopm.utils.generate_coarser_files", "pycopm.utils.grid_builder", "pycopm.utils.input_values", "pycopm.utils.properties_builder", "pycopm.utils.runs_executer", "related"], "filenames": ["about.rst", "api.rst", "configuration_file.rst", "examples.rst", "index.rst", "installation.rst", "introduction.rst", "modules.rst", "output_folder.rst", "pycopm.rst", "pycopm.core.rst", "pycopm.core.pycopm.rst", "pycopm.utils.rst", "pycopm.utils.files_writer.rst", "pycopm.utils.generate_coarser_files.rst", "pycopm.utils.grid_builder.rst", "pycopm.utils.input_values.rst", "pycopm.utils.properties_builder.rst", "pycopm.utils.runs_executer.rst", "related.rst"], "titles": ["About pycopm", "pycopm Python API", "Configuration file", "Examples", "Welcome to pycopm\u2019s documentation!", "Installation", "Introduction", "pycopm", "Output folder", "pycopm package", "pycopm.core package", "pycopm.core.pycopm module", "pycopm.utils package", "pycopm.utils.files_writer module", "pycopm.utils.generate_coarser_files module", "pycopm.utils.grid_builder module", "pycopm.utils.input_values module", "pycopm.utils.properties_builder module", "pycopm.utils.runs_executer module", "Related"], "terms": {"tool": [0, 3, 5, 6, 8, 19], "coarsen": [0, 1, 2, 3, 6], "opm": [0, 1, 2, 4, 6, 13, 16, 18, 19], "flow": [0, 1, 2, 4, 6, 13, 18, 19], "geolog": [0, 2, 3, 6, 8], "model": [0, 2, 3, 6, 8, 19], "i": [0, 1, 2, 3, 6, 8, 14, 15], "being": 0, "fund": 0, "center": [0, 3, 14], "sustain": 0, "subsurfac": 0, "resourc": [0, 19], "cssr": [0, 3, 5, 6], "project": [0, 5, 19], "331841": 0, "thi": [0, 2, 3, 5, 6, 8], "work": [0, 6], "progress": 0, "contribut": [0, 5], "ar": [0, 1, 2, 3, 5, 6, 8, 19], "more": [0, 3], "than": 0, "welcom": 0, "us": [0, 1, 2, 3, 5, 6, 8, 17, 19], "fork": 0, "pull": 0, "request": 0, "approach": [0, 2], "The": [1, 2, 3, 6, 8], "main": [1, 2, 3, 9, 10, 11, 14], "script": [1, 5, 11], "execut": [1, 2, 3, 5, 6, 8, 11, 18], "locat": [1, 3, 8], "core": [1, 5, 7, 9], "folder": [1, 3, 4, 5, 6], "differ": [1, 2], "job": 1, "call": [1, 2, 8, 14], "ert": [1, 2, 3, 6, 8, 13, 16, 18], "reference_simul": 1, "contain": [1, 3], "gener": [1, 2, 3, 6, 8, 14, 15, 17, 18, 19], "file": [1, 4, 5, 6, 13, 14, 16, 18], "after": [1, 2, 3, 5, 8], "run": [1, 2, 3, 5, 6, 8, 13, 18], "norn": [1, 2, 4, 6, 8], "drogon": [1, 2, 4, 6, 8], "case": [1, 3], "test": [1, 2, 3, 5, 6], "template_script": 1, "mako": [1, 13], "base": [1, 6, 19], "from": [1, 2, 3, 5, 6, 14, 15, 16, 19], "origin": [1, 3], "deck": [1, 2, 4, 6, 13, 14, 17], "final": [1, 2], "util": [1, 7, 9], "function": [1, 2, 3, 11, 13, 15, 16, 17, 18], "framework": [1, 3, 6, 19], "pyocpm": 1, "packag": [1, 4, 7], "subpackag": [1, 4, 7], "submodul": [1, 7, 9], "modul": [1, 4, 5, 7, 19], "content": [1, 3, 4, 7], "allow": [2, 3, 6], "set": [2, 3, 6, 8, 16], "integr": 2, "studi": [2, 3, 6, 8, 18, 19], "histori": [2, 3, 6, 8], "match": [2, 3, 6, 8], "onli": [2, 3, 5, 6, 8, 14], "To": [2, 3, 5], "pycopm": [2, 3, 5, 6, 8], "ani": 2, "given": [2, 3, 6], "coarser": [2, 3, 6, 8, 14, 17], "can": [2, 3, 5, 8], "achiev": [2, 3, 5], "without": [2, 8], "paramet": [2, 3, 6, 16, 17], "via": [2, 4, 6], "command": [2, 5], "line": [2, 3, 5, 16], "see": [2, 5, 6, 8], "overview": [2, 4], "h": 2, "definit": [2, 3], "argument": [2, 6, 11, 14], "option": [2, 6, 11], "well": [2, 3, 6, 14, 19], "exampl": [2, 4, 8], "here": [2, 3], "we": [2, 3, 8, 14], "an": [2, 4, 5, 19], "one": [2, 3, 6, 8, 14], "txt": [2, 3, 5, 6], "first": [2, 3, 16], "input": [2, 3, 4, 6, 14, 16, 17], "full": [2, 6, 8], "path": [2, 3, 6, 8], "If": [2, 3, 5], "your": [2, 6, 8], "write": [2, 13, 14, 17], "e": [2, 3, 5, 6, 8], "g": [2, 3, 5, 6, 8], "user": [2, 5], "dmar": 2, "github": [2, 3, 5, 6], "build": [2, 4], "simul": [2, 3, 5, 8, 9, 12, 16, 18, 19], "bin": [2, 5], "follow": [2, 3, 5, 6, 8], "delet": 2, "suffix": 2, "save": [2, 3, 6], "storag": [2, 19], "egrid": 2, "dbg": 2, "grdecl": 2, "unrst": 2, "unsmri": 2, "prt": 2, "inc": [2, 6, 16], "infostep": 2, "smspec": 2, "init": [2, 3], "you": [2, 3, 5, 8], "type": [2, 19], "each": [2, 6], "realiz": 2, "complet": 2, "order": [2, 3, 6], "memori": 2, "number": [2, 3, 16], "jump": [2, 3, 14], "2": [2, 3, 6], "4": [2, 3], "sinc": [2, 3], "implement": [2, 3, 6], "white": 2, "space": 2, "between": [2, 3, 6], "block": [2, 17], "need": [2, 3, 5, 6, 8], "next": 2, "entri": [2, 6], "defin": [2, 3, 17], "singl": 2, "0": [2, 3, 5, 6], "1": [2, 3, 5, 6], "vector": [2, 3, 6], "x": [2, 3, 6], "coers": 2, "y": [2, 3, 6], "z": [2, 3, 6, 14, 17], "ensembl": [2, 3, 6], "maximum": [2, 3], "parallel": 2, "mpi": [2, 5], "process": [2, 14, 16], "600": 2, "runtim": 2, "second": [2, 3], "A": [2, 19], "valu": [2, 3, 6, 16], "mean": [2, 6], "unlimit": 2, "minimum": 2, "must": [2, 3], "have": [2, 3, 14], "succeed": 2, "regard": 2, "success": 2, "7": 2, "specif": [2, 3], "seed": 2, "reproduc": 2, "observations_train": 2, "name": [2, 3, 6, 16], "observ": 2, "hm": [2, 3], "observations_test": 2, "observations_complet": 2, "select": [2, 8, 18], "which": [2, 3, 5], "default": [2, 3, 6, 8], "let": [2, 13], "sat": 2, "For": [2, 3, 5, 8], "satnum": [2, 6], "comput": [2, 6], "sandv": 2, "et": 2, "al": 2, "2022": 2, "cell": [2, 3, 6, 14, 15, 16, 17], "correct": [2, 6, 8, 17], "lost": [2, 17], "pv": [2, 6], "boundari": [2, 17], "account": 2, "poros": [2, 3], "all": [2, 3, 6, 8, 14, 17], "initi": [2, 3, 6, 16, 17], "equil": 2, "fine": 2, "scale": [2, 6], "error": [2, 3, 8], "wwpr": 2, "wopr": 2, "wgpr": 2, "100": 2, "100000": 2, "2005": 2, "03": 2, "01": [2, 3], "last": [2, 6, 16], "date": 2, "do": [2, 3, 5, 6], "remov": [2, 3, 6, 14, 17], "current": [2, 3, 5, 6, 8, 14, 18], "read": [2, 3, 6, 16], "result": [2, 3, 8], "inform": 2, "shown": 2, "termin": [2, 3, 5, 6], "instead": 2, "same": [2, 3, 8, 14, 17], "discuss": 2, "later": 2, "three": [2, 3], "pillar": [2, 14], "direct": [2, 3, 6, 17], "respect": 2, "j": [2, 3, 6, 14, 15], "k": [2, 3, 6, 14, 15], "index": [2, 4, 14, 15, 17], "standard": 2, "data": [2, 3, 6], "pilar": [2, 3, 6, 17], "keep": [2, 3, 6, 14], "honor": 2, "shape": 2, "Then": [2, 3, 8], "provid": 2, "chang": 2, "": [2, 3, 6, 14], "add": [2, 3, 6, 14], "back": 2, "remain": 2, "mpirun": 2, "avail": [2, 5, 6], "stop": 2, "time": [2, 3, 18], "random": 2, "satur": [2, 3, 13, 16], "consid": 2, "region": [2, 3, 14], "ntg": [2, 3], "poro": [2, 3, 6], "properti": [2, 3, 6, 13, 14, 17], "modifi": [2, 5, 13, 14, 15, 16, 17, 18], "activ": [2, 3, 5, 6, 14, 17], "gui": 2, "test_run": 2, "ensemble_experi": 2, "ensemble_smooth": 2, "iterative_ensemble_smooth": 2, "es_mda": 2, "weight": [2, 6], "flag": [2, 3, 6, 14, 16], "support": [2, 5, 6, 14], "confer": 2, "document": [2, 6], "descript": [2, 6], "enabl": [2, 6], "rst": 2, "true": 2, "newton": 2, "min": [2, 3, 6], "iter": [2, 3], "dist": 2, "distpara": 2, "lw": 2, "3": [2, 3, 5, 6], "uniform": 2, "5": [2, 3], "ew": 2, "tw": 2, "lo": 2, "eo": 2, "lg": 2, "eg": 2, "tg": 2, "log": 2, "eog": 2, "tog": 2, "lmlto": 2, "emlto": 2, "9": [2, 5], "tmlto": 2, "lmltg": 2, "emltg": 2, "tmltg": 2, "permeabl": [2, 3], "rock": 2, "coars": [2, 3, 6, 8, 14, 15, 17], "max": [2, 3, 6], "permx": [2, 3, 6], "permi": [2, 3, 6], "permz": [2, 3, 6], "distribut": [2, 14, 17], "interv": [2, 3], "perm_min": 2, "perm_max": 2, "correspond": [2, 6, 14], "perform": [3, 6], "insid": [3, 5], "o": [3, 6, 8, 14], "drogon_coars": 3, "norne_coars": 3, "gif": [3, 19], "introduct": [3, 4, 8], "wa": [3, 6, 8], "develop": [3, 6, 8], "focus": [3, 6], "creat": [3, 5, 6, 8, 14], "hello_world": 3, "c": [3, 6], "m": [3, 5, 6], "would": [3, 6, 8], "dry": [3, 6], "clone": [3, 5], "left": [3, 8], "right": [3, 8, 14], "ad": [3, 4, 6], "p": [3, 6], "pore": [3, 6, 14, 17], "volum": [3, 6, 14, 17], "neighbour": [3, 6, 14], "make": [3, 5, 6, 14], "where": [3, 6], "mode": [3, 6], "n": [3, 6, 14], "integ": [3, 14], "By": 3, "download": 3, "spe10_model2": 3, "8": 3, "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20": 3, "made": 3, "inact": [3, 6], "least": [3, 5, 6, 14], "our": 3, "plopm": [3, 4], "friend": 3, "png": [3, 19], "figur": [3, 8], "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20_prep_pycopm_dryrun": 3, "statoil_feasibility_sim_model_with_depletion_kross_inj_sector_20_pycopm": 3, "v": 3, "subfig": 3, "t": 3, "xunit": 3, "km": 3, "xformat": 3, "0f": 3, "yunit": 3, "yformat": 3, "d": 3, "suptitl": 3, "cet_rainbow_bgyrm_35_85_c69": 3, "cbsfax": 3, "30": 3, "02": 3, "cformat": 3, "2f": 3, "top": [3, 14], "view": [3, 14], "note": 3, "also": [3, 5, 6, 14], "instal": [3, 4], "pip": [3, 5], "git": [3, 5], "http": [3, 5, 6], "com": [3, 5, 6], "In": [3, 5, 6], "handl": [3, 14], "requir": [3, 5, 14, 16, 17], "indic": [3, 6, 14], "fault": [3, 6, 14, 15], "wellspec": 3, "assum": 3, "includ": [3, 5, 8], "replac": 3, "those": 3, "actual": 3, "some": [3, 8, 19], "relev": 3, "keyword": [3, 14], "per": 3, "section": [3, 14], "grid": [3, 5, 6, 13, 14, 15, 17], "mapax": 3, "multregt": 3, "other": [3, 8], "like": 3, "multz": 3, "oper": [3, 14], "perm": 3, "porv": [3, 6], "multx": 3, "multi": 3, "prop": [3, 14], "equal": 3, "copi": [3, 5, 8], "multipli": 3, "involv": 3, "appli": 3, "still": 3, "format": 3, "addit": [3, 5], "swatinit": [3, 6], "output": [3, 4, 6, 16], "new": [3, 6, 14], "might": [3, 8, 19], "give": [3, 6, 8], "special": 3, "schedul": [3, 14], "vile": 3, "abov": 3, "drogon_hist": 3, "l127": 3, "128": 3, "l242": 3, "243": 3, "q": [3, 6], "l": [3, 6], "c1": 3, "drogon_hist_pycopm": 3, "c2": 3, "total": 3, "conserv": 3, "reduc": 3, "31": 3, "11": 3, "trial": 3, "avoid": [3, 6], "connect": [3, 6], "across": 3, "lot": 3, "divid": 3, "conquer": 3, "apporach": 3, "recommend": [3, 8], "label": 3, "differenti": 3, "closest": [3, 6], "redistribut": 3, "ga": 3, "oil": 3, "field": 3, "place": 3, "practic": 3, "water": 3, "relat": [3, 4, 13], "now": 3, "show": [3, 8], "refer": [3, 15, 17], "previou": [3, 5], "comment": 3, "about": [3, 4], "seem": 3, "ok": 3, "go": 3, "w": [3, 6], "drogon_2times_coars": 3, "higher": 3, "compar": 3, "summari": [3, 8], "end": 3, "good": 3, "old": 3, "drogon_hist_pycopm_pycopm": 3, "foip": [3, 6], "fopr": 3, "tcpu": 3, "tunit": 3, "f": [3, 6], "14": 3, "delax": 3, "loc": 3, "empti": [3, 6], "10": [3, 5], "1f": 3, "xlnum": 3, "6": [3, 6], "ylabel": 3, "sm": 3, "dai": 3, "product": 3, "rate": 3, "3xz": 3, "2xyz": 3, "drogon_pycopm_comparison": 3, "2e": 3, "nice": 3, "sga": 3, "16": 3, "r": [3, 5, 6], "dpi": 3, "1000": 3, "2000": 3, "loop": 3, "rotat": 3, "two": [3, 6], "describ": [3, 6, 8], "certain": 3, "featur": 3, "norne_atw2013": 3, "concept": 4, "roadmap": 4, "python": [4, 19], "sourc": [4, 19], "linux": 4, "window": 4, "maco": 4, "configur": [4, 6], "hello": 4, "world": 4, "spe10": [4, 8], "smeaheia": 4, "api": 4, "pyopmspe11": 4, "pyopmnearwel": 4, "exprecc": 4, "micp": 4, "pymm": 4, "search": [4, 14], "page": 4, "exist": 5, "environ": 5, "interest": [5, 19], "code": 5, "repositori": 5, "virtual": 5, "repo": 5, "get": 5, "cd": 5, "python3": 5, "venv": 5, "vpycopm": 5, "upgrad": 5, "setuptool": 5, "wheel": 5, "lint": 5, "dev": 5, "org": 5, "releas": 5, "2024": 5, "04": 5, "master": 5, "branch": 5, "ci": 5, "yml": 5, "binari": 5, "subsystem": 5, "could": [5, 8], "try": [5, 6], "prerequisit": 5, "turn": 5, "should": 5, "current_directori": 5, "pwd": 5, "common": 5, "done": [5, 6], "mkdir": 5, "cmake": 5, "duse_mpi": 5, "dwith_ndebug": 5, "dcmake_build_typ": 5, "dcmake_prefix_path": 5, "j5": 5, "sh": 5, "build_opm_mpi": 5, "so": [5, 14], "built": 5, "dune": 5, "librari": 5, "macport": 5, "brew": 5, "geometri": 5, "istl": 5, "gitlab": 5, "v2": 5, "dunecontrol": 5, "dcmake_disable_find_package_mpi": 5, "dpython_execut": 5, "dopm_enable_python": 5, "ON": 5, "version": 5, "due": 5, "resdata": 5, "host": 6, "simplifi": 6, "flexibl": 6, "focu": [6, 8], "were": 6, "reservoir": 6, "manual": 6, "templat": [6, 13], "adapt": [6, 8], "favourit": [6, 8], "optim": [6, 8], "pet": [6, 8], "everest": [6, 8], "name_of_input_fil": 6, "just": 6, "level": 6, "dir": [6, 15], "either": 6, "ones": 6, "ha": 6, "while": 6, "them": [6, 19], "actnum": [6, 14], "endnum": 6, "eqlnum": [6, 17], "fipnum": [6, 17], "fluxnum": 6, "imbnum": 6, "miscnum": 6, "multnum": 6, "pvtnum": 6, "rocknum": 6, "mult": 6, "xyz": 6, "arithmet": 6, "averag": 6, "harmon": 6, "rest": 6, "adjust": 6, "fgip": 6, "confact": 6, "kh": 6, "compdat": 6, "peqvr": 6, "item": 6, "13": 6, "transmis": 6, "intern": 6, "tune": 6, "creation": 6, "discontinu": 6, "along": 6, "around": 6, "noth": 6, "static": 6, "prep": 6, "exectut": 6, "prep_deck": 6, "deck_dri": 6, "plu": 6, "_pycopm": 6, "text": [6, 16], "befor": [6, 16], "pycopm_": 6, "pycopm_porv": 6, "etc": 6, "utf8": 6, "iso": 6, "8859": 6, "encod": 6, "jk": 6, "return": [6, 13, 14, 15, 16, 17, 18], "posit": [6, 14, 15], "As": 8, "earli": 8, "screenshot": 8, "postprocess": 8, "directli": 8, "further": 8, "plot": [8, 9, 12, 18], "visual": 8, "resinsight": 8, "focuc": 8, "test_generic_deck": 8, "py": [8, 18], "appear": 8, "find": [8, 14], "otherwis": 8, "load_pars": [9, 10, 11], "files_writ": [9, 12], "coarser_fil": [9, 12, 13], "ert_fil": [9, 12, 13], "grid_featur": [9, 12, 13], "opm_properti": [9, 12, 13], "write_let_t": [9, 12, 13], "generate_coarser_fil": [9, 12], "create_deck": [9, 12, 14], "find_neighbor": [9, 12, 14], "get_ijk": [9, 12, 14], "handle_clust": [9, 12, 14], "handle_cp_grid": [9, 12, 14], "handle_fault": [9, 12, 14, 15], "handle_grid_prop": [9, 12, 14], "handle_mapax": [9, 12, 14], "handle_op": [9, 12, 14], "handle_prop": [9, 12, 14], "handle_pv": [9, 12, 14], "handle_region": [9, 12, 14], "handle_schedul": [9, 12, 14], "handle_segmented_wel": [9, 12, 14], "handle_wel": [9, 12, 14], "handle_zcorn": [9, 12, 14], "map_ijk": [9, 12, 14], "map_properti": [9, 12, 14], "process_the_deck": [9, 12, 14], "write_grid": [9, 12, 14], "write_prop": [9, 12, 14], "grid_build": [9, 12], "coarser_grid": [9, 12, 15], "handle_face_dir_im": [9, 12, 15], "handle_face_dir_ip": [9, 12, 15], "handle_face_dir_jm": [9, 12, 15], "handle_face_dir_jp": [9, 12, 15], "input_valu": [9, 12], "assign_hm_paramet": [9, 12, 16], "assign_standard_valu": [9, 12, 16], "get_number_of_lin": [9, 12, 16], "initialize_valu": [9, 12, 16], "process_input": [9, 12, 16], "read_refer": [9, 12, 16], "read_the_first_part": [9, 12, 16], "properties_build": [9, 12], "add_lost_pv_to_all_cel": [9, 12, 17], "add_lost_pv_to_all_eq_cel": [9, 12, 17], "add_lost_pv_to_all_fip_cel": [9, 12, 17], "add_lost_pv_to_boundary_cel": [9, 12, 17], "coarser_properti": [9, 12, 17], "identify_removed_pilar": [9, 12, 17], "identify_removed_pilars_zdir": [9, 12, 17], "initialize_properti": [9, 12, 17], "runs_execut": [9, 12], "utilii": [13, 14, 15, 16, 17, 18], "necessari": [13, 14], "variabl": [13, 16], "dic": [13, 14, 15, 16, 17, 18], "method": [13, 14, 15, 17], "arg": [13, 14, 15, 16, 17, 18], "dict": [13, 14, 15, 16, 17, 18], "global": [13, 14, 15, 16, 17, 18], "dictionari": [13, 14, 15, 16, 17, 18], "none": [13, 14, 18], "tabl": 13, "scrip": 14, "diffeent": 14, "ind": [14, 16], "i_d": 14, "list": [14, 16], "int": [14, 15, 16, 17], "its": 14, "increas": 14, "shift": 14, "cluster": 14, "zcord": 14, "nrwo": 14, "splite": 14, "row": 14, "map": [14, 15], "clusmin": 14, "clusmax": 14, "rmv": 14, "sure": 14, "nor": 14, "destroi": 14, "panda": 14, "datafram": 14, "mask": 14, "segment": 14, "ir": 14, "zcorn": 14, "coordin": 14, "corner": [14, 15], "d_z": 14, "z_t": 14, "z_b": 14, "z_b_t": 14, "v_c": 14, "arrai": [14, 17], "float": [14, 18], "dz": 14, "bottom": 14, "identifi": [14, 17], "point": [14, 15], "cell_index": 15, "face": 15, "requiri": 16, "lol": 16, "num_lin": 16, "inject": 16, "obtain": 16, "dic1": 16, "local": 16, "in_fil": 16, "str": 16, "quantiti": 16, "uncoars": 16, "29": 16, "inx": 17, "num": 17, "below": 19, "check": 19, "out": 19, "csp": 19, "spe11": 19, "benchmark": 19, "dynam": 19, "quick": 19, "vtk": 19, "expans": 19, "co2": 19, "horda": 19, "platform": 19, "leakag": 19, "remedi": 19, "microbi": 19, "induc": 19, "calcit": 19, "precipit": 19, "open": 19, "imag": 19, "cfd": 19, "microsystem": 19, "It": 3, "lower": 3, "member": 3}, "objects": {"": [[9, 0, 0, "-", "pycopm"]], "pycopm": [[10, 0, 0, "-", "core"], [12, 0, 0, "-", "utils"]], "pycopm.core": [[11, 0, 0, "-", "pycopm"]], "pycopm.core.pycopm": [[11, 1, 1, "", "load_parser"], [11, 1, 1, "", "main"], [11, 1, 1, "", "pycopm"]], "pycopm.utils": [[13, 0, 0, "-", "files_writer"], [14, 0, 0, "-", "generate_coarser_files"], [15, 0, 0, "-", "grid_builder"], [16, 0, 0, "-", "input_values"], [17, 0, 0, "-", "properties_builder"], [18, 0, 0, "-", "runs_executer"]], "pycopm.utils.files_writer": [[13, 1, 1, "", "coarser_files"], [13, 1, 1, "", "ert_files"], [13, 1, 1, "", "grid_features"], [13, 1, 1, "", "opm_properties"], [13, 1, 1, "", "write_let_tables"]], "pycopm.utils.generate_coarser_files": [[14, 1, 1, "", "create_deck"], [14, 1, 1, "", "find_neighbors"], [14, 1, 1, "", "get_ijk"], [14, 1, 1, "", "handle_clusters"], [14, 1, 1, "", "handle_cp_grid"], [14, 1, 1, "", "handle_fault"], [14, 1, 1, "", "handle_grid_props"], [14, 1, 1, "", "handle_mapaxes"], [14, 1, 1, "", "handle_oper"], [14, 1, 1, "", "handle_props"], [14, 1, 1, "", "handle_pv"], [14, 1, 1, "", "handle_regions"], [14, 1, 1, "", "handle_schedule"], [14, 1, 1, "", "handle_segmented_wells"], [14, 1, 1, "", "handle_wells"], [14, 1, 1, "", "handle_zcorn"], [14, 1, 1, "", "map_ijk"], [14, 1, 1, "", "map_properties"], [14, 1, 1, "", "process_the_deck"], [14, 1, 1, "", "write_grid"], [14, 1, 1, "", "write_props"]], "pycopm.utils.grid_builder": [[15, 1, 1, "", "coarser_grid"], [15, 1, 1, "", "handle_face_dir_im"], [15, 1, 1, "", "handle_face_dir_ip"], [15, 1, 1, "", "handle_face_dir_jm"], [15, 1, 1, "", "handle_face_dir_jp"], [15, 1, 1, "", "handle_faults"]], "pycopm.utils.input_values": [[16, 1, 1, "", "assign_hm_parameters"], [16, 1, 1, "", "assign_standard_values"], [16, 1, 1, "", "get_number_of_lines"], [16, 1, 1, "", "initialize_values"], [16, 1, 1, "", "process_input"], [16, 1, 1, "", "read_reference"], [16, 1, 1, "", "read_the_first_part"]], "pycopm.utils.properties_builder": [[17, 1, 1, "", "add_lost_pv_to_all_cells"], [17, 1, 1, "", "add_lost_pv_to_all_eq_cells"], [17, 1, 1, "", "add_lost_pv_to_all_fip_cells"], [17, 1, 1, "", "add_lost_pv_to_boundary_cells"], [17, 1, 1, "", "coarser_properties"], [17, 1, 1, "", "identify_removed_pilars"], [17, 1, 1, "", "identify_removed_pilars_zdir"], [17, 1, 1, "", "initialize_properties"]], "pycopm.utils.runs_executer": [[18, 1, 1, "", "plotting"], [18, 1, 1, "", "simulations"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"about": 0, "pycopm": [0, 1, 4, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "python": [1, 5], "api": 1, "configur": [2, 3, 8], "file": [2, 3, 8], "exampl": 3, "via": [3, 8], "opm": [3, 5, 8], "flow": [3, 5, 8], "deck": [3, 8], "hello": 3, "world": 3, "spe10": 3, "smeaheia": 3, "drogon": 3, "norn": 3, "welcom": 4, "": 4, "document": 4, "indic": 4, "tabl": 4, "instal": 5, "packag": [5, 9, 10, 12], "sourc": 5, "build": 5, "linux": 5, "window": 5, "maco": 5, "introduct": 6, "concept": 6, "roadmap": 6, "overview": 6, "output": 8, "folder": 8, "an": 8, "input": 8, "subpackag": 9, "modul": [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], "content": [9, 10, 12], "core": [10, 11], "submodul": [10, 12], "util": [12, 13, 14, 15, 16, 17, 18], "files_writ": 13, "generate_coarser_fil": 14, "grid_build": 15, "input_valu": 16, "properties_build": 17, "runs_execut": 18, "relat": 19, "pyopmspe11": 19, "pyopmnearwel": 19, "plopm": 19, "exprecc": 19, "ad": 19, "micp": 19, "pymm": 19}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"About pycopm": [[0, "about-pycopm"]], "pycopm Python API": [[1, "pycopm-python-api"]], "pycopm": [[1, "pycopm"], [7, "pycopm"]], "Configuration file": [[2, "configuration-file"]], "Welcome to pycopm\u2019s documentation!": [[4, "welcome-to-pycopm-s-documentation"]], "Indices and tables": [[4, "indices-and-tables"]], "Installation": [[5, "installation"]], "Python package": [[5, "python-package"]], "OPM Flow": [[5, "opm-flow"]], "Source build in Linux/Windows": [[5, "source-build-in-linux-windows"]], "Source build in macOS": [[5, "source-build-in-macos"]], "Introduction": [[6, "introduction"]], "Concept": [[6, "concept"]], "Roadmap": [[6, "roadmap"]], "Overview": [[6, "overview"]], "Via configuration files": [[8, "via-configuration-files"], [3, "via-configuration-files"]], "Output folder": [[8, "output-folder"]], "Via an OPM Flow input deck": [[8, "via-an-opm-flow-input-deck"]], "pycopm package": [[9, "pycopm-package"]], "Subpackages": [[9, "subpackages"]], "Module contents": [[9, "module-pycopm"], [10, "module-pycopm.core"], [12, "module-pycopm.utils"]], "pycopm.core package": [[10, "pycopm-core-package"]], "Submodules": [[10, "submodules"], [12, "submodules"]], "pycopm.core.pycopm module": [[11, "module-pycopm.core.pycopm"]], "pycopm.utils package": [[12, "pycopm-utils-package"]], "pycopm.utils.files_writer module": [[13, "module-pycopm.utils.files_writer"]], "pycopm.utils.generate_coarser_files module": [[14, "module-pycopm.utils.generate_coarser_files"]], "pycopm.utils.grid_builder module": [[15, "module-pycopm.utils.grid_builder"]], "pycopm.utils.input_values module": [[16, "module-pycopm.utils.input_values"]], "pycopm.utils.properties_builder module": [[17, "module-pycopm.utils.properties_builder"]], "pycopm.utils.runs_executer module": [[18, "module-pycopm.utils.runs_executer"]], "Related": [[19, "related"]], "pyopmspe11": [[19, "pyopmspe11"]], "pyopmnearwell": [[19, "pyopmnearwell"]], "plopm": [[19, "plopm"]], "expreccs": [[19, "expreccs"]], "ad-micp": [[19, "ad-micp"]], "pymm": [[19, "pymm"]], "Examples": [[3, "examples"]], "Via OPM Flow decks": [[3, "via-opm-flow-decks"]], "Hello world": [[3, "hello-world"]], "SPE10": [[3, "spe10"]], "Smeaheia": [[3, "smeaheia"]], "Drogon": [[3, "drogon"]], "Norne": [[3, "norne"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/docs/text/examples.rst b/docs/text/examples.rst index 33f4dbd..0549740 100644 --- a/docs/text/examples.rst +++ b/docs/text/examples.rst @@ -41,11 +41,11 @@ For the `HELLO_WORLD.DATA `_ friend to generate PNG figures: @@ -96,6 +96,9 @@ We use our `plopm `_ friend to generate PNG .. tip:: You can install plopm by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git. +Drogon +------ + .. note:: In the current implementation of the **pycopm** tool, the handling of properties that require definitions of i,j,k indices (e.g., FAULTS, WELLSPECS) are assumed to be define in the main .DATA deck. Then, in order to use **pycopm** for simulation models @@ -109,19 +112,15 @@ We use our `plopm `_ friend to generate PNG are still given in the same input format in the coarse deck. In addition, SWATINIT if used in the deck, is read from the .INIT file and output for the coarse model in a new file, then one might need to give the right include path to this special case. - SECTION SCHEDULE: All keywords in this section must be in the input deck and no via include viles. + SECTION SCHEDULE: All keywords in this section must be in the input deck and no via include viles. - -Drogon ------- -Following the note above, then by downloading the `DROGON model `_, replacing the lines in -`DROGON_HIST.DATA `_ for the FAULTS (L127-128) and SCHEDULE (L242-243) with -the actual content of those include files, then by executing: +Following the note above, then by downloading the `DROGON model `_, adding the `MAPAXES `_ +to the deck, replacing the lines in `DROGON_HIST.DATA `_ for the FAULTS (L127-128) and SCHEDULE (L242-243) with the actual content of those include files, then by executing: .. code-block:: bash - pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -l C1 - pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -j 2.5 -l C2 + pycopm -i DROGON_HIST.DATA -c 1,1,3 -p 1 -q 1 -l C1 + pycopm -i DROGON_HIST_PYCOPM.DATA -c 1,3,1 -p 1 -q 1 -j 2.5 -l C2 this would generate the following coarse model: @@ -130,14 +129,47 @@ this would generate the following coarse model: Note that the total pore volume is conserved for the coarse model. Here, we first coarse in the z direction, which reduces the number of cells from 31 to 11, and after we coarse in the y direction. -After trial and error, the jump (-j) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of -inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z directon and after coarsening -in the x and y directions. In addition, we add labels (-l) C1 and C2 to differentiate between the coarse include files. +After trial and error, the jump (**-j**) is set to 2.5 to avoid generated connections across the faults. For geological models with a lot of +inactive cells and faults, this divide and conquer apporach is recommended, i.e., coarsening first in the z direction and after coarsening +in the x and y directions. Also, we add labels (**-l**) C1 and C2 to differentiate between the coarse include files. In addition, we use the +flags **-p 1 -q 1** to add the remove pore volume to the closest coarser cells and to redistribute the pore volume in the locations with +gas and oil, this results in the coarse model having the same total pore volume, field gas in place, and practically same oil and water in +place as the input model. .. note:: - Add to the generated coarse deck the missing include files in the grid section related to the region operations (e.g., + Add to the generated coarse deck the removed include files in the grid section related to the region operations (e.g., ../include/grid/drogon.multregt for this case). +Now, we also show a 2 times coarser model in all directions (referring to the previous comment about divide and conquer, for the Drogon model +it seems still ok to do a 2 times coarsening in one go): + +.. code-block:: bash + + pycopm -i DROGON_HIST.DATA -c 2,2,2 -p 1 -q 1 -j 4 -w DROGON_2TIMES_COARSER + +Here, we use the **-w** flag to give a specific name to the generated coarser deck, as well as using a higher value of **-j** to avoid generated connections across the faults. +If we run these three models using OPM Flow, then we can compare the summary vectors. To this end, we use our good old friend `plopm `_: + +.. code-block:: bash + + plopm -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -v 'FOIP,FOPR,TCPU' -tunits y -f 14 -subfigs 2,2 -delax 1 -loc empty,empty,empty,center -d 10,5 -xformat '.1f' -xlnum 6 -ylabel 'sm$^3$ sm$^3$/day seconds' -t 'Field oil in place Field oil production rate Simulation time' -labels 'DROGON DROGON 3XZ COARSER DROGON 2XYZ COARSER' -save drogon_pycopm_comparison -yformat '.2e,.0f,.0f' + +.. figure:: figs/drogon_pycopm_comparison.png + + Note that the coarse models have the same initial field oil in place as the input model. It seems the coarse properties (e.g., permeabilities) + are good initial inputs to use in a history matching framework (e.g., to history match saturation function parameters), and the lower simulation + time for the coarse models allow for more ensemble members and more iterations. + +We can also make a nice GIF by executing: + +.. code-block:: bash + + plopm -v sgas -subfigs 1,3 -i 'DROGON_HIST DROGON_HIST_PYCOPM_PYCOPM DROGON_2TIMES_COARSER' -d 16,10.5 -r 0,3 -m gif -dpi 1000 -t "DROGON DROGON 3XZ COARSER DROGON 2XYZ COARSER" -f 16 -interval 2000 -loop 1 -cformat .2f -cbsfax 0.30,0.01,0.4,0.02 -s ,,1 -rotate -30 -xunits km -yunits km -xformat .0f -yformat .0f -c cet_rainbow_bgyrm_35_85_c69 + +.. figure:: figs/sgas.gif + + Top view of the Drogon and the two coarse models + Norne ----- By downloading the `Norne model `_ (and replacing the needed include files as described in the previous @@ -145,7 +177,7 @@ example), then here we create a coarser model by removing certain pilars in orde .. code-block:: bash - pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1 + pycopm -i NORNE_ATW2013.DATA -x 0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,2,0,2,2,2,2,0 -y 0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,2,2,2,2,2,2,2,2,0 -z 0,0,2,0,0,2,2,2,2,2,02,2,2,2,2,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0 -a min -p 1 -q 1 this would generate the following coarse model: diff --git a/docs/text/figs/drogon_generic.png b/docs/text/figs/drogon_generic.png index 709e175..616b74c 100644 Binary files a/docs/text/figs/drogon_generic.png and b/docs/text/figs/drogon_generic.png differ diff --git a/docs/text/figs/drogon_pycopm_comparison.png b/docs/text/figs/drogon_pycopm_comparison.png new file mode 100644 index 0000000..a1b21b1 Binary files /dev/null and b/docs/text/figs/drogon_pycopm_comparison.png differ diff --git a/docs/text/figs/sgas.gif b/docs/text/figs/sgas.gif new file mode 100644 index 0000000..42e89ea Binary files /dev/null and b/docs/text/figs/sgas.gif differ diff --git a/docs/text/introduction.rst b/docs/text/introduction.rst index 3768ab3..31bc074 100644 --- a/docs/text/introduction.rst +++ b/docs/text/introduction.rst @@ -41,8 +41,9 @@ where -z Vector of z-coarsening, see the description for -x ('' by default). -a Use `min`, `max`, or `mode` to scale the actnum, e.g., min makes the new coarser cell inactive if at least one cell is inactive, while max makes it active it at least one cell is active (`mode` by default). -n Use `min`, `max`, or `mode` to scale endnum, eqlnum, fipnum, fluxnum, imbnum, miscnum, multnum, pvtnum, rocknum, and satnum (`mode` by default). --s Use `min`, `max`, or `mean` to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz ('' by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, mean for mult(-)xyz, and the pore volume weighted mean for the rest). +-s Use `min`, `max`, or `mean` to scale permx, permy, permz, poro, swatinit, and all mult(-)xyz ('' by default, i.e., using the arithmetic average for permx/permy, harmonic average for permz, volume weighted mean for mult(-)xyz, and the pore volume weighted mean for the rest). -p Add the removed pore volume to the closest coarser cells (`0` by default, `1` to enable). +-q Adjust the pv to the initial FGIP and FOIP from the input deck (`0` by default, `1` to enable). -r Remove CONFACT and KH from COMPDAT (`1`) and also remove PEQVR (`2`) (ITEM 13, the last entry) to compute the well transmisibility connections internally in OPM Flow using the grid properties (`2` by default; `0` to not remove). -j Tuning parameter to avoid creation of neighbouring connections in the coarser model where there are discontinuities between cells along the z direction, e.g., around faults ('' by default, i.e., nothing corrected; if need it, try with values of the order of 1). -m Execute a dry run on the input deck to generate the static properties ('prep'), generate only the coarse files ('deck'), only exectute a dry run on the generated coarse model ('dry'), 'prep_deck', 'deck_dry', or do all ('all') (`prep_deck` by default). diff --git a/src/pycopm/core/pycopm.py b/src/pycopm/core/pycopm.py index 4d48135..f2ff96d 100644 --- a/src/pycopm/core/pycopm.py +++ b/src/pycopm/core/pycopm.py @@ -36,6 +36,7 @@ def pycopm(): dic["remove"] = int(cmdargs["remove"].strip()) # Remove CONFACT and KH dic["encoding"] = cmdargs["encoding"].strip() dic["pvcorr"] = int(cmdargs["pvcorr"]) + dic["fipcorr"] = int(cmdargs["fipcorr"]) dic["cijk"] = "yes" for i in ["x", "y", "z"]: dic[f"{i}coar"] = [] @@ -178,8 +179,8 @@ def load_parser(): default="", help="Use 'min', 'max', or 'mean' to scale permx, permy, permz, poro, swatinit, and all " "mult(-)xyz ('' by default, i.e., using the arithmetic average for permx/permy, harmonic" - " average for permz, mean for mult(-)xyz, and the pore volume weighted mean for the " - "rest).", + " average for permz, volume weighted mean for mult(-)xyz, and the pore volume weighted" + " mean for the rest).", ) parser.add_argument( "-p", @@ -187,6 +188,12 @@ def load_parser(): default=0, help="Add the removed pore volume to the closest coarser cells ('0' by default).", ) + parser.add_argument( + "-q", + "--fipcorr", + default=0, + help="Adjust the pv to the initial FGIP and FOIP from the input deck ('0' by default).", + ) parser.add_argument( "-r", "--remove", diff --git a/src/pycopm/utils/generate_coarser_files.py b/src/pycopm/utils/generate_coarser_files.py index 26585f0..dac364d 100644 --- a/src/pycopm/utils/generate_coarser_files.py +++ b/src/pycopm/utils/generate_coarser_files.py @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2024 NORCE # SPDX-License-Identifier: GPL-3.0 -# pylint: disable=R0912,R0913,R0914,R0915 +# pylint: disable=R0912,R0913,R0914,R0915,C0302 """ Utiliy methods to only create the coarser files by pycopm. @@ -33,6 +33,9 @@ def create_deck(dic): if not dic["write"]: dic["write"] = dic["deck"] + "_PYCOPM" dic["flags"] = "--parsing-strictness=low --enable-dry-run=true --output-mode=none" + dic["flags1"] = ( + f"--parsing-strictness=low --output-mode=none --output-dir={dic['fol']}" + ) if dic["mode"] in ["prep", "prep_deck", "all"]: os.system(f"cp {dic['deck']}.DATA {dic['deck']}_PREP_PYCOPM_DRYRUN.DATA") print( @@ -78,6 +81,9 @@ def create_deck(dic): dic["grids"] = [] dic["mults"] = [] dic["special"] = [] + dic["fip"] = "" + dic["nrptsrt"] = 0 + dic["nrptsrtc"] = 0 dic["grid"] = Grid(f"{dic['exe']}/" + dic["deck"] + ".EGRID") dic["ini"] = ResdataFile(f"{dic['exe']}/" + dic["deck"] + ".INIT") if not dic["ijk"]: @@ -113,6 +119,7 @@ def create_deck(dic): dic["porv"] = np.array(dic["ini"].iget_kw("PORV")[0]) actnum = np.array([0 for _ in range(nc)]) d_z = np.array([np.nan for _ in range(nc)]) + v_c = np.array([np.nan for _ in range(nc)]) z_t = np.array([np.nan for _ in range(nc)]) z_b = np.array([np.nan for _ in range(nc)]) z_b_t = np.array([np.nan for _ in range(nc)]) @@ -132,6 +139,9 @@ def create_deck(dic): d_z[cell.global_index] = dic["grid"].cell_dz( ijk=(cell.i, cell.j, cell.k) ) + v_c[cell.global_index] = dic["grid"].cell_volume( + ijk=(cell.i, cell.j, cell.k) + ) for name in dic["props"] + dic["regions"] + dic["grids"]: dic[name][cell.global_index] = dic["ini"].iget_kw(name.upper())[0][ n @@ -148,6 +158,8 @@ def create_deck(dic): dic["swatinit"][cell.global_index] *= dic["porv"][ cell.global_index ] + for name in dic["mults"]: + dic[name][cell.global_index] *= v_c[cell.global_index] n += 1 # Coarsening @@ -160,7 +172,7 @@ def create_deck(dic): dic["kc"][dic["ijk"][2]], ) sys.exit() - clusmin, clusmax, rmv = map_properties(dic, actnum, d_z, z_t, z_b, z_b_t) + clusmin, clusmax, rmv = map_properties(dic, actnum, d_z, z_t, z_b, z_b_t, v_c) if dic["pvcorr"] == 1: handle_pv(dic, clusmin, clusmax, rmv) handle_cp_grid(dic) @@ -174,6 +186,70 @@ def create_deck(dic): ) as file: for row in dic["lol"]: file.write(row + "\n") + if dic["fipcorr"] == 1: + thr = 1e-1 + with open( + f"{dic['exe']}/{dic['fol']}/{dic['write']}_2DAYS.DATA", + "w", + encoding="utf8", + ) as file: + for row in dic["lolc"]: + file.write(row + "\n") + with open( + f"{dic['exe']}/{dic['fol']}/{dic['write']}_CORR.DATA", + "w", + encoding="utf8", + ) as file: + for row in dic["deckcorr"]: + file.write(row + "\n") + os.system(f"{dic['flow']} {dic['write']}_CORR.DATA {dic['flags1']}") + os.system(f"{dic['flow']} {dic['write']}_2DAYS.DATA {dic['flags1']}") + ref = ResdataFile(f"{dic['exe']}/" + dic["write"] + "_2DAYS.UNRST") + cor = ResdataFile(f"{dic['exe']}/" + dic["write"] + "_CORR.UNRST") + cori = ResdataFile(f"{dic['exe']}/" + dic["write"] + "_CORR.INIT") + ref_fipg = np.array(ref.iget_kw("FIPGAS")[0]) + ref_fipo = np.array(ref.iget_kw("FIPOIL")[0]) + cor_pv = np.array(cori.iget_kw("PORV")[0]) + cor_pa = cor_pv[cor_pv > 0] + cor_fipg = np.array(cor.iget_kw("FIPGAS")[0]) + cor_fipo = np.array(cor.iget_kw("FIPOIL")[0]) + fact = sum(ref_fipo) / sum(cor_fipo) - 1 + cor_pa[cor_fipo <= thr] -= ( + fact * sum(cor_pa[cor_fipo > thr]) / len(cor_pa[cor_fipo <= thr]) + ) + cor_pa[cor_fipo > thr] *= 1 + fact + cor_pv[cor_pv > 0] = cor_pa + with open( + f"{dic['exe']}/{dic['fol']}/{dic['label']}PORV.INC", + "w", + encoding="utf8", + ) as file: + file.write("PORV\n") + file.write("\n".join(f"{val}" for val in cor_pv)) + file.write("\n/") + os.system(f"{dic['flow']} {dic['write']}_CORR.DATA {dic['flags1']}") + cor = ResdataFile(f"{dic['exe']}/" + dic["write"] + "_CORR.UNRST") + cori = ResdataFile(f"{dic['exe']}/" + dic["write"] + "_CORR.INIT") + cor_pv = np.array(cori.iget_kw("PORV")[0]) + cor_pa = cor_pv[cor_pv > 0] + cor_fipg = np.array(cor.iget_kw("FIPGAS")[0]) + cor_fipo = np.array(cor.iget_kw("FIPOIL")[0]) + cor_sgas = np.array(cor.iget_kw("SGAS")[0]) + fact = (sum(ref_fipg) - sum(cor_fipg)) / sum(cor_fipg[cor_sgas > thr]) + cor_pa[cor_fipo <= thr] -= ( + fact * sum(cor_pa[cor_sgas > thr]) / len(cor_pa[cor_fipo <= thr]) + ) + cor_pa[cor_sgas > thr] *= 1 + fact + cor_pv[cor_pv > 0] = cor_pa + with open( + f"{dic['exe']}/{dic['fol']}/{dic['label']}PORV.INC", + "w", + encoding="utf8", + ) as file: + file.write("PORV\n") + file.write("\n".join(f"{val}" for val in cor_pv)) + file.write("\n/") + os.system(f"{dic['flow']} {dic['write']}_CORR.DATA {dic['flags1']}") print( f"\nThe generation of coarse files succeeded, see {dic['fol']}/" f"{dic['write']}.DATA and {dic['fol']}/{dic['label']}*.INC" @@ -186,7 +262,7 @@ def create_deck(dic): print("\nThe dry run of the coarse model succeeded\n") -def map_properties(dic, actnum, d_z, z_t, z_b, z_b_t): +def map_properties(dic, actnum, d_z, z_t, z_b, z_b_t, v_c): """ Mapping to the coarse properties @@ -205,6 +281,7 @@ def map_properties(dic, actnum, d_z, z_t, z_b, z_b_t): freq = pd.Series(actnum).groupby(dic["con"]).sum() dz_c = pd.Series(z_b_t).groupby(dic["con"]).mean() h_tot = pd.Series(d_z).groupby(dic["con"]).sum() + v_tot = pd.Series(v_c).groupby(dic["con"]).sum() if dic["how"] == "min": clusmin = pd.Series(actnum).groupby(dic["con"]).min() clust = clusmin @@ -251,7 +328,7 @@ def map_properties(dic, actnum, d_z, z_t, z_b, z_b_t): ] else: dic[f"{name}_c"] = [ - f"{val/fre}" if fre > 0 else "0" for val, fre in zip(c_c, freq) + f"{val/v_t}" if v_t > 0 else "0" for val, v_t in zip(c_c, v_tot) ] else: if dic["show"] == "min": @@ -618,7 +695,7 @@ def process_the_deck(dic): dic (dict): Modified global dictionary """ - dic["lol"] = [] + dic["lol"], dic["lolc"] = [], [] dic["dimens"] = False dic["removeg"] = False dic["welspecs"] = False @@ -628,12 +705,16 @@ def process_the_deck(dic): dic["props"] = False dic["oper"] = False dic["region"] = False + dic["schedule"] = False dic["fault"] = False + dic["rptsrt"] = False with open(dic["deck"] + ".DATA", "r", encoding=dic["encoding"]) as file: for row in csv.reader(file): nrwo = str(row)[2:-2].strip() if 0 < nrwo.find("\\t"): nrwo = nrwo.replace("\\t", " ") + if not dic["schedule"]: + dic["lolc"].append(nrwo) if nrwo == "DIMENS": dic["dimens"] = True continue @@ -647,6 +728,8 @@ def process_the_deck(dic): continue if handle_regions(dic, nrwo): continue + if handle_schedule(dic, nrwo): + continue if handle_wells(dic, nrwo): continue if handle_segmented_wells(dic, nrwo): @@ -725,6 +808,43 @@ def handle_oper(dic, nrwo): return False +def handle_schedule(dic, nrwo): + """ + Handle the schedule sections + + Args: + dic (dict): Global dictionary\n + nrwo (list): Splited row from the input deck + + Returns: + dic (dict): Modified global dictionary + + """ + if dic["rptsrt"]: + edit = nrwo.split() + if "RFIP" not in edit or "FIP" not in edit: + dic["fip"] = " ".join(edit[:-2] + ["FIP"] + [edit[-1]]) + dic["nrptsrt"] = len(dic["lol"]) + dic["nrptsrtc"] = len(dic["lolc"]) - 1 + dic["rptsrt"] = False + if nrwo == "RPTRST" and dic["fipcorr"] == 1: + dic["rptsrt"] = True + if nrwo == "SCHEDULE" and not dic["schedule"]: + dic["schedule"] = True + dic["lol"].append(nrwo + "\n") + if dic["fipcorr"] == 1: + dic["deckcorr"] = dic["lol"].copy() + if dic["nrptsrt"] > 0: + dic["deckcorr"][dic["nrptsrt"]] = dic["fip"] + dic["lolc"][dic["nrptsrtc"]] = dic["fip"] + dic["deckcorr"].append("TSTEP") + dic["deckcorr"].append("2 /") + dic["lolc"].append("TSTEP") + dic["lolc"].append("2 /") + return True + return False + + def handle_regions(dic, nrwo): """ Handle the regions sections