Professional Documents
Culture Documents
CIVE50003 Computational Methods II - Lecture III - 220123 V3
CIVE50003 Computational Methods II - Lecture III - 220123 V3
CIVE50003 Computational Methods II - Lecture III - 220123 V3
Lecture 3
EA l 1 −1
This k j = 0 j −1 1 is the element stiffness matrix
2×2 2 Lh j h j x j +1 − x j
=
where
l j =4 L − x j +1 − x j
uj
This {d j } = is the element nodal dof vector
u j +1
2×1
4 x j +1
But there is still = I = ∑ Ij 0 where
= I j ∫ [] dx
this to do: j =1 x
j
Discretised on Ω
Element j
(assembly)
CIVE50003 Computational Methods II – Lecture 3 2
Assembly is best illustrated with an example
System diagram: Free body diagram:
Uniform E and q, linearly-varying A(x)
x=0 x=L
x q
PL RH ∫qdx = qL PL
E, A 0
A0
. 2A 0
{
{
{
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? ū(x3 ) = ? ū(x4 ) = ? ū(x5 ) = ? NBC2:
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = L/4 x3 = L/2 x4 = 3 L/4 x5 = L
Node: n1 n2 n3 n4 n5 .
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
1 2
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n1 n2
Node: n1 n2 n3 n4 n5 .
L
Here: x=
j x=
1 0 x j +=
1 x=
2
4
L 15 L
l j =l1 = 4 L − x2 − x1 =
h j = h1 = x2 − x1 =
4 4
Px j =
Px1 =
− RH Px j +1 =
Px2 = 0
0 1 1 1
{f } = Pj +1 − Pj + qh j
Thus, the 1st element’s equation is:
j 2×1
1 0 2 1
EA l 1 −1
k j = 0 j
2×2 2 Lh j −1 1
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
2 3
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n2 n3
Node: n1 n2 n3 n4 n5 .
L L
Here: x=
j x=
2 x j +=
1 x=
3
4 2
L 13L
h j = h2 = x3 − x2 = l j =l2 = 4 L − x3 − x2 =
4 4
P=
xj P=
x2 0 Px=
j +1
P=
x3 0
0 1 1 1
{f } = Pj +1 − Pj + qh j
Thus, the 2nd element’s equation is:
j 2×1
1 0 2 1
EA l 1 −1
k j = 0 j
2×2 2 Lh j −1 1
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
3 4
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n3 n4
Node: n1 n2 n3 n4 n5 .
L 3L
Here: x=
j x=
3 x j +=
1 x=
4
2 4
L 11L
h j = h3 = x4 − x3 = l j =l3 = 4 L − x4 − x3 =
4 4
P=
xj P=
x3 0 Px=
j +1
P=
x4 0
0 1 1 1
{f } = Pj +1 − Pj + qh j
Thus, the 3rd element’s equation is:
j 2×1
1 0 2 1
EA l 1 −1
k j = 0 j
2×2 2 Lh j −1 1
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
4 5
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n4 n5
Node: n1 n2 n3 n4 n5 .
3L
Here: x=
j x=
4 x j +=
1 x=
5 L
4
L 9L
h j = h4 = x5 − x4 = l j =l4 = 4 L − x5 − x4 =
4 4
P=
xj P=
x4 0 Px=
j +1
P=
x5 PL
0 1 1 1
{f } = Pj +1 − Pj + qh j
Thus, the 4th element’s equation is:
j 2×1
1 0 2 1
EA l 1 −1
k j = 0 j
2×2 2 Lh j −1 1
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
1 2
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n1 n2
Node: n1 n2 n3 n4 n5 .
In local view:
I1}2×1 { f1}2×1 − [ k1 ]2×2 {d1}2×1
{=
RH 1 1 15 EA0 1 −1 u1
= + qL − −1 1 u
0 8 1 2L 2
In global view:
RH 1 15 −15 0 0 0 u1
0 1 −15 15 0 0 0 u
1 EA 2
{I1}5×1 = 0 + qL 0 −
0
0 0 0 0 0 u3
0 8 0 2 L
0 0 0 0 0 u4
0 0 0 0 0 0 0 u5
CIVE50003 Computational Methods II – Lecture 3 8
Formulate {I2} (global view)
e2
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
2 3
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n2 n3
Node: n1 n2 n3 n4 n5 .
In local view:
I 2 }2×1 { f 2 }2×1 − [ k2 ]2×2 {d 2 }2×1
{=
1 1 13EA0 1 −1 u2
= qL − −1 1 u
8 1 2L 3
In global view:
0 0 0 0 0 0 0 u1
0 1 0 13 −13 0 0 u
1 EA 2
{I 2 }5×1 =+
0 qL 1 − 0 0 −13 13 0 0 u3
0 8 0 2 L
0 0 0 0 0
u4
0 0 0 0 0 0 0 u5
CIVE50003 Computational Methods II – Lecture 3 9
Formulate {I3} (global view)
e3
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
3 4
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n3 n4
Node: n1 n2 n3 n4 n5 .
In local view:
I 3 }2×1 { f3 }2×1 − [ k3 ]2×2 {d3 }2×1
{=
1 1 11EA0 1 −1 u3
= qL − −1 1 u
8 1 2L 4
In global view:
0 0 0 0 0 0 0 u1
0 0 0 0 0 0 0 u
1 EA 2
{I 3 }5×1 =+
0 qL 1 − 0 0 0 11 −11 0 u3
0 8 1 2 L
0 0 −11 11 0
u4
0 0 0 0 0 0 0 u5
CIVE50003 Computational Methods II – Lecture 3 10
Formulate {I4} (global view)
e4
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? NBC2: Px q Px
4 5
ū'(x5 ) = P L/EA 0
x1 = 0 x2 = /4
L
x3 = /2
L
x4 = /4
3L
x5 = L n4 n5
Node: n1 n2 n3 n4 n5 .
In local view:
I 4 }2×1 { f 4 }2×1 − [ k4 ]2×2 {d 4 }2×1
{=
0 1 1 9 EA0 1 −1 u4
+ qL −
= −1 1 u
PL 8 1 2 L 5
In global view:
0 0 0 0 0 0 0 u1
0 0 0 0 0 0 0 u2
1 EA0
{I 4 }5×1 =
0 + qL 0 − 0 0 0 0 0 u3
0 8 1 2 L
0 0 0 9
−9 u4
PL 1 0 0 0 −9 9 u5
CIVE50003 Computational Methods II – Lecture 3 11
The final assembled {I}
4 Element: e1 e2 e3 e4
{I }5×1
= ∑
= {I } {0}
{
{
{
{
j 5×1 EBC1: ū(x1 ) = 0 ū(x2 ) = ? ū(x3 ) = ? ū(x4 ) = ? ū(x5 ) = ? NBC2:
5×1 ū'(x5 ) = P L/EA 0
j =1
x1 = 0
Node: n1
x2 = L/4
n2
x3 = L/2
n3
x4 = 3 L/4
n4
x5 = L
n5 .
Discretised on Ω
This is the tridiagonal sparse [A]{x} = {b} you’ve heard so much about!
In structural mechanics, it’s often written as [k]{d} = {f}
But there’s still something missing. Can you say what it is?
CIVE50003 Computational Methods II – Lecture 3 12
Solving the assembled matrix system
15 −15 0 0 0 u1 RH 1
Element: e1 e2 e3 e4
−15 28 −13 0 0 u2 0 2
{
{
{
{
EBC1: ū(x1 ) = 0 ū(x2 ) = ? ū(x3 ) = ? ū(x4 ) = ? ū(x5 ) = ? NBC2:
ū'(x5 ) = P L/EA 0
EA0
0 −13 24 −11 0 =
u3
1
0 + qL 2
x1 = 0 x2 = L/4 x3 = L/2 x4 = 3 L/4 x5 = L 2L 0 8 2
Node: n1 n2 n3 n4 n5 . 0 0 −11 20 −9 u4
0 0 0 −9 9 u5 P
L 1
or [ k ]5×5 {d }5×1 = { f }5×1
We did say on slide 3 that we should be solving a 4×4 system, not 5×5
How do we incorporate the BCs?
Essential BC1: ū1 = 0
Natural BC2: P(x) = PL at x = L
The natural BC2 is already accounted for, it came from the
‘boundary’ term in the weak form, and you can see PL is
indeed present in the global nodal load vector {f}
CIVE50003 Computational Methods II – Lecture 3 13
Enforcing essential BCs
There are many ways to enforce essential BCs
The method presented here is called partitioning
First identify which matrix rows & columns correspond to:
‘restrained’ dofs (those where essential BCs are enforced) i.e. ū1
‘free’ dofs (which are as of yet unknown) i.e. ū2, ū3, ū4 and ū5
A dof can be either ‘restrained’ or ‘free’ but not both
Then partition the matrix system accordingly:
Restrained Free dofs
dof
Restrained
dof 15 −15 0 0 0 u1 RH 0 1
−15 28 −13 0 0 u2 0 0 2
EA0 1
Free 0 −13 24 −11 0 u3 = 0 + 0 + qL 2
2L 0 0 8 2
dofs
0 0 −11 20 −9 u4
0 0 0 −9 9 u5 0 PL 1
ū1 ū2 ū3 ū4 ū5
{f }
4×1 4×1
= + = {0}4×1
[ k RF ]1×4 [ kRR ]1×1 5×5 {d R }1×1
{ R ,r }1×1 5×1 { R ,a }1×1 5×1
f f F , r 4×1
5×1
Matrix equation 1 lets you solve for the unknown free dofs {dF}:
[ kFF ]4×4 {d F }4×1 + [ kFR ]4×1 {d R }1×1 = { f F ,r }4×1 + { f F ,a }4×1 A-ha! Here is the 4×4
system!
Matrix equation 2 lets you solve for the unknown nodal reactions: {fR,r}
[ kRF ]1×4 {d F }4×1 + [ kRR ]1×1 {=
dR}
1×1
{ f R,r }1×1 + { f R,a }1×1 No further inversion
3.1667
4.8974
=⇒ { f R ,r }1×1 −1.5 0 0 0 + 1.5 × 0 − 1.25 =−6 ≡ RH
4.6702
1.6146
Is equilibrium satisfied?
RH + PL + qL =0 ⇒ RH =− PL − qL =− ( −4 ) − 1× 10 =4 − 10 =−6 Yes!
You just need to access the correct rows / columns from memory
– the rearrangement and partitioning is more conceptual
{
{
{
{
EBC1: ū(x1 ) = 0
Node: x1 = 0
ū(x2 ) = ?
x2
ū(x3 ) = ?
x3
ū(xn -2 ) = ?
xn -2