TUNING

Recognised by the OPM Flow parserSCHEDULE

The TUNING keyword defines the parameters used to control the commercial simulator’s time stepping and numerical convergence for the global grid. The keyword is similar to the TUNINGDP keyword in the SCHEDULE section that is optimized for high throughput runs. The keyword is mostly ignored by OPM Flow; however, the simulator can be instructed to read some parameters from the TUNING keyword if the appropriate command line parameter has been activated (see section 2.2Running OPM Flow 2023-04 From The Command Line).

Notes:

The keyword consists of three records, with items 1-1 to 1-11 representing record one items, 2-1 to 2-14 record two and 3-1 to 3-12 representing record number three. Each of the records are terminated by a “/” and is explicitly shown in the above rows.

There is no keyword terminating “/”.

Note that for record number two (items 2-1 to 2-13) the maximum values should always be greater than the associated target value; for example, XXXCNV should be greater than TRGCNV. Also note that the TUNING keyword is stored on the restart files (see RPTRST – Define Data to be Written to the RESTART File) enabling the parameters to be utilized in a restart run without re-specifying the keyword.

Records
Fixed number of records
Record count
3
Items per record
record 1: 10, record 2: 13, record 3: 11

Parameters

Record 1

No.NameDescriptionTypeDimensionFieldMetricLabDefault
1TSINITTSINIT is a positive real value that defines the maximum length of the next time step. Note that whenever the keyword is used TSINIT is always set back to the default value of one, unless explicitly over written.DOUBLETimedaysdayshours1.0
2TSMAXZTSMAXZ is a positive real value that defines the maximum length of time steps following the next time step (TSINIT).DOUBLETimedaysdayshours365.0
3TSMINZTSMINZ is a positive real value that defines the minimum length of all time steps.DOUBLETimedaysdayshours0.1
4TSMCHPTSMCHP is a positive real value that sets the minimum time step length that can be chopped.DOUBLETimedaysdayshours0.15
5TSFMAXTSFMAX is a positive real value that specifies the maximum growth rate a time step can be increased by, subject to the maximum allowable time step size set by TSMAXZ. For example, if the current time step has converged at 10 days and TSFMAX is set to the default value, then the next time step will be 3.0 x 10 days, that is 30 days provided it is less than TSMAXZ.DOUBLEdimensionlessdimensionlessdimensionless3.0
6TSFMINTSFMIN is a positive real value that specifies the minimum decay rate a time step can be decreased by, subject to the minimum allowable time step size set by TSMINZ. For example, if the current time step has not converged at 10 days and TSFMIN is set to the default value, then the next time step will be 0.3 x 10 days, that is the maximum of 3 days and TSMINZ.DOUBLEdimensionlessdimensionlessdimensionless0.3
7TSFCNVTSFCNV is a positive real value that specifies the decay rate a time step can be decreased by after a convergence failure.DOUBLEdimensionlessdimensionlessdimensionless0.1
8TFDIFFTFDIFF is a positive real value that sets the time step growth factor of the time step after a convergence failure. For example, if the chopped current convergent time step is 10 days and TFDIFF is set to the default value, then the time step will be increased to 1.25 x 10 days, that is the minimum of 12.5 days and TSMAXZ.DOUBLEdimensionlessdimensionlessdimensionless1.25
9THRUPTTHRURT is a positive real value that specifies the maximum throughput ratio over a time step.DOUBLEdimensionlessdimensionlessdimensionless1.0 x 1020
10TMAXWCTMAXWC is a positive real value that defines maximum allowed time step after a well event; for example, when a well is opened or closed, etc.DOUBLETimedaysdayshoursNone

Record 2

No.NameDescriptionTypeDimensionFieldMetricLabDefault
1TRGTTETRGTTE is a positive real value that sets the target time truncation error.DOUBLEdimensionlessdimensionlessdimensionless0.1
2TRGCNVTRGCNV is a positive real value that defines the target non-linear convergence error.DOUBLEdimensionlessdimensionlessdimensionless0.001
3TRGMBETRGMBE is a positive real value that specifies the target material balance error.DOUBLEdimensionlessdimensionlessdimensionless1.0 x 10-7
4TRGLCVTRGLCV is a positive real value that specifies the target linear convergence error.DOUBLEdimensionlessdimensionlessdimensionless0.0001
5XXXTTEXXXTTE is a positive real value that sets the maximum time truncation error.DOUBLEdimensionlessdimensionlessdimensionless10.0
6XXXCNVXXXCNV is a positive real value that defines the maximum non-linear convergence error.DOUBLEdimensionlessdimensionlessdimensionless0.01
7XXXMBEXXXMBE is a positive real value that specifies the maximum mass balance error, that is the tolerated mass balance error relative to total mass present.DOUBLEdimensionlessdimensionlessdimensionless1.0 x 10-6
8XXXLCVXXXLCV is a positive real values that sets the maximum linear convergence error.DOUBLEdimensionlessdimensionlessdimensionless0.0001
9XXXWFLXXXWFL is a positive real values that fixes the maximum well flow convergence error.DOUBLEdimensionlessdimensionlessdimensionless0.001
10TRGFIPTRGFIP is a positive real value that stipulates the target fluid in-place error in Local Grid Refinements.DOUBLEdimensionlessdimensionlessdimensionless0.025
11TRGSFTTRGSFT is a positive real values that defines the target surfactant change when the Surfactant Model is active in the run.DOUBLEdimensionlessdimensionlessdimensionlessNone
12THIONXTHIONX is a positive real value used to set the threshold for damping in the ion echange calculation for when the Brine Model is active in the run.DOUBLEdimensionlessdimensionlessdimensionless0.01
13TRWGHTTRWGHT is an integer that stipulates the implicitness for active tracer updates within the Newton iterations, and should be set to: The calculation is explicit, that is fully decoupled. The calculation is implicit, that is fully coupled.INTdimensionlessdimensionlessdimensionless1

Record 3

No.NameDescriptionTypeDimensionFieldMetricLabDefault
1NEWTMXNEWTMX is a positive integer greater or equal to NEWTMN that stipulates the maximum number of Newton iterations for a time step.INTdimensionlessdimensionlessdimensionless12
2NEWTMNNEWTMN is a positive integer that is less or equal to NEWTMX that defines the minimum number of Newton iterations for a time step.INTdimensionlessdimensionlessdimensionless1
3LITMAXLITMAX is a positive integer greater or equal to LITMIN that sets the maximum number of linear iterations within a Newton iteration.INTdimensionlessdimensionlessdimensionless25
4LITMINLITMIN is a positive integer less or equal to LITMAX that sets the minimum number of linear iterations within a Newton iteration.INTdimensionlessdimensionlessdimensionless1
5MXWSITMXWSIT is a positive integer that defines the maximum number of iterations within a well flow calculation.INTdimensionlessdimensionlessdimensionless8
6MXWPITMXWPIT is a positive integer that stipulates the maximum number of iterations for solving the bottom-hole pressure for wells under tubing head pressure control within a well flow calculation.INTdimensionlessdimensionlessdimensionless8
7DDPLIMDDPLIM is a positive real value that stipulates the maximum pressure change at the last Newton iteration.DOUBLEPressurepsiabarsaatma1.0 x 106
8DDSLIMDDSLIM is a positive real value that sets the maximum saturation change at the last Newton iteration.DOUBLEdimensionlessdimensionlessdimensionless1.0 x 106
9TRGDPRTRGDPR is a positive real value that defines the target maximum pressure change within a time step.DOUBLEPressurepsiabarsaatma1.0 x 106
10XXXDPRXXXDPR is a positive real value that stipulates the maximum tolerable pressure change within a time step.DOUBLEPressurepsiabarsaatmaNone
11MNWRFPMNWRFP is a positive integer greater than one and less than NEWTMX that defines the minimum number of Newton iterations before invoking the bisection algorithm for when the polymer phase is active in the model via the POLYMER keyword in the RUNSPEC section.INTdimensionlessdimensionlessdimensionless4

Example

--
-- DEFAULT TUNING PARAMETERS
--
TUNING
1.0 365.0 0.1 0.15 3 0.3 0.1 1.25 1E20 1* /
/
/
The above example explicitly sets the default parameters for OPM Flow for when the appropriate command line parameter has been activated (see section 2.2Running OPM Flow 2023-04 From The Command Line) to instruct the simulator to read the first record of the TUNING keyword.Alternatively one could just use the following to accomplish the same thing.
TUNING
/
/
/

Manual source: parts/chapters/subsections/12.3/TUNING.fodt