adaptive methods for multi-phase flow: grid-adaptivity · 0.15 10¡13m2 500 pa 2 dirichlet bc: sw =...

34
Adaptive methods for multi-phase flow: Grid-adaptivity Benjamin Faigle, I. Aavatsmark, B. Flemisch, R. Helmig

Upload: others

Post on 11-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

Adaptive methods for multi-phase flow:Grid-adaptivity

Benjamin Faigle,I. Aavatsmark, B. Flemisch, R. Helmig

Page 2: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

2

Department of Hydromechanics and Modeling of Hydrosystems

Page 3: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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)

Page 4: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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?

Page 5: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 6: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 7: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 8: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 9: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 10: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 11: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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.

Page 12: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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)

Page 13: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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 = : : :

Page 14: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 15: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 16: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

16

Department of Hydromechanics and Modeling of Hydrosystems

Fluxes with Mpfa

Results after 5 years of injection

reference

Page 17: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 18: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

18

Department of Hydromechanics and Modeling of Hydrosystems

Saturation at the end of the injection period (2 years):

Page 19: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

19

Department of Hydromechanics and Modeling of Hydrosystems

Saturation at the end of the post-injection period (5 years):

Page 20: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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”?

Page 21: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

21

Department of Hydromechanics and Modeling of Hydrosystems

Accurate result with second half edge!

Page 22: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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??

Page 23: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 24: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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.

Page 25: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 26: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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.

Page 27: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

27

Department of Hydromechanics and Modeling of Hydrosystems

Page 28: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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·+ ";

Page 29: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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·=X

®

%®S®X·®

S® ; X·®; pc

Page 30: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 31: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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:

Page 32: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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

Page 33: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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·+ "

Page 34: Adaptive methods for multi-phase flow: Grid-adaptivity · 0.15 10¡13m2 500 Pa 2 Dirichlet BC: Sw = 1 pn = 2:5e7Pa +%gz. 10 ... Write everything into a large equation system of form

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)