Вы находитесь на странице: 1из 32

Finite Element Method

A presentation by
Prof. S.V. Kulkarni
Electrical Engineering Department
IIT Bombay
Main steps of the FEM method
 Discretization into "elements"

 FE formulation: Approximation of PDE over elements

 Assembly of element equations

 Solution of global linear system

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Classification of approximation Methods

 Minimization of functional -
`variational'/`Raleigh-Ritz'

 Weighted residual methods


1. Point collocation
2. Sub-domain collocation
3. Least squares
4. Galerkin

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
References:
• M. N. O. Sadiku, “Numerical techniques in electromagnetics”, 2nd Ed, CRC press, 2001.
• J. Jin, “The finite element method in electromagnetics”, John Wiley and Sons, 1993.

 Find a function extremizing the functional subjected to


boundary conditions.
b

 Functional: I ( y ) = ∫ F ( x, y , y′)dx
a
 Boundary conditions: y (a ) = A and y (b) = B

 x is independent variable
 y is dependent variable

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
y
y + δy  Variational symbol δ
δ y for δ x = 0
dy
dx
 Differential symbol d
δy = h ( x ) y dy for finite dx
a
 As y → y + δ y , F → F + δ F
b x
∂F ∂F
δF = δy + δy′
∂y ∂y′
 Analogous differential is
∂F ∂F ∂F
dF = dx + dy + dy′
∂x ∂y ∂y′

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
 To have minimum value of functional
I
δI = I ( y + h ) − I ( y ) δI = 0
b b
= ∫ [ F ( x , y + h , y ′ + h ′) ]dx − ∫ [ F ( x , y , y ′) ]dx
a a
y y+h y
 Expanding first term using Taylor series
b
δI ≅ ∫ [hF
a
y ]
( x , y , y ′ ) + h ′F y ′ ( x , y , y ′ ) dx
 Integrating by parts leads to
d  ∂F 
b b
∂F ∂F
δ I ≅ ∫ h(x)dx + h(x) a − ∫ h(x)   dx
b

a
∂y ∂y′ a
dx  ∂y′ 
Prof. SV Kulkarni, EE Dept,
1 October 2009 Indian Institute of Technology Bombay
Variational methods
b
b
 ∂F d  ∂F   ∂F 
δI ≅ ∫
a

 ∂ y

dx



 ∂y′ 

h ( x ) dx +  ∂y ′

h ( x ) 
a
 As h ( a ) = h ( b ) = 0
b
 ∂F d  ∂F 
δI ≅ ∫
a

 ∂y
−    h ( x ) dx
dx  ∂ y ′  

 In order to δ I vanish, the integrand must vanish


∂F d  ∂F 
−   = 0
∂ y dx  ∂ y ′ 

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
 Necessary condition for functional to have extremum is to
satisfy Euler – Lagrange equation by a given function.

∂F d  ∂F 
−   = 0
∂y dx  ∂y′ 
 This is for one independent and one dependent variable.

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
Functional Euler – Lagrange equation
b
∂F d  ∂F 
I ( y ) = ∫ F ( x, y, y′)dx −   = 0
a

∂y dx  ∂y 

∂F ∂  ∂F  ∂  ∂F 
I (u ) = ∫∫ F ( x, y, u , u x , u y )ds −   − =0
s ∂u ∂x  ∂u x  ∂y  ∂u y 

∂F ∂  ∂F  ∂  ∂F 
∫∫
I (u ) = F ( x, y, u , v, u x , u y , vx , v y )ds
s
−   −
∂u ∂x  ∂u x  ∂y  ∂u y
=0


∂F ∂  ∂F  ∂  ∂F 
−   − =0

∂v ∂x  ∂v x  ∂y  ∂v y  
b
d2 n


n
I ( y ) = F ( x, y, y′, y′′,..., y )dx
d
Fy − (Fy ′ ) + 2 (Fy′′ ) − .... + ( −1)
dx dx
n d

dx n
( )
Fy n = 0
a

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
1 2 
 Consider functional ( )
I (φ ) = ∫  φx + φ y − f ( x, y )φ dxdy − − − −(1)
2

s 2 
1 2
(2
F = φx +φy − f (x, y)φ
2
)
 Euler – Lagrange equation is
∂F ∂  ∂F  ∂  ∂F 
 = 0 − − − −( 2)
−   −
∂φ ∂x  ∂φ x  ∂y  ∂φ y 

 From (1) and (2), ∇ 2φ = − f ( x, y )
 Solving Poisson’s equation is equivalent to extremizing the
functional

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Variational methods
Equation PDE Functional
1
 Laplace ∇ 2φ = 0 I (φ ) =
2v∫ | ∇ [
φ | 2
]
dv

1
 Poisson ∇ 2φ = − f [
I (φ ) = ∫ | ∇φ |2 −2 fφ dv
2v
]
1
 Homogeneous ∇ 2φ + k 2φ = 0
2v
[
I (φ ) = ∫ | ∇φ |2 − k 2φ 2 dv]
wave
1 1  1 2
2
∇ φ − 2 φtt = 0 I (φ ) = ∫ ∫ | ∇φ | + 2 φt dv dt
2

u 2t v u 
1
 Inhomogeneous ∇ 2φ + k 2φ = − f I (φ ) =
2v∫[| ∇ φ | 2
− k 2 2
]
φ − 2 fφ dv
wave
1
 Diffusion 2
∇ φ + kφt = 0 I (φ ) = ∫
2tv ∫ |[∇ φ | 2
]
−2kφφt dv

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Construction of functional from PDEs

 Earlier, we have proved that Euler’s equation produces the


governing differential equation corresponding to a given
functional or variational principle.
 Now, let us see procedure of constructing a functional
formulation for a given differential equation.
 Suppose, we have one dependent variable u and two
independent variables x and y. We are interested in finding
the functional associated with the Poisson’s equation.
∇ 2u = − f ( x, y )
or − ∇ 2 u − f = 0
 −∇ 2 u − f  δ u = 0
Prof. SV Kulkarni, EE Dept,
1 October 2009 Indian Institute of Technology Bombay
(multiplied both sides by variation of the independent variable).
 Integrate over the domain of problem (I is a functional),

∫∫  u − f  δ udxdy = 0 = δ I
 2
−∇
∴ δ I = −∫∫ ∇2u δ u dxdy − ∫∫ f δ udxdy
 Integrating by parts the equation
 ∂ 2u ∂ 2u 
δ I = − ∫∫  2 + 2  δ udxdy − ∫∫ f δ udxdy
 ∂x ∂y 
 ∂u ∂u ∂ (δ u)   ∂u ∂u ∂ (δ u) 
= −∫ δ u − ∫ dxdy − ∫ δ u − ∫ dydx − ∫∫ f δ udxdy
 ∂x ∂x ∂x   ∂y ∂y ∂y 
Prof. SV Kulkarni, EE Dept,
1 October 2009 Indian Institute of Technology Bombay
 ∂u ∂u ∂(δu)   ∂u ∂u ∂(δu) 
=−∫ δu − ∫ dxdy − ∫ δu − ∫ dydx − ∫∫ f δudxdy
 ∂x ∂x ∂x   ∂y ∂y ∂y 
 ∂u ∂ (δ u ) ∂u ∂ (δ u )  ∂u ∂u
= ∫∫  + − f δ u  dx dy − ∫ δ udy − ∫ δ u dx
 ∂x ∂x ∂y ∂y  ∂x ∂y

 Now
2
 ∂u   ∂u 
say F =   ⇒ F is a function of   only
 ∂x   ∂x 
y

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 ∂u  ∂ (δ u )
2
∂F  ∂u    ∂u    ∂u 
δ F= δy⇒δ   = 2   δ   = 2 
∂y  ∂x    ∂x    ∂ x   ∂ x  ∂x

 ∂ u  ∂ (δ u ) 1  ∂ u 
2
δ is taken inside, since it is
∴  = δ  independent of x by definition,
 ∂ x  ∂ x 2  ∂ x 

δ   ∂u  
2 2
 ∂u  ∂u ∂u
δI = ∫∫   +
2   ∂x   ∂y 
 − 2 fu dxdy − δ ∫
 ∂x
udy − δ ∫
∂y
udx

 The last two terms vanish if we assume either the
homogeneous Dirichlet or Neumann condition at the
boundaries.

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Hence
  ∂u  2  ∂u  2 
∴ δ I = δ ∫∫   +   − 2 fu dxdy
 ∂x   ∂y  

 And
1  2
 ∂u   ∂u 
2

I = ∫∫    +   − 2 fu dxdy
2   ∂x   ∂y  

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Example
 Consider a second order differential equation,

d 2u
2
= x + 1, 0 < x < 1
dx
with boundary conditions u x = 0 = 0, u x =1 = 1

The exact solution of above equation is


1 3 1 2 1
u (x) = x + x + x
6 2 3

1 October 2009 Prof. SV Kulkarni, EE Dept,


Indian Institute of Technology Bombay
 Now , we want approximate solution using the Raleigh-Ritz
method:
 first step : choose a approximate or trial solution
u = c + c x + c x2 + c x3
0 1 2 3

 second step : define a functional corresponding to trial


function 2
1
1
 
du  1

()
I u = ∫   dx + ∫ ( x +1)u dx
2 0  dx  0

Where u is the approximate solution .

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Applying the boundary conditions , we get
c 0 = 0, c1 = 1 − c 2 − c 3

and then the trial function


( ) (
u = x +c2 x2 − x + c3 x3 − x )
 Substituting and Performing the integration,
2 2 1 2 1 23 1 4
I = c3 + c 2 + c 2 c 3 − c3 − c 2 +
5 6 2 60 4 3
∂I 1 1 1
= 0 = c2 + c3 − ,
∂c2 3 2 4
∂I 1 4 23
= 0 = c 2 + c3 −
∂ c3 2 5 60

1 October 2009 Prof. SV Kulkarni, EE Dept,


Indian Institute of Technology Bombay
 Then by solving above two algebraic equations, we get
1 1
c2 = , c3 =
2 6

and then the approximate solution is


1 1 1
u = x 3 + x 2 + x
6 2 3

which for this problem comes equal to the exact solution.

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Concept of finite elements
 The problem with the conventional Raleigh-Ritz method (or
even the weighted residual method) is that the trial
function, say of the form:

u ( x ) = c1u1 ( x ) + c2 u2 ( x ) + ........... + cnun ( x )


(Note: u1, u2 are some polynomial functions of x and not potentials at nodes)

is applicable to whole domain; hence the accuracy is a


function of type and no. of n functions.
2
1 '
()
I u = ∫ cu

2
1 1 +(c u'
2 2 +......... + c u'
)
n n dx − ∫[ cu
1 1 + c2u2 +........... + cnun ] f dx

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 If we put this in vector form, in matrix notations, we get,
1 T
()

I u = C AC - CT B
2
where Aij = ∫ ui' u 'j dx
Β ij = ∫ ui f dx

( ) = 0 ⇒ AC = B
∂I u
()
minimizing I u , i.e.
∂C
where C is the unknown vector .

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 However , since it is difficult to choose a trial function valid
for the entire problem domain,
 We divide the whole problem domain into a number of small
(finite) elements over each of which a trial function is assumed.
 Consider a one dimensional domain within the limits of 0
and 1. Divide the whole domain into 6 parts with h as the
step-size.

u ( x ) = c1 ( x)u1 + c2 ( x)u2 + ........... + cn ( x)un

Note: c1, c2 are some (shape) functions of x

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Boundary conditions→ u at ends = 0.
 The cj is so chosen that , it is equal to 1 at node j and 0 at
all other nodes.
 It means infinite-dimensional problem is converted into
finite dimensional problem.
 Any combination c1u1 + c 2 u 2 + ........... + c n u n must
have value uj at j.

2
1 '
I = ∫ cu
2
(
1 1 + c'
u
2 2 +......... + c'
)
nu dx − ∫[ cu
1 1 + c2u2 +........... + cnun ] f dx

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
1 T
I= U AU - U T B
2
where Aij = ∫ ci' c 'j dx
Β ij = ∫ ci f dx

∂I
minimizing I , i.e. = 0 ⇒ AU = B
∂U

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Now, for i=j
2 2
1  −1 
Aij = ∫ ci' c 'j dx = ∫   dx + ∫   dx
h  h 
2
1 2 2
= 2 
h
∫ (1) dx = h2
⋅ h =
h

and for i ≠ j i.e. , at adjacent nodes only.


 1   −1  −1 −1
Aij = ∫     dx = 2 .h =
 h  h  h h

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Then
2 −1 0 0 0 0
 
 −1 2 −1 0 0 0 
0 −1 2 −1 0 0 
A= 
0 0 −1 2 −1 0
0 0 0 −1 2 −1 
 
0 0 0 0 −1 2
and
Bi = ∫c i f dx = hf

∵ ∫ c dx
i = h

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
Rayleigh-Ritz Finite Element Analysis

 Let us consider the Laplacian problem


 ∂  ∂φ  ∂  ∂φ  
α −  −    + βφ = f
 ∂ x  ∂x  ∂y  ∂ y  
 Let us consider the approximate analysis
3
φ e = ∑ Nie ( x, y ) φie
i =1

 The functional can be written as


M
I (φ )= ∑ ( )
I φ e

e =1

where M is total number of elements.

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
The sub-functional can be written as
  e 2
1   ∂φ   ∂ φ  e 2
2

e
( )
I φ = ∫∫ α  
e


 +
∂x   ∂y  
  + β φ e
( ) ds − ∫∫ f φ e ds

  
2 S
  S

∂I e  ∂Ne
3 ∂Ne
∂Ne
∂Ne
 
∴ e =∑φje ∫∫α i  ∫∫
j j e e e
+ i  +βN N ds − fNi ds
∂φi j=1   ∂x ∂x ∂y ∂y  
i j

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 Or
∂ Ie
 e
 e
∴ e = Κ  φ − b
∂φ
e
{ }{ }
Where
T
∂I  ∂I
e
∂I e
∂I  e e

 e= e, e
, e 
,
 ∂ φ   ∂ φ1 ∂φ 2 ∂φ3 
T
{φ } = φ
e
1
e
, φ , φ 
e
2
e
3

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay
 The element of matrix [ Ke ] are given by
  ∂N e
∂N e
∂N e
∂N e
 
kije = ∫∫ α  i
j j
i N j dx dy
e e
+ i  + β N
  ∂x ∂x ∂y ∂y  
   
 And the element of {be} are
b ie = ∫∫ fN ie d x d y

Suppose if the f is constant within the element , then


bie = f ∫∫ N ie dx dy

1 October 2009 Prof. SV Kulkarni, EE Dept,


Indian Institute of Technology Bombay
 Assembling all the M elements and imposing stationary
requirement on I to find the system of equation

∂I M
 ∂I 
e

  = ∑  e  ⇒ [ K ]{φ } = {b}
 ∂φ  e =1  ∂φ 
Where [K] is called the Global coefficient matrix.

Prof. SV Kulkarni, EE Dept,


1 October 2009 Indian Institute of Technology Bombay

Вам также может понравиться