adaptive methods for multi-phase flow: grid-adaptivity · 0.15 10¡13m2 500 pa 2 dirichlet bc: sw =...
TRANSCRIPT
Adaptive methods for multi-phase flow:Grid-adaptivity
Benjamin Faigle,I. Aavatsmark, B. Flemisch, R. Helmig
2
Department of Hydromechanics and Modeling of Hydrosystems
3
Department of Hydromechanics and Modeling of Hydrosystems
a) Efficiency reasons:– Most time spent for the solution of
the pressure equation• Grid resolution affects
assembling and solution time!
Why adaptive grids?
25,0%
45,1%
22,7%0,4% PE assemble
PE solveTransportMuPhy
Sinsbeck (2011)
4
Department of Hydromechanics and Modeling of Hydrosystems
b) Qualitative reasons:– Sequential: Solution not
converged but approximated: Pressure field should be as good as possible.
– The finer the grid, the less nummerical diffusion.
– Global refinement not always possible.
Why adaptive grids?
5
Department of Hydromechanics and Modeling of Hydrosystems
Numerical Scheme
Mass conservation:– For phases ® and components ·, for each component:
– Solution strategies:• Fully implicit• Sequential
– Summation yields one pressure equation.– Transport equation– -Flash calculations
v® = ¡¸®K(r p® ¡ %®g)
C·=X
®
%®S®X·®
X
®
@ÁS®%®X·®
@t+ r ¢
ÃX
®
X·®%®v® + J·®
!+X
®
X·®%®q
·= 0
6
Department of Hydromechanics and Modeling of Hydrosystems
Outline
• Introduction– Why using adaptive grids?
• Simulation on adaptive grids– How to adapt
• Representation of fluxes near refined cells
– Numerical Results
• Outlook
7
Department of Hydromechanics and Modeling of Hydrosystems
How to refine the grid?
Finite Volume context:– Refine with closure
» Problem:
» e.g. Johannsen: Cell 80m x 10m
– Refine with irregular edges Hanging node
8
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Tpfa
– Standard approach to approximate flux:
Use a Two-Point flux approximation
– Problem:
6=
r© ¼ ©j ¡ ©i¢x
9
Department of Hydromechanics and Modeling of Hydrosystems
Example Simulation 1
– 2 D, injection of CO2 into a rectangular domain filled with brine.
– Comparison of fully refined vs. adaptive grids.
– Compositional two-phase system.
– Material data:
Neumann BC:qn = ¡0:2 Mt/m yr.qw = free °ow
Porosity Permeability Entry Pressure BC-lambda0.15 10¡13m2 500 Pa 2
Dirichlet BC:Sw = 1pn = 2:5e7Pa +%gz
10
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Tpfa is inaccurate
– Standard approach to approximate flux:
Use a Two-Point flux approximation
– Problem:• Coloured cells expect flux to the left!
r© ¼ ©j ¡ ©i¢x
Height: ©w;i = pw;i + %w;igzi
11
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Mpfa
Multi-point flux approximation (Mpfa)a) Define an “interaction region”.
b) Introduce new points on interface.
12
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Mpfa
Multi-point flux approximation (Mpfa)a) Define an “interaction region”.
b) Introduce new points on interface.
c) Approximate flux with new points.
Area of left inter-action region
Value at cell center of cell i
Rotated vector connecting the points i,k
f°;i = ¡nT°KirUi Value on introduced point k
rUi =1
T
2X
k=1
ºk(u¤k ¡ u0)
13
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Mpfa
Multi-point flux approximation (Mpfa)a) Define an “interaction region”.
b) Introduce new points on interface.
c) Approximate flux with new points.
d) Approximate flux as seen from all cells.
f°;j = ¡n2TK31
T3º5(u
¤2 ¡ u3)
¡n2TK31
T3º6 (uj ¡ u3
+1
TiºT7 Rºi(u
¤1 ¡ ui)
+1
TiºT7 Rºj(u
¤2 ¡ ui)
¶
f°;i = : : :
14
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes: Mpfa
Multi-point flux approximation (Mpfa)a) Define an “interaction region”.
b) Introduce new points on interface.
c) Approximate flux with new points.
d) Approximate flux as seen from all cells.
e) Write everything into a large equationsystem of form
where T contains the „transmissibility coefficients“ (introduced points already eradicated), and u is the vector of unknown cell values
f = Tu
15
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes with Mpfa
Results: Flux error in horizontal direction
z ¡ Coordinate: ©w;i = pw;i + %w;igxi
16
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes with Mpfa
Results after 5 years of injection
reference
17
Department of Hydromechanics and Modeling of Hydrosystems
Example Simulation 2
More challenging example:– Tilted domain.
– No quadratic cells.
– Two periods• Injection phase: Pressure gradient drives flow.• Post-injection phase: Gravity drives flow.
Neumann BC:qn = ¡0:2 Mt/m yr.qw = free °ow
Dirichlet BC:Sw = 1pn = 2:5e7Pa +%gz
18
Department of Hydromechanics and Modeling of Hydrosystems
Saturation at the end of the injection period (2 years):
19
Department of Hydromechanics and Modeling of Hydrosystems
Saturation at the end of the post-injection period (5 years):
20
Department of Hydromechanics and Modeling of Hydrosystems
Fluxes with MPFA – Improvements
Flux through the edge:– Twice the flux of first half-edge of the interaction volume.
– Construct second interaction region:
• Strongly dependent onsurrounding cells.
• Expensive way to “search”the region.
• Is it “worth the effort”?
21
Department of Hydromechanics and Modeling of Hydrosystems
Accurate result with second half edge!
22
Department of Hydromechanics and Modeling of Hydrosystems
Mpfa – Programming Obstacles
Larger stencil: More inteaction– Many iterators used to
come from intersection to all 3 neighbours and point connecting point.
Per sub-face required:– 3 neighbour elements
– Point in the middle
– All surrounding Elements??
23
Department of Hydromechanics and Modeling of Hydrosystems
Summary
Mpfa on adaptive grids “does not look so bad”!
With adaptive grids simulation can be fast and still accurate:– Tpfa on static, fine grid: 75s
– Tpfa (3 levels): 16s
– Mpfa (3 levels) 16.3s
– Mpfa ('', 2 half-edges) 16.9s
24
Department of Hydromechanics and Modeling of Hydrosystems
Future work
– Investigate Refinement Indicators• Application of several indicators.• Dependence of refinement criteria on solution scheme.• Influence of Refinement on the solution.
25
Department of Hydromechanics and Modeling of Hydrosystems
Future work
– Investigate Refinement Indicators• Application of several indicators.• Dependence of refinement criteria on solution scheme.• Influence of Refinement on the solution.
– Extension to three dimensions.
– Applications
26
Department of Hydromechanics and Modeling of Hydrosystems
Thank you
for your attention!
ReferencesI. Aavatsmark et. Al (2008): A compact multipoint flux approximation method with improved robustness.
Numerical Methods for Partial Differential Equations, 24:1329-1360, 2008.
J. Fritz et. al (2010): Multiphysics Modeling of Advection - Dominated Two - Phase Compositional Flow in Porous Media. International Journal of Numerical Analysis & Modeling. (accepted)
BGR (2010): Projekt CO2 - Drucksimulation, final report of Federal Institute of Geosciences and Natural Resources.
27
Department of Hydromechanics and Modeling of Hydrosystems
28
Department of Hydromechanics and Modeling of Hydrosystems
Implicit Pressure
Volume balance:
– If we use non-wetting pressure as primary variable
watergas
+ =water
gas
vw = ¡¸wK(r pn ¡r pc ¡ %wg);
vn = ¡¸nK(r pn ¡ %ng);
Acs et. al (1985)
Transport Estimate
Pressure Equation
Transport Step
Flash Calculation
Upate, Output
Volumederivatives
Formulation
ctotal@p
@t+X
·
@vtotal@C·
r ¢ÃX
®
X·®%®v®
!=X
·
@vtotal@C·
q·+ ";
29
Department of Hydromechanics and Modeling of Hydrosystems
Solution Scheme: Sequential
Initialization
Transport Estimate
Pressure Equation
Transport Step
Flash Calculation
Upate, Output
End
Time-step
Volumederivatives @vtotal
@C·estimate
C·estimate
C·
C·=X
®
%®S®X·®
S® ; X·®; pc
30
Department of Hydromechanics and Modeling of Hydrosystems
Solution Procedure on Adaptive Grids
Initialization
Transport Estimate
Pressure Equation
Transport Step
Flash Calculation
Upate, Output
End
Time-step
Volumederivatives
Adaptive Module
Create Indicator → Criteria
Store solution
Flash calculation
Mark cells, adapt grid
Reconstruct solution
S®; X·®; pc
C·; p
31
Department of Hydromechanics and Modeling of Hydrosystems
Implicit Pressure
Discretized (multi-phase):
Formulation
Vict;ipti ¡ pt¡¢ti
¢t
¡X
°ij
A°ijn°ij ¢KX
®
%®¸®X
·
@vt@C·
X·®
µpt®;j ¡ pt®;i
¢x+ %®g(zj ¡ zi)
¶
+ViX
°ij
A°ijUi
KX
®
%®¸®X
·
@vt;j@C·
j¡ @vt;i
@C·i
¢xX·®
µpt®;j ¡ pt®;i
¢x+ %®g(zj ¡ zi)
¶
= ViX
·
@vt@C·
q·i + Vi®rvt ¡ Á
¢t:
32
Department of Hydromechanics and Modeling of Hydrosystems
Explicit Step
Transport Equation (explicit):
– Determines size of the time step.
Equilibrium (Flash-) Calculation
@C·
@t= ¡r ¢
ÃX
®
X·®%®v®
!+ q·;
Transport Estimate
Pressure Equation
Transport Step
Flash Calculation
Upate, Output
Volumederivatives
Formulation
33
Department of Hydromechanics and Modeling of Hydrosystems
Derivation of the Pressure Equation
– Volume contraint:
– Taylor expansion in time:
– Reordering:
vt = Á
vt (t) + ¢t@vt@t
+ O¡¢t2
¢= Á (t) + ¢t
@Á
@t+ O
¡¢t2
¢:
@vt@t
=@vt@p
@p
@t+X
·
@vt@C·
@C·
@t
@Á
@t=@Á
@p
@p
@t
µ@vt@p
¡ @Á
@p
¶@p
@t+X
·
@vt@C·
@C·
@t=Á¡ vt
¢t
ct@p
@t+X
·
@vt@C·
X
®
r ¢ (v®%®X·®) =
X
·
@vt@C·
q·+ "
34
Department of Hydromechanics and Modeling of Hydrosystems
Pressure Equation with MpfaAdaptive Grid
Victotalpti ¡ pt¡¢ti
¢t
¡X
°ij;irregular
X
®
%®¸®X
·
@vtotal@C·
X·®
0@0@t2ipt®;i +
X
j
t2jpt®;j
1A+ %®g
0@t2izi +
X
j
t2jzj
1A1A
¡X
°ij;regular
A°ijn°ij ¢KX
®
%®¸®X
·
@vtotal@C·
X·®
µpt®;j ¡ pt®;i
¢x+ %®g
zj ¡ zi¢x
¶
+ViX
°ij;irregular
X
®
%®¸®X
·
@vt;j@C·
j¡ @vt;i
@C·i
¢xX·®
0@0@t2ipt®;i +
X
j
t2jpt®;j
1A+ %®g
0@t2izi +
X
j
t2jzj
1A1A
+ViX
°ij;regular
A°ijUi
KX
®
%®¸®X
·
@vt;j@C·
j¡ @vt;i
@C·i
¢xX·®
µpt®;j ¡ pt®;i
¢x+ %®g
zj ¡ zi¢x
¶
= ViX
·
@vt@C·
q·i + Vi®rvt ¡ Á
¢t: (1)