Sunteți pe pagina 1din 11

Mathematical pre-setup for pseudo-coding element types in FEA

Jide Williams

Isoparametric Bilinear element


This type of element is useful when geometry becomes very complex and integration
becomes complex as well. It depends on a concept called natural coordinates which
makes use of 𝜉 𝑎𝑛𝑑 𝜂 equivalent to x and y in cartesian coordinate system. See figure
below:

Now because element is Isoparametric, iso-same, para- parameter; the same shape
function is used to interpolate both displacements, (field quantity) and geometry
(shape). In other words, you can use shape functions to estimate the displacement of a
node through interpolation, with the same shape functions you can estimate the
geometry or location of a point within the element, interpolated from the nodal
coordinate points. Isoparametric elements are useful for many applications including
plane stress, plane strain, 3D elements and so on

Mathematically you can write


For geometry;
𝑛

∑ 𝑁𝑖 𝑋𝑖
𝑋 𝑖=1
{ }= 𝑛 = [𝑁]{𝑐 }𝑜𝑟
𝑌
∑ 𝑁𝑖 𝑌𝑖
{ 𝑖=1 }

T
{c} = [ x1 y1, x2 y2, x3 y3, x4 y4,]

𝑋 = 𝑁1 𝑋1 + 𝑁2 𝑋2 + 𝑁3 𝑋3 + 𝑁4 𝑋4 ;
𝑌 = 𝑁1 𝑌1 + 𝑁2 𝑌2 + 𝑁3 𝑌3 + 𝑁4 𝑌4 ;

𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒 𝑝𝑜𝑖𝑛𝑡𝑠, 𝐼𝑇 𝐼𝑆 𝐴 𝐹𝑈𝑁𝐶𝑇𝐼𝑂𝑁 𝑂𝐹 𝐴 𝑆𝐼𝑁𝐺𝐿𝐸 𝐸𝐿𝐸𝑀𝐸𝑁𝑇.


𝑓𝑜𝑟 𝑒𝑥𝑎𝑚𝑝𝑙𝑒 𝑖𝑓 𝑤𝑒 𝑎𝑟𝑒 𝑑𝑒𝑎𝑙𝑖𝑛𝑔 𝑤𝑖𝑡ℎ 𝑎 𝑄4, 𝑛 = 4, 𝑜𝑟 8 𝑓𝑜𝑟 𝑎 𝑄8. X1 Y1…. Xn Yn is the
coordinate of the first point, and the nth point.

The solution will give us a single value for X and Y stating that point for a single
element.

For the nodal displacements however,


𝑛

∑ 𝑁𝑖 𝑈𝑖
𝑈 𝑖=1
[𝑁]{𝑑 } 𝑜𝑟
{ }= 𝑛
𝑉
∑ 𝑁𝑖 𝑉𝑖
{ 𝑖=1 }

T
{d} = [ u1 v1 u2 v2 u3 v3 u4 v4]

𝑈 = 𝑁1 𝑈1 + 𝑁2 𝑈2 + 𝑁3 𝑈3 + 𝑁4 𝑈4 ;
𝑉 = 𝑁1 𝑉1 + 𝑁2 𝑉2 + 𝑁3 𝑉3 + 𝑁4 𝑉4 ;

Again, 𝑛 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑛𝑜𝑑𝑎𝑙 𝑝𝑜𝑖𝑛𝑡𝑠, 𝑓𝑜𝑟 𝑒𝑥𝑎𝑚𝑝𝑙𝑒 𝑖𝑓 𝑤𝑒 𝑎𝑟𝑒 𝑑𝑒𝑎𝑙𝑖𝑛𝑔 𝑤𝑖𝑡ℎ 𝑎 𝑄4, 𝑛 =
4, 𝑜𝑟 𝑛 = 8 𝑓𝑜𝑟 𝑎 𝑄8. U1, V1…. Un Vn are the nodal displacements of the first node,
and the nth node

The shape functions are being derived in another article, here they are stated as follow:

N 1⁄4 * (1 – ξ) (1 – η);
1=
N 1⁄4 * (1 + ξ) (1 – η);
2=
N 1⁄4 * (1 + ξ) (1 + η);
3=
N 1⁄4 * (1 – ξ) (1 + η);
4=
In the pseudocode, these can be defined right off the back, and can be written in matrix
form as:

1 1 1 1 1
𝑁1
𝑋1 𝑋2 𝑋3 𝑋4 𝑋
𝑁
𝑌1 𝑌2 𝑌3 𝑌4 *[ 2 ] = 𝑌
𝑁3
𝑈1 𝑈2 𝑈3 𝑈4 𝑈
𝑁 [𝑉 ]
( 𝑉1 𝑉2 𝑉3 𝑉4 ) 4

You need to develop a [B] matrix, just simply because


[B] is needed in the development of stiffness matrix. That is:
[k] = ∫ [B]T [E][B] d V

To get [B] it is essentially, remember that


𝜕𝑈 𝜕𝑉 𝜕𝑈 𝜕𝑉
𝜀𝑥 = , 𝜀𝑦 = 𝜀𝑥𝑦 = +
𝜕𝑋 𝜕𝑌 𝜕𝑌 𝜕𝑋

So that now,

𝜕𝑈 𝜕(𝑁1 𝑈1 + 𝑁2 𝑈2 + 𝑁3 𝑈3 + 𝑁4 𝑈4 )
𝜀𝑥 = =
𝜕𝑋 𝜕𝑋

But U1, U2, U3, V1, V2, V3… Un, Vn are real numbers…. They are constants, I can factor
them out

𝑈1 𝜕𝑁1 𝑈2 𝜕𝑁2 𝑈3 𝜕𝑁3 𝑈4 𝜕𝑁4 𝑈𝑛 𝜕𝑁𝑛


𝜀𝑥 = + + + +⋯…
𝜕𝑋 𝜕𝑋 𝜕𝑋 𝜕𝑋 𝜕𝑋

We are differentiating with respect to X and not X1, X2, X3, Xn, are real numbers but N is
a function
In the same manner,

𝜕𝑈 𝜕(𝑁1 𝑈1 + 𝑁2 𝑈2 + 𝑁3 𝑈3 + 𝑁4 𝑈4 )
𝜀𝑦 = =
𝜕𝑌 𝜕𝑌

𝑉1 𝜕𝑁1 𝑉2 𝜕𝑁2 𝑉3 𝜕𝑁3 𝑉4 𝜕𝑁4 𝑉𝑛 𝜕𝑁𝑛


𝜀𝑦 = + + + + ⋯…
𝜕𝑌 𝜕𝑌 𝜕𝑌 𝜕𝑌 𝜕𝑌

And,

𝑉1 𝜕𝑁1 𝑈1 𝜕𝑁1 𝑉2 𝜕𝑁2 𝑈2 𝜕𝑁2 𝑉3 𝜕𝑁3 𝑈3 𝜕𝑁3 𝑉4 𝜕𝑁4 𝑈1 𝜕𝑁4


𝛾𝑥𝑦 = + + + + + + +
𝜕𝑋 𝜕𝑌 𝜕𝑋 𝜕𝑌 𝜕𝑋 𝜕𝑌 𝜕𝑋 𝜕𝑌

𝜕𝑁𝑖 𝜕𝑁𝑖 𝜕𝑁𝑖 𝜕𝑁𝑖


𝐵= , , + .
𝜕𝑋 𝜕𝑌 𝜕𝑌 𝜕𝑋
𝜕𝑁𝑖
But 𝜕𝑋 may be difficult to differentiate because Ni is a function of natural coordinate
𝜉 𝑎𝑛𝑑 𝜂, 𝑛𝑜𝑡 𝑥 𝑎𝑛𝑑 𝑦.

So, chain rule will be used as

∂Ni /∂x = ∂Ni /∂ξ * ∂ξ /∂x + ∂Ni /∂η * ∂η /∂x


∂Ni /∂y = ∂Ni /∂ ξ * ∂ξ /∂y + ∂Ni /∂η * ∂η /∂y
𝛛𝐍𝑖 𝛛𝛏 𝛛𝐍𝑖 𝛛𝛈
𝛛𝐍𝑖 ∗ ∗
𝛛𝐗 𝛛𝛏 𝛛𝐗 𝛛𝛈 𝛛𝐗
{ }=
𝛛𝐍𝑖 𝛛𝐍𝑖 𝛛𝛏 𝛛𝐍𝑖 𝛛𝛈
𝛛𝐘 ∗ ∗
[ 𝛛𝛏 𝛛𝐘 𝛛𝛈 𝛛𝐘]

𝛛𝐍𝑖 𝛛𝛏 𝛛𝛈 𝛛𝐍𝑖
{ 𝛛𝐗 } = [𝛛𝐗 𝛛𝐗] ∗ { 𝛛𝛏 }
𝛛𝐍𝑖 𝛛𝛏 𝛛𝛈 𝛛𝐍𝑖
𝛛𝐘 𝛛𝐘 𝛛𝐘 𝛛𝛈

𝛛𝐍𝑖 𝛛𝐍𝑖
But recall that , 𝛛𝛈 𝑎𝑟𝑒 𝑒𝑎𝑠𝑦 𝑡𝑜 𝑓𝑖𝑛𝑑 𝑏𝑒𝑐𝑎𝑢𝑠𝑒 𝑁𝑖 𝑖𝑠 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑥𝑖 𝑎𝑚𝑑 𝑒𝑡𝑎.
𝛛𝛏

𝛛𝛏 𝛛𝛈 𝛛𝛏 𝛛𝛈
So now, to find 𝛛𝐗 , 𝛛𝐗, 𝛛𝐘 , 𝛛𝐘 we use another characteristic of Isoparametric element. That
is:
𝑋 = 𝑁1 𝑋1 + 𝑁2 𝑋2 + 𝑁3 𝑋3 + 𝑁4 𝑋4 ;
But X1, X2, X3, X4 …Xn are constants they are real numbers and Ni are functions of
natural coordinates 𝜉 𝑎𝑛𝑑 𝜂.
Taking partials of X, Y with respect to 𝜉 𝑎𝑛𝑑 𝜂 𝑏𝑒𝑐𝑜𝑚𝑒𝑠

𝛛𝐗 𝛛𝑁1 𝑋1 𝛛𝑁2 𝑋2 𝛛𝑁3 𝑋3 𝛛𝑁4 𝑋4


= + + + ; 𝑤ℎ𝑖𝑐ℎ 𝑐𝑎𝑛 𝑏𝑒 𝑟𝑒𝑤𝑟𝑖𝑡𝑡𝑒𝑛 𝑎𝑠
𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉

𝑋1 𝛛𝑁1 𝑋2 𝛛𝑁2 𝑋3 𝛛𝑁3 𝑋4 𝛛𝑁4


= + + +
𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉

𝛛𝐘 𝛛𝑁1 𝑌1 𝛛𝑁2 𝑌2 𝛛𝑁3 𝑌3 𝛛𝑁4 𝑌4


= + + + ; 𝑤ℎ𝑖𝑐ℎ 𝑐𝑎𝑛 𝑏𝑒 𝑟𝑒𝑤𝑟𝑖𝑡𝑡𝑒𝑛 𝑎𝑠
𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉

𝑌1 𝛛𝑁1 𝑌2 𝛛𝑁2 𝑌3 𝛛𝑁3 𝑌4 𝛛𝑁4


= + + +
𝛛𝜉 𝛛𝜉 𝛛𝜉 𝛛𝜉

And since we have already initialized N 1⁄4 * (1 – ξ) (1 – η); N2, N3 and N4,
1=
We can write

𝛛𝐍1 1 𝛛𝐍3 1
= ∗ (𝜂 − 1 ); = ∗ (𝜂 + 1);
𝛛𝛏 4 𝛛𝛏 4

𝛛𝐍2 1 𝛛𝐍4 1
= ∗ (1 − 𝜂 ); = ∗ (−𝜂 − 1);
𝛛𝛏 4 𝛛𝛏 4
𝛛𝐍1 1 𝛛𝐍3 1
= ∗ (𝜉 − 1 ) = ∗ (𝜉 + 1);
𝛛𝛈 4 𝛛𝛈 4

𝛛𝐍2 1 𝛛𝐍4 1
= ∗ (−𝜉 − 1) = ∗ (1 − 𝜉 );
𝛛𝛈 4 𝛛𝛈 4

All these are therefore initialized in the pseudocode.


𝜉 𝑎𝑛𝑑 𝜂 𝑎𝑟𝑒 𝐺𝑎𝑢𝑠𝑖𝑎𝑛 𝑞𝑢𝑎𝑑𝑟𝑎𝑡𝑢𝑟𝑒 𝑝𝑜𝑖𝑛𝑡𝑠 𝑓𝑜𝑟 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛. This will discuss shortly.

The matrix we had above was

𝛛𝛏 𝛛𝛈

[𝛛𝐗
𝛛𝛏
𝛛𝐗
𝛛𝛈
] inverting this matrix, we get what we want which is
𝛛𝐘 𝛛𝐘

𝛛𝐗 𝛛𝐘
𝛛𝛏 𝛛𝛏
[𝐽] = [𝛛𝐗 𝛛𝐘]
𝛛𝛈 𝛛𝛈
This is what J is Jacobian matrix so that if we invert it we will still obtain the same
answer

𝜕𝜉 𝜕𝜂
𝐽−1 [= 𝜕𝑋 𝜕𝑋 ]
𝜕𝜉 𝜕𝜂
𝜕𝑌 𝜕𝑌
The utility here is that once we find the [J] matrix above, we just invert it.
This can be written in matrix form for computational analysis and pseudocode.
[B] which is a combination of the derivatives strains in the X, Y direction, and shear in
the X-Y direction, is

For a 4 noded element will be [B] is set up like this

[B] = ∂ N1 /∂ x 0 ∂N2 /∂x 0 ∂N3 /∂x 0 ∂N4 /∂x 0


0 ∂N1 /∂y 0 ∂N2 /∂y 0 ∂N3 /∂y 0 ∂N 4 /∂y
∂N1 /∂y ∂N1 /∂x ∂N2 /∂y ∂N2 /∂x ∂N3 /∂y ∂N3 /∂x ∂N4 /∂y ∂N4 /∂x

This can easily be populated, as they are all numerical.


Gauss Quadrature Rule
The rule estimates that if you evaluate(integrate) a field variable 𝜑(𝜉) at a certain
designated position and multiply each evaluation by a weight and sum up the
evaluations the result will be very accurate. The integration domain must be between -1
and 1

One-dimension Gauss Rule


This means you integrating along 𝜉 𝑜𝑟 𝑎𝑙𝑜𝑛𝑔 𝜂 𝑎𝑥𝑖𝑠, 𝑛𝑜𝑡 𝑏𝑜𝑡ℎ.

One-point rule
𝟏 𝟏
∫ 𝑭(𝝃) 𝒅𝝃 ≈ ∑ 𝒘𝒊 ∗ 𝑭(𝝃) = 𝟐𝑭(𝑶)
−𝟏 𝒊=𝟏

Essentially what this means is that you are integrating or summing at xi value = 0 and
using a weight value w = 2, 𝑖. 𝑒 . , 𝜉 = 0, 𝑎𝑛𝑑 𝑤𝑒𝑖𝑔ℎ𝑡 𝑣𝑎𝑙𝑢𝑒 𝑖𝑠 𝑖𝑛 𝑎 𝑜𝑛𝑒 −
𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛

Two Points Rule – One-dimensional integration


Now you are integrating using two points or positions.
𝟏 𝟐 −𝟏 𝟏
∫ 𝑭(𝝃) 𝒅𝝃 ≈ ∑ 𝒘𝒊 ∗ 𝑭(𝝃) ≈ 𝟏 ∗ 𝑭 ( )+𝟏∗𝑭(
)
−𝟏 𝒊=𝟏 √𝟑 √𝟑
Here, weight factor is 1, and we are integrating
−𝟏 𝟏
𝜉 𝑣𝑎𝑙𝑢𝑒𝑠 𝑓𝑟𝑜𝑚 ( ) 𝑡𝑜 ( ) 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦𝑖𝑛𝑔 𝑏𝑦 𝑖𝑡𝑠 𝑤𝑒𝑖𝑔ℎ𝑡 𝑎𝑡 𝑒𝑎𝑐ℎ 𝑝𝑜𝑖𝑛𝑡 𝑎𝑛𝑑 𝑠𝑢𝑚𝑚𝑖𝑛𝑔 𝑓𝑟𝑜𝑚 𝑓𝑖𝑟𝑠𝑡 𝑡𝑜
√𝟑 √𝟑
𝑠𝑒𝑐𝑜𝑛𝑑 𝑝𝑜𝑖𝑛𝑡 𝑖𝑛 𝑎 𝑜𝑛𝑒 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛

Three Points Rule – One-dimensional integration


Now you are integrating using two points or positions.

𝟏 𝟑 𝟓 √𝟑 𝟖 𝟓 √𝟑
∫ 𝑭(𝝃) 𝒅𝝃 ≈ ∑ 𝒘𝒊 ∗ 𝑭(𝝃) ≈ ∗ 𝑭 (− ) + ∗ 𝑭(𝟎) + ∗ 𝑭 ( )
−𝟏 𝒊=𝟏 𝟗 𝟓 𝟗 𝟗 𝟓
With 3 point rule, weight factor is ranges from w1 to w3, which are 5/9, 8/9, and 5/9
respectively and we are integrating
−√𝟑 −√𝟑
𝜉 𝑣𝑎𝑙𝑢𝑒𝑠 𝑓𝑟𝑜𝑚 ( 𝟓 ) 𝑡𝑜 0, 𝑡𝑜 ( 𝟓 ) 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦𝑖𝑛𝑔 𝑏𝑦 𝑖𝑡𝑠 𝑤𝑒𝑖𝑔ℎ𝑡 𝑎𝑡 𝑒𝑎𝑐ℎ 𝑝𝑜𝑖𝑛𝑡 𝑎𝑛𝑑 𝑠𝑢𝑚𝑚𝑖𝑛𝑔 𝑓𝑟𝑜𝑚 𝑓𝑖𝑟𝑠𝑡
𝑠𝑒𝑐𝑜𝑛𝑑 𝑝𝑜𝑖𝑛𝑡 𝑖𝑛 𝑎 𝑜𝑛𝑒 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛

One-point rule – Two-Dimensional Integration


Two-dimensional integration is typical with plane stress problems, i.e. you will have to
integrate along 𝜉 𝑎𝑛𝑑 𝜂, and 𝑖 𝑎𝑛𝑑 𝑗 𝑎𝑟𝑒 𝑡ℎ𝑒 𝑑𝑖𝑟𝑒𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛

One-Point rule therefore will mean integrating that point twice, one along
𝜉, 𝑎𝑛𝑑 𝑡ℎ𝑒 𝑜𝑡ℎ𝑒𝑟 𝑎𝑙𝑜𝑛𝑔 𝜂.
𝟏 𝟏
𝟏
∬ 𝑭(𝝃) 𝒅𝝃𝒅𝜼 ≈ ∑ ∑ 𝒘𝒊 ∗ 𝒘𝒋 ∗ 𝑭(𝝃𝒊 𝜼𝒋 ) = 𝟐 ∗ 𝟐 ∗ 𝑭(𝟎, 𝟎)
−𝟏 𝒊=𝟏
𝒋=𝟏

Essentially what this means when 𝑖 𝑎𝑛𝑑 𝑗 = 1 you are integrating two times summing at
𝜉 = 0, η = 0, and using a weight values wi and wj = 2 at each point 𝑖. 𝑒 . , 𝑖𝑛 𝑎 𝑡𝑤𝑜 −
𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛
The key here is 𝑖 𝑙𝑜𝑜𝑝𝑠 𝑜𝑛𝑐𝑒, 𝑗 𝑙𝑜𝑜𝑝𝑠 𝑜𝑛𝑐𝑒 𝑚𝑎𝑘𝑒 𝑡𝑤𝑜 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠

Two Points Rule – Two-dimensional integration


Now you are integrating using two points or positions.
𝟏 𝟐
𝟐 𝟏 𝟏 𝟏 𝟏
∬ 𝑭(𝝃) 𝒅𝝃𝒅𝜼 ≈ ∑ ∑ 𝒘𝒊 𝒘𝒋 ∗ 𝑭(𝝃𝒊 , 𝜼𝒋 ) ≈ 𝟏 ∗ 𝟏 ∗ 𝑭 (− ,− , , )
𝒊=𝟏
𝒋=𝟏
√𝟑 √𝟑 √𝟑 √𝟑
−𝟏
The example above is when 𝑖 𝑎𝑛𝑑 𝑗 = 1.
𝟏 𝟏
𝜉1 𝑖𝑠 (− ) , 𝜂1 𝑖𝑠 (− ) 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦𝑖𝑛𝑔 𝑏𝑦 𝑡ℎ𝑒𝑖𝑟 𝑤𝑒𝑖𝑔ℎ𝑡 𝑓𝑎𝑐𝑡𝑜𝑟𝑠 𝑒𝑎𝑐ℎ 𝑝𝑜𝑖𝑛𝑡 𝑤ℎ𝑖𝑐ℎ 𝑖𝑠 1, 𝑎𝑛𝑑 𝑠𝑢𝑚𝑚𝑖𝑛𝑔
√𝟑 √𝟑
𝑖𝑛 𝑎 𝑡𝑤𝑜 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑎𝑠 𝑠ℎ𝑜𝑤𝑛
The key here is that 𝑖 𝑙𝑜𝑜𝑝𝑠 𝑓𝑟𝑜𝑚 1 𝑡𝑜 2, 𝑗 𝑙𝑜𝑜𝑝𝑠 𝑓𝑟𝑜𝑚 1 𝑡𝑜 2 𝑚𝑎𝑘𝑖𝑛𝑔 4 𝑡𝑜𝑡𝑎𝑙 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛𝑠

Three Points Rule – Two-dimensional integration


Now you are integrating using two points or positions.
𝟏 𝟑
𝟑 𝟓 √𝟑 √𝟑 √𝟑 √𝟑
∭ 𝑭(𝝃) 𝒅𝝃𝒅𝜼 ≈ ∑ ∑ 𝒘𝒊 ∗ 𝒘𝒋 ∗ 𝑭 (𝝃𝒊 , 𝜼, 𝒋 ) ≈ ∗ 𝑭 (− ,− 𝟎, 𝟎, , )
𝒊=𝟏 𝟗 𝟓 𝟓 𝟓 𝟓
−𝟏 𝒊=𝟏
The example is for 𝑖 = 1, 𝑎𝑛𝑑 𝑗 = 1With 3 point rule, weight factor is ranges from w1 to
w3, which are 5/9, 8/9, and 5/9 respectively and we are integrating
−√𝟑 −√𝟑
𝜉 𝑣𝑎𝑙𝑢𝑒𝑠 𝑓𝑟𝑜𝑚 ( 𝟓 ) 𝑡𝑜 0, 𝑡𝑜 ( 𝟓 ) 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑦𝑖𝑛𝑔 𝑏𝑦 𝑖𝑡𝑠 𝑤𝑒𝑖𝑔ℎ𝑡 𝑎𝑡 𝑒𝑎𝑐ℎ 𝑝𝑜𝑖𝑛𝑡 𝑎𝑛𝑑 𝑠𝑢𝑚𝑚𝑖𝑛𝑔 𝑓𝑟𝑜𝑚 𝑓𝑖𝑟𝑠𝑡
𝑠𝑒𝑐𝑜𝑛𝑑 𝑝𝑜𝑖𝑛𝑡 𝑖𝑛 𝑎 𝑡𝑤𝑜 𝑑𝑖𝑚𝑒𝑛𝑠𝑖𝑜𝑛 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛
The key is that at each point
𝑑𝑒𝑛𝑜𝑡𝑒𝑑 𝑏𝑦 𝑖, 𝑎𝑛𝑑 𝑗, 𝑦𝑜𝑢 𝑤𝑖𝑙𝑙 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 𝜉𝑖 𝑎𝑛𝑑 𝜂𝑖 𝑠𝑜 𝑡ℎ𝑎𝑡 𝑖 𝑙𝑜𝑜𝑝𝑠 3 𝑡𝑖𝑚𝑒𝑠 , 𝑗 𝑙𝑜𝑜𝑝𝑠 3 𝑡𝑖𝑚𝑒𝑠. 𝑇ℎ𝑒𝑠𝑒
Adds up to 6 iterations
A summary of Gaussian Quadrature
The topic is so important to finite element that we must do a quick review of this.
Now, it’s important to know the number of terms to expect before you numerically
integrate.
How? There is a formula that can help.
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑇𝑒𝑟𝑚𝑠 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐺𝑎𝑢𝑠𝑠𝑖𝑎𝑛 𝑃𝑜𝑖𝑛𝑡𝑠(𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑝𝑜𝑖𝑛𝑡𝑠)𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑙𝑠
Note that the number of integrals is related to dimension of the geometry, whether its
1D, 2D, or 3D.
1D is simply 1 integral ∫ .
2D is area, i.e. ∬
3D is volume, i.e. ∭

A 1D will only integrate across a line. That is, you could have a 1 Gaussian point (GP),
2 GP, or 3 GP along a line. Similarly, a 2D or 3D integration would mean integrating
across a plane geometry with X, and Y, directions, or volumetric integration, with X, Y,
and Z orientations respectively.

Using the formula for a 3 gaussian points (GP), 1D, i.e. one integral will be: 31 =
3 𝑡𝑒𝑟𝑚𝑠
Using the formula for a 4 gaussian points (GP), 2D, i.e. two integrals will be: 42 =
16 𝑡𝑒𝑟𝑚𝑠
Using the formula for a 3 gaussian points (GP), 3D, i.e. three integrals will be: 33 =
27 𝑡𝑒𝑟𝑚𝑠

To understand how the terms are laid out, we will turn to tables as below
Let us assume we want to numerically integrate 4 points in 1D, that’s a 4-point rule.
𝑖, 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑒𝑟𝑚𝑠 𝑜𝑟 𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛 𝑡𝑒𝑟𝑚𝑠. 𝑇ℎ𝑒𝑟𝑒 ′ 𝑠 𝑛𝑜 𝑗, 𝑠𝑖𝑛𝑐𝑒 𝑖𝑡𝑠 1𝐷, 𝑜𝑛𝑒 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑙
𝑊𝑒 𝑡ℎ𝑒𝑛 𝑛𝑒𝑒𝑑 𝑡𝑜 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑒𝑟𝑚𝑠, 𝑢𝑠𝑖𝑛𝑔:
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑇𝑒𝑟𝑚𝑠 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐺𝑎𝑢𝑠𝑠𝑖𝑎𝑛 𝑃𝑜𝑖𝑛𝑡𝑠(𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑝𝑜𝑖𝑛𝑡𝑠)𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑙𝑠
= 21 = 2 𝑡𝑒𝑟𝑚𝑠
𝟏
Formula is ∫−𝟏 𝑭(𝝃) 𝒅𝝃 ≈ ∑𝟐𝒊=𝟏 𝒘𝒊 ∗ 𝑭(𝝃𝒊 )𝒅𝝃, 𝑖 goes from 1:4 since there are only 2 GP
𝑤𝑖 is given in literature for 4 points, GP is also given in literature, also called sampling
points
We then need to estimate 𝑭(𝝃𝒊 )𝒅𝝃, the function value at 𝜉𝑖
To obtain the function value at that point, we turn to the shape function at that point, and
that is N 1⁄4 * (1 – ξ) (1 – η) or its derivative in most case; as we can see, since we
1=
are dealing with a 1D problem in this case 𝜂, 𝑖𝑠 𝑖𝑛𝑐𝑜𝑠𝑒𝑞𝑢𝑒𝑛𝑡𝑖𝑎𝑙 𝑖𝑓 𝑖𝑡 𝑔𝑜𝑒𝑠 𝑡𝑜 0, which
becomes
𝑭(𝝃𝒊 ) 1⁄4 * (1 – 𝜉𝑖 )
=
𝑖 𝒘𝒊 GP (𝜉𝑖 ) 𝑭(𝝃𝒊 ) 𝒘𝒊 ∗ 𝑭(𝝃𝒊 )
1 0.652145154862546 -0.3399810435848563 1.339981 -0.45557
2 0.652145154862546 0.3399810435848563 0.660019 -0.45557
3 0.3478548451374538 -0.8611363115940526 1.861136 -1.60269
4 0.3478548451374538 0.8611363115940526 1.861136 0.119581
4 -1.71429
∑ 𝑤𝑖 ∗ 𝑭(𝝃𝒊 )
𝑖=1

In a 2-point GP 2 dimensions, we have 22 = 4 iterations as shown. 𝑖, 𝑎𝑛𝑑 𝑗 𝑑𝑖𝑟𝑒𝑐𝑡𝑖𝑜𝑛𝑠


Will be present because it’s a 2 D integration.
In a 2D integration or 3D, always start with the inner loop first. Complete the iteration,
then loop the outer.
Notice how the outer loop j is changing while the inner loop i stays constant until the
outer loop is completed before it goes to the next iteration
The implication of this is that wi will be weight values 11, and 22, while wj will alternate
12, 12
Same with the gaussian points which is now GP (𝜉𝑖 , 𝜂𝑗 ), and
𝑭(𝝃𝒊 , 𝜼𝒋 ) = 1⁄4 * (1 – ξ) (1 – η)

𝑖 𝒋 𝒘𝒊 𝒘𝒋 GP (𝜉𝑖 ) GP (𝜂𝑗 ) 𝑭(𝝃𝒊 , 𝜼𝒋 ) 𝒘𝒊 ∗ 𝒘𝒋 ∗ 𝑭(𝝃𝒊 , 𝜼𝒋 )


1 1 1 1 -0.5773502691896257 -0.5773502691896257 0.622008 0.622008
1 2 1 1 -0.5773502691896257 0.5773502691896257 0.166667 0.166667
2 1 1 1 0.5773502691896257 -0.5773502691896257 0.166667 0.166667
2 2 1 1 0.5773502691896257 0.5773502691896257 0.044658 0.044658
4 1.000000
∑ 𝑤𝑖 ∗ 𝑭(𝝃,𝒊 , 𝜼𝒋 )
𝑖=1

Same procedure follows for 3 G.P triple integration

Pseudocode Development for Q4

𝜐,

DO for I start. Finish. step

𝜂 = []
𝜉 = []
𝜂𝑖
𝜉𝑗

𝜂 𝑎𝑛𝑑 𝜉
𝑑𝜉𝑖 𝑑𝜂𝑗

ENDDO.
ENDDO.

Then we can estimate the value of k -stiffness matrix per element

[𝐾 ] = ∬ 𝑡 ∗ 𝐽𝑑𝑒𝑡[𝐵]𝑇 [𝐶 ][𝐵]𝑑𝑥𝑑𝑦
𝑡 𝑖𝑠 𝑡ℎ𝑒 𝑝𝑙𝑎𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑡ℎ𝑖𝑐𝑘𝑛𝑒𝑠𝑠
𝐵 𝑖𝑠 𝑡ℎ𝑒 𝐵 𝑚𝑎𝑡𝑟𝑖𝑥 𝑑𝑒𝑣𝑒𝑙𝑜𝑝𝑒𝑑 𝑎𝑛𝑑 𝑖𝑡𝑠 𝑡𝑟𝑎𝑛𝑠𝑝𝑜𝑠𝑒, [𝐶 ]𝑖𝑠 𝑎 2𝐷 𝑐𝑜𝑛𝑠𝑡𝑖𝑡𝑢𝑡𝑖𝑣𝑒 𝑚𝑎𝑡𝑟𝑖𝑥
1 𝑣 0
𝐸 𝑣 1 0
𝑃𝑙𝑎𝑛𝑒 𝑆𝑡𝑟𝑒𝑠𝑠 [𝐶 ] = ∗[ 1 − 𝑣]
(1 − 𝑣 )
2
0 0
2
1−𝑣 𝑣 0
𝐸 𝑣 1−𝑣 0
𝑃𝑙𝑎𝑛𝑒 𝑆𝑡𝑟𝑎𝑖𝑛 = ∗[ 1 − 2𝑣]
(1 + 𝑣)(1 − 2𝑣)
0 0
2
Using degree of freedom

We can code the assembly of the individual K’s


Next step is to apply boundary condition, to be able to calculate displacement matrix

{𝐿𝑜𝑎𝑑 } = [𝐾𝑔𝑙𝑜𝑏𝑎𝑙(𝑤𝑖𝑡ℎ 𝑎𝑝𝑝𝑙𝑖𝑒𝑑 𝐵𝐶 )] ∗ {𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑒𝑚𝑒𝑛𝑡 𝑚𝑎𝑡𝑟𝑖𝑥 }


{𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑚𝑒𝑛𝑡𝑀𝑎𝑡𝑟𝑖𝑥 } = {𝐿𝑜𝑎𝑑 }/[𝐾𝑔𝑙𝑜𝑏𝑎𝑙(𝑤𝑖𝑡ℎ 𝑎𝑝𝑝𝑙𝑖𝑒𝑑 𝐵𝐶 )] solved by naïve gauss
elimination