Numerical Simulations of CO 2 Geo-Sequestration using PETSc Henrik B¨ using Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University June 30th, 2016
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Overview Two-phase flow in porous media Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 2
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Representative elementary volume (REV) averaging microscale REV rock matrix liquid phase gas phase Porosity: φ = V pores V α V total , Saturation of phase α : S α = V pores , µ Absolute permeability: K = k f ρ g . H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 3
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Initial-Boundary-Value problem p w - S n -formulation ∂ ( φρ w (1 − S n )) k rw ( S n ) � � + div ρ w K ( ∇ p w − ρ w g ) = ρ w q w ∂ t µ w ∂ ( φρ n S n ) k rn ( S n ) � � + div ρ n K ( ∇ p w + ∇ p c ( S n ) − ρ n g ) = ρ n q n ∂ t µ n Initial conditions S n ( x , 0) = S n 0 ( x ) , p w ( x , 0) = p w 0 ( x ) x ∈ Ω Boundary conditions p w ( x , t ) = g Dw ( x , t ) on Γ Dw ρ w v w · n = g Nw ( x , t ) on Γ Nw S n ( x , t ) = g Dn ( x , t ) on Γ Dn ρ n v n · n = g Nn ( x , t ) on Γ Nn H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 4
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Nonlinearities 5 10 x 10 1 Brooks−Corey Brooks−Corey, k van Genuchten 0.9 9 rw Brooks−Corey, k rn 0.8 8 van Genuchten k rw relative permeability k r [−] capillary pressure p c [Pa] 0.7 van Genuchten k rn 7 0.6 6 0.5 5 0.4 4 0.3 3 0.2 2 0.1 1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 water saturation S w [−] water saturation S w [−] Brooks-Corey van Genuchten ) m � 2 2+3 λ √ � 1 − (1 − S 1 / m k rw = S λ k rw = S e e e � � 2+ λ � 2 m k rn = (1 − S e ) 2 � 1 1 − S λ 1 e k rn = (1 − S e ) 1 − S m 3 e p c = p d S − 1 /λ p c = 1 e α ( S − 1 / m − 1) 1 / n e S w − S wr Effective saturation: S e = 1 − S wr − S nr , 0 ≤ S e ≤ 1 H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 5
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Numerical method ∂ ( φρ α S α ) k r α � � + div K ( ∇ p α − ρ α g ) = ρ α q α α ∈ { w , n } ρ α ∂ t µ α ◮ First step: Semidiscretization in space with two-point flux approximation. Leads to a system of ordinary differential equations. ◮ Second step: Time-Integration with implicit Euler method. Leads to a system of nonlinear algebraic equations (remember relative permeabilities and capillary pressure). p w F 1 and F = F ( u ) = 0 with u = S n F 2 Linearize this nonlinear system of equations with Newton’s method. H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 6
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Numerical method φ ( ρ α S α ) n +1 − ( ρ α S α ) n � i i V i ∆ t α � n +1 � n +1 � � p w , j − p w , i k r α � � + ρ α K − ρ ij g ij A ij d i + d j µ α ij α j � q n +1 − α, i V i = 0 α Two-point flux approximation for two neighbouring grid cells i and j with distances d i and d j to the interface separating the two control volumes with area A ij . H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 7
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Newton’s method Transformation into linear system ∂ F ( u ) ∆ u = − F ( u ) ∂ u Jacobian J := ∂ F ( u ) and ∆ u := u j +1 − u j . Jacobian is of the form ∂ u ∂ F 1 ∂ F 1 ∂ p w ∂ S n J = ∂ F 2 ∂ F 2 ∂ p w ∂ S n Exact Jacobian computed by Automatic Differentiation (AD) using ADiMat , TAPENADE or TAF . Every quadrant has non-zero entries due to coupling of equations. H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 8
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Comparison of exact and approximate Jacobians J ij = ∂ F i ( u ) ≈ F i ( . . . , u j − 1 + ∆ u j , u j +1 , . . . ) − F i ( . . . , u j − 1 − ∆ u j , u j +1 , . . . ) ∂ u j 2∆ u j with u = ( p w , S n ) T = ( u 1 , u 2 , . . . , u N ) T and ∆ u j = δ · u j . Homogeneous case 20 # Newton iterations 15 10 Finite differences (FD) Automatic differentiation (AD) 5 1 10 20 30 40 50 60 70 80 90 Time step number Exact Jacobians save time: One vs. two evaluations. Newton iterations decrease. H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 9
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Comparison of exact and approximate Jacobians J ij = ∂ F i ( u ) ≈ F i ( . . . , u j − 1 + ∆ u j , u j +1 , . . . ) − F i ( . . . , u j − 1 − ∆ u j , u j +1 , . . . ) ∂ u j 2∆ u j with u = ( p w , S n ) T = ( u 1 , u 2 , . . . , u N ) T and ∆ u j = δ · u j . Heterogeneous case 20 Finite differences (FD) Automatic differentiation (AD) # Newton iterations 15 10 5 1 10 20 30 40 50 60 70 80 90 Time step number Exact Jacobians save time: One vs. two evaluations. Newton iterations decrease. H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 10
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Used preconditioners and iterative solvers Balay et al. (1997) Algebraic multigrid ◮ Hypre/BoomerAMG http://acts.nersc.gov/hypre/ ◮ Notay (2012)/AGMG http://homepages.ulb.ac.be/~ynotay/AGMG/ ◮ PETSc/GAMG http://www.mcs.anl.gov/petsc/ ◮ Trilinos/ML http://trilinos.sandia.gov/packages/ml/ Solvers Preconditioners ◮ MUMPS/LU ◮ Incomplete LU http://graal.ens-lyon.fr/MUMPS/ ◮ Hypre/Euclid ◮ BiCGStab ◮ Block-Jacobi ◮ GMRES ◮ FGMRES ◮ Geometric multigrid (2 and 3 level) H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 11
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Heterogeneous porosity and permeability Gaussian distribution for Porosity field. Permeability after Pape et al. (1999). Fractal model valid for Rotliegend sandstone of NE-German basin: K = 155 φ + 37315 φ 2 + 630(10 φ ) 10 . H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 12
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Performance of iterative solvers and preconditioners Homogeneous porous medium Heterogeneous porous medium −4 −4 10 10 MUMPS/LU MUMPS/LU Hypre/Euclid Hypre/Euclid −6 ILU0 −6 ILU0 10 10 ASM ASM log 10 (Residual) Trilinos/ML (W Cycle) log 10 (Residual) Trilinos/ML (W Cycle) −8 Trilinos/ML (V Cycle) −8 Trilinos/ML (V Cycle) 10 10 −10 −10 10 10 −12 −12 10 10 −14 −14 10 10 100 110 120 130 140 150 100 120 140 160 180 200 220 Time [%] Time [%] Homogeneous porous medium Heterogeneous porous medium −4 −4 10 10 MUMPS/LU BiCGStab+Hypre/Euclid −6 −6 Geometric MG (2 level) 10 10 Geometric MG (3 level) FGMRES+Hypre/Euclid log 10 (Residual) log 10 (Residual) −8 −8 GMRES+Hypre/Euclid 10 10 MUMPS/LU −10 −10 10 10 BiCGStab+Hypre/Euclid Geometric MG (2 level) Geometric MG (3 level) −12 −12 10 10 FGMRES+Hypre/Euclid GMRES+Hypre/Euclid −14 −14 10 10 90 95 100 105 110 115 120 125 130 100 110 120 130 140 Time [%] Time [%] Geometric multigrid best. Necessity for large-scale problems. H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 13
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine CO 2 injection into heterogeneous porous media. z-Extension [m] Day: x-Extension [m] z-Extension [m] Day: x-Extension [m] H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 14
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Convergence study � e i � EOC i +1 = log(2) − 1 | log Grid size: I 0 · J 0 · K 0 = (2 x · 6+1) · 2 · (2 x +1) | e i +1 x Nodes MUMPS/LU [s] ILU0 [s] GeoMG3 [s] EOC( p w ) 2 250 114 75 106 1.32 H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 15
Two-phase flow Numerical method and test example Two-phase two-component flow Properties of CO 2 and brine Convergence study � e i � EOC i +1 = log(2) − 1 | log Grid size: I 0 · J 0 · K 0 = (2 x · 6+1) · 2 · (2 x +1) | e i +1 x Nodes MUMPS/LU [s] ILU0 [s] GeoMG3 [s] EOC( p w ) 2 250 114 75 106 1.32 3 882 374 403 340 0.99 H. B¨ using Numerical Simulations of CO 2 Geo-Sequestration 16
Recommend
More recommend