2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics...

30
PFJL Lecture 13, 1 Numerical Fluid Mechanics 2.29 2.29 Numerical Fluid Mechanics Spring 2015 – Lecture 13 REVIEW Lecture 12: Grid-Refinement and Error estimation – Estimation of the order of convergence and of the discretization error – Richardson’s extrapolation and Iterative improvements using Roomberg’s algorithm Fourier Error Analysis – Provide additional information to truncation error: indicates how well Fourier mode solution, i.e. wavenumber and phase speed, is represented Effective wavenumber: Effective wave speed (for linear convection eqn., , integrating in time exactly): nd eff eff sin( ) (for CDS, 2 order, ) j ikx ikx j e k x ik e k x x eff eff . ( . ) eff numerical () (,) (0) (0) num eff eff eff k t ik x c num ikx i t k k k k k k c k df f t cik f xt f e f e dt c k 0 f f c t x eff eff eff (with ) ik c ikc

Transcript of 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics...

Page 1: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 1Numerical Fluid Mechanics2.29

2.29 Numerical Fluid Mechanics

Spring 2015 – Lecture 13

REVIEW Lecture 12:• Grid-Refinement and Error estimation

– Estimation of the order of convergence and of the discretization error

– Richardson’s extrapolation and Iterative improvements using Roomberg’salgorithm

• Fourier Error Analysis

– Provide additional information to truncation error: indicates how well Fourier mode

solution, i.e. wavenumber and phase speed, is represented

• Effective wavenumber:

• Effective wave speed (for linear convection eqn., , integrating in time exactly):

ndeff eff

sin( ) (for CDS, 2 order, )jikx

ikx

j

e k xi k e kx x

eff eff

.(. )

eff numerical( ) ( , ) (0) (0)num

eff eff effk t ik x cnum ikx i tkk k k

k k

c kd f f t c i k f x t f e f edt c k

0f fct x

eff eff eff(with )i k c i k c

Page 2: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 2Numerical Fluid Mechanics2.29

2.29 Numerical Fluid Mechanics

Spring 2015 – Lecture 13

REVIEW Lecture 12, Cont’d:• Stability

– Heuristic Method: trial and error

– Energy Method: Find a quantity, l2 norm , and then aim to show that it

remains bounded for all n.

• Example: for we obtained

– Von Neumann Method (Introduction), also called Fourier Analysis Method/Stability

• Hyperbolic PDEs and Stability

– 2nd order wave equation and waves on a string

• Characteristic finite-difference solution (review)

• Stability of C – C (CDS in time/space, explicit):

• Example: Effective numerical wave numbers and dispersion

2n

jj

0ct x

0 1c t

x

1c tCx

Page 3: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 3Numerical Fluid Mechanics2.29

FINITE DIFFERENCES – Outline for Today

• Fourier Analysis and Error Analysis

– Differentiation, definition and smoothness of solution for ≠ order of spatial operators

• Stability

– Heuristic Method

– Energy Method

– Von Neumann Method (Introduction) : 1st order linear convection/wave eqn.

• Hyperbolic PDEs and Stability

– Example: 2nd order wave equation and waves on a string

• Effective numerical wave numbers and dispersion

– CFL condition:

• Definition

• Examples: 1st order linear convection/wave eqn., 2nd order wave eqn., other FD schemes

– Von Neumann examples: 1st order linear convection/wave eqn.

– Tables of schemes for 1st order linear convection/wave eqn.

• Elliptic PDEs

– FD schemes for 2D problems (Laplace, Poisson and Helmholtz eqns.)

Page 4: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 4Numerical Fluid Mechanics2.29

References and Reading Assignments

• Lapidus and Pinder, 1982: Numerical solutions of PDEs in Science and Engineering. Section 4.5 on “Stability”.

• Chapter 3 on “Finite Difference Methods” of “J. H. Ferzigerand M. Peric, Computational Methods for Fluid Dynamics. Springer, NY, 3rd edition, 2002”

• Chapter 3 on “Finite Difference Approximations” of “H. Lomax, T. H. Pulliam, D.W. Zingg, Fundamentals of Computational Fluid Dynamics (Scientific Computation). Springer, 2003”

• Chapter 29 and 30 on “Finite Difference: Elliptic and Parabolic equations” of “Chapra and Canale, Numerical Methods for Engineers, 2014/2010/2006.”

Page 5: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 5Numerical Fluid Mechanics2.29

Von Neumann Stability

• Widely used procedure

• Assumes initial error can be represented as a Fourier Series and considers growth or decay of these errors

• In theoretical sense, applies only to periodic BC problems and to linear problems

– Superposition of Fourier modes can then be used

• Again, use, but for the error:

• Being interested in error growth/decay, consider only one mode:

• Strict Stability: The error will not to grow in time if

– in other words, for t = nΔt, the condition for strict stability can be written:

Norm of amplification factor ξ smaller or equal to1

( , ) ( ) i kxk

kf x t f t e

( , ) ( ) i xx t t e

( ) where is in general complex and function of : ( )i x t i xt e e e

1te

1 or for , 1t te e von Neumann condition

Page 6: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 6Numerical Fluid Mechanics2.29

Evaluation of the Stability of a FD Scheme

Von Neumann Example

• Consider again:

• A possible FD formula (“upwind” scheme)

(t = nΔt, x = jΔx) which can be rewritten:

• Consider the Fourier error decomposition (one mode) and discretize it:

• Insert it in the FD scheme, assuming the error mode satisfies the FD

(strictly valid for linear eq. only):

• Cancel the common term (which is ) in (linear) eq. and

obtain:

0ct x

1

1 0n n n nj j j jc

t x

11(1 ) with n n n

j j jc t

x

( , ) ( ) i x t i x n n t i j xjx t t e e e e e

1 ( 1) ( 1)1(1 ) (1 )n n n n t i j x n t i j x n t i j x

j j j e e e e e e

(1 )t i xe e

n n t i j xj e e

jj-1n

n+1

x

t

Page 7: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 7Numerical Fluid Mechanics2.29

Evaluation of the Stability of a FD Scheme

von Neumann Example

• The magnitude of is then obtained by multiplying ξ with its

complex conjugate:

Since

• Thus, the strict von Neumann stability criterion gives

Since

we obtain the same result as for the energy method:

2 (1 ) (1 ) 1 2 (1 ) 1

2

i x i xi x i x e ee e

te

2cos( ) and 1 cos( ) 2sin ( )2 2

i x i xe e xx x

2 21 2 (1 ) 1 cos( ) 1 4 (1 )sin ( )

2xx

21 1 4 (1 )sin ( ) 12

x

2sin ( ) 0 1 cos( ) 02

x x

1 (1 ) 0 0 1 ( )c t c tx x

Equivalent to the

CFL condition

Page 8: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 8Numerical Fluid Mechanics2.29

Partial Differential Equations

Hyperbolic PDE: B2 - 4 A C > 0

Wave equation, 2nd orderExamples:

• Allows non-smooth solutions

• Information travels along characteristics, e.g.:

– For (3) above:

– For (4), along streamlines:

• Domain of dependence of u(x,T) = “characteristic path”

• e.g., for (3), it is: xc(t) for 0< t < T

• Finite Differences, Finite Volumes and Finite Elements

• Upwind schemes

2 22

2 2(1) u uct x

Unsteady (linearized) inviscid convection

(Wave equation first order)(3) ( )

t

uU u g

(4) ( ) U u gSteady (linearized) inviscid convection

t

x, y0

( ( ))d tdt

cc

xU x

dds

cxU

(2) 0u uct x

Sommerfeld Wave/radiation equation,

1st order

(from Lecture 10)

Page 9: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 9Numerical Fluid Mechanics2.29

Partial Differential Equations

Hyperbolic PDE - ExampleWaves on a String

Initial Conditions

Boundary Conditions

Wave Solutions

t

xu(x,0), ut(x,0)

u0,t) uL,t)

Typically Initial Value Problems in Time, Boundary Value Problems in Space

Time-Marching Solutions:

Implicit schemes generally stable

Explicit sometimes stable under certain conditions

2 22

2 2

( , ) ( , ) 0 , 0u x t u x tc x L tt x

(from Lecture 10)

Page 10: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 10Numerical Fluid Mechanics2.29

t

xu(x,0), ut(x,0)

u0,t) uL,t)

Partial Differential Equations

Hyperbolic PDE - Example

j+1

j-1j

ii-1 i+1

Finite Difference Representations (centered)

Finite Difference Representations

Wave Equation2 2

22 2

( , ) ( , ) 0 , 0u x t u x tc x L tt x

Discretization:

(from Lecture 10)

Page 11: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 11Numerical Fluid Mechanics2.29

t

xu(x,0), ut(x,0)

u0,t) uL,t)j+1

j-1j

ii-1 i+1

Introduce Dimensionless Wave Speed

Explicit Finite Difference Scheme

Stability Requirement:

Partial Differential Equations

Hyperbolic PDE - Example

1 Courant-Friedrichs-Lewy condition (CFL condition) c tCx

Physical wave speed must be smaller than the largest numerical wave speed, or,

Time-step must be less than the time for the wave to travel to adjacent grid points:

or x xc tt c

(from Lecture 10)

Page 12: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 12Numerical Fluid Mechanics2.29

Partial Differential Equations

Hyperbolic PDE - Example

Start of Integration: Euler and Higher Order Starters

t

xu(x,0)=f(x) , ut(x,0)=g(x)

u0,t) uL,t)

j=1ii-1 i+1

1st order Euler Starter

But, second derivative in x at t = 0 is known from IC:

From Wave Equation

Higher order Taylor Expansion

Higher Order Self Starter j=2

+k

- 2

Given ICs:

General idea: use the PDE itself to get higher order integration

Page 13: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 13Numerical Fluid Mechanics2.29

Waves on a String

L=10;

T=10;

c=1.5;

N=100;

h=L/N;

M=400;

k=T/M;

C=c*k/h

Lf=0.5;

x=[0:h:L]';

t=[0:k:T];

%fx=['exp(-0.5*(' num2str(L/2) '-x).^2/(' num2str(Lf) ').^2)'];

%gx='0';

fx='exp(-0.5*(5-x).^2/0.5^2).*cos((x-5)*pi)';

gx='0'; %Zero first time derivative at t=0

f=inline(fx,'x');

g=inline(gx,'x');

n=length(x);

m=length(t);

u=zeros(n,m);

% Second order starter

u(2:n-1,1)=f(x(2:n-1));

for i=2:n-1

u(i,2) = (1-C^2)*u(i,1) + k*g(x(i)) +C^2*(u(i-1,1)+u(i+1,1))/2;

end

% CDS: Iteration in time (j) and space (i)

for j=2:m-1

for i=2:n-1

u(i,j+1)=(2-2*C^2)*u(i,j) + C^2*(u(i+1,j)+u(i-1,j)) - u(i,j-1);

end

end

waveeq.m

Initial condition

2 22

2 2

( , ) ( , ) 0 , 0u x t u x tc x L tt x

figure(1)

plot(x,f(x));

a=title(['fx = ' fx]);

set(a,'FontSize',16);

figure(2)

wavei(u',x,t);

a=xlabel('x');

set(a,'Fontsize',14);

a=ylabel('t');

set(a,'Fontsize',14);

a=title('Waves on String');

set(a,'Fontsize',16);

colormap;

Page 14: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 14Numerical Fluid Mechanics2.29

L=10;

T=10;

c=1.5;

N=100;

h=L/N; % Horizontal resolution (Dx)

M=400;

% Test: increase duration of simulation, to see effect of

%dispersion and effective wavenumber/speed (due to 2nd order)

%T=100;M=4000;

k=T/M; % Time resolution (Dt)

C=c*k/h % Try case C>1, e.g. decrease Dx or increase Dt

Lf=0.5;

x=[0:h:L]';

t=[0:k:T];

%fx=['exp(-0.5*(' num2str(L/2) '-x).^2/(' num2str(Lf) ').^2)'];

%gx='0';

fx='exp(-0.5*(5-x).^2/0.5^2).*cos((x-5)*pi)';

gx='0';

f=inline(fx,'x');

g=inline(gx,'x');

n=length(x);

m=length(t);

u=zeros(n,m);

%Second order starter

u(2:n-1,1)=f(x(2:n-1));

for i=2:n-1

u(i,2) = (1-C^2)*u(i,1) + k*g(x(i)) +C^2*(u(i-1,1)+u(i+1,1))/2;

end

%CDS: Iteration in time (j) and space (i)

for j=2:m-1

for i=2:n-1

u(i,j+1)=(2-2*C^2)*u(i,j) + C^2*(u(i+1,j)+u(i-1,j)) - u(i,j-1);

end

end

waveeq.m

Waves on a String, Longer simulation:Effects of dispersion and effective wavenumber/speed

Page 15: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 15Numerical Fluid Mechanics2.29

Wave Equation

d’Alembert’s Solution

Wave Equation

Solution

Periodicity Properties

Proof

G F

F

2 22

2 2

( , ) ( , ) 0 , 0u x t u x tc x L tt x

t

xu(x,0)=f(x) , ut(x,0)=g(x)

u0,t) uL,t)

Page 16: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 16Numerical Fluid Mechanics2.29

Hyperbolic PDE

Method of Characteristics

G FFirst 2 Rows known j+1

j-1

j

Characteristic Sampling

Exact Discrete Solution

Explicit Finite Difference Scheme t

xu(x,0)=f(x) , ut(x,0)=g(x)

u0,t) uL,t)

Page 17: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 17Numerical Fluid Mechanics2.29

Hyperbolic PDE

Method of Characteristics

G F j+1

j-1

j

Let’s proof the following FD scheme is an exact Discrete Solution

D’Alembert’s Solution with C=1

Proof

t

xu(x,0)=f(x) , ut(x,0)=g(x)

u0,t) uL,t)

Page 18: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

2.29 Numerical Fluid Mechanics PFJL Lecture 13, 18

( , )u x t ( , )u x t

Courant-Fredrichs-Lewy Condition (1920’s)

• Basic idea: the solution of the Finite-Difference (FD) equation

can not be independent of the (past) information that determines

the solution of the corresponding PDE

• In other words:

The “Numerical domain of dependence of FD scheme must

include the mathematical domain of dependence of the

corresponding PDE”

CFL NOT satisfied CFL satisfiedtime

space

time

spacePDE dependenceNumerical “stencil”

Page 19: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 19Numerical Fluid Mechanics2.29

Determine domain of dependence of PDE and of FD scheme

• PDE:

• FD scheme. For our Upwind discretization, with t = nΔt, x = jΔx :

=> CFL condition:

CFL: Linear convection (Sommerfeld Eqn) Example

( , ) ( , ) 0u x t u x tct x

If and 0 cstdx c x c t du u

dt

Solution of the form:

Characteristics:

jj-1n

n+1

True solution

is outside of

numerical

domain of

influence

( , ) ( )u x t F x ct

CFL NOT satisfied CFL satisfied

11 0

n n n nj j j jc

t x

True solution

is within

numerical

domain of

influence

Slope of characteristic:

Slope of Upwind scheme:tx

1dtdx c

1tx c

1c tx

© Springer. All rights reserved. This content is excluded from our CreativeCommons license. For more information, see http://ocw.mit.edu/fairuse.Source: Figure 2.1 from Durran, D. Numerical Methods for Wave Equationsin Geophysical Fluid Dynamics. Springer, 1998.

Page 20: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 20Numerical Fluid Mechanics2.29

CFL: 2nd order Wave equation Example

Determine domain of dependence of PDE and of FD scheme

• PDE, second order wave eqn example:

– As seen before: slope of characteristics:

• FD scheme: discretize: t = nΔt, x = jΔx

– CD scheme (CDS) in time and space (2nd order), explicit

– We obtain from the respective slopes:

2 22

2 2

( , ) ( , ) 0 , 0u x t u x tc x L tt x

( , ) ( ) ( )u x t F x ct G x ct

1 11 12 1 2 2 1

1 12 2

2 2(2 2 ) ( ) where =

n n n n n nj j j j j j n n n n n

j j j j j

u u u u u u c tc u C u C u u u Ct x x

1c tx

Full line case: CFL satisfied

Dotted lines case:

c and Δt too big, Δx too

small (CFL NOT satisfied)

1dtdx c

t

x

n

j

Page 21: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 21Numerical Fluid Mechanics2.29

CFL Condition: Some comments

• CFL is only a necessary condition for stability

• Other (sufficient) stability conditions are often more restrictive

– For example: if is discretized as

– One obtains from the CFL:

– While a Von Neumann analysis leads:

• For equations that are not purely hyperbolic or that can change of type (e.g. as diffusion term increases), CFL condition can at times be violated locally for a short time, without leading to global instability further in time

( , ) ( , ) 0u x t u x tct x

nd thCD,2 order in CD,4 order in x

( , ) ( , ) 0t

u x t u x tct x

2c tx

Five grid-points stencil:

(-1,8,0,-8,1) / 12

See Taylor tables in

previous lecture and

eqn. sheet

0.728c tx

Page 22: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 22Numerical Fluid Mechanics2.29

von Neumann Examples

• Forward in time (Euler), centered in space, Explicit

– Von Neumann: insert

• Taking the norm:

• Unconditionally Unstable

• Implicit scheme (backward in time, centered in space)

• Unconditionally Stable

11 1 1

1 10 ( )2 2

n n n nj j j j n n n n

j j j jCc

t x

( , ) ( ) i x t i x n n t i j xjx t t e e e e e

11 1( ) 1 1 sin( )

2 2n n n n t i x i xj j j j

C Ce e e Ci x

2 2 2 21 sin( ) 1 sin( ) 1 sin ( ) 1 for 0 ! te Ci x Ci x C x C

1 1 11 1 02

n n n nj j j jc

t x

1 1 11 1( ) 1 sin( )

2n n n n t tj j j j

C e e Ci x

2 22 2

1 1 1 for 0 ! 1 sin( ) 1 sin( ) 1 sin ( )

te CCi x Ci x C x

Page 23: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 23Numerical Fluid Mechanics2.29

Stability of FD schemes for ut + b uy = 0 (t denoted x below)

Table showing various finite difference forms removed due to copyright restrictions.Please see Table 6.1 in Lapidus, L., and G. Pinder. Numerical Solution of PartialDifferential Equations in Science and Engineering. Wiley-Interscience, 1982.

Page 24: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 24Numerical Fluid Mechanics2.29

Stability of FD schemes for ut + b uy = 0, Cont.

Table showing various finite difference forms removed due to copyright restrictions.Please see Table 6.1 in Lapidus, L., and G. Pinder. Numerical Solution of PartialDifferential Equations in Science and Engineering. Wiley-Interscience, 1982.

Page 25: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 25Numerical Fluid Mechanics2.29

Partial Differential Equations

Elliptic PDE

Laplace Operator

Laplace Equation – Potential Flow

Helmholtz equation – Vibration of plates

Poisson Equation

• Potential Flow with sources

• Steady heat conduction in plate + source

Examples:

2 U u uSteady Convection-Diffusion

• Smooth solutions (“diffusion effect”)

• Very often, steady state problems

• Domain of dependence of u is the full domain D(x,y) => “global” solutions

• Finite differ./volumes/elements, boundary integral methods (Panel methods)

ϕ

ϕ

(from Lecture 9)

Page 26: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 26Numerical Fluid Mechanics2.29

Partial Differential Equations

Elliptic PDE - Example

y

xu(x,0) = f1(x)

u0,y)=g1(y) ua,y)=g2(y)j+1

j-1j

ii-1 i+1

Equidistant Sampling

Discretization

Finite Differences

u(x,b) = f2(x)

(from Lecture 9)

Dirichlet BC

Page 27: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 27Numerical Fluid Mechanics2.29

Discretized Laplace Equation

Partial Differential Equations

Elliptic PDE - Example

y

xu(x,0) = f1(x)

ua,y)=g2(y)j+1

j-1j

ii-1 i+1

u(x,b) = f2(x)Finite Difference Scheme

Global Solution Required

Boundary Conditions

u0,y)=g1(y)

i

i

(from Lecture 9)

Page 28: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 28Numerical Fluid Mechanics2.29

Elliptic PDEs

Laplace Equation, Global Solvers

p1 p2 p3

p4 p5 p6

p7 p8 p9

u1,2 u5,2

u2,1

u5,2

Dirichlet BC

Leads to Ax = b, with A block-tridiagonal:

A = tri { I , T , I }

Page 29: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

PFJL Lecture 13, 29Numerical Fluid Mechanics2.29

Neumann (Derivative) Boundary Condition

Ellipticic PDEs

Neumann Boundary Conditions

y

xu(x,0) = f1(x)

u0,y)=g1(y) uxa,y) given

ii-1 i+1

u(x,b) = f2(x)

Finite Difference Scheme

Finite Difference Scheme at i = n

Derivative BC: Finite Difference

Boundary Finite Difference Scheme at i = n

1, 1, , 1 , 1 ,2 4 0n j n j n j n j n jn

uu x u u u ux

given

Leads to a factor 2 (a matrix 2 I in A) for points along boundary

j

Page 30: 2.29 Numerical Fluid Mechanics Lecture 13 Slides · PDF file2.29 Numerical Fluid Mechanics PFJL Lecture 13, ... •Chapter 3 on “Finite Difference ... Fundamentals of Computational

MIT OpenCourseWarehttp://ocw.mit.edu

2.29 Numerical Fluid MechanicsSpring 2015

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.