Presentation is loading. Please wait.

Presentation is loading. Please wait.

Example application – Finite Volume Discretization Numerical Methods for PDEs Spring 2007 Jim E. Jones.

Similar presentations


Presentation on theme: "Example application – Finite Volume Discretization Numerical Methods for PDEs Spring 2007 Jim E. Jones."— Presentation transcript:

1 Example application – Finite Volume Discretization Numerical Methods for PDEs Spring 2007 Jim E. Jones

2 Flow in porous media Darcy’s Law: experimentally derived law relating flow velocity to pressure drop Conservation Law: Net flow is balanced by source/sinks

3 Putting together yields pressure equation If K is constant Can solve like programming assignment #1 Use finite difference discretization Solve linear system using Gauss-Seidel Solving the pressure equation for porous media flow

4 Finite Volume discretization: an alternative to finite differences Construct a dual grid by cutting each grid line. h

5 Finite Volume discretization: an alternative to finite differences h Construct a dual grid by cutting each grid line.

6 Finite Volume discretization equations p i,j p i-1,j Each unknown lies at the center of a cell on the dual grid.

7 Finite Volume discretization equations p i,j p i-1,j Get an equation for i,j by integrating the PDE over the volume V i,j

8 Divergence Theorem V  S The volume integral of the divergence of a vector field is equal to the surface integral of its component in the normal direction

9 Finite Volume discretization equations p i,j p i-1,j Apply divergence theorem. V i,j

10 Finite Volume discretization equations p i,j p i-1,j V i,j 

11 Finite Volume discretization equations p i,j p i-1,j V i,j  Length of boundary = h

12 Finite Volume discretization equations p i,j p i-1,j V i,j 

13 Finite Volume discretization equations p i,j p i-1,j V i,j

14 Finite Volume discretization equations p i,j p i-1,j Get an equation for i,j by integrating the PDE over the volume V i,j

15 Finite Volume discretization equations p i,j p i-1,j Get an equation for i,j by integrating the PDE over the volume V i,j Integrating source term over the volume

16 Quick Check: what if K=1? Same as finite differences for

17 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 How do we define K West at the interface?

18 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 How do we define K West at the interface? Lets make the normal component of velocity continuous across the interface.

19 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 pipi p West p i-1

20 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 pipi p West p i-1 Equate V left and V right and solve for p West

21 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 pipi p West p i-1

22 If K’s constant, get matrix from assignment #1, otherwise … KiKi K i-1 pipi p West p i-1 The effective diffusion coefficient is the harmonic average of the 2.

23 Programming Assignment #3 Will be like assignment #1, except –The diffusion coefficient will vary and the discretization will be done by finite volume method –We’ll replace the Gauss-Seidel solver for the linear system with something more effective To get a head start, modify your code (or mine) from assignment #1 to solve the PDE …

24 Use finite volumes and Gauss-Seidel. Solving the pressure equation for porous media flow Keep problem size as input. I’m showing a small problem for illustration.

25 Use finite volumes and Gauss-Seidel. Solving the pressure equation for porous media flow

26 Assume that K is defined by a function on x & y Solving the pressure equation for porous media flow

27 Use the K value at volume centers in defining the finite volume equations Solving the pressure equation for porous media flow

28 Upcoming Schedule March M W 12 14 19 21 24 28 April M W 2 4 9 11 16 18 23 25 Programming assignment #3 due March 21 Take home portion of exam handed out March 28 Take home due and in class exam April 2 Programming assignment #4 due April 9 Final Project presentations April 23 & 25


Download ppt "Example application – Finite Volume Discretization Numerical Methods for PDEs Spring 2007 Jim E. Jones."

Similar presentations


Ads by Google