Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Previous Class
This Class
Numerical integration: Gauss quadrature
• Introduction to numerical integration and Gauss quadrature
• Gauss quadrature in one dimension (1D)
• Derivation of Gauss points and weights
(one point, two-point, and n point quadrature)
• FEM example
• Gauss quadrature in 2D
• Exactness of Gauss quadrature in 2D
• Full, reduced and recommended integration in 2D
• Minimum integration order
• Gauss quadrature in 3D
2
1
Introduction
Numerical integration:
• Evaluating the integrand at specific points
• Multiplying each result by an appropriate weighting factor
• Summing up the results f
x
x2
∫ fdx ≈ W f
x1
1 1 + W2 f 2 + ... + Wn f n
x
x1 x2
2
One dimension Gauss quadrature
Transform of integration limit: from x1 and x2 to -1 and 1
so that the formulas will be generalized
x = 12 (1 − ξ ) x1 + 12 (1 + ξ ) x2
x2 1
∫ fdx
x1
∫ φ dξ
−1
φ = f ( x(ξ ) ) dx / d ξ
Transformation Jacobian J = dx / dξ = ( x2 − x1 ) / 2
From now on, we need to work only with -1 to 1 limits
5
∫ξ dξ = 2 / 5
4
∫ 1.dξ = 2 ∫ξ dξ = 2 / 3
2
−1 −1 −1
1 1
∫ ξ dξ = 0
−1
∫ξ
3
dξ = 0 ...
−1
3
Deriving sampling points and weights
Based on the condition that all terms need to be
integrated exactly
f (ξ ) = a0 + a1ξ
1 n
∫ a1ξ dξ = 0 = ∑Wiξi
−1 i =1
There are two equations;
We need at least two unknowns for the solution to exist
7 At least 1 Gauss point needed (n=1)
∫ a d ξ = 2a
−1
0 0 = W1a0 ⇒ W1 = 2
f
1
∫ a ξ dξ = 0 = W ξ
−1
1 1 1 ⇒ ξ1 = 0
ξ1 = 0 W1 = 2
4
Two Gauss point rule (n=2)
Example: Third order polynomial
∫ a0 dξ = 2a0 = ∑Wi a0
−1 i =1
∫ a1ξ dξ = 0 = ∑Wi a1ξi
−1 i =1
1 n
∫aξ 2
2
dξ = 2 / 3a2 = ∑ W a ξi 2 i
2
−1 i =1
−1 i =1
Unknown: W1 , ξ1 , W2 , ξ 2
f
W1 + W2 = 2
W1ξ1 + W2ξ 2 = 0
W1ξ12 + W2ξ 22 = 2 / 3 x
−1 −1 0 1 1
W1ξ13 + W2ξ 23 = 0 3 3
W1 = 1
Solving the W2 = 1
equations, we
ξ1 = 1/ 3
have:
ξ 2 = − 1/ 3
10
5
Three Gauss point rule (n=3)
Fifth order polynomial
∫ a0 dξ = 2a0 = ∑Wi a0
i =1
∫ a1ξ dξ = 0 = ∑Wi a1ξi
−1 i =1
−1
1 n 1 n
−1 i =1 −1 i =1
1 n 1 n
−1 i =1 −1 i =1
Unknown: W1 , ξ1 , W2 , ξ 2 ,W3 , ξ3
W1 = 5 / 9 ξ1 = − 3 / 5
Solving the
equations, we W2 = 8 / 9 ξ2 = 0
have: W3 = 5 / 9 ξ3 = 3 / 5
12
6
Remarks on the derivation
1) Note that the integration for odd order terms are
always zero, e.g.
13
FEM example
Beam element (X=ξ l) 2 4
1 3
length N1
[ K ] = ∫ [ B]T [ EI ][ B]ldξ N4
−1
Polynomial order 2 Recall: cubic shape function
(use two point Gauss quadrature)
7
Gauss quadrature in two dimensions
1 1 1
η
I= ∫ ∫ φ (ξ ,η )dξ dη ≈ ∫ ∑Wiφ (ξi ,η )dη
−1 −1 −1 i
1 1
= ∑ W j ∑ Wiφ (ξi ,η j ) = ∑∑ W jWiφ (ξi ,η j )
1/ 3
j i j i
ξ
−1/ 3 1 1
η
−1/ 3 1/ 3
0.6
25
81
40
81
25
81
2 point rule
40 64 40
81 81 81
ξ
− 0.6
25
81
40
81
25
81 m x n rule possible
but not
− 0.6 0.6 recommended
15 3 point rule
1 1
I= ∫ ∫ξ η
l m
dξdη
−1 -1 Gauss rule
for exact
Integration
Constant (l = m = 0) 1
Linear (l + m = 1) ξ η
One point
2
Quadratic (l + m = 2) ξ ξη η2
Cubic (l + m = 3) ξ3 ξ 2η ξη2 η3 2x2
4 3 2 2
Quartic (l + m = 4) ξ ξ η ξ η ξη3 η4
ξ 3 η2 ξ 2 η3
ξ 3 η3
16
8
Full, reduced and recommended integration in 2D
Q4 2x2 1 2x2
17
U e = 12 U o ∫ J d ξ dη d ς
Ve
9
Three dimensions
1 1 1
I= ∫ ∫ ∫ φ (ξ ,η , ς )dξ dη dς
−1 −1 −1
≈ ∑∑∑ WW
i jWk φ (ξi ,η j , ς k )
i j k
19
Next class
20
10