• Keine Ergebnisse gefunden

Numerical Simulation of Transport Processes in Porous Media

N/A
N/A
Protected

Academic year: 2021

Aktie "Numerical Simulation of Transport Processes in Porous Media"

Copied!
28
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Numerical Simulation of Transport Processes in Porous Media

Finite-Volume Methods

Olaf Ippisch

Interdisziplin¨ ares Zentrum f¨ ur Wissenschaftliches Rechnen Universit¨ at Heidelberg

Im Neuenheimer Feld 368 D-69120 Heidelberg Telefon: 06221/54-8252

E-Mail: olaf.ippisch@iwr.uni-heidelberg.de

November 3, 2009

(2)

Cell-Centred Finite-Volume Method

We want to discretise the steady-state ground-water equation

∇ · ~ J w (~ x) + r w (~ x) = 0 with

J w = −K s (~ x )∇p w

with the Cell-Centred Finite-Volume method.

(3)

Divide Domain into Grid Cells

First we divide grid into rectangular grid cells g ij

x0,0 x4,0

x4,0.5

N=5

x1,0 x2,0 x3,0 x0,1

x0,2 x0,3 x0,4

x3.5,1 x4.5,1

x4,1.5

(4)

Transformation of Volume Integral into Boundary Integral

We demand that the integral of the partial differential equation over each grid cell is fulfilled:

Z

g

ij

∇ · ~ J w dx dy = Z

g

ij

r(~ x) dx dy

and use the Satz of Gauss to transform the volume integral over the divergence of the flux into a boundary integral over the flux normal to the boundary:

|{z}

Satz of Gauss

Z

∂g

ij

~ J w · ~ n ds = Z

g

ij

r (~ x) dx dy

(5)

Inner Grid Cell

(

−10

)

(

01

) (

10

)

(

−10

)

(i,j−1) (i,j)

(i−1,j) (i−0.5,j) (i+0.5,j) (i+1,j)

(i,j+0.5)

(i,j−0.5)

i+0.5,j

F (i,j+1)

(6)

Finite Volume Discretisation: Split into Sum over Faces

For our rectangular cell, we can split the integral over the boundary of the cell into integrals over each face

Z

∂g

ij

~ J w · ~ n ds = X

k=i±0.5

Z

F

kj

~ J w · ~ n ds + X

l=j±0.5

Z

F

il

~ J w · ~ n ds

and approximate the integral over each face with the Midpoint rule

|{z}

Midpointrule

X

k =i±0.5

~ J w (~ x k,j ) · ~ n · h

|{z}

Face Area

+ X

l=j±0.5

~ J w (~ x i,l ) · ~ n · h

|{z}

Face Area

If the permeability is a diagonal matrix the flux over a face depends only on the

gradient in the normal direction

(7)

Finite Volume Discretisation: Insert Flux law

The multiplication with the (normalised) normal vector only influences the sign of the flux integral

X

k=i±0.5

~ J w (~ x k,j ) · ~ n · h + X

l=j±0.5

~ J w (~ x i,l ) · ~ n · h =

−K xx (~ x i−0.5,j ) · ∂p

∂x (~ x i−0.5,j ) · (−1)

| {z }

from n

x

·h

−K xx (~ x i+0.5,j ) · ∂p

∂x (~ x i+0.5,j ) · (1)

|{z}

from n

x

·h

−K yy (~ x i,j−0.5 ) · ∂p

∂x (~ x i,j−0.5 ) · (−1)

| {z }

from n

y

·h

−K yy (~ x i,j+0.5 ) · ∂p

∂x (~ x i,j+0.5 ) · (1)

|{z}

from n

y

·h

(8)

Finite Volume Discretisation: Approximate Derivatives

The gradient at the face midpoint is approximated by a central difference quotient

|{z}

approx.Derivative

+K xx (~ x i−0.5,j ) · p(~ x i,j ) − p(~ x i−1,j )

h · h

−K xx (~ x i+0.5,j ) · p(~ x i+1,j ) − p(~ x i,j )

h · h

+K yy (~ x i,j−0.5 ) · p(~ x i,j ) − p(~ x i,j−1 )

h · h

−K yy (~ x i,j+0.5 ) · p(~ x i,j+1 ) − p(~ x i,j )

h · h

(9)

Finite Volume Discretisation: Approximate Derivatives

The integration of the source/sink term is also done with the midpoint rule:

Z

g

ij

r (~ x)dx dy ≈ h 2 r (~ x i,j )

(10)

Matrix Contribution of each Grid Cell

We get one line of a linear equation system for each grid cell:

−K

xx

(~ x

i−0.5,j

) · p

i−1,j

− K

xx

(~ x

i+0.5,j

) · p

i+1,j

−K

yy

(~ x

i,j−0.5

) · p

i,j−1

− K

yy

(~ x

i,j+0.5

) · p

i,j+1

+ [K

xx

(~ x

i−0.5,j

) + K

xx

(~ x

i+0.5,j

) + K

yy

(~ x

i,j−0.5

) + K

yy

(~ x

i,j+0.5

)] · p

i,j

= h

2

r(~ x

i,j

)

(11)

Dirichlet Boundary Conditions

Let us assume that at x = 0 there is a Dirichlet boundary:

h/2 x0,j

h

The derivative between the face midpoint and the element midpoint can be approximated by a difference quotient (only first order):

∂p

∂x (~ x −0.5,j ) ≈ p(~ x 0,j ) − p d (0, y j )

h/2

(12)

Matrix Contribution at Dirichlet Boundary x = 0

The constant term −K xx (~ x i−0.5,j ) · p d (0, y j ) is brought to the right-hand side of the equation:

−K

xx

(~ x

i+0.5,j

) · p

i+1,j

−K

yy

(~ x

i,j−0.5

) · p

i,j−1

− K

yy

(~ x

i,j+0.5

) · p

i,j+1

+ [2K

xx

(~ x

i−0.5,j

) + K

xx

(~ x

i+0.5,j

)

+K

yy

(~ x

i,j−0.5

) + K

yy

(~ x

i,j+0.5

)] · p

i,j

= h

2

r(~ x

i,j

) + 2K

xx

(~ x

i−0.5,j

) · p

d

(0, y

j

)

(13)

Neumann Boundary Conditions

To integrate Neumann boundary conditions we go back to the point before the integration of the face fluxes with the midpoint rule. For each face we had to determine

Z

F

~ J w · ~ n ds

At a Neumann boundary ~ J w · ~ n is given directly by the boundary condition φ n (~ x ), we can therefore use

Z

F

kl

~ J w · ~ n ds ≈

|{z}

Midpointrule

h · φ ~ N (~ x ) · ~ n

at each Neumann boundary.

(14)

Matrix Contribution at Neumann Boundary x = 0

We transfer the constant term h · φ N (~ x −0.5,j ) to the right hand side:

−K

xx

(~ x

i+0.5,j

) · p

i+1,j

−K

yy

(~ x

i,j−0.5

) · p

i,j−1

− K

yy

(~ x

i,j+0.5

) · p

i,j+1

+ [K

xx

(~ x

i+0.5,j

) + K

yy

(~ x

i,j−0.5

) + K

yy

(~ x

i,j+0.5

)] · p

i,j

= h

2

r(~ x

i,j

) − h · φ

N

(~ x

−0.5,j

)

(15)

Different Grid Spacing in x and y direction

If the grid spacing in x and y direction is different, the h factors do not clear:

− h

y

h

x

(K

xx

(~ x

i−0.5,j

) · p

i−1,j

− K

xx

(~ x

i+0.5,j

) · p

i+1,j

)

− h

x

h

y

(K

yy

(~ x

i,j−0.5

) · p

i,j−1

− K

yy

(~ x

i,j+0.5

) · p

i,j+1

) +

» h

y

h

x

(K

xx

(~ x

i−0.5,j

) + K

xx

(~ x

i+0.5,j

)) + h

x

h

y

(K

yy

(~ x

i,j−0.5

) + K

yy

(~ x

i,j+0.5

)) –

· p

i,j

= h

x

h

y

r(~ x

i,j

)

(16)

Example: 3 × 3 Grid

Let us perform a Finite-Volume discretisation of the stead-state groundwater equation on a 3 × 3 grid with a homogeneous permeability field and Dirichlet boundary condition on the north and south side and no-flux boundary conditions at the left and right:

3 5

6 7 8

noflux 4 noflux

dirichlet north

K (~ x ) =

K 0

0 K

(17)

Example: 3 × 3 Grid

0 1 2

3 5

6 7 8

noflux

4

noflux

dirichlet north

dirichlet south

The resulting linear equation system is:

0 B B B B B B B B B B

@

4K −K 0 −K 0 0 0 0 0

−K 5K −K 0 −K 0 0 0 0

0 −K 4K 0 0 −K 0 0 0

−K 0 0 3K −K 0 −K 0 0

0 −K 0 −K 4K −K 0 −K 0

0 0 −K 0 −K 3K 0 0 −K

0 0 0 −K 0 0 4K −K 0

0 0 0 0 −K 0 −K 5K −K

0 0 0 0 0 −K 0 −K 4K

1 C C C C C C C C C C A

0 B B B B B B B B B B

@ p

0

p

1

p

2

p

3

p

4

p

5

p

6

p

7

p

8

1 C C C C C C C C C C A

= 0 B B B B B B B B B B B

@

2Kp

dsouth

2Kp

dsouth

2Kp

dsouth

0 0 0 2Kp

dnorth

2Kp

dnorth

2Kp

d

north

1

C

C

C

C

C

C

C

C

C

C

C

A

(18)

Effective Permeability

We assume that the permeability is a diagonal Tensor, which is depending on the position, but constant on each grid cell g ij .

We need to evaluate K at the cell boundaries x i±0.5,j±0.5 .

What is the correct value of K if it is not homogeneous but element-wise constant?

(19)

1D-Example

The steady-state groundwater flow equation is:

dJ w

dx = 0 in Ω = (0, `

|{z}

length

)

J w = −K (x) dp dx

p

0

K(x)

p

l

with the Dirichlet boundary conditions p(0) = p 0

p(`) = p `

because of dJ dx

w

= 0 in Ω ⇔ J w (x) = J 0 ∈ R this means

J 0 = −K (x) dp dx ⇔ dp

dx = − J 0

K (x)

(20)

1D-Example

By integration of both sides over the domain dp

dx = − J 0 K (x)

`

Z

0

dp

dx dx = [p(x)] ` 0 = p ` − p 0 = −J 0

`

Z

0

1 K (x) dx

we get the flux depending on the boundary conditions and the permeability distribution:

⇔ J 0 = − `

`

R 1 dx

· p ` − p 0

`

| {z }

(21)

1D-Example, cell-wise constant Permeability

If we divide the domain into two halves with constant permeability if K (x) =

K l x ≤ 2 ` K r x > ` 2

K r

0 l

K l

we can perform the integration and get the effective permeability

K eff = `

`

R

0 1 K(x ) dx

= `

` 2

1 K

l

+ ` 2 K 1

r

= 2

1 K

l

+ K 1

r

We therefore choose for cell-wise constant permeabilities the harmonic mean K (~ x i±0.5,j ) = 2

1

K(~ x

i,j

) + K(~ x 1

i±1,j

)

(22)

Finite-Volume Method for tensor-product Grids

− 2h

yj

K

xx

(~ x

i−0.5,j

) h

xi−1

+ h

xi

· p

i−1,j

− 2h

yj

K

xx

(~ x

i+0.5,j

) h

xi

+ h

xi+1

· p

i+1,j

− 2h

xi

K

yy

(~ x

i,j−0.5

) h

yj−1

+ h

yj

· p

i,j−1

− 2h

xi

K

yy

(~ x

i,j+0.5

) h

yj

+ h

yj+1

· p

i,j+1

+

» 2h

yj

K

xx

(~ x

i−0.5,j

)

+ 2h

yj

K

xx

(~ x

i+0.5,j

)

(23)

Complexer Grids with Cell-Centred Finite Volumes

With the Cell-Centred Finite Volume Method it is also possible to use some kind of unstructured grids:

Nested Grids

I M J K A B

γ

x

Voronoi Grids

A B

C

D

E F G

x i

x k

C i

(24)

Summary Cell-Centred Finite-Volume Method

• Only the integral of the partial differential equation over each grid cell must fullfill the equation.

• Implementation of Dirichlet Boundary and Neumann Boundary conditions straight forward

• Structured and unstructured grids possible

• Dirichlet boundary conditions can easily be integrated by rearranging the equation systems and bringing them to the right side of the equation.

• Neumann boundary conditions can easily be integrated in the flux integrals

• Convergence order can differ dependent on the concrete method.

(25)

Properties of the Cell-Centred Finite-Volume Method

• Advantages:

• well suited for structured grids

• locally mass conservative

• good approximation of average permeability

• limited variety of unstructured grids possible

• limited local adaptivity possible

• cheap for simple problems

• Problems:

• Only linear convergence rate on non-equidistant grids

• grid generation can be complicated (must fulfil rather strong conditions)

(26)

The Vertex-Centred Finite-Volume Method

vi

vj bi

bj

• The unknowns are located at the edges of the elements (vertices)

• Base functions are used on each element, which are parameterised with the values at the vertices

• A secondary mesh is constructed connecting the face centres and the

barycenter of the element

(27)

The Vertex-Centred Finite-Volume Method (2)

vj vi

bik xikf γikf

nikf

xijk nijk γijk

element ek

vi vj

bki bjk

element ek xijk

nijk γijk

γjkf xjkf

njkf

• Material properties are assumed to be constant for each element

• The volume integrals are calculated as a sum over the subcontrol-volumes using the midpoint rule and the material properties valid for the specific control-volume. P

i

b i k · r i k

• The face integrals are calculated as a sum over all subcontrol-volume faces with the midpoint rule P

ij

γ ij k ~ J ij k ~ n k ij

• The gradient at the face centres is given by the base functions.

(28)

Properties of the Vertex-Centred Finite-Volume Method

• Advantages:

• can be used for domains with complicated shape

• well suited for unstructured grids

• local adaptivity possible

• locally mass conservative

• Problems:

• grid generation can be complicated (must often fullfill certain conditions)

• more computationally expensive for simple problems

• bad approximation of average permeability

Referenzen

ÄHNLICHE DOKUMENTE

[r]

[r]

The goal is to ex- press the matrix current given by Eq.(4) in terms of isotropic quasiclassical Green’s functions ˇ G 1(2) at both sides of the contact and

Yet, in order to derive hydrodynamic boundary conditions, the coarse graining must be taken with respect to the bath particle size a only, while the tracer size is required to satisfy

Hence in the first step, for a given number of mesh points, assign- ment order, and real space cutoff, we select the Ewald splitting parameter α and the regularization parameter

Abstract—The efficient computation of interactions in charged particle systems is possible based on the well known Ewald summation formulas and the fast Fourier transform for

We investigate sectoriality and maximal regularity in L p -L q - Sobolev spaces for the structurally damped plate equation with Dirichlet- Neumann (clamped) boundary conditions1.

Interaction potentials at constant temperature Tc- T = 220 mK and different lateral positions D.x = x - xo relative to the substrate (with xo a reference position at the