Professional Documents
Culture Documents
L t
Lecture 40
Course Coordinator:
Dr. Suresh A. Kartha,
Associate Professor,
Department of Civil Engineering,
IIT Guwahati.
Galerkin FEM
We were discussing on how Galerkin FEM
can be applied
pp for 2-D cases.
→ to solve 2-D Laplace equation
(or Poisson equation).
∂2 f ∂2 f ⎫
+ 2 = F ( x, y )
⎪
∂x 2
∂y ⎪⎪
i.e. or ⎬ with appropriate BCs.
∂2 f ∂2 f ⎪
+ 2 =0 ⎪
∂x 2
∂y ⎪⎭
→ two dimensional domain was rectangular in shape.
→ In our case we discretised the domain
using rectangular elements.
∴ The x − axis is discretised i = 1, 2,3,..., I nodes or discrete points
The y − axis is discretised j = 1, 2,3,..., J nodes.
∴ For this rectangular domain there are a total of ( I × J ) discrete nodes.
→ Any general node is given as (i, j ) in the suffix.
suffix
→ Four nodes constitute an
rectangular element
element. There
are a total of ( I − 1) × ( J − 1)
elements. Any general element
elements.
is given as i, j in the superfix.
→ As described for the one-dimensional
one dimensional case
case, there will be
combination of approximating polynomial for ' f ' in the entire domain
I −1 J −1
i.e. f ( x, y ) ≈ f ( x, y ) = ∑∑ f [ i , j ] ( x, y )
i =1 j =1
∴ I ( f ( x, y )) = ∫
x1
∫y W ( x, y) × ⎜⎝ ∂x 2 + ∂y 2 − f ⎟⎠ dydx = 0
1
∂2 f ∂ ⎛ ∂f ⎞ ∂W ∂f
To do integration: see W 2 = ⎜ W ⎟−
∂x ∂x ⎝ ∂x ⎠ ∂x ∂x
∂2 f ∂ ⎛ ∂f ⎞ ∂W ∂f
and W 2 = ⎜ W ⎟−
∂y ∂y ⎝ ∂y ⎠ ∂y ∂y
⎡ ∂ ⎛ ∂f ⎞ ∂ ⎛ ∂f ⎞ ∂W ∂f ∂W ∂f ⎤
∴ I = ∫ ∫ ⎢ ⎜W ⎟ + ⎜W ⎟− − − F ⎥dxdy = 0
⎣ ∂x ⎝ ∂x ⎠ ∂y ⎝ ∂y ⎠ ∂x ∂x ∂y ∂y ⎦
Using Stokes' theorem
∂ ⎛ ∂f ⎞ ∂f
∫∫ ∂x ⎜⎝ ∂x ⎟⎠
W dxdy = v∫ ∂x nx ds
W
∂ ⎛ ∂f ⎞ ∂f
∫∫ ∂y ⎜⎝W ∂y ⎟⎠dxdy = v∫ W ∂y ny ds
where nˆ = nx iˆ + n y ˆj
⎡ ∂ ⎛ ∂f ⎞ ∂ ⎛ ∂f ⎞ ⎤ ⎛ ∂f ∂f ⎞
∴ ∫ ∫ ⎢ ⎜W ⎟ + ⎜ W ⎟⎥ dxdy = ∫
v ⎜ W n + W n y ⎟ ds
⎣ ∂x ⎝ ∂x ⎠ ∂y ⎝ ∂y ⎠ ⎦ ⎝ ∂x ∂y ⎠
x
⎛ ∂f ˆ ∂f ˆ ⎞
Note that nˆ ⋅∇f = (nx i + n y j ) ⋅ ⎜ i +
ˆ ˆ j⎟
⎝ ∂x ∂y ⎠
∂f ∂f
= nx + ny ≡ flux of f through boundary = qn
∂x ∂y
⎡ ∂ ⎛ ∂f ⎞ ∂ ⎛ ∂f ⎞ ∂W ∂f ∂W ∂f ⎤
∴ I = ∫ ∫ ⎢ ⎜W ⎟ + ⎜W ⎟− − − F ⎥dxdy = 0
⎣ ∂x ⎝ ∂x ⎠ ∂y ⎝ ∂y ⎠ ∂x ∂x ∂y ∂y ⎦
⎛ ∂W ∂f ∂W ∂f ⎞
= v∫ Wqn ds − ∫ ∫ ⎜ + + WF ⎟dxdy = 0
B ⎝ ∂x ∂x ∂y ∂y ⎠
The
h li
line integral
i l describes
d ib the
h flux
fl qn normall to the
h outer
boundary B of the solution domain.
→ For
F allll interior
i t i elements
l t that
th t do
d nott coincide
i id
with the outer boundary, you have v∫ Wq ds = 0
B
n
⎛ ∂W ∂f ∂W ∂f ⎞
where I = − ∫∫ ⎜
[i , j ]
+ + WF ⎟ dxdy for interior elements.
⎝ ∂x ∂x ∂y ∂y ⎠
In Galerkin approach we use the shape functions itself as the
weighing function W .
Recall,, f [i , j ] ( x , y ) = f1 × ((1 − x − y + x y ) + f 2 × ( x − x y )
+ f3 × ( x y ) + f 4 × ( y − x y )
∂f
∴ = f1 × ( −1 + y ) + f 2 × (1 − y ) + f3 × ( y ) + f 4 × ( − y )
∂x
∂f
Similarly
Similarly, = f1 × ( −1 + x ) + f 2 × ( − x ) + f3 × ( x ) + f 4 × (1 − x )
∂y
→ As the weighing functions N k[i , j ] ( x , y ) are applicable
only in the element i , j and elsewhere being zero we can
write total integral
xI y I xi +1 yi +1
I ( f ( x, y )) = ∫ ∫ [ ]dxdy = ∫ ∫ [ ]dxdy
x1 y1 xi yi
∂2 f ∂ ⎛ ∂f ⎞ ∂ ⎛ ∂f ⎞ ∂
(n) (n)
∂f ∂f
2
f
• Now, ∂t
= −u
∂x
and ∂t 2
= −
∂t ⎝⎜ ∂x ⎠⎟
u = −u
∂x ⎝⎜ ∂t ⎟
⎠
= u 2
∂x 2
i i
(n) (n)
∂f ∂ f
( )
2
1
∴ f i ( n +1) = f i ( n ) − u ⋅ .∆t + u 2 ⋅ 2 .∆t 2 + O ∆t 3
∂x i 2 ∂x i
•
• Using second order centered‐difference
centered difference
scheme:
( n +1) f i +( n1) − f i −( n1) 1 2 ⎛ f i +( n1) − 2. fi ( n ) + f i −( n1) ⎞ 2
fi = fi (n)
−u⋅ ⋅ ∆t + ⋅ u ⋅ ⎜ ⎟ ⋅ ∆t
2∆x 2 ⎝ ∆ x 2
⎠
u ∆t
• Let us define convection number as c=
∆x
.
= f − ( f − f ) + ⋅ ( f − 2. f + f )
2
c
( n +1) c (n) (n) (n) (n) (n) (n)
fi i i +1 i −1 i +1 i i −1
2 2
This is the Lax‐Wendroff one step p
approximation.
Here c = u∆t ≤ 1.0
Here, 1 0 for stability
stability.
∆x