From c62d6e33baec22dc9469eb90d06414c3fa4ac6c6 Mon Sep 17 00:00:00 2001 From: gdfldm <142009224+gdfldm@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:04:46 +0000 Subject: [PATCH 1/3] Add draft of New Features --- parts/appendices/B.fodt | 108 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 3 deletions(-) diff --git a/parts/appendices/B.fodt b/parts/appendices/B.fodt index 7a5aafd7..69522374 100644 --- a/parts/appendices/B.fodt +++ b/parts/appendices/B.fodt @@ -13514,17 +13514,119 @@ Updated with AFR/TSA Rev-D comments and new keywords. - In addition to the above the following new features have been added to the simulator: + In addition to the changes to the command line options the following new features have been added to the simulator: - Item1 + Added a command line argument to control the way OPM Flow treats SKIP100 and SKIP300 keywords (#5329). By default OPM Flow behaves like the commercial black-oil simulator. - + Add summary output vectors for stranded CO2 in the gas phase (GMST) and maximum potential residual trapping (GMTR) (#5344, https://docs.opengosim.com/theory/residual_and_stranded/). + + + Added support for WTMULT to multiply a well target or constraint by a constant (#5411). + + + Simulator is now able to make better usage of the Damaris middleware if enabled (https://project.inria.fr/damaris/). Added the ability to pass multiple variables to Damaris using the DamarisWriter class (#5352). A command line option has also been added to limit the variables to be passed using --damaris-limit-variables=<CSV list>. + + + Restart files can now be output every time step if the command line option --enable-write-all-solutions=true (#5426). The numbering of the restart and summary files will follow the time step index and not the report index. This will not be compatible with restart, but it is sometimes useful to investigate the results at every time step. Note that this doesn't add support for RPTRST BASIC=6. + + + Added support for automatic chokes (NODEPROP item 3 CHOKE) in extended network models (#4935). + + + Added support for using CPR on AMD GPU using the rocSPARSE library (#5408). + + + Added support for outputting the RSWSAT and RVWSAT arrays to the Restart file (#5483). + + + Added PSI and OMEGA parameters to DRSDTCON to control the regime and rate of convective mixing (#5491). Now supports GAS/WATER systems in addition to OIL/GAS systems. + + + Added an OPM implementation of the ILU0 preconditioner in CUDA similar to that implemented in CuDILU (#5441). + + + Added support for Killough's hysteresis model for both wetting and non-wetting phase hysteresis in a water wet system (EHYSTR item 2 HYSTMOD = 4) (#5273). + + + Added the option to specify the linear solver for subdomains when using the NLDD nonlinear solver (#5553). Previously, the simulator was hardcoded to use the ILU0 solver with the default maximum number of iterations and default reduction tolerance. The new command line options are nldd-local-linear-solver, nldd-local-linear-solver-reduction and nldd-local-linear-solver-max-iter. + + + Extended implementation of DRSDTCON to apply to multiple PVT regions (#5527). Also added support for deactivation of individual DRSDT, DRVDT and DRSDTCON regions. + + + Added foundations for future experiments using the four-byte float type instead of the eight-byte double type as the primary array element in order to save memory (#5560). + + + Added separate energy convergence tolerance and energy balance tolerance (#5321). Previously the tolerances for mass were used. + + + Support added for RFIP and SFIP mnemonics for the RPTRST keyword to request output of fluid in place volumes at surface and reservoir conditions to the Restart file (#5621). Note that FIP is an alias for SFIP. + + + Support added for mnemonic WELLS=N for the RPTSCHED keyword to request output of well reports to the Print file (#5626). + + + Support added for the EQUALREG keyword to specify property arrays by region (#5648). + + + Added a failure flag to the TaskletRunner allowing errors in a tasklet to be caught and logged (#909). + + + Added support for using METIS in addition to Zoltan to partition corner point grids (#725). + + + Add support for outputting MULTPV to the Restart file if it is specified in the GRID or EDIT section (#4021). + + + Add support for WELSPECS, COMPSEGS, WELSEGS, WSEGVALV, WECON, WTEST, WGRUPCON, GCONSUMP, GRUPTREE and EXIT keywords in PYACTION blocks (#4059,#4061,#4069,#4070,#4071). + + + Added support for CNAMES to specify the component names (#5405,#4091). + + + Added support for DENAQA and VISCAQA keywords to specify parameters for calculating brine density and viscosity using Ezrokhi's method when using CO2STORE (#4091). Also added support for SALTMF to allow the initial salt concentration to be input as a mole fraction. + + + Extended the tracer model to include partitioning of tracers into free and solution states whenever dissolved gas/vaporized oil exist (#5268,#4001). Essentially the tracer linear system has been extended with equations for free and solution tracers with simple mass transfer coupling between them. Both free and solution tracers are now outputted in restart files. + + + Added support for output of well level target or constraint summary vectors: WBHPT, W[OGLVW]PRT, and W[OGVW]IRT where O, G, L, V and W represent oil, gas, liquid, reservoir volume and water respectively (#4093). + + + Initial support for enumerated compositional initialisation (#4110). + + + Added support for [FGW]GMI[RT] field, group and well gas mass injection rate and injection total summary vectors for use with CO2STORE (#4162). + + + Added a new command line parameter --action-parsing-strictness=normal|low that specifies the parsing strictness for ACTIONX and PYACTION blocks (#5547,#4167). If the normal (default?) option is selected then keywords that have not been tested for ACTIONX or PYACTION will not be applied. If the low option is selected then OPM Flow will try to apply all keywords, however, the results may not be correct. + + + A mixing model has been added to the thermal black-oil simulator. The meaning of the TEMP and THERMAL keywords has been changed. TEMP set internal energy = enthalpy (U=H). THERMAL use enthalpy and internal energy (U=H-W). + + + Added support for the COPY keyword for data with global storage (#4236). + + + Added support for the OPERATE keyword for data with global storage (#4237). + + + Added support for the ADDREG, COPYREG, EQUALREG, and MULTIREG keywords for data with global storage (#4238). + + + Extended API to allow a source term to be added to a cell (#4241). In particular this allows a source term to be generated by Python code without needing to pass in a DeckRecord. + + + Added parsing support for ZMF keyword (#4200). + + + The convertECL utility has been updated to support conversion of LGR output between the unformatted (.LGR) and formatted (.FLGR) file types. From 9e840ca489967ac38c31c0a006628bb9be5c1b0b Mon Sep 17 00:00:00 2001 From: gdfldm <142009224+gdfldm@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:56:35 +0000 Subject: [PATCH 2/3] Add draft Improvements Minor updates to New Features --- parts/appendices/B.fodt | 178 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 167 insertions(+), 11 deletions(-) diff --git a/parts/appendices/B.fodt b/parts/appendices/B.fodt index 69522374..98e32ec8 100644 --- a/parts/appendices/B.fodt +++ b/parts/appendices/B.fodt @@ -13520,7 +13520,7 @@ Updated with AFR/TSA Rev-D comments and new keywords. - + Added a command line argument to control the way OPM Flow treats SKIP100 and SKIP300 keywords (#5329). By default OPM Flow behaves like the commercial black-oil simulator. @@ -13593,7 +13593,7 @@ Updated with AFR/TSA Rev-D comments and new keywords.Added support for DENAQA and VISCAQA keywords to specify parameters for calculating brine density and viscosity using Ezrokhi's method when using CO2STORE (#4091). Also added support for SALTMF to allow the initial salt concentration to be input as a mole fraction. - Extended the tracer model to include partitioning of tracers into free and solution states whenever dissolved gas/vaporized oil exist (#5268,#4001). Essentially the tracer linear system has been extended with equations for free and solution tracers with simple mass transfer coupling between them. Both free and solution tracers are now outputted in restart files. + Extended the tracer model to include partitioning of tracers into free and solution states whenever dissolved gas/vaporized oil exist (#5268,#4001). Essentially the tracer linear system has been extended with equations for free and solution tracers with simple mass transfer coupling between them. Both free and solution tracers are now output to the Restart file. Added support for output of well level target or constraint summary vectors: WBHPT, W[OGLVW]PRT, and W[OGVW]IRT where O, G, L, V and W represent oil, gas, liquid, reservoir volume and water respectively (#4093). @@ -13611,13 +13611,7 @@ Updated with AFR/TSA Rev-D comments and new keywords.A mixing model has been added to the thermal black-oil simulator. The meaning of the TEMP and THERMAL keywords has been changed. TEMP set internal energy = enthalpy (U=H). THERMAL use enthalpy and internal energy (U=H-W). - Added support for the COPY keyword for data with global storage (#4236). - - - Added support for the OPERATE keyword for data with global storage (#4237). - - - Added support for the ADDREG, COPYREG, EQUALREG, and MULTIREG keywords for data with global storage (#4238). + Added support for the COPY, OPERATE, ADDREG, COPYREG, EQUALREG, and MULTIREG keywords for data with global storage (#4236,#4237,#4238). Extended API to allow a source term to be added to a cell (#4241). In particular this allows a source term to be generated by Python code without needing to pass in a DeckRecord. @@ -13653,10 +13647,172 @@ Updated with AFR/TSA Rev-D comments and new keywords. - Item1 + Support has been added for MPI communication being performed directly between GPUs instead of being sent via the CPU when using a multi-gnu linear solver (#5145). + + + Python bindings can now control whether MPI_Init() and MPI_Finalize() will be called when creating an Opm::Main object (#5325). This allows the Python unit test files to run more than a single unit test. + + + The fraction of pore-volume whose CNV targets are violated as a new per-iteration quantity is now included in the INFOITER file (--output-extra-convergence-info=iteration), with the column header CnvErrPvFrac (#5302). + + + Support has been added for using hipify on the CUDA code to allow for GPU support on both AMD and Nvidia architectures (#5253). + + + The simulator now checks if relaxed tolerances are tighter than the strict tolerances and if so adjusts the relaxed tolerances (#5337). + + + The code now resets the group pressure maintenance state to avoid oscillations when the target pressure is reached and the pressure maintenance rate is set to zero (#5350). + + + Optimized the memory operations time by overlapping the creation (which includes a host memory copy) of the Jacobian matrix used in the block Jacobi ILU with copying the matrix data to the GPU (#5256). + + + SummaryState Objects are now Aware of Undefined UDQ Values (#5334). + + + Previously the code would only start handling oscillations when two phases had oscillating residuals. The code will now start handling oscillations when just one phase is oscillating (#5398). + + + Added Newton update damping for the situation where the solution for a domain oscillates (#5342). + + + Reduced execution time for parallel AMG/CPR simulations. Allowed use of AMG with command line option --matrix-add-well-contributions=false (#5182). + + + The code has been updated to only issue warnings the first time the transmissibilities are calculated thus removing spurious and duplicate warnings that can occur when using load balancing (#5351). + + + Nearly all exceptions thrown when computing wells will not abort the simulator but result in a timestep chop. Hence those should not be counted as errors and be reported in the PRT file. The simulator now only reports problems for exceptions thrown when updating the well potentials (#5423). + + + The well economic (WECON) minimum rates are no longer applied if the well is subject to a zero group rate target or constraint (#5424). + + + Directly output the SGMAX, SHMAX, SOMAX, SOMIN and SWHY1 arrays rather than the KRNSW_GO, KRNSW_OW, PCSWM_GO, PCSWM_OW and SOMAX arrays to the Restart file for cases with relative permeability and/or capillary pressure hysteresis (#5402). + + + Sphinx documentation has been added for the opm.simulators.BlackOilSimulator Python module (#5243). + + + The simulator now more dynamically picks the thread block size when using CUDA giving up to a 50% speed up on linear iterations (#5433). + + + If OpenMP is available then the simulator will now default to two threads per process unless the OMP_NUM_THREADS environment variable is set or the command line option --threads-per-process is set. A warning will be issued if both the environment variable and the command line option are set, but the environment variable will take precedence (#5454). + + + Support for the --print-properties command line option has been removed (#5514). + + + Visualization Toolkit (VTK) files can now be output for dry runs by using the --enable-vtk-output=1 --enable-dry-run=1 command line options (#5499). + + + Linear solver default parameters have been updated to improve accuracy and performance including: material balance tolerance reduced to 1.0e-7, local well solve control switching is turned on, use implicit IPR is turned on, and enable drift compensation is turned off (#5157). + + + A more helpful message is now output if the PETGRID keyword is used to try to load a generic simulation grid (*.GSG) file (#5541): "OPM Flow cannot read GSG format grid input, re-export case from Petrel using GRDECL instead." + + + The check for active wells as a condition for drift compensation has been removed (#5110). For CO2 injection simulation the drift compensation is still beneficial even when wells are no longer active. + + + The command line option --cpr-reuse-setup now only applies to the CPR preconditioner (#5445). + + + The simulator now uses a mobility weighted average of cell level densities for the connection level mixture densities in no-flow producing wells (#5479). This mobility weighted average approach gives a more monotone pressure build up. + + + Output cell counts and pore volume fractions to INFOITER file for cells that: (1) satisfy the strict convergence tolerance, (2) satisfy the relaxed but not the strict convergence tolerance, (3) do not satisfy the relaxed convergence tolerance (#5338). + + + Consistency checks have been added for oil, gas and water phase saturation functions (#5570,#5571,#5572). + + + The simulator now avoids computing the default number of domains based on a specific target number of cells per domain if the user choses a specific number of NLDD domains (#5579). + + + The simulator now avoids doing unnecessary updates in the numerical aquifer calculations (#5632). + + + Previously the THP was set to zero if a well was stopped or set to a zero rate (well or group). The THP will now be calculated provided a VFP table is active (#5634). + + + Consistency checks have been added for three-point saturation scaling SCALECRS=YES (#5573,#5640). These checks collectively guarantee a mobile displacing oil saturation in the two phase gas-oil and oil-water systems. + + + A new convergence monitoring feature (#5590) has been introduced to improve the robustness and efficiency of the simulator based on Moyner et al., 2024 (https://doi.org/10.3997/2214-4609.202437057). The following command line options have been added: --convergence-monitoring enables convergence monitoring, --convergence-monitoring-cut-off=x specifies the cut off limit (default = 6), and --convergence-monitoring-decay-factor=x specifies the decay factor (default = 0.75). + + + Support has been added for Python >= 3.8, whilst support has been maintained for Python 3.6 and 3.7 (#5644). + + + A new strategy for preventing wells from oscillating between being stopped and revived has been introduced (#5659). The cycle of oscillations are broken by requiring that for a well to remained stopped after it is stopped in the local solve, then it should have had zero rate when it entered the local solve, basically meaning that both the global and local solve agree it should be stopped. + + + It is no longer necessary to use add well contributions to matrix for NLDD. Also, the CPRW preconditioner is now supported for NLDD (#5341,#5676). + + + The number of pinch-out connections generated will now be reported to the Print file (#767). + + + An error message will now be generated if the COMPSEGS keyword is used before the multi-segment well is defined using the WELSEGS keyword (#4031). + + + The reservoir volume rate (RESV) constraint for a history matching producer is evaluated by converting the observed oil, water and gas surface rates to the current reservoir conditions hence its value is not fixed. However, to test if the well is subject to a zero reservoir volume rate constraint it is sufficient to test if all of the observed rates are zero (#4039). + + + The path of the Restart file (either absolute or relative to the .DATA file) as specified by the RESTART keyword is now saved for writing to the SMSPEC file (#4056). + + + Restart file paths of between 73 and 132 characters in length are now also written to the SMSPEC file (#4057). + + + Support has been added for formatted FSMSPEC files in the summary utility (#4080). + + + Improved the reading of possibly corrupt summary files (#4079). + + + The ACTNUM array is now updated immediately after scanning the GRID and EDIT sections (#4082). This avoids problems where cells are deactivated by setting PORO equal to zero while at the same time setting regions numbers for these cells to invalid values (which is not currently supported). + + + The compatibility with restart files has been improved specifically reading the well closure reason for history matching wells, and not using a guide rate model for wells with a target type of NONE (#4090). + + + The INIT file output code's assumption that tabulated saturation functions have at most NSSFUN (TABDIMS keyword item 3) rows per saturation region has been relaxed (#4066). This allows larger saturation function tables to be output to the INIT file without an error being generated. + + + Added support for restarting cases with group injection controlled voidage replacement (#4108). + + + Support has been expanded for saving/restoring scaling factors for segment level devices (SICDs, AICDs and Valves) to/from the Restart file (#3978). + + + Avoid unnecessarily checking if the fluid is saturated in CO2STORE and H2STORE cases (#4125). + + + If the injection fluid temperature has not been set for an injection well then it now defaults to the cell temperature in the upper most completion (#5490,#4155,#4152). + + + A warning message will now be generated and the well connection will be skipped if the well connection is in a cell that will be deactivated due a pore volume cut off specified by the MINPV or MINPVV keyword (#4174). This also avoids a crash that would have occurred if any such well was re-completed at a later stage in the simulation. + + + Restart support has been added for DRSDT (#4166). + + + The code now uses the failure flag of the tasklet runner to detect a failure while writing output and throw an error if this happens (#5478,#4178). + + + Added ESMRY methods to get a list of dates for summary results and obtain the units for a summary vector have been exported to Python (#4184). + + + Add support for converting between formatted (.FGRID) and unformatted (.GRID) grid files to the convertECL utility (#4208). + + + An error message will now be generated if an attempt is made to copy an undefined array (for example using the COPY keyword). Similarly, operations on an array (for example the ADD keyword) other than assignment (for example using the EQUALS keyword) will now generate an error message if the array being operated on has not been previously been defined in the input deck (#4109,#4235). However, operations are allowed on multiplier arrays (MULTX, MULTY, etc.) that have not been explicitly defined in the input deck but have a default value of one (#4235). - + Performance improvements in well name matching on platforms which support the Posix fnmatch() function (#4243). From 4a061b0d436e17e372efd721421d992ed0649a9a Mon Sep 17 00:00:00 2001 From: gdfldm <142009224+gdfldm@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:03:37 +0000 Subject: [PATCH 3/3] Command line table numbering --- parts/appendices/B.fodt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/appendices/B.fodt b/parts/appendices/B.fodt index 98e32ec8..9796ae2f 100644 --- a/parts/appendices/B.fodt +++ b/parts/appendices/B.fodt @@ -13130,7 +13130,7 @@ Updated with AFR/TSA Rev-D comments and new keywords. - + 1