An Iterative Solver for the Diffusion The Methods Progress So - - PowerPoint PPT Presentation

an iterative solver for the diffusion
SMART_READER_LITE
LIVE PREVIEW

An Iterative Solver for the Diffusion The Methods Progress So - - PowerPoint PPT Presentation

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement An Iterative Solver for the Diffusion The Methods Progress So Far... Equation Alan Davidson adavidso@cs.hmc.edu 25 April 2006 An Iterative Solver The


slide-1
SLIDE 1

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Iterative Solver for the Diffusion Equation

Alan Davidson

adavidso@cs.hmc.edu

25 April 2006

slide-2
SLIDE 2

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Diffusion/Heat Equation

ut = a + D · uxx

  • u is the concentration/temperature
  • a is a source/sink
  • D is a diffusion/thermal diffusivity constant
  • t is time, x is space
slide-3
SLIDE 3

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Hitch

  • For clinic, we needed arbitrary Dirichlet boundary

conditions through the middle

  • These BCs simply hold the concentration at a fixed

amount

  • Exact solution cannot be found easily
slide-4
SLIDE 4

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Solution!

  • Use an iterative solver
  • For clinic we actually used
  • The 3-D equation
  • The Gauss-Seidel method
  • The backwards Euler FDA
  • C++
  • I wanted to try
  • 1, 2, or 3 dimensions
  • Dirichlet, Neumann, and Cauchy BCs
  • The Jacobi or SSOR methods
  • The backwards Euler FDA
  • Sparse matrices in Matlab
slide-5
SLIDE 5

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

Iterative Methods

We want to solve A x =

  • b

but we don’t want to invert A (time constraints, etc). Divide up A so that A = D + L + U where

  • D is diagonal
  • L is lower triangular
  • U is upper triangular
slide-6
SLIDE 6

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Jacobi Method

Pick x(0) to be the initial guess at a solution. Now, define

  • x(i+1)

= D−1 · (−L − U) · x(i) + D−1 · b If

  • x(i+1) −

x(i) isn’t small enough, repeat.

slide-7
SLIDE 7

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Successive Over-Relaxation (SOR) Method

We will solve ωA x = ω b Noting that ωA = (D + ωL) + (ωU − (1 − ω)D), we now have that

  • x(i+1)

= (D + ωL)−1 ·

  • (−ωU + (1 − ω)D)

x(i) + ω b

  • The backwards version is
  • x(i+1)

= (D + ωU)−1 ·

  • (−ωL + (1 − ω)D)

x(i) + ω b

slide-8
SLIDE 8

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

The Symmetric Successive Over-Relaxation (SSOR) Method

We do one forwards SOR step followed by one backwards SOR step:

  • x(i+1/2)

= (D + ωL)−1 ·

  • (−ωU + (1 − ω)D)

x(i) + ω b

  • x(i+1)

= (D + ωU)−1 ·

  • (−ωL + (1 − ω)D)

x(i+1/2) + ω b

slide-9
SLIDE 9

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

Progress So Far...

Slower than I expected

  • 1-D case implemented for both Jacobi and SSOR

methods with any Dirichlet BCs

  • Neumann (and therefore Cauchy) BCs are not well

defined in arbitrary locations, especially in a 1-D case

  • Uses only sparse matrices
  • Checks for stability

Oddly enough, the Jacobi method seems to converge more quickly than the SSOR!?

slide-10
SLIDE 10

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-11
SLIDE 11

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-12
SLIDE 12

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-13
SLIDE 13

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-14
SLIDE 14

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-15
SLIDE 15

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-16
SLIDE 16

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

An Example Run...

slide-17
SLIDE 17

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

References Used

Saad, Yousef. Iterative Methods for Sparse Linear Systems SIAM, 2000. http://mathworld.wolfram.com

slide-18
SLIDE 18

An Iterative Solver for the Diffusion Equation Alan Davidson Problem Statement The Methods Progress So Far...

That’s All, Folks!

Questions?