Professional Documents
Culture Documents
Fundamentals of Finite Element Method
Fundamentals of Finite Element Method
th
Indo-German Winter Academy, Roorkee
Fundamentals O Finite
!ierence "ethods
Sumit Somani
IIIrd #nderGraduate, $S%
IIT Bombay
Tutor& 'ro( G( Bis)as,IIT *an+ur
Fundamental of Finite Difference Methods
Acknowledgements
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
It has been a +leasure +re+arin, this lecture
I take this o++ortunity to thank my su+er-isor 'ro(
Gautam Biswas .'roessor ,IIT *an+ur/ or his
enthusiastic su++ort( A ma0or chunk o this lecture is
ins+ired by his lecture notes( %1cer+ts rom 'ro( !r(
Atul Sharma2s .Asstt( 'roessor, IIT Bombay/ lectures
ha-e been included )ith his kind +ermission and
+rouse thanks to him or the same(
Fundamental of Finite Difference Methods
Motivation
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
These slides are a brie introduction to Finite !ierence "ethods
and the moti-ation to study and learn this method is the act that
in Fluid dynamics, thermodynamics, solid mechanics etc( a lar,e
number o dierential e3uations are ound( And to sol-e all o
them analytically is -ery diicult and at times im+ossible(
Finite !ierence "ethods +ro-ide suiciently satisactory
accurate numerical solutions to such e3uations and )ith the
-alues )e ,et rom this method )e can use them in simulation
o the +roblem or studyin, the +roblem or a +ractical +ur+ose(
Fundamental of Finite Difference Methods
Outline
Fundamentals o !iscreti4ation(
Finite !ierence e3uations rom the +oint o -ie) o their consistency and
con-er,ence(
Artiicial 7iscosity((
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Fundamental of Finite Difference Methods
Classification of Partial Differential Equations
I B
:
; <A$ 8 9 then Para#olic equation
I
B
:
; <A$ = 9 then Elli$tic equation
I B
:
; <A$ > 9 then %&$er#olic equation
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Fundamental of Finite Difference Methods
PDEs contd'''
(nstead& )avier *tokes .?S/ %3uation is elli+tic in s+ace and +arabolic in time
and in steady state they are elli+tic
Boundary conditions at the t)o ends and an initial condition are needed to sol-e
such e3uations
?o) let us consider its t)o dimensional counter+art i(e( #nsteady @eat conduction
in :!( S is the source term and no) )e can see it is elli+tic in s+ace and +arabolic
in time( An initial condition and t)o conditions or the e1treme ends in each s+atial
co-ordinate is re3uired to sol-e such a e3uation(
B-! e3n :-! e3n
Fundamental of Finite Difference Methods
PDEs contd'''' ,Fluid Flow E-am$le.
Fluid lo) +roblems ha-e nonlinear terms due to inertia and ener,y terms kno)n
as ad-ection and con-ection res+ecti-ely(
For -ery hi,h s+eeds it becomes hy+erbolic as the let hand terms dominate and
ri,ht hand terms becomes tri-ial thereore the e3uation becomes hy+erbolic in
s+ace and time(
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Fundamental of Finite Difference Methods
Boundar& and /nitial Conditions
But for wor"ing purpose we only consider terms upto a limit otherwise
Taylor series is a infinite series and we can#t deal with infinite $ of
terms.
Fundamental of Finite Difference Methods
First Order Forward and Backward difference
We re+resent the order o error .in this case/ as O.1/ because the terms o the
order o 1 )ere let out )hile e-aluatin, the deri-ati-e(
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
B
st
order accurate
Truncation %rror
Fundamental of Finite Difference Methods
Central Differences
The basic conce+t in sol-in, the '!% usin, this a++roach is to re+lace each
deri-ati-e term )ith its dierence element(
For the schemes )here truncation error .T%/ is like OEx) or *+t) &or its
higher orders) it is obvious that as mesh tends to zero T, would tend to
zero. But schemes with T, li"e *+t-x) we have delve further. .n such
cases /0, may be consistent only if as the mesh tends to zero% t-x
also tend to 1. 2owever if t% x individually tend to 1 without t-x
tending to 1 then /0, becomes inconsitent.
Where G@S is the numerical solution rom F!% and R@S is the
e1act solution o the e3uation o the '!% obtained analytically(
Fundamental of Finite Difference Methods
E-$licit and /m$licit Methods
Finally )e are ,oin, to learn to sol-e the F!% obtained rom our '!%(
%1+licit methods sim+ly says as )e kno) -alues o all the de+endent -ariables at
all 1 at a time inter-al rom the ,i-en initial conditions( Ater that )e kee+ on
+lu,,in, -alues o +re-ious inter-al to ,et the -alue at the ne1t inter-al(
In this method solution takes the orm o a Imarchin,I +rocedure in ste+s o time(
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
This e3uation contains only a sin,le unkno)n by +lu,,in, in other -alues the
unkno)n -ariable can be ound out(
Fundamental of Finite Difference Methods
/m$licit Method
In this method the unkno)n -alue at time le-el nDB is re+resented not only in
terms o kno)n -alues o time le-el n but also in terms o unkno)n -alues( By
doin, so )e can2t obtain solution or time le-el nDB directly by sol-in, this
e3uation( We )ould ha-e to )rite such e3uations or all 1 and it )ill result into a
system o linear e3uations )hose solution )ill ,i-e us -alues at time le-el nDB
Where r8 3&t'-&x'
(
When this e3uation is a++lied at all ,rid +oints system o e3uations as abo-e is
obtained( $oeicient matri1 is a tri-dia,onal matri1 and )e can deri-e ad-anta,e
rom it by usin, 1homas Algorithm .BK<K/
Fundamental of Finite Difference Methods
/m$licit methods for 3 Dimensional equation
)here,
$learly this e3uation has L unkno)ns
and thereore system obtained is not tri-
dia,onal
In this )e s+lit the earlier obtained F!% in t)o ste+s( We break the time inter-al
bet)een n and nDB into t)o e3ual +arts by considerin, another time le-el o
nDBJ:( The e3uation is broken do)n in t)o ste+s(
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
First
Ste+
Second
Ste+
?o) our system o L unkno)ns is broken do)n into t)o systems o M unkno)ns each and
thus )e no) ha-e t)o tridia,onal matrices to sol-e )hich can be sol-ed eiciently then
beore( This method is called as alternatin, direction im+licit or A!I method(
Fundamental of Finite Difference Methods
Com$arison E-$licit and /m$licit Methods
Advantage
The al,orithm is sim+ler
Disadvantage
Re3uires many time ste+s to carry
out the calculations o-er a ,i-en time
inter-al, due to restrictions on Nt
im+osed by stability constraints(
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Advantage
Takes lesser time or calculations o-er a
time inter-al(
Disadvantage
B/ $om+licated +ro,ram(
:/ Gar,e com+utation time in each ste+
as matri1 mani+ulations are re3d( At
eachste+ so com+uter time +er time
ste+ is lar,er than e1+licit a++roach(
M/ For lar,er Nt, truncation error is hi,h(
E-$licit Method /m$licit Method
Fundamental of Finite Difference Methods
Errors
Round-o error 8 4 8 ? ; !
Thus ? 8 ! D 4
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Fundamental of Finite Difference Methods
*ta#ilit& Anal&sis
By lookin, at +re-ious e3uation )e can clearly say that the rate o accumulation o
7
i
in is e3ual to net ad-ecti-e lu1 rate across the boundary runnin, rom i 8 I 9
B
and i 8 I
:
When )e a++ly this dierencin, scheme to the second term o the unsteady 1-
direction momentum e3uation )e ,et
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
I )e introduce a actor @ )hich )ould e1+ress )ei,hted a-era,e o central and
u+)ind dierncin, )e )ould ,et this,
Where 9 = @ = B( For n 8 9 it becomed central is s+ace and @ 8 B it becomes ully
u+)ind( We can increase the accuracy as )e like by suitable ad0ustment o @(
Fundamental of Finite Difference Methods
5eferences
Wiki+edia
We can con-ert it into ro)-echelon orm .in this case a u++er trian,ular matri1(We
modiy the elements like ,i-en belo)(
Fundamental of Finite Difference Methods
1homas Algorithm ,contd'''.
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Other -alues can be ound by back-substitution( And )e are done( It is hi,hly ast
and eicient method(
Fundamental of Finite Difference Methods
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Difference A$$ro-imations for derivatives
Fundamental of Finite Difference Methods
Sumit Somani, IIT Bombay 8
th
Indo-German Winter Academy, Roorkee
Difference A$$ro-imations for mi-ed $artial derivatives