Finite Element Analysis of Trusses
Finite Element Analysis of Trusses
Finite Element Analysis of Trusses
Atique Ahmad
قیتع ادمح
Contact:
atiq@pieas.edu.pk
Frank L. Stasa,
Applied Finite Element Analysis for Engineers,
Chapter – 3
Oxford University Press, 1985
●
Finite element formulation of a two-dimensional truss is developed.
●
Direct approach does not involve any of the mathematical techniques:
variational method, weighted-residual method, virtual work principle.
●
Main purpose is to demonstrate the step-by-step procedure.
●
The bar elements developed earlier are now used in a 2D structure.
●
1D elements in 2D problem.
●
An example will be solved by hand and then the procedure will be
implemented on computer.
●
A cantilever truss with only five members
and four joints. Members 2, 4, 5 are 0.5 in
diameter made of steel (E=30×106 psi),
whereas members 1 and 3 are 0.4 in diameter
made of aluminum (E=11×106 psi).
●
Divide the entire geometry into a number of
small and manageable finite elements.
●
Here each member is an element connected
by pin-joints called nodes.
●
Force is transmitted through these nodes
from one element to the next.
●
Each element is either in tension or
compression only; there is no bending.
●
No force is applied anywhere along the An arbitrary truss element e
length of the truss element. Such cases fall having nodes i and j.
under the study of beams and frames.
02/10/20 | 15:49 ME-424 Finite Element AnalysisAtique Ahmad 4/18
First Step: Discretization – The Input Data
X Y
0 0
nXY = 4 0
4 2[ ]
0 3.5
i j m
Nodal Coordinates
eProp=
1
2
3
1
4
[ ] 2 1
3 2
4 1
3 2
1 2
E
Element Connectivity and
Material / Cross-section
xA
n
[
FX
loads= 2 −5000 cos π
3 ( )
FY
−5000 sin π
3( ) ]
materials=
02/10/20 | 15:49
[ 30×10
11×10
6
6
π 0.52
4
π 0.4 2
4
] n UX UY
BCs= 1 1
4 1[ 0
1 ]
ME-424 Finite Element AnalysisAtique Ahmad
1 → fixed BC
0 → free (unknown)
5/18
Second step: Stiffness of each element
●
In FEA, we solve the equation [K]{U} = {F}; here [K] is the stiffness
matrix of the entire truss, calculated from stiffness matrices [k(e)].
●
[K] is described in the global coordinates (X, Y) but it is easier to
describe each element in local coordinates (x, y) in such a way that x is
along the element length, just like a bar element.
– Every element will have its own local CS but the equations will be
generalized for all elements.
●
Let u ≡ displacement along x-axis
and f ≡ force acting axially
– Nothing along y-axis.
●
Recall from the bar element:
●
Element equation is: [k(e)]{u}={f}
1 −1 u i fi
(e) (e)
A E
L
(e) [
−1 1 u j
=
]{ } { }
fj
,
2
L = √( x j −x i ) +( y j − y i )
(e) 2
●
Local CS consists of only x-axis, i.e., it is one-dimensional. This is
why truss elements are 1D element, even if the truss is 2D / 3D.
●
First, include the unused y-axis in our equation.
– Displacement component in y-direction and force component in y-direction
are zero; and since there are 2DoF per node, thus [k] must be 4×4 matrix:
1 0 −1 0 ui fi
(e)
A E
L(e)
(e)
[0
−1
0
0 0 0 0
0 1 0 uj
0 0 0 0
=
0
]{ } { }
fj
0
●
Since x may not be parallel to X-axis, there must be a coordinate
transformation for which easiest method is to use direction cosines.
x j −x i y j− yi
cos ( X , x)=cos θ X = cos(Y , x )=cos θY =
L L
– Note that the sequence of i and j is important here.
●
Let θ ≡ angle between +X-axis and the element e:
x j−x i η y j− y i ξ
cos ( X , x )=cos θ= = cos ( X , y)=sin θ= =
L L L L
●
Displacement at ith node in local CS is transformed into global CS:
U iX =uix⋅cos θ U iY =uix⋅sin θ uiy =0
●
Similarly, at jth node:
U jX =u jx⋅cos θ U jY =u jx⋅sin θ u jy =0
●
Or in matrix form:
U iX cos θ 0 0 0 ui U =T u
{ }[
U iY
U jX
U jY
=
sin θ 0
0
0
{U }=[T ]{u}
0
0 cos θ
0 sin θ
0
0
0
]{ }
0
uj
0
−1
T
−1
T U =T (T u)=T U
k u=f
k (T U )=T F
T
T k T T U =T T T F
T
●
Thus, element stiffness matrix in GCS is given by [K(e)] as:
[ K ]=[T ][ k ][T ]T
●
Perform the matrix multiplication to find:
2 2
cos θ cos θ sin θ −cos θ −cos θ sin θ
(e)
[ K ]=
–
A (e) E(e)
L(e)
[cos θ sin θ
−cos 2 θ
−cos θ sin θ
2
sin θ
−cos θ sin θ
−sin2 θ
Note that all entries are non-zero.
−cos θ sin θ
cos 2 θ
cos θ sin θ
−sin θ
2
cos θ sin θ
sin 2 θ
]
– Remember: size of this matrix is 4×4.
●
Thus, we have modeled an arbitrary element.
●
In short form: [K(e)] {U(e)} = {F(e)} : element equation in GCS
●
This equation cannot be solved by itself since [K(e)] is singular.
●
We need equations for all the elements and solve them in an
assembled form: [K] {U} = {F}
02/10/20 | 15:49 ME-424 Finite Element AnalysisAtique Ahmad 9/18
Fourth Step: Assemblage
●
Recall again that element stiffness matrix in GCS is square matrix of:
●
(DoF / node) × (number of nodes / element)
– Here (2 × 2), i.e., square matrix of size 4
●
Similar logic says that stiffness matrix of the entire truss must have a
size of total DoF in the system, i.e., 2×(total number of nodes).
●
Thus a larger truss will have a larger [K]; in our example it’s 8×8.
●
Our job is to put the entries of each element’s stiffness matrix [K(e)]
into the corresponding row/column of the global stiffness matrix [K].
●
This is performed using the scatter operation available in most modern
programming languages that allow matrix manipulation.
. . . . . . . .
[ ]
. . . . . . . .
. . . . . . . . . . . .
(e)
[ K ]=
[ ]
. . .
. . .
. . .
for e=1,2,.. 5
.
.
.
[ K ]= .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
– Where
(e)
2
cos θ cos θ sin θ
(e)
L −[k ] [k ] [ ]
[k ]=
[
cos θ sin θ
2
sin θ ]
This relates to nodes i, j of element e as: [ K (e) ]= k ii k ij
●
[
k ji k jj ]
●
Before detailed explanation of the scattering, programming of the
previous steps is very helpful.
●
Instead of programming in C/C++ or Python, use a matrix software
for small to medium size finite element analysis, such as:
●
Commercial: MATLAB
●
Free & open-source: GNU Octave, Scilab, FreeMat
●
Use a separate data file.
●
Initialize all variables as properly sized arrays.
●
Loop over all elements: for e = 1:nElems
●
Calculation of the sub-matrix [k] is enough.
●
Assemblage: …
●
Apply BC by any one of the following method
●
Remove corresponding row/column from [K]
– Smaller matrix solves faster.
●
Multiply corresponding diagonal entry of [K] by a large number
– Called penalty method, corresponds to almost immovably stiff node
● Solve the FE equation [K]{U}={F} by the command: U=K\F
●
The solution consists of X-,Y-components of nodal displacements.
●
Post-processing is required to calculate strains and stresses.
●
Elongation ΔL is defined, from the geometry of deformed bar, as:
(e)
Δ L =(U jX cos θ+U jY sin θ)−(U iX cos θ+U iY sin θ)
●
Strain is then readily calculated as
(e)
ΔL
( e)
ϵ = (e)
L
●
And stress is simply:
(e) ( e) (e)
σ =E ϵ
●
Finally, the axial force in the truss member is given by:
(e) (e) (e)
F =σ A
●
Each member of a 2D truss has been modeled as 1D element.
●
1D truss elements have two nodes and each node has 2DoF.
●
This results in a 4×4 element stiffness matrix in GCS.
●
All element stiffness matrices are then assembled together.
●
There are more than one way for application of BCs.
●
The global equation KU=F can be solved numerically on computer.
●
Solution consists of nodal displacements.
●
Strains and stresses are calculated for each element afterwards.
●
Solve five problems from textbook by hand.
●
Write computer code in GNU Octave to solve 10 or more truss
problems from books on Engineering Statics and / or Mechanics of
Materials. Use SI units only.
●
Submission date: Next Thursday.
●
Relates to PLO 5: Modern Tool Usage
●
The procedure can be extended to 3D trusses.
●
Element stiffness matrix is as before:
(e) (e )
A E [k ] −[k ]
(e)
[ K ]=
L
(e) [ −[k ] [k ] ]
●
But here: 2
c x cx c y c x cz
●
Where:
[k ]=
A (e) E (e)
L
(e)
[ 2
cx c y c y c y cz
c z c x c z c y c 2z ]
● cx = cos θx , cy = cos θy , cz = cos θz
●
Assembly process is now performed for the three axes.
●
Extend the GNU Octave code for analysis of 3D trusses and solve a
few problems to get bonus sessional marks and extra PLO5.