Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Introduction to FEM
Kengo NakajimaInformation Technology Center
FDM and FEM
• Numerical Method for solving PDE’s– Space is discretized into small pieces (elements, meshes)
• Finite Difference Method (FDM)– Differential derivatives are directly approximated using
Taylor Series Expansion.
• Finite Element Method(FEM)– Solving “weak form” derived from integral equations.
• “Weak solutions” are obtained.
– Method of Weighted Residual (MWR), Variational Method – Suitable for Complicated Geometries
• Although FDM can handle complicated geometries ...
2FEM-intro
Finite Difference Method (FDM)Taylor Series Expansion
∆x ∆x
φi-1
φi
φi+1
( ) ( )K
iiiii x
x
x
x
xx
∂∂∆+
∂∂∆+
∂∂∆+=+ 3
33
2
22
1 !3!2
φφφφφ
( ) ( )K
iiiii x
x
x
x
xx
∂∂∆−
∂∂∆+
∂∂∆−=− 3
33
2
22
1 !3!2
φφφφφ
2nd-Order Central Difference
( )K
ii
ii
x
x
xx
∂∂∆×+
∂∂=
∆− −+
3
3211
!3
2
2
φφφφ
3FEM-intro
FEM1D 4
2nd –Order Differentiation in FDM• Approximate Derivative at×(center of i and i+1)
∆x ∆x
φi-1
φi
φi+1
× xdx
d ii
i ∆−≈
+
+
φφφ 12/1
∆x→0: Real Derivative
• 2nd-Order Diff. at i
211
11
2/12/12
2 2
xxxx
x
dx
d
dx
d
dx
d iiiiiii
ii
i∆
+−=∆
∆−−
∆−
=∆
−
≈
−+−+
−+ φφφφφφφφφ
φ
i+1/2
∆x ∆x
φi-1
φi
φi+1
×i+1/2
×i-1/2
1D Heat Conduction
• Linear Equation at Each Grid Point
211
11
2/12/12
2 2
xxxx
x
dx
d
dx
d
dx
d iiiiiii
ii
i∆
+−=∆
∆−−
∆−
=∆
−
≈
−+−+
−+ φφφφφφφφφ
φ
• 2nd-Order Central Difference
222
11
1)(,
2)(,
1)(
)1()()()()(
xiA
xiA
xiA
NiiBFiAiAiA
RDL
iRiDiL
∆=
∆−=
∆=
≤≤=×+×+× +− φφφ
02
2
=+ BFdx
d φ
)1(0)(121
)1(0)(2
12212
211
NiiBFxxx
NiiBFx
iii
iii
≤≤=+∆
+∆
−∆
≤≤=+∆
+−
−+
−+
φφφ
φφφ
5FEM-intro
FDM can handle complicated geometries: BFC
Handbook of Grid Generation
6FEM-intro
History of FEM• In 1950’s, FEM was originally developed as a method
for structure analysis of wings of airplanes under collaboration between Boeing and University of Washington (M.J. Turner, H.C. Martin etc.).– “Beam Theory” cannot be applied to sweptback wings for
airplanes with jet engines.
• Extended to Various Applications– Non-Linear: T.J.Oden– Non-Structure Mechanics: O.C.Zienkiewicz
• Commercial Package– NASTRAN
• Originally developed by NASA• Commercial Version by MSC• PC version is widely used in industries
7FEM-intro
Recent Research Topics
• Non-Linear Problems– Crash, Contact, Non-Linear Material– Discontinuous Approach
• X-FEM
• Parallel Computing– also in commercial codes
• Adaptive Mesh Refinement (AMR)– Shock Wave, Separation– Stress Concentration– Dynamic Load Balancing (DLB) at Parallel Computing
• Mesh Generation– Large-Scale Parallel Mesh Generation
8FEM-intro
FEM-intro 9
• Numerical Method for PDE (Method of Weighted Residual)
• Gauss-Green’s Theorem• Numerical Method for PDE (Variational Method)
FEM-intro 10
Approximation Method for PDEPartial Differential Equations: 偏微分方程式
• Consider solving the following differential equation (boundary value problem), domain V, boundary S :
fuL =)(
• u (solution of the equation) can be approximated by function uM (linear combination)
i
M
i
iM au Ψ=∑=1
iΨ
ia
Trial/Test Function (試行関数)(known function of position, defined in domain and at boundary. “Basis” in linear algebra.
Coefficients (unknown)
FEM-intro 11
Method of Weighted Residual MWR: 重み付き残差法
• uM is exact solution of u if R (residual:残差)= 0:
fuLR M −= )(
• In MWR, consider the condition where the following integration of R multiplied by w (weight/weighting function:重み関数) over entire domain is 0
0)( =∫V
M dVuRw
• MWR provides “smoothed” approximate solution, which satisfies R=0 in the domain V
FEM-intro 12
Variational Method (Ritz) (1/2)変分法
• It is widely known that exact solution u provides extreme values (max/min) of “functional:汎関数” I(u) – Euler equation: differential equation satisfied by u, if
functional has extreme values(極値)– Euler equation is satisfied, if u provides extreme values of
I(u).
– provide extreme values:停留させる(or stationarize)
• For example, functional, which corresponds to governing equations of linear elasticity (principle of virtual work, equilibrium equations), is “principle of minimum potential energy (principle of minimum strain energy)(エネルギー最小,歪みエネルギー最小)” .
FEM-intro 13
Variational Method (Ritz) (2/2)変分法
i
M
i
iM au Ψ=∑=1
• Substitute the following approx. solution into I(u), and calculate coefficients ai under the condition where IM=I(uM) provides extreme values, then uMis obtained:
• Variational method is theoretical method, and can be only applied to differential equations, which has equivalent variational problem.– In this class, we mainly use MWR– Brief overview of Ritz method will given later today.
FEM-intro 14
Finite Element Method (FEM)有限要素法
• Entire region is discretized into fine elements(要素), and the following approximation is applied to each element:
i
M
i
iM au Ψ=∑=1
• MWR or Variational Method is applied to each element
• Each element matrix is accumulated to global matrix, and solution of obtained linear equations provides approx. solution of PDE.
• Details of FEM will be provided after next class
FEM-intro 15
Example of MWR (1/3)
• Thermal Equation
02
2
2
2
=+
∂∂+
∂∂
Qy
T
x
Tλ
0=T at boundary S
in V
S
V
• Approximate Solution
j
n
j
jaT Ψ=∑=1
λ:Conductivity,Q:Heat Gen./Volume
• Residual
Qyx
ayxaR jjn
j
jj +
∂Ψ∂
+∂
Ψ∂= ∑
=2
2
2
2
1
),,( λ
FEM-intro 16
Example of MWR (2/3)
• Multiply weighting function wi, and apply integration over V:
0=∫ dVRwV
i
• If a set of weighting function wi is a set of ndifferent functions, the above integration provides a set of n linear equations:
• # trial/test functions = # weighting functions
),...,1(1
2
2
2
2
nidVQwdVyx
wan
j V
ijj
V
ij =−=
∂Ψ∂
+∂
Ψ∂∑ ∫∫
=
λ
FEM-intro 17
Example of MWR (3/3)
• Matrix form of the equations is described as follows:
[ ]{ } { }QaB =
dVQwQdVyx
wBV
iijj
V
iij ∫∫ −=
∂Ψ∂
+∂
Ψ∂= ,
2
2
2
2
λ
Actual approach is slightly different from this(more detailed discussions after next week)
FEM-intro 18
Various types of MWR’s
• Various types of weighting functions
• Collocation Method 選点法• Least Square Method 最小自乗法• Galerkin Method ガラーキン法
FEM-intro 19
Collocation Method
• Weighting function: Dirac’s Delta Function δ
( )ixx −= δiw x:location
• In collocation method, R (residual) is set to 0 at ncollocation points by feature of Dirac’s Delta Fn. δ :
( )ixxi
xx ==−∫ |RdVRV
δ
( )( ) ( )∫
∞+
∞−=≠=
=∞=
1,00
0
dzzzifz
zifz
δδ
δ
• If n increases, R approaches to 0 over entire domain.
FEM-intro 20
Least Square Method• Weighting function:
ii a
Rw
∂∂=
• Minimize the following integration according to ai(unknowns):
[ ] dVaRaIV
ii ∫=2),()( x
[ ] 0),(),(2)( =
∂∂=
∂∂
∫ dVaaR
aRaIa
V i
iii
i
xx
0),(
),( =
∂∂
∫ dVaaR
aRV i
ii
xx
FEM-intro 21
Galerkin Method
• Weighting Function = Test/Trial Function:
iiw Ψ=
• Galerkin, Boris Grigorievich – 1871-1945– Engineer and Mathematician of Russia– He got a hint for Galerkin Method while
he was imprisoned because of anti-czarism (1906-1907).
FEM-intro 22
Example (1/2)
• Governing Equation
)10(02
2
≤≤=++ xxudx
ud
• Boundary Conditions: Dirichlet0@0 == xu1@0 == xu
• Exact Solution
xx
u −=1sin
sin
FEM-intro 23
Exact Solution xx
u −=1sin
sin
0
0.02
0.04
0.06
0.08
0.00 0.25 0.50 0.75 1.00
x
u
FEM-intro 24
Example (2/2)• Assume the following approx. solution:
221122
121 )1()1())(1( Ψ+Ψ=−+−=+−= aaaxxaxxxaaxxu
• Residual is as follows:
)1(),1( 221 xxxx −=Ψ−=Ψ
232
12
21 )62()2(),,( axxxaxxxxaaR −+−+−+−+=
• Let’s apply various types of MWR to this equation– We have two unknowns (a1, a2), therefore we need two
independent weighting functions.
Test/trial function satisfies u=0@x=0,1
FEM-intro 25
Collocation Method
• n=2,x=1/4,x=1/2 for collocation points:
• Solution:
0)2
1,,(,0)
4
1,,( 2121 == aaRaaR
=
−2/1
4/1
8/74/7
64/3516/29
2
1
a
a
217
40,
31
621 == aa
)4042(217
)1(x
xxu +−=
232
12
21 )62()2(),,( axxxaxxxxaaR −+−+−+−+=
FEM-intro 26
Least Square Method• Weighting functions, Residual:
• Solution:
=
399
55
1572707
101202
2
1
a
a
32
22
2
11 62,2 xxxa
Rwxx
a
Rw −+−=
∂∂=−+−=
∂∂=
0)62(),,(),,(
0)2(),,(),,(
321
021
2
1
021
21
021
1
1
021
=−+−=∂∂
=−+−=∂∂
∫∫
∫∫
dxxxxxaaRdxa
RxaaR
dxxxxaaRdxa
RxaaR
246137
41713,
246137
4616121 == aa
)4171346161(246137
)1(x
xxu +−=
232
12
21 )62()2(),,( axxxaxxxxaaR −+−+−+−+=
FEM-intro 27
Galerkin Method• Weighting functions, Residual:
• Results:
=
20/1
12/1
105/1320/3
20/310/3
2
1
a
a
41
7,
369
7121 == aa
)1(),1( 22211 xxwxxw −=Ψ=−=Ψ=
0)(),,(),,(
0)(),,(),,(
321
0212
1
021
21
0211
1
021
=−=Ψ
=−=Ψ
∫∫
∫∫dxxxxaaRdxxaaR
dxxxxaaRdxxaaR
)6371(369
)1(x
xxu +−=
232
12
21 )62()2(),,( axxxaxxxxaaR −+−+−+−+=
FEM-intro 28
Results
• Galerkin Method provides the most accurate solution– If functional exists, solutions of variational method and
Galerkin method agree.• A kind of analytical solution (later of this material)
• Many commercial FEM codes use Galerkin method.• In this class, Galerkin method is used.• Least-square may provide robust solution in Navier-
Stokes solvers for high Re.
X AnalyticalCollocation
0.25-0.50Collocation
0.33-0.67Least-Square
Galerkin
0.25 0.04401 0.04493 0.04462 0.04311 0.04408
0.50 0.06975 0.07143 0.07031 0.06807 0.06944
0.75 0.06006 0.06221 0.06084 0.05900 0.06009
FEM-intro 29
Homework (1/2)• Apply the following two method is the next page to
the same equations:– Method of Moment– Sub-Domain Method– Results at x=0.25, 0.50, 0.75
• Compare the results of “collocation method” on “non-collocaion points” with exact solution– Explain the behavior – Try different collocation points
FEM-intro 30
Homework (2/2)
• Method of Moment(モーメント法)
)1(1 ≥= − iw ii x– Weighting functions ?
• Sub-Domain Method(部分領域法)– Domain V is divided into subdomains Vi (i=1-n), and
weighting functions wi are given as follows:
=0
1iw
for points in Vifor points out of Vi
– Two unknowns, two sub domains
FEM-intro 31
• Numerical Method for PDE (Method of Weighted Residual)
• Gauss-Green’s Theorem• Numerical Method for PDE (Variational Method)
FEM-intro 32
Gauss’s Theorem
( )dSWnVnUndVz
W
y
V
x
U
S
zyx
V∫∫ ++=
∂∂+
∂∂+
∂∂
• 3D (x,y,z)
• Domain V surrounded by smooth closed surface S
• 3 continuous functions defined in V :– U(x,y,z),V(x,y,z),W(x,y,z)
• Outward normal vector n on surface S: – nx,ny,nz: direction cosine
V
Sn
FEM-intro 33
Green’s Theorem (1/2)
z
BAW
y
BAV
x
BAU
∂∂=
∂∂=
∂∂= ,,
• Assume the following functions:
• Thus:
∂∂
∂∂+
∂∂
∂∂+
∂∂
∂∂+
∂∂+
∂∂+
∂∂=
∂∂+
∂∂+
∂∂
z
B
z
A
y
B
y
A
x
B
x
A
z
B
y
B
x
BA
z
W
y
V
x
U2
2
2
2
2
2
• Apply Gauss’s theorem:
( ) dSnz
Bn
y
Bn
x
BAdSWnVnUn
dVz
B
z
A
y
B
y
A
x
B
x
AdV
z
B
y
B
x
BA
S
zyx
S
zyx
VV
∫∫
∫∫
∂∂+
∂∂+
∂∂=++=
∂∂
∂∂+
∂∂
∂∂+
∂∂
∂∂+
∂∂+
∂∂+
∂∂
2
2
2
2
2
2
FEM-intro 34
Green’s Theorem (2/2)• (cont.)
• Finally:
∫∫ ∫
∂∂
∂∂+
∂∂
∂∂+
∂∂
∂∂−
∂∂=
∂∂+
∂∂+
∂∂
VV S
dVz
B
z
A
y
B
y
A
x
B
x
AdS
n
BAdV
z
B
y
B
x
BA
2
2
2
2
2
2
dSn
BA
dSn
z
z
B
n
y
y
B
n
x
x
BAdSn
z
Bn
y
Bn
x
BA
S
SS
zyx
∫
∫∫
∂∂=
∂∂
∂∂+
∂∂
∂∂+
∂∂
∂∂=
∂∂+
∂∂+
∂∂
n
B
∂∂
• Appears often after next week– From 2nd order differentiation to 1st order differentiation.
Gradient of B to the direction of normal vector
FEM-intro 35
In Vector Form
• Gauss’s Theorem
• Green’s Theorem
dSdVS
T
V
nww ∫∫ =⋅∇
( ) ( )( ) dVuvdSuvdVuvV
TT
SV
∇∇−∇=∆ ∫∫∫ n
FEM-intro 36
• Numerical Method for PDE (Method of Weighted Residual)
• Gauss-Green’s Theorem• Numerical Method for PDE (Variational Method)
FEM-intro 37
Variational Method (Ritz) (1/2)変分法
• It is widely known that exact solution u provides extreme values (max/min) of “functional:汎関数” I(u) – Euler equation: differential equation satisfied by u, if
functional has extreme values(極値)– Euler equation is satisfied, if u provides extreme values of
I(u).
– provide extreme values:停留させる(or stationarize)
• For example, functional, which corresponds to governing equations of linear elasticity (principle of virtual work, equilibrium equations), is “principle of minimum potential energy (principle of minimum strain energy)(エネルギー最小,歪みエネルギー最小)” .
FEM-intro 38
Variational Method (Ritz) (2/2)変分法
i
M
i
iM au Ψ=∑=1
• Substitute the following approx. solution into I(u), and calculate coefficients ai under the condition where IM=I(uM) provides extreme values, then uMis obtained:
• Variational method is theoretical method, and can be only applied to differential equations, which has equivalent variational problem.– In this class, we mainly use MWR– Brief overview of Ritz method will given later today.
FEM-intro 39
Application of Variational Method (1/5)
( ) dVQuy
u
x
uuI
V
−
∂∂+
∂∂= ∫ 22
122
• Consider the following integration I(u) in 2D-domain V, where u(x,y) is unknown function of x and y:
S
V
• I(u) is “functional(汎関数)” of function u• u* is a twice continuously differentiable function and
minimizes I(u). η is an arbitrary function which satisfies η=0 at boundary S, and α is a parameter. Consider the following equation:
Q: known value
0=u at boundary S
( ) ( ) ( )yxyxuyxu ,,, * ηα ⋅+=
FEM-intro 40
Application of Variational Method (2/5)
( ) ( )*uIuI ≥• At this stage, the following condition is necessary:
( ) 00
* =⋅+∂∂
=α
ηαα
uI
• Assume that functional I(u*+αη) is a function of α. Functional I provides minimum value, if α=0. Therefore, the following equation is obtained:
• According to the definition of functional I(u), following equation is obtained
0**
=
−
∂∂
∂∂+
∂∂
∂∂
∫ dVQyyu
xx
u
V
ηηη
FEM-intro 41
( ) 00
* =⋅+∂∂
=α
ηαα
uI
0**
=
−
∂∂
∂∂+
∂∂
∂∂
∫ dVQyyu
xx
u
V
ηηη
( ) ( ) ηα
ηαα
Qu
QQu =∂
⋅+∂=∂∂ *
( ) dVQuy
u
x
uuI
V
−
∂∂+
∂∂= ∫ 22
122
( ) ( ) ( )yxyxuyxu ,,, * ηα ⋅+=
( )
yy
u
y
u
xx
u
x
u
xx
u
xx
u
x
u
x
u
x
u
x
u
x
u
∂∂
∂∂=
∂∂
∂∂
∂∂
∂∂=
∂∂
∂∂
⇒=∂∂=
∂∂
∂∂
∂∂+
∂∂=
∂⋅+∂=
∂∂
∂∂
∂∂⋅
∂∂=
∂∂
∂∂
ηα
ηα
αηα
ηαηααα
*2*2
**2
2
1,
2
10,
,2
1
FEM-intro 42
Application of Variational Method (3/5)• Apply Green’s theorem on 1st and 2nd term of LHS,
and apply integration by parts, then following equation is obtained:(A=η, B=u*)(next page) :
• At boundary S, η=0:
0*
2
*2
2
*2
=∂∂+
+
∂∂+
∂∂− ∫∫ dSn
udVQ
y
u
x
u
SV
ηη
yx ny
un
x
u
n
uwhere
∂∂+
∂∂=
∂∂ *** Gradient of u* in the direction
of normal vector
02
*2
2
*2
=
+
∂∂+
∂∂− ∫ dVQy
u
x
u
V
η
• (A) is required, if the above is true for arbitrary η0
2
*2
2
*2
=+∂∂+
∂∂
Qy
u
x
u(A)
FEM-intro 43
Green’s Theorem• (A=η, B=u*):
∫∫ ∫
∂∂
∂∂+
∂∂
∂∂−
∂∂=
∂∂+
∂∂
VV S
dVy
u
yx
u
xdS
n
udV
y
u
x
u ***
2
*2
2
*2 ηηηη
∫ ∫∫ ∂∂+
∂∂+
∂∂−=
∂∂
∂∂+
∂∂
∂∂
V SV
dSn
udV
y
u
x
udV
y
u
yx
u
x
*
2
*2
2
*2**
ηηηη
0**
=
−
∂∂
∂∂+
∂∂
∂∂
∫ dVQyyu
xx
u
V
ηηη
FEM-intro 44
Application of Variational Method (4/5)
• Equation (A) is called “Euler equation”– Necessary condition of u*, which minimizes functional I(u), is
that u* satisfies the Euler equation.
• Sufficient condition:– Assume that u* is solution of the Euler equation and αη=δu*
( ) ( )( ) ( )
dVy
u
x
udVuQ
y
u
x
u
uIuuI
VV
∂∂+
∂∂+
+
∂∂+
∂∂−
=−+
∫∫2*2*
*2
*2
2
*2
***
2
1 δδδ
δ
δI= 0First Variation第一変分
δI2≧0Second Variation第二変分
FEM-intro 45
Application of Variational Method (5/5)• It has been proved that u* (solution of Euler equation)
minimizes functional I(u).
( ) ( )*** uIuuI ≥+δ• Therefore, boundary value problem by Euler equation
(A) with B.C. (u=0) is equivalent to variational problem.– Solving equivalent variational problem provides solution of
Euler equation (Poission equation in this case)– Functional must exist !
*u
FEM-intro 46
Approx. by Variational Method (1/4)
• Functional
( ) dxxuudx
duuI ∫
−−
=1
0
22
2
1
2
1
• Boundary Condition0@0 == xu1@0 == xu
• Obtain u, which “stationalizes” functional I(u) under this B.C.– Corresponding Euler equation is as follows (same as
equation in p.21):
)10(02
2
≤≤=++ xxudx
ud (B-1)
FEM-intro 47
Approx. by Variational Method (2/4)
• Assume the following test function with n-th order for function u, which is twice continuously differentiable:
( ) ( )123211 −++++⋅−⋅= nnn xaxaxaaxxu L• If we increase the order of test function, un is closer
to exact solution u. Therefore, functional I(u) can be approximated by I(un):– If I(un) stationarizes, I(u) also stationarizes.
• We need to obtain set of unknown coefficients ak, which satisfies the following stationary condition:
( ) ( )nka
uI
k
n ~10 ==∂
∂(B-3)
(B-2)
FEM-intro 48
Ritz Method
• Equation (B-3) is linear equations for a1-an.
• If this solutions is applied to equation (B-2), approximate solution, which satisfies Euler equation (B-1), is obtained.– Approximate solution, but satisfies Euler equation strictly (厳密解)
• This type of method using a set of coefficients a1-an is called “Ritz Method”.
FEM-intro 49
Approx. by Variational Method (3/4)
• Ritz Method, n=2
( ) ( ) ( ) ( ) 221212 111 axxaxxxaaxxu ⋅−⋅+⋅−⋅=+⋅−⋅=
( )⇒=
∂∂
01
2
a
uI ( )( )
( )( ) ( ){ } ( ) 0113221
311
1
0
22
1
0
232
1
1
0
22
=−+
−−−−+
+−−−
∫∫
∫
dxxxadxxxxxx
adxxxxx
( )⇒=
∂∂
02
2
a
uI ( )( ) ( ){ }
( )( ) ( ) 012232
13221
1
0
32
1
0
3232
1
1
0
232
=−+
−−+−+
−−−−
∫∫
∫
dxxxadxxxxxxx
adxxxxxx
FEM-intro 50
Supplementation for (3/4) (1/3)
• Ritz Method, n=2
( ) ( ) ( ) ( ) 221212 111 axxaxxxaaxxu ⋅−⋅+⋅−⋅=+⋅−⋅=
( ) dxxuudx
duuI ∫
−−
=1
0
22
2
1
2
1
( ) ( )[ ] ( ) ( )[ ]( ) ( )[ ]2312
2
22
1
2
22
1
22
11
112
13221
2
1
2
1
2
1
axxaxx
axxaxxaxxax
xuudx
du
⋅−⋅+⋅−⋅−
⋅−⋅+⋅−⋅−−+−
=−−
FEM-intro 51
Supplementation for (3/4) (2/3)
( ) ( ){ }
( )( ) ( ){ } ( ) 0113221
121
1
0
22
1
0
232
1
1
0
222
=−⋅−
−⋅−−−+
−⋅−−
∫∫
∫
dxxxadxxxxxx
adxxxx
( ) ( )[ ] ( ) ( )[ ]( ) ( )[ ]2312
2
22
1
2
22
1
22
11
112
13221
2
1
2
1
2
1
axxaxx
axxaxxaxxax
xuudx
du
⋅−⋅+⋅−⋅−
⋅−⋅+⋅−⋅−−+−
=−−
( )⇒=
∂∂
01
2
a
uI
FEM-intro 52
Supplementation for (3/4) (3/3)
( )( ) ( ){ }
( ) ( ){ } ( ) 01132
13221
1
0
32
1
0
2422
1
1
0
232
=−⋅−
−⋅−−+
−⋅−−−
∫∫
∫
dxxxadxxxx
adxxxxxx
( ) ( )[ ] ( ) ( )[ ]( ) ( )[ ]2312
2
22
1
2
22
1
22
11
112
13221
2
1
2
1
2
1
axxaxx
axxaxxaxxax
xuudx
du
⋅−⋅+⋅−⋅−
⋅−⋅+⋅−⋅−−+−
=−−
( )⇒=
∂∂
02
2
a
uI
FEM-intro 53
Approx. by Variational Method (4/4)
• Final linear equations are as follows:
=
20/1
12/1
105/1320/3
20/310/3
2
1
a
a
41
7,
369
7121 == aa
)6371(369
)1(x
xxu +−=
• This result is identical with that of Galerkin Method– NOT a coincidence !!
FEM-intro 54
Galerkin Method• Weighting functions (which satisfy u=0@x=0,1),
Residual:
• Results:
=
20/1
12/1
105/1320/3
20/310/3
2
1
a
a
41
7,
369
7121 == aa
)1(),1( 22211 xxwxxw −=Ψ=−=Ψ=
0)(),,(),,(
0)(),,(),,(
321
0212
1
021
21
0211
1
021
=−=Ψ
=−=Ψ
∫∫
∫∫dxxxxaaRdxxaaR
dxxxxaaRdxxaaR
)6371(369
)1(x
xxu +−=
232
12
21 )62()2(),,( axxxaxxxxaaR −+−+−+−+=
FEM-intro 55
Ritz Method & Galerkin Method (1/4)( ) ( ) 2211212 1 wawaxaaxxu +=+⋅−⋅=
( )
[ ] 11
22
1
122111
22
22
1
122
11
2
1
2
2
2
1
2
1
2
1
wxa
uxxu
a
wwawaa
uuu
a
dx
dw
dx
dwa
dx
dwa
dx
du
adx
du
dx
du
a
⋅=∂∂⋅=
∂∂
⋅+=∂∂⋅=
∂∂
+=
∂∂⋅=
∂∂
( ) dxxuudx
duuI ∫
−−
=1
0
22
2
1
2
1
( )⇒=
∂∂
01
2
a
uI
( )⇒=
∂∂
02
2
a
uI
( ){ } 01
0
22111
1
0
221
1
21 =
++−
+
∫∫ dxxawawwdxadx
dw
dx
dwa
dx
dw
( ){ } 01
0
22112
1
0
2
2
21
21 =
++−
+ ∫∫ dxxawawwdxadxdw
adx
dw
dx
dw
FEM-intro 56
Ritz Method & Galerkin Method (2/4)( )
⇒=∂
∂0
1
2
a
uI
( ){ } 01
0
22111
1
0
221
1
21 =
++−
+
∫∫ dxxawawwdxadx
dw
dx
dwa
dx
dw
∫∫∫
−=
−
=
1
0
121
2
1
1
0
121
2
1
1
0
111
1
0
1
2
1 dxadx
wdwdxa
dx
wdw
dx
dwwadxa
dx
dw
∫∫∫
−=
−
=
1
0
222
2
1
1
0
222
2
1
1
0
212
1
0
221 dxa
dx
wdwdxa
dx
wdw
dx
dwwadxa
dx
dw
dx
dw
)1(
),1(2
22
11
xxw
xxw
−=Ψ=
−=Ψ= 21
2
1111
1 dx
wdw
dx
dw
dx
dw
dx
dww
x+=
∂∂
22
2
1212
1 dx
wdw
dx
dw
dx
dw
dx
dww
x+=
∂∂
FEM-intro 57
Ritz Method & Galerkin Method (3/4)( )
⇒=∂
∂0
1
2
a
uI
( ) 01
0
2211222
2
121
2
1 =
+++
+− ∫ dxxawawadx
wda
dx
wdw
01
0
222
2
1 =
++− ∫ dxxudx
udw
( )⇒=
∂∂
02
2
a
uI
( ) 01
0
2211222
2
121
2
2 =
+++
+− ∫ dxxawawadx
wda
dx
wdw
01
0
222
2
2 =
++− ∫ dxxudx
udw
Galerkin Method !!
02
2
=++ xudx
ud
2211 wawau +=
FEM-intro 58
Ritz Method & Galerkin Method (4/4)
• This example is a very special case. But, generally speaking, results of Galerkin method and Ritz method agree, if functional exists.
• Although Ritz method provides approx. solution, that satisfies Euler equation in strict sense. Therefore, solution of Ritz method is closer to exact solution.– This is the main reason that Galerkin method is accurate.
• Please just remember this.
• This relationship between Ritz and Galerkin is not correct if functional does not exist.– In these cases, Galerkin method is not necessarily the
best method from the viewpoint of accuracy and robustness.