Finite Difference Method (FDM) for Solving Ordinary and Partial Differential Equations - P, Lab Reports of Materials science

The finite difference method (fdm) is a set of techniques used to numerically solve ordinary and partial differential equations (odes and pdes). It is mathematically simpler and easier to implement compared to finite element method. However, it has limitations when dealing with complex geometry in 2d or 3d. In this document, we discuss the finite difference method, its advantages, and its limitations with examples.

Typology: Lab Reports

Pre 2010

Uploaded on 08/19/2009

koofers-user-fzt
koofers-user-fzt 🇺🇸

5

(1)

8 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
4/25/2002 1
MAT E 460
ENGINEERING COMPUTATION LABORATORY
FINITE DIFFERENCES
Prof. Antonios Zavaliangos
LeBow 441, x2078, [email protected]
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Finite Difference Method (FDM) for Solving Ordinary and Partial Differential Equations - P and more Lab Reports Materials science in PDF only on Docsity!

MAT E 460

ENGINEERING COMPUTATION LABORATORY

FINITE DIFFERENCES

Prof. Antonios Zavaliangos

LeBow 441, x2078, [email protected]

What is the

Finite Difference Method (FDM)

•^ Finite difference method is actually a set oftechniques for the numerical solution of ordinaryand partial differential equations. • It is “lighter” mathematically wrt finite elements • It is “easy” to implement computationally • It has problems with complex geometry...

Shooting Method

Once possibility is to assume that j(0)=j

and integrate bya

Euler Forward, Backward, R-K etc. In that case thecomputed value of c(L) may be c

which is possible that isa^

c^ a^

≠^ c

as the BC require. 0

In that case we need to adjust j

so that c(L) becomes ca^

This requires a number of iterations…This is the so called shooting method...

Finite Difference Method

A alternative is based on the FDM.Discretize the length L by using N(equi-spaced) points.Approximate the derivatives:Write the governing equation usingthe above approximations for each ofthe n-

inner

points

c^1

c^2

c^3

c^ n-

c^ n

2

1

1 2 2

1 1

1 1 2

x

c c c cd dx

c x c c x c c x c dc dx

i i i

i i i i i i^

1

2

4

3

2

3

2

1

1 1

2

1

1

^ ++ 
^ + 
^ ++ 
^ + 
^ ++ 
^ + 

n

n

n

i i i i i

c xv D

c xv D

c

c xv D

c xv D c

c xv D

c xv D c

c x cv D

x

c c c

PDE-FDM

x

t

0 1 2

i^

….^

n

0 1 2... j... m

δ x

δ t c t c

x

c c c D

ji ji ji ji ji

δ

δ

, (^1) ,

2

, 1 , , 1

−^

IC BC

tDδ< 2 x δ

Stability conditiono/w problems...

If I know i-1, i, i+1 at jI can determine i at j+

PDE-FDM

dc^ dt cd dy cd dx D^

^ 
+^

2 2 2 2

Extensions to 2-D:is tedious but computationally “easily” implemented3-D also...

Parabolic PDE

x

t

0 1 2

i^

….^

n

0 1 2... j... m

δ x

δ t

c t c

x

c c c D

ji ji ji ji ji

δ

δ

(^1) , (^1) ,

2

, 1 , , 1

+^

IC BC

dc^ dt cda dx 2 =^2 2

c t c

x

c c c a

ji ji ji ji ji

δ

δ

, (^1) ,

2

(^1) , 1 (^1) , (^1) , 1 2

−^

+−

Euler ForwardEuler Backward ++ Other methods exist...

Elliptic PDE

x

y

0 1 2

i^

….^

n

0 1 2... j... m

δ x

δ y

ji ji ji ji ji ji ji

f

y

c c c

x

c c c^

,

2

(^1) , , (^1) ,

2

, 1 , , 1

−^

− −

BC

), ( 2 2 2 2

yx f cd dy cd (^) dx

+^

e.g., steady state diffusion in 2-D

(n-2)

. (m-2) equations with.(n-2)^

(m-2) unknowns

BOTTOM LINE

•^

FDM provides an mathematically simple and easyto implement computationally method to solvehigher order ordinary and partially differentialequations.

•^

Solving complex geometry 2 or 3D problems canbe a challenge.