1
Numerical methods – Topics
Table of Contents
NUMERICAL METHODS – TOPICS
1
1. PIN JOINTED FRAME IN 3 DIMENSIONS
2. RIGID JOINTED FRAME IN 2 DIMENSIONS
3. FINITE ELEMENT ANALYSIS OF 2D HEAT FLOW
4. FINITE ELEMENT ANALYSIS OF PLANE STRESS
5. FINITE DIFFERENCE HEAT FLOW
6. FINITE DIFFERENCE PLATE BENDING
7. DYNAMIC RELAXATION OF 3D PIN JOINTED TRUSSES AND CABLE NETWORKS
8. DYNAMIC RELAXATION FORMFINDING OF MINIMAL SURFACE
9. DISCRETE FOURIER TRANSFORM
10. ‘SOCIAL FORCE’ SIMULATION OF PEOPLE MOVEMENT
11. B-SPLINE CURVES
12. PARAMETRIC DESIGN OF TOWER STRUCTURE USING ROBOT FOR ANALYSIS
1
3
6
7
9
10
10
11
11
13
13
14
1. Pin jointed frame in 3 dimensions
x1, y1 , z1 to x2 , y2 , z2
2
2
2
x2 x1 y2 y1 z2 z1 .
Consider a member from
L
with cross-sectional area A and Young’s modulus E . Its unstressed length is
2
x1 x1 , y1 y1 , z1 z1 and x2 x2 , y2 y2 , z2 z2 , where the displacements are small, the length becomes
x x x x y y y y z z z z
If the ends move to
L L
2
2
x
L
1
2
1
2
1
2
2
1
2
1
2
1
x1 y2 y1 z2 z1 2x2 x1x2 x1 2y2 y1 y2 y1 2z2 z1z2 z1 in which the products of small
2
2
2
x
2
2
x1
L
x
2
x1
2
y
2
y1
L
y
2
y1
z
2
z1
L
z
2
z1
quantities have been neglected in the binomial series.
Hence the tension in the member is
EA
y2 y1
z2 z1
EA x2 x1
T EA
x2 x1 L y2 y1 L z2 z1 L2 X
L
L
L
L
Y
Z
X
Y
x1
y1
z
Z 1
x2
y2
z2
where X x2 x1,Y y2 y1 ,Z z2 z1 .
If p x1, p y1 , pz1 is the force that node 1 exerts on the member and p x2 , p y2 , pz2 is the force that node 2 exerts on the member, then
px1
X
p y1
Y
p z1 T Z
.
px2 L X
p y2
Y
Z
p z2
3
Thus
k11 k12
k21 k22
k31 k32
k 41 k42
k51 k52
k61 k62
k13
k14
k15
k23
k33
k24 k25
k34 k35
k 43
k53
k44
k54
k 45
k55
k63
k64
k65
px1
X
p y1
Y
p z1 EA Z
3 X Y Z X
px2 L X
p y2
Y
Z
p z2
XX
k16
XY
XZ XX
k26
YY
YZ
YX
YX
k36 EA ZX
ZY
ZZ ZX
3
k46 L XX XY XZ XX
YX YY YZ YX
k56
k66
ZX ZY ZZ ZX
x1 k11
y1 k21
z k
Y Z 1 31
x2 k41
y2 k51
z2 k61
XY XZ
YY YZ
ZY ZZ
.
XY
XZ
YY
YZ
ZY
ZZ
k12
k13
k14
k15
k22
k23
k24
k25
k32
k33
k34
k35
k 42
k52
k43
k53
k 44
k54
k45
k55
k62
k63
k64
k65
k16 x1
k26 y1
k36 z1
k 46x2
k56 y2
k66 z2
where
2. Rigid jointed frame in 2 dimensions
EA
e where e is the elongation. The end moments and shear forces as applied to the beam are
L
EI
6
EI
6
M1 M 2 EI
12
M1
2 61 6 2
41 2 2
, M 2
21 4 2
and F
in which anticlockwise moments and rotations
L
L
L
L
L
L
L
are positive
and is the relative displacement of the two ends in the direction corresponding to the shear force.
Tension in beam, T
In matrix form:
4
EA
0
L
T
0 12EI
F
L3
M1
6EI
0
L2
M 2
6EI
0
L2
0
6EI
L2
4EI
L
2EI
L
0
6EI e
L2
2EI 1
L
2
4EI
L
We have to resolve the end displacements and forces parallel and perpendicular to the beam:
f1x c s 0 0
f1 y s c 0 0 T
M1 0 0 1 0 F
and
f
c
s
0
0
2x
M1
f 2 y s c 0 0M 2
M 2 0 0 0 1
x2 x1
y y1
and s 2
.
L
L
EA
f1x
0
1x
L
f1 y
1 y
0 12EI
M1 T 1
L3
Thus finally, Q PQ in which P
6EI
f 2x
2x
0
L2
f 2 y
2 y
6EI
0
M 2
1
L2
1x
e c s 0 c s 01 y
s
c
0
s
c
0
1
1 0 0 1 0 0 02x
0
0
0
0
0
1
2 y
2
1
in which c
0
6EI
L2
4EI
L
2EI
L
0
c s 0 c s 0
6EI
L2 , Q s c 0 s c 0 and QT is the transpose of Q .
0 0 1 0 0 0
2EI
L
0 0 0 0 0 1
4EI
L
5
The matrix multiplication giving the element stiffness matrix K QTPQ can be done using the computer: Kij
using 0 to 3 for the summations). Alternatively:
c 2
s 2 cs
cs 0 c 2 cs 0
2
s 2 0 cs s 2 0
cs
cs c
EA 0
0 0 0
0 0 12EI 0
0
K
2
3 2
2
L c cs 0 c
cs 0 L s
cs
2
cs s 2 0 cs
s
0
cs c 2
0 0 0
0 0
0
0
0
0 0 s 0 0 s
0 0 0 0
0 0 c 0 0 c
0 0 0 0
6EI s c 0 s c 0 2EI 0 0 2 0
2
L 0 0 s 0 0 s L 0 0 0 0
0 0 c 0 0 c
0 0 0 0
s c 0 s c 0
0 0 1 0
2
2
Using the fact that c s 1, this can be written
0 s 2 cs
0 cs c 2
0 0
0
2
0 s
cs
0 cs c 2
0 0
0
0 0
0 0
0 1
0 0
0 0
0 2
0
0
0
0
0
0
4
Qmi PmnQnj (maybe
m1
n1
4
6
c 2
cs
EA 12EI 0
K 3 2
L c
L
cs
0
0 0 s
0 0 c
6EI s c 0
2
L 0 0 s
0 0 c
s c 0
1
0 c 2 cs 0
0 cs s 2 0
0
0 0
0 0 12EI 0
3
0 c2
cs 0 L 1
0
0 cs
s 2 0
0 0
0 0
0
0 0 0 0
0 0 s
0 0 c
0 0 0 0
s c 0 2EI 0 0 2 0
0 0 s L 0 0 0 0
0 0 0 0
0 0 c
s c 0
0 0 1 0
0 1 0 0
0 0 1 0
0 0 0 0
0 1 0 0
0 0 1 0
0 0 0 0
0
0
1
0
0
2
0
1
0
0
1
0
cs
s2
0
cs
s 2
0
0
0
0
0
0
0
3. Finite Element Analysis of 2D Heat Flow
3
L2
3
L1
1
1
2
L3
2
Consider triangular element with nodes at vertices x1, y1 , x2 , y2 and x3 , y3 . Temperatures at nodes are T1 , T2 and T3 . Temperature at any
point within element is
7
x x y y y y x x x x y y y y x x x x y y y y x x
2
3
2
3
1
3
1
2
1
2
T1 3
T2 1
T3
T
x2 x1 y3 y1 y2 y1x3 x1
x3 x2 y1 y2 y3 y2 x1 x2
x1 x3 y2 y3 y1 y3 x2 x3
y
2
y3 x x2 x3 y x2 y3 y2 x3
2
T y
3
y1 x x3 x1 y x3 y1 y3 x1
2
1
T y y x x x y x y
1
2
1
2
1 2
y1 x2
2
2
T
3
where 12 L1L2 sin 3 12 L2 L3 sin 1 12 L3 L1 sin 2 is the area of the triangle.
Heat flow vector is f
k x
k y2 y3 T1 y3 y1T2 y1 y2 T3 i
2
x3 T1 x3 x1T2 x1 x2 T3 j
2
The change of sign is because the flow is in the direction of decreasing temperature.
2
where k is the thermal conductivity.
Rate of heat flow out of element across side 1 – 2 is equal to
k y2 y3 T1 y3 y1T2 y1 y2 T3 y1 y2 k x2 x3 T1 x3 x1 T2 x1 x2 T3 x1 x2
x1 x2 i y1 y2 j f k
2
2
k L T L3 L1 cos2T1 L3 L2 cos1T2
2
3 3
2
4
Q1 , Q2 and Q3 are the rates of heat flow into the nodes,
2
3
2
1
2
2
2
2
2
1
2
2
2
2
2
3
2
1
1
2
1
2
2
2
3
2
2
3
2
3
3
Triangular constant strain elements are applied to the linear elastic analysis of a homogeneous isotropic material.
The displacements u and v are given by
.
L L L L L L T
be taken as the absolute value of the area of the triangle.
2L
L L L T . Note must
L L L 2L T
4. Finite element analysis of plane stress
k 2L23T3 L22 L23 L12 T1 L12 L22 L23 T2
This is equal to twice the heat flow into node 3. Thus if
2L12
Q1
k
2
2
2
Q2 8 L3 L1 L2
2 2 2
Q3
L2 L3 L1
8
u
v
y
2
y3 x x2 x3 y x2 y3 y2 x3 u1
2
v1
y
3
y1 x x3 x1 y x3 y1 y3 x1 u2
2
v2
y y x x x y x y
1
2
1
2
2
1 2
y1 x2 u3
.
v3
u u1
v
x x 1
v u2
G
The strains are y
y v2
xy
v u
u3
x y
v
3
y y
x x
0
0
0
y3 y1
y1 y2
2
3
1
G
x2 x3
0
x3 x1
0
x1 x2 .
where
The
stresses
are
where
0
y S y
2
xy
xy
x2 x3 y2 y3 x3 x1 y3 y1 x1 x2 y1 y2
x
1
0
E
t
S
1
0 , E is Young’s modulus and is Poison’s ratio. The strain energy of the element isU x y xy y where
2
1
2
0 0 1
xy
2
u1
v1
x
u
t
t
t is the thickness of the plate. Thus U x y xy S y u1 v1 u2 v2 u3 v3 GTSG 2.
2
2
v2
xy
u3
v3
9
U
u1
U
f x1
u1
v1
f y1 U
v1
f x2 u
u
2
tGTSG 2 . Hence the element stiffness matrix is k tGTSG. Again must be taken as the absolute value
The nodal forces,
f y2 U
v2
v
f x3 2
u3
U
v3
f y3
u3
U
v3
of the area of the triangle.
5. Finite difference heat flow
2 2
dy
d y x .....
Consider a series of points in order along a curve, x i, yi . We have y y y i
x 2
dx i
dx i 2
2 x x 2
dy
d y i1 i
yi1 y i
dx
xi1 xi 2
2
i
dx
y i1 yi yi y i1
2
d y x i1 x i xi x i1
i
so that
and therefore
.
2
x i1 x i1
2 x x 2
dx
dy
i
i1
d y i
yi yi1
2
dx
xi x i1 2
2
i
dx i
In two dimensions, with lines of constant i having constant x and lines of constant j having constant y ,
10
i1, j i, j i, j i1, j i, j1 i, j i, j i, j1
2
2
x
x
x
x
y
y
yi, j y i, j1
i1,
j
i,
j
i,
j
i1
i,
j1
i,
j
.
2
2
xi1, j x i1, j
y i, j1 yi, j 1
x i, j y i, j
2
2
i1, j
xi1, j xi, j
i1, j
i, j 1
i, j 1
x i, j x i1 yi, j 1 y i, j yi, j y i, j 1
xi1, j xi1, j
y i, j1 yi, j 1
2
2
2
2
Thus if 2 2 2 0 , then i, j
. If the spacing is constant and equal to a in
1
1
1
1
x y
xi1, j xi, j x i, j x i1 yi, j 1 y i, j yi, j y i, j 1
xi1, j xi1, j
y i, j1 yi, j 1
2
2
i1, j i1, j i, j1 i, j1
both the x and y directions, i, j
.
4
6. Finite difference plate bending
2
4w
4 w 4 w 2 2
Et 3
p
4
w 4 2 2 2 4 2 2 w where D
As above but solving
.
D
x
x y y x y
12 1 2
7. Dynamic relaxation of 3D pin jointed trusses and cable networks
i.
ii.
Apply
loads to nodes.
Calculate member lengths using Pythagoras’s theorem, L x 2 y 2 z2 . Hence member tensions. Add forces from members to
nodes.
11
iii.
Move nodes using the Verlet algorithm:
Ft Resultant force
m
Mass
Velocity v t v t a tt
Acceleration a t
t
2
t
2
Position rt t rt v
t
t
t
2
The carry over, 1.0 to represent damping.
iv.
Go back to i.
8. Dynamic relaxation formfinding of minimal surface
That is a soap film surface, good shape for fabric structures. Use triangular element. If T is the surface tension and the corners of an element
are at ri ,i 0,1,2 , the force on node i is fi
T
r
k
ri rk ri
2 qi qi
qi where
qi rk rj rk ri rj ri rj rk rj ri rk ri
qi rk ri 0
j i 1 If j 2, j i 2
k i 2 If k 2, k i 1
9. Discrete Fourier transform
Also known as fast Fourier transform
12
Write
pt
N
P e
i
2 nt
T
n
n N
N
A iB e
n
N
An iBn e
i
2 nt
T
n
N
2nt
2nt
A0 2An cos
Bn sin
T
T
n1
A0 p
An An
Bn Bn
Given p t find An and Bn .
2 nt
T
n N
n N
i
13
10. ‘Social force’ simulation of people movement
11. B-spline curves
Uniform cubic B-spline:
1 3 3 1pi1
1 3 6 3 0 pi
3
2
ru u u u 1
6 3 0 3 0pi1
1 4 1 0pi2
pi1
1 3 3 1pi1
p
1 3 6 3 0 pi 1
r0 0 0 0 1
1 4 1 0 i
pi1
6 3 0 3 0pi1 6
1 4 1 0pi2
pi2
pi1
1 3 3 1pi1
p
1 3 6 3 0 pi 1
r
1 1 1 1 1
0 1 4 1 i
6 3 0 3 0 pi1 6
pi1
1 4 1 0pi2
pi2
14
1 3 3 1pi1
dr
1 3 6 3 0 pi
2
ru u 3u 2u 1 0
ru
6 3 0 3 0pi1
1 4 1 0pi2
pi1
1 3 3 1pi1
p
1 3 6 3 0 pi 1
ru 0 0 0 1 0
3 0 3 0 i
pi1
6 3 0 3 0pi1 6
1 4 1 0pi2
pi2
pi1
1 3 3 1pi1
p
1 3 6 3 0 pi 1
ru
1 3 2 1 0
0 3 0 3 i
pi1
6 3 0 3 0pi1 6
1 4 1 0pi2
pi2
12. Parametric design of tower structure using Robot for analysis