Methods and systems for reservoir simulation
An improved reservoir simulator is provided that determines variable convergence criteria used in newton iterations in in a manner that addresses the problem of oversolving while minimizing the adverse effect on the nonlinear system. In the improved reservoir simulator, nonlinear information along with some information from the linear system can be used to determine a variable convergence tolerance. The variable convergeance tolerance can be used to define the variable convergence criteria used in newton iterations performed by the reservoir simulator.
1 . A method of simulating fluid flow within a subterranean reservoir and optionally within at least one wellbore connected thereto, comprising:
gathering information regarding the reservoir and optionally the at least one wellbore connected thereto;
providing the information to a reservoir simulator and running the reservoir simulator to generate a solution that models fluid flow within the reservoir and optionally within the at least one wellbore connected thereto wherein the reservoir simulator performs a number of newton iterations to generate the solution and employs a variable convergence criterion determined by operation of a machine learning system; wherein the variable convergence criterion is a forcing term of an inexact Newton method; and
setting a flow control valve based on the solution.
2 . A method according to claim 1 , wherein the newton iterations include a current newton iteration following a previous newton iteration; and the machine learning system takes as input nonlinear system information related to the current newton iteration and linear system information related to the previous newton iteration to determine a variable convergence tolerance used to solve the current newton iteration.
3 . A method according to claim 1 , wherein the newton iterations include a current newton iteration following a previous newton iteration; and the machine learning system takes as input data representing a number of features related to current newton iteration and the previous newton iteration to determine a variable convergence tolerance used to solve the current newton iteration.
4 . A method according to claim 3 , wherein the features comprise linear system information related to the previous newton iteration selected from the group consisting of: data representing approximate condition number from the previous newton iteration, and data representing number of linear iterations for the previous newton iteration.
5 . A method according to claim 3 , wherein the features comprise nonlinear system information related to the current newton iteration selected from the group consisting of: data representing a residual 2-norm, and data representing decay in the residual 2-norm.
6 . A method according to claim 3 , wherein the features comprise data representing current newton iteration number.
7 . A method according to claim 3 , wherein the features comprise data representing current time-step size.
8 . A method according to claim 1 , wherein the machine learning system employs a random forest regression.
9 . A method according to claim 1 , wherein the newton iterations include a current newton iteration following a sequence of previous newton iterations; and the machine learning system comprises a Recurrent Neural Network that is configured to take information from the sequence of previous newton iterations as input to output a variable convergence tolerance that is used to solve the current newton iteration.
10 . A method according to claim 1 , wherein the variable convergence criterion is further determined from a heuristic η′ of the form
η
′
=
α
(
R
2
v
R
2
v
-
1
)
β
+
γ
1
(
❘
"\[LeftBracketingBar]"
λ
max
❘
"\[RightBracketingBar]"
v
-
1
❘
"\[LeftBracketingBar]"
λ
min
❘
"\[RightBracketingBar]"
)
δ
,
where α, β, γ, δ are fixed parameters,
R
2
v
represents representing a residual 2-norm for the current newton iteration,
R
2
v
-
1
represents representing a residual 2-norm for the previous newton iteration; and
❘
"\[LeftBracketingBar]"
λ
max
❘
"\[RightBracketingBar]"
v
-
1
❘
"\[LeftBracketingBar]"
λ
min
❘
"\[RightBracketingBar]"
represents the ratio of the maximum and minimum elgenvalues of the linear system for the previous newton iteration.
11 . A processor-based system that stores program instructions that, when executed on the system, cause the system to perform the method of claim 1 .
12 . A non-transitory computer-readable medium storing program instructions that, when executed by a processor, cause the processor to perform the method of claim 1 .