2D Stiffness Axial
2D Stiffness Axial
The following Mathcad sheet details the programming steps for any pin jointed frame. There are variations in the
methodology which tend to relate to the programming software used, but Mathcad illustrates the process in a
logical manner. Note that any user input is shown here in greyed boxes.
Basic data for the frame needs to be input here. Firstly The number of nodes and number of members needs to
be input. Number ranges are then defined for constructing stiffness matrices etc. Node locations are required,
and a connectivity pattern defined also.
1.1 Connectivity
The matrix 'CON' defines the connectivity of the elements to the nodes. The first column refers to
the member numbers. The second and third columns correspond to the node numbers to which
the members in the first column are connected to. Remember, insert the lower node number first.
⎛1 1 3⎞
⎜ ⎟
⎜2 1 2
⎟
CON := ⎜ 3 1 4⎟
⎜4 2 4⎟
⎜ ⎟
⎝5 2 3⎠
Enter the Young's modules 'E' and cross sectional area 'A' values of each Member (note that
the matrix row location refers to the associated member number)
⎛ 500 ⎞ ⎛ 200 ⎞
⎜ ⎟ ⎜ ⎟
⎜ 500 ⎟ 2 ⎜ 200 ⎟ −2
Area := ⎜ 750 ⎟ ⋅ mm E := ⎜ 200 ⎟ ⋅ kN⋅ mm
⎜ 750 ⎟ ⎜ 200 ⎟
⎜ ⎟ ⎜ ⎟
⎝ 500 ⎠ ⎝ 200 ⎠
2. Stiffness Calculations
The stiffness calculations can now proceed logically as per the hand calculations, however all nodes and degrees
of freedom are considered to ensure the procedure is completely general.
⎛ 3 ⎞
⎜ ⎟
L :=
2 2 ⎜ 3 ⎟
Lengths
j ⎡⎣x( CONj , 3) − x( CONj , 2)⎤⎦ + ⎡⎣y( CONj , 3) − y( CONj , 2)⎤⎦ L = ⎜ 4.243 ⎟ m
⎜ 3 ⎟
⎜ ⎟
⎝ 4.243 ⎠
E ⋅ Area
j j⎛ 1 −1 ⎞
Stiffness matrices K := ⎜ ⎟
j L
j ⎝ −1 1 ⎠
⎛ 180 ⎞
⎜ ⎟
⎜ 270 ⎟
Check Member angles: θ = ⎜ 225 ⎟ ⋅ deg
⎜ 180 ⎟
⎜ ⎟
⎝ 135 ⎠
2.4 Transformation matrices
The following code creates 'nm' transformation matrices (2 x 2nn), inserting the cos/sin functions at the
appropriate locations which link local to global degrees of freedom:
t := for z ∈ 1 .. 2 ⋅ nn
j
temp
1, z
← ( j)
cos θ if z = 2 ⋅ CON
j,2
−1
sin( θ ) if z = 2 ⋅ CON
j j,2
0 otherwise
temp
2, z
← ( j)
cos θ if z = 2 ⋅ CON
j,3
−1
sin( θ ) if z = 2 ⋅ CON
j j,3
0 otherwise
temp
⎛ −1 0 0 0 0 0 0 0 ⎞ ⎛ 0 −1 0 0 0 0 0 0 ⎞
t = ⎜ ⎟ t = ⎜ ⎟
1 ⎝ 0 0 0 0 −1 0 0 0 ⎠ 2 ⎝ 0 0 0 −1 0 0 0 0 ⎠
⎛ −0.707 −0.707 0 0 0 0 0 0 ⎞ ⎛ 0 0 −1 0 0 0 0 0 ⎞
t = ⎜ ⎟ t = ⎜ ⎟
3 ⎝ 0 0 0 0 0 0 −0.707 −0.707 ⎠ 4 ⎝ 0 0 0 0 0 0 −1 0 ⎠
⎛ 0 0 −0.707 0.707 0 0 0 0⎞
t = ⎜ ⎟
5 ⎝0 0 0 0 −0.707 0.707 0 0 ⎠
Comparing with the hand calc, you can see that the boundary DOF's are also included. Boundaries conditions
are dealt with later on.
nm
⎛ t T⋅K ⋅t ⎞
Use assembly equation to create global stiffness matrix KG :=
∑ ⎝ j j j⎠
j=1
This matrix is singular at present, boundary conditions will be required to remove the singularity and prevent rigid
body motion
2.6 Applied forces
Assemble the Global Force Matrix (force annotation same as for DOF notation)
⎛ 0 ⎞
⎜ −10 ⎟
⎜ ⎟
⎜ 0 ⎟
⎜ 0 ⎟
P := ⎜ ⎟ ⋅ kN
⎜ ⎟0
⎜ 0 ⎟
⎜ 0 ⎟
⎜ ⎟
⎝ 0 ⎠
The following matrix defines the fixity for each degree of freedom. For the variable 'BC' insert a '0' if unrestrained,
insert a '1' if restrained.
⎛0⎞
⎜0⎟
⎜ ⎟
⎜0⎟
⎜0⎟
BC := ⎜ ⎟
⎜1⎟
⎜1⎟
⎜1⎟
⎜ ⎟
⎝1⎠
Now remove singularity of global stiffness matrix by adding in a matrix with large stiffness values along the
leading diagonal at locations where the degree of freedom is restrained. Add a stiffness of say 1050 kN/mm:
:= if ⎛ BC = 0 , 0 , 10 ⋅ kN⋅ mm
50 − 1⎞
Matrix to be added: KGBC
k, k ⎝ k ⎠
⎛0 0 0 0 0 0 0 0 ⎞
⎜0 0 0 0 0 0 0 0
⎟
⎜ ⎟
⎜0 0 0 0 0 0 0 0 ⎟
⎜0 0 0 0 0 0 0 0 ⎟
⎜ ⎟ −1
KGBC = ⎜ 0 0 0 0 1 × 10
50
0 0 0 ⎟ ⋅ kN⋅ mm
⎜ 50
⎟
⎜0 0 0 0 0 1 × 10 0 0 ⎟
⎜ 50 ⎟
⎜0 0 0 0 0 0 1 × 10 0 ⎟
⎜ 50 ⎟
⎝0 0 0 0 0 0 0 1 × 10 ⎠
Normally this is the part of the calculation which requires the solution of simultaneous equations using Gauss
Elimination, and requires the lions share of the programming. Luckily in Mathcad we can calculate the inverse
of the stiffness matrix directly:
⎛ 0.183 ⎞
⎜ −0.527 ⎟
⎜ ⎟
(
d := KGmod )− 1⋅ P ⎜ −0.078 ⎟
⎜ −0.41 ⎟ Compare with the results
d=⎜ ⎟ ⋅ mm from the notes
⎜ 0
⎟
⎜ 0 ⎟
⎜ 0 ⎟
⎜ ⎟
⎝ 0 ⎠
F := K ⋅ t d
j j j (Fj)2 =
6.09 ⋅ kN
-3.91
-8.613 Note: +ve tension
-3.91 -ve compression
5.529
4. Conclusion
The procedure presented is applicable for any pin jointed frame which is joint loaded. It can be expanded to incorporate
members with more degrees of freedom, i.e. rotational and shear DOF's, and also into 3D structures.