Control and optimization of
subsurface flow
2
SIAM CSE 2013
Subsurface flow
• Fluids
• Clean groundwater – drinking, irrigation
• Polluted ground water – clean-up, remediation • Oil – many components, viscous tar or water-like • Natural gas – may contain pollutants (e.g. H2S) • CO2 – liquid, gaseous, supercritical; dissolution
• Porous medium
• Porous soil (shallow) – sand, clay
• Porous rock (deep) – clastics (sandstones, shales), carbonates • Heterogeneous – layers, fractures, faults, dissolved, cemented • Interfacial processes – surface tensions, adsorption, desorption
• Environment
• High pressures: 10 MPa / km
• High temperatures: 25 oC / km 3000 m: 300 bar, 100
oC
fluids trapped in porous rock below impermeable ‘cap rock’
Oil & gas reservoirs
gas oil
Oil production mechanisms
• Primary recovery – expansion of rock and fluids,
decreasing reservoir pressure
depletion drive, compaction drive, 5-40% recovery
• Secondary recovery – injection of fluids to maintain
reservoir pressure and displace oil to the wells
water flooding, gas flooding, 10-60% recovery
• Tertiary recovery – injection of heat or chemicals to
change physical properties (e.g. viscosity, wettability)
Research & development drivers
• Increasing demand; reducing supply
• energy demand continues to grow world-wide
• renewables are developing too slow to keep up with demand • ‘easy oil’ has been found; few new discoveries; complex fields
=> produce more from existing reservoirs
• Increasing knowledge- and data intensity
• more sensors: pressure/temperature/flow, time-lapse
seismics, passive seismics, EM, tilt meters, remote sensing, … • more control: multi-lateral wells, smart wells,
snake wells, dragon wells, remotely controlled chokes, … • more modeling capacity: computing power, visualization
Governing equations – simple example
• Oil and water only, no gravity, no capillary pressures
• Separate equations for
p and
S
w:
•
l
t,c
t andf
w are functions ofS
;v
t is a function ofp
• Coupled and nonlinear, (near-)elliptic, (near-)hyperbolic
w t w w wS
v f
S
q
t
2 t t tp
p
c
q
t
l
K
diffusion
convection
Reservoir simulation
• 3-phases (gas, oil, water) or multiple components
+ thermal effects + chemical effects + geo-mechanics + …
• Nonlinear PDEs discretized in time and space – FD/FV
Reservoir simulation
• 3-phases (gas, oil, water) or multiple components
+ thermal effects + chemical effects + geomechanics + …
• Nonlinear PDEs discretized in time and space – FD/FV
• Cornerpoint grids or unstructured grids
• Large variation in parameter values: 10-15 <
k
< 10-11 m2• Typical model size: 104–106 cells, 50–500 time steps
• Fully implicit (Newton iterations) – clock times: hours-days
• Typical code size: 106-107 lines (well models, PVT analysis)
• Research focused on upscaling, gridding, ‘history matching’
(inverse modeling), new physics, solvers, parallelization
• Primarily used in design phase: field (re-)development
Closed-loop reservoir management
• Hypothesis: recovery can be significantly increased by
changing reservoir management from a ‘batch-type’ to a near-continuous model-based controlled activity
• Key elements:
• Optimization under geological uncertainties
• Data assimilation for frequent updating of system models
• Inspiration:
• Systems and control theory
• Meteorology and oceanography
• A.k.a. real-time reservoir management, smart fields,
Closed-loop reservoir management
Noise Input System Output (reservoir, wells
& facilities)
Noise
Sensors
Predicted output Measured output Data
assimilation algorithms Controllable
input
System models well logs, well tests, Geology, seismics, fluid properties, etc.
Optimization algorithms
Open-loop flooding optimization
Data assimilation
algorithms
Noise Input System Output Noise (reservoir, wells & facilities) Optimization algorithms Sensors System model
Predicted output Measured output
Controllable input
Geology, seismics, well logs, well tests, fluid properties, etc.
Optimization techniques
• Global versus local
• Gradient-based versus gradient-free
• Constrained versus non-constrained
• ‘Classical’ versus ‘non-classical’ (genetic algorithms,
simulated annealing, particle swarms, etc.)
• We use ‘optimal control theory’
• Gradient-based – steepest ascent, LBFGS, trust regions, …
• Gradients obtained with ‘adjoint’ equation (implicit differentiation) • Computational effort independent of number of controls
• Objective function: ultimate recovery or monetary value
• Controls: injection/production rates, pressures or valve openings (102 to 103 control variables, 104 – 106 states )
• Constraint handling: GRG, lumping, SQP, augmented Lagrangian, … • Beautiful, but code-intrusive and requires lots of programming
12-well example
• 3D reservoir
• High-permeability channels
• 8 injectors, rate-controlled
• 4 producers, BHP-controlled
• Production period of 10 years
• 12 wells x 10 x 12 time steps
gives 1440 optimization parameters
u
• Optimization of monetary value
J
• Adjoint gives us:
Van Essen et al., 2006
J
= (value of oil – costs of water produced/injected)1 2 1440
dJ
J
J
J
d
u
u
u
u
Why this wouldn’t work
• Real wells are sparse and far apart
• Real wells have more complicated constraints
• Field management is usually production-focused
• Long-term optimization may jeopardize short-term profit
• Optimal inputs cannot be implemented (too dynamic)
• Production engineers don’t trust reservoir models anyway
Robust open-loop flooding optimization
Data assimilation
algorithms
Noise Input System Output Noise (reservoir, wells & facilities) Optimization algorithms Sensors System models
Predicted output Measured output
Controllable input
Geology, seismics, well logs, well tests, fluid properties, etc.
Robust optimization
• Use ensemble of realizations (typically 100)
• Optimize expected value over ensemble
• Single strategy, not 100!
• If necessary include risk aversion (utility function)
• Computationally intensive
22
SIAM CSE 2013
Robust optimization results
3 control strategies applied to set of 100 realizations:
reactive control, nominal optimization, robust optimization
Fig. 3: Cumulative Distribution Function and Probability Density Functions based on the first set of 100 realizations of the reactive control strategy, the 100 nominal optimization strategies and the
Monetary value (M$) Pr obabil ty dens ity
Closed-loop flooding optimization
Noise Input System Output (reservoir, wells
& facilities)
Noise
Sensors
Predicted output Measured output Data
assimilation algorithms Controllable
input
System models well logs, well tests, Geology, seismics, fluid properties, etc.
Optimization algorithms
Data assimilation
(‘computer-assisted history matching’)
• Uncertain parameters, not initial conditions or states
• Parameters: permeabilities, porosities, fault multipliers, …
• Data: production (oil, water, pressure), 4D seismics, …
• Very ill-posed problem: many parameters, little info
• Variational methods – Bayesian framework:
• Ensemble Kalman filtering – sequential methods
• Reservoir-specific methods (e.g. streamlines)
• ‘Non-classical’ methods – simulated annealing, GAs, …
• Monte Carlo methods – MCMC with proxies
1
1
0 0
T T
d m
Closed-loop flooding optimization
‘Truth model’
Noise Input System Output (reservoir, wells
& facilities)
Noise
Sensors
Predicted output Measured output Data
assimilation algorithms Controllable
input
System models well logs, well tests, Geology, seismics, fluid properties, etc.
Optimization algorithms
System models well logs, well tests, Geology, seismics, fluid properties, etc. ‘Truth model’
Noise
Sensors Noise Input System Output
(reservoir, wells & facilities) Controllable input Optimization algorithms etc., etc.
Predicted output Measured output Data
assimilation algorithms
Closed-loop
–effect of cycle time
1 2 3 4 5 6 8.5 9 9.5 10 10.5x 10 7 N PV , $ 1 2 3 4 5 6 -2 -1.5 -1.0 -0.5 0 D is cou nt ed w at er cos ts , $ 1 2 3 4 5 6 8.5 9 9.5 10 10.5x 10 7 D is cou nt ed oil rev en ue s, $ reactive open-loop1 month 1 year 2 years 4 years
Hypothesis: recovery can be significantly increased by
changing reservoir management from a ‘batch-type’ to a near-continuous model-based controlled activity
Link with short-term optimization
Data assimilation
algorithms
Noise Input System Output Noise (reservoir, wells & facilities) Optimization algorithms Sensors System models
Predicted output Measured output
Controllable input
Geology, seismics, well logs, well tests, fluid properties, etc.
• Life-cycle optimization attractive for reservoir engineers
• Not so attractive for production engineers:
• Decreased short term production
• Erratic behavior of optimal operational strategy
+8%
Net Present Value - No Discounting
time [year] R eve n u es [ M $ ] Reactive Control Optimal Control -50%
short term horizon
Reactive control & optimal control
injector 1 time [year] flow rate [bb l/d] injector 2 time [year] flow rate [bb l/d] injector 3 time [year] flow rate [bb l/d] injector 4 time [year] flow rate [bb l/d] injector 5 time [year] flow rate [bb l/d] injector 6 time [year] flow rate [bb l/d] injector 7 time [year] flow rate [bb l/d] injector 8 time [year] flow rate [bb l/d] producer 1 time [year] flow rate [bb l/d] producer 2 time [year] flow rate [bb l/d] producer 3 time [year] flow rate [bb l/d] producer 4 time [year] flow rate [bb l/d]
Hierarchical optimization
• Optimize objectives sequentially
• Optimal first objective constrains second optimization
• Only possible if there are redundant degrees of freedom in
Hierarchical optimization
• Order objectives in relative importance
• Optimize objectives sequentially
• Optimal first objective constrains second optimization
• Only possible if there are redundant degrees of freedom in
input parameters after meeting primary objective
• Second optimization is performed in null space of control
variables (directions in which
dJ/du
remains constant)• Null space defined by Hessian
d
2J/du
2• Small deviations from optimal first objective should be
Hierarchical optimization: example
•Same model as before
•Rates in 8 injectors optimized
•Primary objective:
life-cycle monetary value
•Secondary objective:
strongly discounted monetary value (25%) to emphasize
short term production value
•Hessian approximated by adjoint (first-order derivatives)
in combination with finite differences
•Alternatives: approximate Hessian with LBFGS or switching
between two objectives
Van Essen et al., 2006
Hierarchical optimization: results
50 100 150 200 24 25 26 27 28 29 30 31 32 Iterations N et P re se n t V a lu e - D isc o u n te d [M $ ]Secondary Objective Function
50 100 150 200 40 41 42 43 44 45 46 47 48 Iterations N et P re se n t V a lu e - U n d isc o u n te d [M $ ]
Primary Objective Function
Optimization of secondary objective function - constrained to null-space
of primary objective 20 40 60 80 100 24 25 26 27 28 29 30 31 32 Iterations N et P re se n t V a lu e - D isc o u n te d [M $ ]
Secondary Objective Function
20 40 60 80 100 40 41 42 43 44 45 46 47 48 Iterations N et P re se n t V a lu e - U n d isc o u n te d [M $ ]
Primary Objective Function
Optimization of secondary objective function - unconstrained +28.2% -0.3% +28.2% -5.0%
Hierarchical optimization: results
0 900 1800 2700 3600 0 5 10 15 20 25 30 35 40 45 50 time [days] NP V ov er T im e - U ndi sc ount ed [10 6 $] ~ ~value of objective function J
1 resulting from u * . value of objective function J
1 resulting from u * value of objective function J
1 resulting from u Time (d) Monetary value (M$) 0 3600 0 30 900 1800 2700 15
life cycle optimization
unconstrained optimization
hierarchical optimization
Subsurface flow controllability
Data assimilation
algorithms
Noise Input System Output Noise (reservoir, wells & facilities) Optimization algorithms Sensors System models
Predicted output Measured output
Controllable input
Geology, seismics, well logs, well tests, fluid properties, etc.
System-theoretical concepts
• Controllability of a dynamic system is the ability to
influence the states through manipulation of the inputs.
• Observability of a dynamic system is the ability to
determine the states through observation of the outputs.
• Identifiability of a dynamic system is the ability to
determine the parameters from the input-output behavior.
• Well-defined theory for linear systems. More difficult for
nonlinear ones. System model state (p,S) parameters (k,,…) output (pwf ,qw ,qo) input (pwf ,qt)
System-theoretical concepts
• Controllability of a dynamic system is the ability to
influence the states through manipulation of the inputs.
• Observability of a dynamic system is the ability to
determine the states through observation of the outputs.
• Identifiability of a dynamic system is the ability to
determine the parameters from the input-output behavior.
• Want to know more?
Attend MS14 Today, 9:30 AM - 11:30 AM Grand Ballroom A
System model state (p,S) parameters (k,,…) output (pwf ,qw ,qo) input (pwf ,qt)
48
SIAM CSE 2013
System theory – main findings so far
• Controllablity, observability and identifiability are very
limited
• Reservoir dynamics ‘lives’ in a state space of a much
smaller dimension than the number of model grid blocks
• Linear case (pressures only): typical number of relevant
pressure states: 2 x # of wells
• For fixed wells: the (few) identifiable parameter patterns
correspond just to the (few) controllable state patterns
• Scope for reduced-order modeling to speed up iterative
optimization, history matching, upscaling?
• First attempts: POD – disappointing speed-ups • Successful: TPWL (Durlofsky et al.)
System theory – main findings so far
• Controllablity, observability and identifiability are very
limited
• Reservoir dynamics ‘lives’ in a state space of a much
smaller dimension than the number of model grid blocks
• Linear case (pressures only): typical number of relevant
pressure states: 2 x # of wells
• For fixed wells: the (few) identifiable parameter patterns
correspond just to the (few) controllable state patterns
System theory – main findings so far
System theory – main findings so far
• Interpreting the ‘history matched’ results requires
geological insight
• Understanding optimization results also requires
geological insight
• Well location-optimization requires a geological model
• However, we need to focus on the relevant geology:
Which geological features are identifiable?
Which geological features influence controllability?
Conclusions, questions, more work
• Size of the prize still unclear (open- and closed-loop)
• Adjoint based-optimization techniques work well;
constraints, regularization, efficiency still to be improved
• Specific optimization methods less important than
workflow & human interpretation of results
• Field acceptance of closed-loop approach will require
combination with short-term production optimization
• Reservoir dynamics lives in low-order space. Wide scope
for reduced-order, control-relevant modeling
• Control-relevant geology – how do we define it?
• Current focus:
• Expansion to EOR (thermal, compositional, chemical flooding)
Acknowledgments
• Collaborators:
Okko Bosgra†
Arnold Heemink Paul Van den Hof
and many other colleagues and students of
• TU Delft – Department of Geoscience and Engineering • TU Delft – Delft Center for Systems and Control
• TU Delft – Delft Institute for Applied Mathematics • TU Eindhoven – Department of Electrical Engineering • TNO – Built Environment and Geosciences