Top Banner
Lecture 3
25

Lecture 3

Jan 01, 2016

Download

Documents

Mary Figueroa

Lecture 3. FD Methods. Domain of Influence (elliptic, parabolic, hyperbolic) Conservative formulation Complications: Mixed Derivatives Higher Dimensions (2+) Source Terms. FD: Domain of influence. Elliptic PDE Laplace equation. FD: Domain of influence. Parabolic PDE Heat equation. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 3

Lecture 3

Page 2: Lecture 3

FD Methods

Domain of Influence (elliptic, parabolic, hyperbolic)

Conservative formulation

Complications:

- Mixed Derivatives- Higher Dimensions (2+)- Source Terms

Page 3: Lecture 3

FD: Domain of influence

Elliptic PDE Laplace equation

0,U,U2

2

2

2

y)(xy

y)(xx

Hy

Wx

0

0

Page 4: Lecture 3

FD: Domain of influence

Parabolic PDE Heat equation

(t,x)x

k(t,x)t

UU2

2

)()0(

),(

)0( 0

xg,xU

uAtU

ut,U

A

Page 5: Lecture 3

FD: Domain of influence

Hyperbolic PDE Wave equation

(t,x)x

C(t,x)t

UU2

22

2

2

)()0(

)()0(

)0( 0

xg,xUt

xf,xU

ut,U

Page 6: Lecture 3

Mixed Derivatives

Central

Derivative

Stencil:

yx

),j(i),j(i

yx

),j(i),j(i(x,y)

yx

4

11U11U

4

11U11UU

2

Page 7: Lecture 3

PDE FormulationBurgers Equation:

Straightforward discretization (upwind):

Conservative Form:

Standard discretization (upwind):

0UUU

(t,x)x

(t,x)(t,x)t

(i,j))-(i,j(i,j)Δx

Δt(i,j) - ,j)(i U1UUU1U

0U2

1U 2

(t,x)x

(t,x)t

22 U1U2

U1U (i,j)-)(i,jΔx

Δt(i,j) - ,j)(i

Page 8: Lecture 3

Burgers Equation

Page 9: Lecture 3

Lax-Wendroff Theorem

For hyperbolic systems of conservation laws, schemes written in conservation form guarantee that if the scheme converges numerically, then it converges to the analytic solution of the original system of equations.

Lax equivalence:

Stable solutions converge to analytic solutions

Page 10: Lecture 3

Implicit and Explicit Methods

Explicit FD method:

U(i+1) is defined by U(i) knowing the values at time n, one can obtain

the corresponding values at time n+1

Implicit FD method:

U(i+1) is defined by solution

of system of equations at every

time step

Page 11: Lecture 3

Implicit and Explicit Methods

Crank-Nicolson for the Heat Equation

Page 12: Lecture 3

Implicit and Explicit Methods

+ Unconditionally Stable

+ Second Order Accurate in Time

- Complete system should be solved

at each time step

Crank-Nicolson method:

stable for larger time steps

Page 13: Lecture 3

First vs Second Order Accuracy

Local truncation error vs. grid resolution in x

Page 14: Lecture 3

Source Terms

Nonlinear Equation with source term S(U)

e.g. HD in curvilinear coordinates

1. Unsplit method

2. Fractional step (splitting method)

)U()U(U SFx

(t,x)t

Page 15: Lecture 3

Source Terms: unsplit method

One sided forward method:

- Lax-Friedrichs (linear + nonlinear)

- Leapfrog (linear)

- Lax-Wendroff (linear+nonlinear)

- Beam-Warming (linear)

)U(

)U()1F(UU1U

(i,j)ΔtS

(i,j)-F)(i,jΔx

Δt(i,j) - ,j)(i

Page 16: Lecture 3

Source Terms: splitting method

Split inhomogeneous equation into two steps:

transport + sources

1) Solve PDE (transport)

2) Solve ODE (source)

0)U(U

Fx

(t,x)t

(i,j)(i,j) UU

)U(U S(t,x)t

,j)(i(i,j)(i,j) 1UUU

Page 17: Lecture 3

Multidimensional Problems

Nonlinear multidimensional PDE:

Dimensional splitting

x-sweep

y-sweep

z-sweep

source term: splitting method

)U()U()U()U(U SHz

Gy

Fx

(t,x)t

Page 18: Lecture 3

Dimension Splittingx-sweep (PDE):

y-sweep (PDE):

z-sweep (PDE):

source (ODE):

0)U(U

Fx

(t,x)t

0)U(U **

Gy

(t,x)t

0)U(U ****

Hz

(t,x)t

)U(U ****** S(t,x)t

(i,j)(i,j) *UU

(i,j)(i,j) *** UU

(i,j)(i,j) ***** UU

,j)(i(i,j) 1UU ***

Page 19: Lecture 3

Dimension Splitting

Upwind method (forward difference)

)U(

)U()1(U

)U()1(U

)U()1(UU1U

(i,j)ΔtS

(i,j)-H)(i,jHΔz

Δt-

(i,j)-G)(i,jGΔy

Δt-

(i,j)-F)(i,jFΔx

Δt(i,j) - ,j)(i

Page 20: Lecture 3

Dimension Splitting

+ Speed

+ Numerical Stability

- Accuracy

Page 21: Lecture 3

Method of Lines

Conservation Equation:

Only spatial discretization:

Solution of the ODE (i=1..N)- Analytic?- Runge-Kutta

0)U(U

Fx

(t,x)t

)()(U jfjt

))(U())1(U(1

)( jFjFx

jf

Page 22: Lecture 3

Method of Lines

Multidimensional problem:

Lines:

Spatial discretazion:

)U()U()U(U SGy

Fx

(t,x)t

)),(U(),(),(),(U jiSjigjifjit

)),(U()),1(U(1

),( jiFjiFx

jif

)),(U())1,(U(1

),( jiGjiGy

jig

Page 23: Lecture 3

Method of Lines

Analytic solution in time: Numerical error only due to spatial discretization;

+ For some problems analytic solutions exist;

+ Nonlinear equations solved using stable scheme

(some nonlinear problems can not be solved using implicit method)

- Computationally extensive on high resolution grids;

Page 24: Lecture 3

Linear schemes

“It is not possible for a linear scheme to be both higher that first order accurate and free of spurious oscillations.”

Godunov 1959

First order: numerical diffusion;

Second order: spurious oscillations;

Page 25: Lecture 3

end

www.tevza.org/home/course/modelling-II_2011