diff --git a/benchmark/spe11a/r5_Cart_1mm_capmax2500Pa_strictol.txt b/benchmark/spe11a/r5_Cart_1mm_capmax2500Pa_strictol.txt new file mode 100644 index 0000000..601b631 --- /dev/null +++ b/benchmark/spe11a/r5_Cart_1mm_capmax2500Pa_strictol.txt @@ -0,0 +1,54 @@ +"""Set the full path to the flow executable and flags""" +mpirun -np 32 flow --partition-method=2 --edge-weights-method=2 --imbalance-tol=1.1 --nonlinear-solver=nldd --matrix-add-well-contributions=1 --tolerance-mb=1e-7 --linear-solver=cpr_trueimpes --enable-tuning=false --solver-max-time-step-in-days=0.02 --enable-opm-rst-file=true --output-extra-convergence-info=steps,iterations --newton-min-iterations=1 --time-step-control-target-newton-iterations=2 --time-step-control-growth-rate=1.15 --time-step-control-decay-rate=0.85 --newton-max-iterations=6 --relaxed-max-pv-fraction=0 --min-strict-cnv-iter=8 --tolerance-cnv-relaxed=1e-2 --tolerance-cnv=1e-3 --local-domains-ordering-measure=residual --time-step-control=newtoniterationcount --use-update-stabilization=0 --enable-drift-compensation=0 --max-local-solve-iterations=50 --linear-solver-max-iter=50 + +"""Set the model parameters""" +spe11a master #Name of the spe case (spe11a, spe11b, or spe11c) and OPM Flow version (master or release) +complete gaswater #Name of the co2 model (immiscible, convective [convective requires a Flow version newer than 22-08-2024], or complete) and co2store implementation (gaswater or gasoil [oil properties are set to water internally in OPM flow]) +cartesian #Type of grid (cartesian, tensor, or corner-point) +2.8 0.01 1.2 #Length, width, and depth [m] +2800 #If cartesian, number of x cells [-]; otherwise, variable array of x-refinment +1 #If cartesian, number of y cells [-]; otherwise, variable array of y-refinment [-] (for spe11c) +1200 #If cartesian, number of z cells [-]; if tensor, variable array of z-refinment; if corner-point, fix array of z-refinment (18 entries) +20 20 #Temperature bottom and top rig [C] +1.2 110000 1 #Pressure on the top [Pa] and multiplier for the permeability in the z direction [-] +1e-9 1.6e-5 #Diffusion (in liquid and gas) [m^2/s] +0 0 #Rock specific heat and density (for spe11b/c) +0 0 0 #Added pore volume on top boundary (for spe11a [if 0, free flow bc]), pore volume on lateral boundaries, and width of buffer cell [m] (for spe11b/c) +0 0 #Elevation of the parabola and back boundary [m] (for spe11c) + +"""Set the saturation functions""" +(max(0, (s_w - swi) / (1 - swi))) ** 2 #Wetting rel perm saturation function [-] +(max(0, (1 - s_w - sni) / (1 - sni))) ** 2 #Non-wetting rel perm saturation function [-] +penmax * math.erf(pen * ((s_w-swi) / (1.-swi)) ** (-(1.0 / 2)) * math.pi**0.5 / (penmax * 2)) #Capillary pressure saturation function [Pa] +(np.exp(np.flip(np.linspace(0, 5.0, npoints))) - 1) / (np.exp(5.0) - 1) #Points to evaluate the saturation functions (s_w) [-] + +"""Properties sat functions""" +"""swi [-], sni [-], pen [Pa], penmax [Pa], npoints [-]""" +SWI1 0.32 SNI1 0.1 PEN1 1500 PENMAX1 2500 NPOINTS1 1000 +SWI2 0.14 SNI2 0.1 PEN2 300 PENMAX2 2500 NPOINTS2 1000 +SWI3 0.12 SNI3 0.1 PEN3 100 PENMAX3 2500 NPOINTS3 1000 +SWI4 0.12 SNI4 0.1 PEN4 25 PENMAX4 2500 NPOINTS4 1000 +SWI5 0.12 SNI5 0.1 PEN5 10 PENMAX5 2500 NPOINTS5 1000 +SWI6 0.10 SNI6 0.1 PEN6 1 PENMAX6 2500 NPOINTS6 1000 +SWI7 0 SNI7 0 PEN7 0 PENMAX7 2500 NPOINTS7 2 + +"""Properties rock""" +"""K [mD], phi [-], disp [m]""" +PERM1 44529.9988 PORO1 0.44 DISP1 1e-2 +PERM2 506624.985 PORO2 0.43 DISP2 1e-2 +PERM3 1013249.97 PORO3 0.44 DISP3 1e-2 +PERM4 2026499.95 PORO4 0.45 DISP4 1e-2 +PERM5 4052999.88 PORO5 0.43 DISP5 1e-2 +PERM6 10132499.7 PORO6 0.46 DISP6 1e-2 +PERM7 0 PORO7 0 DISP7 0 + +"""Wells position""" +"""radius (0 to use the SOURCE keyword instead of well keywords), x, y, and z position [m] (final positions as well for spe11c)""" +0 0.9 0.005 0.3 #Well 1 +0 1.7 0.005 0.7 #Well 2 + +"""Define the injection values ([hours] for spe11a; [years] for spe11b/c)""" +"""injection time, time step size to write results, maximum solver time step, injected fluid (0 water, 1 co2) (well1), injection rate [kg/s] (well1), temperature [C] (well1), injected fluid (0 water, 1 co2) (well2), ...""" +2.5 0.5 0.5 1 1.7e-7 20 1 0 20 +2.5 0.5 0.5 1 1.7e-7 20 1 1.7e-7 20 +115 1 1 1 0 20 1 0 20 \ No newline at end of file diff --git a/docs/_images/benchmark_spe11a_performance.png b/docs/_images/benchmark_spe11a_performance.png index 02eccb2..4be6887 100644 Binary files a/docs/_images/benchmark_spe11a_performance.png and b/docs/_images/benchmark_spe11a_performance.png differ diff --git a/docs/_images/benchmark_spe11a_sparse_data.png b/docs/_images/benchmark_spe11a_sparse_data.png index d994e5a..2f09e6a 100644 Binary files a/docs/_images/benchmark_spe11a_sparse_data.png and b/docs/_images/benchmark_spe11a_sparse_data.png differ diff --git a/docs/_sources/benchmark.rst.txt b/docs/_sources/benchmark.rst.txt index 69366ee..8d8b922 100644 --- a/docs/_sources/benchmark.rst.txt +++ b/docs/_sources/benchmark.rst.txt @@ -16,6 +16,8 @@ SPE11A Corner-point grid of ca. 1 cm size (maximum capillary pressure of 2500 Pa instead of 95000 Pa following the remarks in the benchmark description) * r4_Cart_1mm_capmax2500Pa Uniform grid of 1 mm size (maximum capillary pressure of 2500 Pa instead of 95000 Pa following the remarks in the benchmark description) +* r5_Cart_1mm_capmax2500Pa_strictol + Uniform grid of 1 mm size with stricter tolerances (maximum capillary pressure of 2500 Pa instead of 95000 Pa following the remarks in the benchmark description) To run the cases in the terminal: @@ -25,10 +27,13 @@ To run the cases in the terminal: pyopmspe11 -i r2_Cart_1cm_capmax2500Pa.txt -o r2_Cart_1cm_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666 pyopmspe11 -i r3_cp_1cmish_capmax2500Pa.txt -o r3_cp_1cmish_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666 pyopmspe11 -i r4_Cart_1mm_capmax2500Pa.txt -o r4_Cart_1mm_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666 + pyopmspe11 -i r5_Cart_1mm_capmax2500Pa_strictol.txt -o r5_Cart_1mm_capmax2500Pa_strictol -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666 As mentioned in the `CSP description `_, using the maximum value of 2500 Pa instead of 95000 Pa does not significantly impact the results (comparing r1 and r2), and this choice also reduces the simulation time. In addition, the corner-point grid results (r3) compare -very well to the fine-scale simulations (r4). +very well to the fine-scale simulations (r4). Unfortunately, the fine-scale simulation with stricer tolerances (r5) finished after the benchmark submission deadline; nevertheless, +we include it here for comparison to the other cases. While the case with stricter tolerances (r5) improves the mass issue compared to the previous case (r4), the simulation time +increased, which highlights the trade-off between simulation time and accuracy (i.e., which is relevant for optimization studies which require to run many simulations). ---------------- Performance data @@ -140,9 +145,9 @@ Spatial maps .. code-block:: bash - plopm -v xco2l -u opm -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm r2 Cart 1cm capmax 2500 Pa r3 cp 1cmish capmax 2500 Pa r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02 - plopm -v xco2l -u opm -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m r2 cp 10mish r3 cp 10mish convective r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02 - plopm -v xco2l -u opm -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m] r2 cp [50m,50m,8mish] r3 cp [50m,50m,8mish] convective r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,' + plopm -v xco2l -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm r2 Cart 1cm capmax 2500 Pa r3 cp 1cmish capmax 2500 Pa r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02 + plopm -v xco2l -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m r2 cp 10mish r3 cp 10mish convective r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02 + plopm -v xco2l -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m] r2 cp [50m,50m,8mish] r3 cp [50m,50m,8mish] convective r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,' -u opm .. tip:: - You can install plopm by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git. \ No newline at end of file + You can install `plopm `_ by executing in the terminal: pip install git+https://github.com/cssr-tools/plopm.git. \ No newline at end of file diff --git a/docs/_sources/related.rst.txt b/docs/_sources/related.rst.txt index 7ebdc84..4d34923 100644 --- a/docs/_sources/related.rst.txt +++ b/docs/_sources/related.rst.txt @@ -2,8 +2,7 @@ Related ======= -Below are some packages following the same configuration-file-to-postprocessing-folder approach; -check them out 🙂. +Below are some tools that might be of interest; check them out 🙂. ************* pyopmnearwell @@ -27,7 +26,7 @@ pycopm ****** .. image:: ./figs/pycopm.gif - :scale: 40% + :scale: 60% `Simplified and flexible framework for coarsening geological models `_. diff --git a/docs/benchmark.html b/docs/benchmark.html index ff9fd22..0e6e23b 100644 --- a/docs/benchmark.html +++ b/docs/benchmark.html @@ -128,17 +128,25 @@

SPE11A< +
  • +
    r5_Cart_1mm_capmax2500Pa_strictol

    Uniform grid of 1 mm size with stricter tolerances (maximum capillary pressure of 2500 Pa instead of 95000 Pa following the remarks in the benchmark description)

    +
    +
    +
  • To run the cases in the terminal:

    pyopmspe11 -i r1_Cart_1cm.txt -o r1_Cart_1cm -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666
     pyopmspe11 -i r2_Cart_1cm_capmax2500Pa.txt -o r2_Cart_1cm_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666
     pyopmspe11 -i r3_cp_1cmish_capmax2500Pa.txt -o r3_cp_1cmish_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666
     pyopmspe11 -i r4_Cart_1mm_capmax2500Pa.txt -o r4_Cart_1mm_capmax2500Pa -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666
    +pyopmspe11 -i r5_Cart_1mm_capmax2500Pa_strictol.txt -o r5_Cart_1mm_capmax2500Pa_strictol -m all -g all -t 1 -r 280,1,120 -w 0.16666666666666666
     

    As mentioned in the CSP description, using the maximum value of 2500 Pa instead of 95000 Pa does not significantly impact the results (comparing r1 and r2), and this choice also reduces the simulation time. In addition, the corner-point grid results (r3) compare -very well to the fine-scale simulations (r4).

    +very well to the fine-scale simulations (r4). Unfortunately, the fine-scale simulation with stricer tolerances (r5) finished after the benchmark submission deadline; nevertheless, +we include it here for comparison to the other cases. While the case with stricter tolerances (r5) improves the mass issue compared to the previous case (r4), the simulation time +increased, which highlights the trade-off between simulation time and accuracy (i.e., which is relevant for optimization studies which require to run many simulations).

    Performance data

    @@ -264,15 +272,15 @@

    Spatial maps

    Note

    To show the high resolution results, all spatial maps (spe11a, spe11b, and spe11c) corresponds to the actual simulation grid (not the benchmark reporting grid), and can be generated by typing in the terminal:

    -
    plopm -v xco2l -u opm -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm  r2 Cart 1cm capmax 2500 Pa  r3 cp 1cmish capmax 2500 Pa  r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
    -plopm -v xco2l -u opm -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m  r2 cp 10mish  r3 cp 10mish convective  r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
    -plopm -v xco2l -u opm -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m]  r2 cp [50m,50m,8mish]  r3 cp [50m,50m,8mish] convective  r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,'
    +
    plopm -v xco2l -i 'r1_Cart_1cm/flow/R1_CART_1CM r2_Cart_1cm_capmax2500Pa/flow/R2_CART_1CM_CAPMAX2500PA r3_cp_1cmish_capmax2500Pa/flow/R3_CP_1CMISH_CAPMAX2500PA r4_Cart_1mm_capmax2500Pa/flow/R4_CART_1MM_CAPMAX2500PA' -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11A: CO$_2$ mass fraction (liquid phase) after 1 day' -d 16,6.5 -t "r1 Cart 1cm  r2 Cart 1cm capmax 2500 Pa  r3 cp 1cmish capmax 2500 Pa  r4 Cart 1mm capmax 2500 Pa" -yunits cm -xunits cm -yformat .0f -xformat .0f -r 29 -save massfracta -cformat .2e -mask satnum -maskthr 7e-5 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
    +plopm -v xco2l -i "r1_Cart_10m/flow/R1_CART_10M r2_cp_10mish/flow/R2_CP_10MISH r3_cp_10mish_convective/flow/R3_CP_10MISH_CONVECTIVE r4_Cart_1m/flow/R4_CART_1M" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11B: CO$_2$ mass fraction (liquid phase) after 500 years' -d 16,3 -t "r1 Cart 10m  r2 cp 10mish  r3 cp 10mish convective  r4 Cart 1m" -yunits km -xunits km -yformat .1f -xformat .1f -r 98 -save massfractb -cformat .2e -mask satnum -maskthr 5e-3 -suptitle 0 -subfigs 2,2 -cbsfax 0.35,0.97,0.3,0.02
    +plopm -v xco2l -i "r1_Cart_50m-50m-10m/flow/R1_CART_50M-50M-10M r2_cp_50m-50m-8mish/flow/R2_CP_50M-50M-8MISH r3_cp_50m-50m-8mish_convective/flow/R3_CP_50M-50M-8MISH_CONVECTIVE r4_cp_8m-8mish-8mish/flow/R4_CP_8M-8MISH-8MISH" -dpi 2000 -c cet_diverging_protanopic_deuteranopic_bwy_60_95_c32 -cnum 3 -xlnum 8 -clabel 'SPE11C: CO$_2$ mass fraction (liquid phase) after 1000 years (y=2.5 [km])' -d 16,3 -t "r1 Cart [50m,50m,10m]  r2 cp [50m,50m,8mish]  r3 cp [50m,50m,8mish] convective  r4 cp [8m,8mish,8mish]" -yunits km -xunits km -yformat .1f -xformat .1f -r 27 -save massfractc -cformat .2e -mask satnum -maskthr 1e-4 -suptitle 0 -subfigs 2,2 -cbsfax 0.30,0.97,0.4,0.02 -s ',51, ,51, ,51, ,304,' -u opm
     

    diff --git a/docs/related.html b/docs/related.html index d11bdbf..8508a71 100644 --- a/docs/related.html +++ b/docs/related.html @@ -92,8 +92,7 @@