Next: Displacements and Forces Up: Stiffness Solution of Trusses Previous: Global'' Member Axes   Contents

## Assembly of Truss Stiffness Matrix

It has already been hinted that the member stiffnesses must be assembled into a structure stiffness. In addition to adding values of member stiffnesses in global axes, it is necessary to adjust the numbering into a numbering system of the truss as a whole. This particular task is accomplished by the location vectors. Each member in member axes will start at node no 1 and end with node no 2. Node no 1 will have forces and with their corresponding displacements and , or simply freedoms 1 and 2. At the end node, the freedoms in member axes are 3 and 4. However, in the structure the same nodes will have different numbers and different freedoms. Suppose that these corresponding freedoms are 7, 9, 25 and 3. The two numbering systems are conveniently related by location vectors. All counting is done starting with 1. The member numbers correspond to the position in the location vector, whilst the structure numbers of freedoms are the values at that location. So for our example, the location vector would be

The contribution of a member to the structure stiffness is obtained by adding to the structure stiffness matrix term in row loc[i] and column loc[j], the term , the member stiffness term for i = 1 to 4 and for j = 1 to 4.

In programming terms, we can write this as:

 (3.12)

for all members and for each member i and j looping for all i-th and all j-th. There is another point that needs to be stated. Without considerable modification and complication, the stiffness solution algorithm yields all member displacements. From the displacements, all member forces are then calculated. The reactions are determined by equilibrium of member forces and the reactions at the supports, since the corresponding displacements are set to zero. We do this by setting the location vector values to zero to correspond to zero displacements. The assembly algorithm then takes care of it by only assembling the contributions of the member stiffness to the structure stiffness if the location vector's value is not zero. This is best examined in the program listing. Below is the program snippet where this is accomplished. Notice that structure stiffness is denoted by Ks, location vector by locVec and the i,j-th element of the member stiffness by k[i,j].

    def assemble(self,k,locVec):
Ks = self.Ks   # alias
for i in range(4):
if locVec[i] != 0:
for j in range(4):
if locVec[j] != 0:
Ks[locVec[i]-1,locVec[j]-1] += k[i,j]
return Ks

The assembly of structure stiffness yields the structure stiffness . As member stiffness is symmetrical, structure stiffness is also symmetrical. It should also be noticed that its leading diagonal terms are all non-zero and positive. If either of the two conditions is not satisfied, then the structure stiffness is wrong, or the structure is a mechanism and can deform under infinitely small loads.

Structure stiffness relates structure nodal loads with the nodal displacements as follows:

 (3.13)

Whilst we consider the nodal loads a vector and the nodal displacements as a corresponding vector, in practice we have to often solve the structure for several load cases, viz, dead loads, live loads, wind loads and so on. This extension is achieved simply by adding the load vector for each load case to a load matrix, with the solution of equations yielding the matrix of displacements.

It is simpler to derive all the expressions for one load case only and take care of several load cases directly in the computer program.

Next: Displacements and Forces Up: Stiffness Solution of Trusses Previous: Global'' Member Axes   Contents
Algis Kabaila 2006-12-03