Upload
danghanh
View
230
Download
3
Embed Size (px)
Citation preview
New Developments in Reservoir Simulation and their Potential Impact on IO
Khalid Aziz
Stanford University
2
Define IO
Production System
Data
Update Detailed Model
Update Reduced Model
Optimization
Controls
Field Development Optimization
Optimization and
UncertaintyPropagation
Update Reduced Models
UpdateDetailed Models
Reservoir, Wells, Surface Facilities
New Wells or Facilities
3
Key Aspects of IO or Smart Fields
� Application of formal optimization techniques to
� Develop Field (wells, new wells, facilities)
� Including optimization while drilling
� Operate (control down hole and surface valves)
� All optimization requires assessing the impact of decisions
4
Assessing Impact of Decisions
� Reservoir Simulation
� Many thousands of simulations required
� Other Approximate Models
� Proxies (based on limited simulations)
� Huge potential of Formal Optimization
5
Development of Key Tools
� Optimization techniques (Smart Fields Consortium at Stanford - SFC)� Global or local
� Gradient based
� Stochastic
� Dynamic programming
� Multiobjective
� Simulation (Reservoir Simulation Consortium at Stanford – SUPRI-B)� Speed and robustness
� Upscaling and proxies
� Flexibility (new processes, updates, new hardware)
6
Modeling Environment
SimulatorEngine
PreprocessingPost-
Processing
Creating one or more images
Extracting useful results
Upscaling?
Wells andFacilities
7
Reservoir Simulation
( )110
i i i i i
w n nc c c c cR m m M M
t+= − − − =
∆
( )1
set of primary variables at iteration
Jacobian MatrixJ
J S S R
S
R
S
υ υ υ υ
υ
υυ
υ
υ
+ − = −
=
∂= =∂
r r r
%r
%
r
r
• Equations
From Gringarten
• Pressure drop / flow rate relationship
• Additional constraint equations
8
Each component is a module that hides its own functionality and data
Object Oriented Architecture
Younis 2011
9
Selected Simulation Research Reservoir Simulation Consortium at Stanford
1. Building a General Purpose Research Simulator (GPRS) using Automatic Differentiation (AD) to Build the Jacobian and Compute Gradients
2. A Robust Method for Solving Nonlinear Equations
3. Fast Flash Calculations for Complex Processes
Development of an Automatic
Differentiation Based GPRS
Work of Rami Younis and Yifan Zhou
PhD Students at Stanford University.
Additional contributions by other researchers.
11
AD (Automatic Differentiation)-GPRS: Motivation
• Need only nonlinear residual code
• Jacobian automatically generated and always accurate
• Flexible and extensible
• Need only nonlinear residual code
• Jacobian automatically generated and always accurate
• Flexible and extensible
AD Framework
• Avoid manual Jacobian construction
• Incorporate new physics
• Complex processes
• New formulations and solution algorithms
• Avoid manual Jacobian construction
• Incorporate new physics
• Complex processes
• New formulations and solution algorithms
GPRS using AD
• Flexible and efficient reservoir-simulation research laboratory
• Flexible and efficient reservoir-simulation research laboratory
Objectives of AD-GPRS
12
AD-GPRS: Key Features
� Generalized compositional formulation
� MPFA (Multi-Point Flux Approximation) discretization for unstructured grid
� Flexible multi-level AIM (Adaptive Implicit Method)
� Combination of MPFA and AIM
� General multi-segment wells
� ……
13
AD Framework
For each time-step
For each Newton iteration
RESIDUAL CODE
JACOBIAN CODE
ADscalarGradient
Value
double block_sparse_vector<block_size>
Automatically Generated JACOBIAN CODE
14
MPFA O(1/3)32:1
1
2
3
4
� 17,545 triangular cells with several linear no-flow features (mimic faults)
� 1 injector (center) + 4 producers (distributed around)
� Anisotropic ratio: 1:1, 2:1, 8:1, 32:1
� TPFA (4-pt), MPFA O(1/3)-method (18-pt)
TPFA32:1TPFA32:1
11
22
33
44
TPFA32:1
1
2
3
4
1
2
3
4
MPFA: Unstructured Grid1
MPFA – TPFA32:1
1 Y. Zhou, H. Tchelepi & B. Mallison, SPE 141592 (2011)
15
MPFA: Unstructured Grid
0
2
4
6
8
10
0 100 200 300 400 500 600
Ga
s R
ate
(k
m3/d
ay
)
Time (day)
1:1
MPFA P1
TPFA P10
2
4
6
8
10
0 100 200 300 400 500 600
Time (day)
2:1
0
2
4
6
8
10
0 100 200 300 400 500 600
Ga
s R
ate
(k
m3/d
ay
)
Time (day)
8:1
0
2
4
6
8
10
0 100 200 300 400 500 600
Time (day)
32:1
Zhou 2011
16
MPFA: Unstructured Grid Case
DiscretizationNewton
iterationsSolver
iterationsDiscretization
time (s)Solver time
(s)
Total time (s)
1:1TPFA
MPFA
597
576
9.5
5.6
0.08
0.18 (+114%)
0.33
0.60 (+82%)
0.61
0.98 (+60%)
2:1TPFA
MPFA
593
588
10.0
5.8
0.08
0.18 (+111%)
0.34
0.61 (+78%)
0.63
0.99 (+58%)
8:1TPFA
MPFA
573
581
11.6
10.2
0.09
0.18 (+113%)
0.40
0.85 (+110%)
0.69
1.24 (+78%)
32:1
TPFA
MPFA
602
639
12.3
20.8
0.09
0.19 (+96%)
0.45
1.62 (+261%)
0.77
2.02 (+161%)
� TPFA (4-pt), MPFA O(1/3)-method (18-pt, 3.5 times more)
Zhou 2011
17
Additional uses of ADGPRS
� Investigate selection of primary unknowns and equations
� Level of implicitness
� Different multipoint flux techniques
� Addition of new processes
� Chemical reactions
� Advanced wells
� …
Solving Nonlinear Equations
Work of Rami Younus
PhD Candidate at Stanford University
19
Implicit models and nonlinearity
( )1; , 0n nR S S t+ ∆ =
Challenges� Newton’s method may not converge
� Convergence rate may be too slow
� Time-step selection for convergence is hard
Try-Adapt-Try-Again strategy
Stiff Nonlinear Residual
( )11 1 1 1
01
; ,n n n n
n n
S S J R S S t
S S
ν ν ν
ν
++ + − +
=+
− = − ∆ =
Use Newton’s Method
20
Even ‘simple’ problems can be challenging
( ) ( )1 1n n ninjR S S c t f S f S+ + = − + ∆ −
2 phase incompressible flow in 1 cell
injS0
initS S=
1 ?S =
Dt∆
nS
1nS +
R
1nSν+
21
Generalized view of Newton’s iteration
( )1
1 1
1
0
; ,n
n n
n n
d SJ R S S t
d
S Sν
ν
+− +
+
=
= − ∆ =
Bottom line …� Newton’s iteration may not converge (unstable in
iteration index v)
� Derivation of ‘CFL-restriction-like’ criteria unlikely
Consider this IVP
It is stationary at the solution
( )11 1 1 1
01
; ,n n n n
n n
S S J R S S t
S S
ν ν ν
ν
ν++ + − +
=+
− = − ∆ =
∆Explicit Euler discretization yields Newton’s Iteration
Newton uses a step-size ∆ν=1
22
2 phase incompressible flow in 2 cells
1t∆ =
2S
0 0.2 0.4 0.6 0.8 10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1S
( )1
2; ,n nR S S t+ ∆
Residual norm contours
4th order integration of Newton Flow
Ordinary Newton steps
injS1S 2S
23
‘Safe-guarding’ Newton’s Iteration (1)
( )11 1 1 1 ; ,n n n nS S J R S S tν ν ν
ν++ + − + − = − ∆ ∆
Classic methods select a constant� Standard: always 1
� Line-search: minimize residual norm along Newton direction
� Trust-region: minimize residual norm within a neighborhood of iterate
ν∆
24
‘Safe-guarding’ Newton’s Iteration (2)
Heuristics in commercial simulators � Appleyard Chop (AC) modifies Newton step cell-by-
cell:
� Changes from mobile to immobile are made barely mobile (and vice-versa)
� A count is kept to avoid ‘oscillation’
� EclipseTM Modified Appleyard Chop (MAC):
� Perform an Appleyard Chop AC
� Limit saturation changes by a maximum constant (0.2 works well)
25
Continuation-Newton
S
Time-step
target
0Sn
Select a step-size
Tangent from formulation
1
2
Fixed residual tolerance
Local Newton correction
3
26
Gravity Segregation
0 50 100 150 200 250 300 3500
20
40
60
80
100
120
140
160
180
200
Time-step (days)
Num
ber
of It
erat
ions
No longer converges
No longer converges MAC Heuristic
(0.6)
MAC Heuristic (0.25)
CN – total iterates
CN – Newton corrections
27
Segregation and advection
0 20 40 60 80 100 120 140 160 180 2000
20
40
60
80
100
120
140
160
180
200
0 20 40 60 80 100 120 140 160 180 2000
20
40
60
80
100
120
140
160
180
200
0 50 100 1500
50
100
150
Time-step Size (Days)
Num
ber
of it
erat
ions
MAC Heuristic (0.6)
MAC Heuristic (0.25)
CN – total iterates
CN – Newton corrections
No longer converges
Fast Compositional Modeling
Work of D. Voskov, H. Pan, A. Iranshahr, R. Zaydullin.
Research Associates and Students
29
Tie-Simplex Parametrization
CO2 C10
p = const
T = const
zi = xi L + yi (1 - L)
z1 + z2 + z3 = 1
C4
iγjγz1
z3
z2
30
Why is CSAT efficient?
γ2
γ1
Solution invariance in γ-space
Solutions in one, two and three dimensions
31
Adaptive tabulation (CSAT)
p1< p2< p3< MCPp
• For given z & T, tabulate tie-lines for pressures up to the Minimal Critical Pressure (MCP)
• Construct refined table below MCPvapor liquid
p y1 y2 y3 x1 x2 x3
p1
p2
p3
MCP
p1 MCP
1 3
2
1 3
2
32
CSAT and RV performance
0
200
400
600
800
1000
1200
1400
1600
1800
2000
Standard RV CSAT
Tim
e, s
ec
SIM time EoS time
SPE 3, immiscible gas injection SPE 5, miscible gas injection
33
Some other Areas of Current Research
� Modeling of Complex Wells
� Geomechanical Modeling
� Linear and Nonlinear Solvers
� Accurate Modeling of Capillary Heterogeneity
� Various Smart Fields Topics
34
Concluding Remarks
1. Simulator developments are making this technology more flexible, easily extendable, faster, and easier to develop new simulators
2. Academic and industrial collaborations have huge benefits for technology and human resource development
Thank You!
Questions or Comments?
Khalid AzizStanford University
36
SimulationCycle
UpdateDetailed Model
UpdateSimplified Model
Impose new Controls onPhysical System
Optimize
AssessValue of Objective
Function