to structure nodes, in accord with Newton's third law. That is, nodal loads associated with element deformation are
$$
\{\mathbf {r} \} = - [ \mathbf {k} ] \{\mathbf {d} \} \tag {2.6-4}
$$
Finally, loads applied to structure nodes by external sources are called $\{P\}$ . For example, $\{P\} = \left[0 - P \quad 0 \quad 0 \quad 0 \quad 0\right]^{T}$ for the truss of Fig. 2.2-1. Loads applied by fixed supports are usually not included in $\{P\}$ because they would immediately be discarded by standard methods of imposing support conditions (see Section 2.10).
The set of equations that places each node in static equilibrium is
$$
\{\mathbf {P} \} + \sum_ {n = 1} ^ {\text {numel}} \{\mathbf {r} \} _ {n} + \sum_ {n = 1} ^ {\text {numel}} \{\mathbf {r} _ {e} \} _ {n} = \{\mathbf {0} \} \tag {2.6-5}
$$
where $\text{numel}$ is the number of elements in the structure. Summations are written because a typical node is connected to more than one element. However, a node receives $\{\mathbf{r}\}$ and $\{\mathbf{r}_e\}$ contributions only from the elements to which it is connected; thus, Eq. 2.6-5 implies the expansion of element vectors to “structure size” by addition of many zeros.
Substitution of Eq. 2.6-4 into 2.6-5 yields
$$
[ \mathbf {K} ] \{\mathbf {D} \} = \{\mathbf {R} \} \tag {2.6-6}
$$
where
$$
[ \mathbf {K} ] = \sum_ {n = 1} ^ {\text {numel}} [ \mathbf {k} ] _ {n} \quad \text {and} \quad \{\mathbf {R} \} = \{\mathbf {P} \} + \sum_ {n = 1} ^ {\text {numel}} \{\mathbf {r} _ {e} \} _ {n} \tag {2.6-7}
$$
Summations imply the expansion of element arrays [k] and $\{\mathbf{r}_e\}$ to "structure size" so that $\{\mathbf{d}\}_n$ of each element $n$ becomes identical to the structure displacement vector $\{\mathbf{D}\}$ .
For a plane truss, Eq. 2.6-6 contains two equations per node. For a space truss there would be three equations per node.
# 2.7 ASSEMBLY AS DICTATED BY NODE NUMBERS
Element node labels, such as $i$ and $j$ in Fig. 2.4-1, serve only as convenient tags during the generation of element matrices. In the assembly process it is the structure node labels, such as 1, 2, and 3 in Fig. 2.2-1, that determine the locations in [K] and {R} to which coefficients in element arrays [k] and {r\_e} are assigned. This is true of any finite element, regardless of its type, size, shape, or number of nodes.
As a simple example, consider a hypothetical structure that has two triangular elements and one d.o.f. per node (Fig. 2.7-1). This structure is not a truss. We need not know what physical problem is being modeled. We need say only that the characteristic matrix [k] of each element is 3 by 3, that structure nodes of

text_image
3.00 / node
2
k
i
①
j
②
k
i
①
j
②
3
1
4
=
Figure 2.7-1. A hypothetical four-node structure built of two triangular elements. This structure is not a truss. Each node has a single d.o.f. Node labels are assigned arbitrarily.
element 1 are numbered 1, 4, and 2, and that structure nodes of element 2 are numbered 4, 3, and 2. For elements 1 and 2 in Fig. 2.7-1, we write
$$
\Gamma_ {i} \leq [ \mathbf {k} ] _ {1} \{\mathbf {d} \} _ {1} = \left[ \begin{array}{l l l} a _ {1} & a _ {2} & a _ {3} \\ a _ {4} & a _ {5} & a _ {6} \\ a _ {7} & a _ {8} & a _ {9} \end{array} \right] \left\{ \begin{array}{l} d _ {i} \\ d _ {j} \\ d _ {k} \end{array} \right\} \quad \text { and } \quad [ \mathbf {k} ] _ {2} \{\mathbf {d} \} _ {2} = \left[ \begin{array}{l l l} b _ {1} & b _ {2} & b _ {3} \\ b _ {4} & b _ {5} & b _ {6} \\ b _ {7} & b _ {8} & b _ {9} \end{array} \right] \left\{ \begin{array}{l} d _ {i} \\ d _ {j} \\ d _ {k} \end{array} \right\} = \left[ \begin{array}{l} \vdots \\ (2. 7 - 1) \end{array} \right.
$$
where $d$ 's are nodal d.o.f. Letter subscripts indicate element node labels. It does not matter how the $a$ 's and $b$ 's are calculated; it matters only that they exist. In the following explanation we ignore symmetry of the [k]'s to show more clearly what happens to the $a$ 's and $b$ 's. Let nodal "loads" be called $\{\overline{\mathbf{r}}\}$ , where $\{\overline{\mathbf{r}}\} = [\mathbf{k}]\{\mathbf{d}\}$ . Now consider element 1. Its nodal loads, first in element labeling and then in structure labeling, are
$$
\begin{array}{l} \bar {r} _ {i} = a _ {1} d _ {i} + a _ {2} d _ {j} + a _ {3} d _ {k} \quad \checkmark \quad \bar {r} _ {1} = a _ {1} D _ {1} + a _ {2} D _ {4} + a _ {3} D _ {2} \\ \bar {r} _ {j} = a _ {4} d _ {i} + a _ {5} d _ {j} + a _ {6} d _ {k} \quad \text { and } \quad \bar {r} _ {4} = a _ {4} D _ {1} + a _ {5} D _ {4} + a _ {6} D _ {2} \tag {2.7-2} \\ \vec {r} _ {k} = a _ {7} d _ {i} + a _ {8} d _ {j} + a _ {9} d _ {k} \quad \vec {r} _ {2} = a _ {7} D _ {1} + a _ {8} D _ {4} + a _ {9} D _ {2} \\ \end{array}
$$
To the latter group of equations we can add the equation $\bar{r}_{3}=0$ because node 3 is not attached to element 1. After this addition, and after rearrangement to place the D's in numerical order, we have for element 1
$$
\left\{ \begin{array}{l} \bar {r} _ {1} \\ \bar {r} _ {2} \\ \bar {r} _ {3} \\ \bar {r} _ {4} \end{array} \right\} = \left[ \begin{array}{c c c c} a _ {1} & a _ {3} & 0 & a _ {2} \\ a _ {7} & a _ {9} & 0 & a _ {8} \\ 0 & 0 & 0 & 0 \\ a _ {4} & a _ {6} & 0 & a _ {5} \end{array} \right] \left\{ \begin{array}{l} D _ {1} \\ D _ {2} \\ D _ {3} \\ D _ {4} \end{array} \right\} \tag {2.7-3}
$$
in which the square matrix is $[k]_{1}$ . Element 2 can be treated similarly. Then, because the two matrices $[k]_{1}$ and $[k]_{2}$ have the same size and operate on the same vector of d.o.f. $\{D\}$ , we can write $[K]\{D\} = (\Sigma [k])(\{D\})$ , where
$$
[ \mathbf {K} ] = [ \mathbf {k} ] _ {1} + [ \mathbf {k} ] _ {2} = \left[ \begin{array}{l l l l} a _ {1} & a _ {3} & 0 & a _ {2} \\ a _ {7} & a _ {9} & 0 & a _ {8} \\ 0 & 0 & 0 & 0 \\ a _ {4} & a _ {6} & 0 & a _ {5} \end{array} \right] + \left[ \begin{array}{l l l l} 0 & 0 & 0 & 0 \\ 0 & b _ {9} & b _ {8} & b _ {7} \\ 0 & b _ {6} & b _ {5} & b _ {4} \\ 0 & b _ {3} & b _ {2} & b _ {1} \end{array} \right] \tag {2.7-4}
$$
We see that coefficients below the diagonal of an element [k] matrix (before reordering) may appear above the diagonal in [K]. This happens in the present example (but not in the truss example of Section 2.5) because expansion and

text_image
3
①
2
5
②
1
4
$$
\left\{\mathbf {R} \right\} = \left\{ \begin{array}{l} \triangle \\ \triangle \\ \triangle \end{array} \right\} + \left\{ \begin{array}{l} \square \\ \square \\ \square \\ \square \end{array} \right\} = \left\{ \begin{array}{l} \square \\ \square \\ \triangle \\ \square \\ \square \end{array} \right\} \text {Structure}
$$
$$
\begin{array}{l} [ \mathbf {K} ] = \left[ \begin{array}{c c} & \triangle \triangle \quad \triangle \\ & \triangle \triangle \quad \triangle \\ & \triangle \triangle \quad \triangle \end{array} \right] + \left[ \begin{array}{c c} \square \square & \square \square \\ \square \square & \square \square \\ & \square \square & \square \square \\ \square \square & \square \square \end{array} \right] = \left[ \begin{array}{c c} \square \square & \square \square \\ \square \triangle \triangle \square \triangle \\ \triangle \triangle & \triangle \\ \square \square & \square \square \\ \square \triangle \triangle \square \triangle \end{array} \right] \\ ⓘ \\ ② \\ \end{array}
$$
Figure 2.7-2. A hypothetical structure having one d.o.f. per node and built from a three-node element and a four-node element.
rearrangement of coefficients are needed to make element d.o.f. vectors {d} identical to the structure d.o.f. vector {D}.
If element d.o.f. labels are interchanged, then coefficients $a_i$ and $b_i$ in Eqs. 2.7-1 will be rearranged in the element [k] matrices. However, if structure node labels are preserved, the $a_i$ and $b_i$ are assigned to the same locations in the structure matrix [K] as before. For example, if in Fig. 2.7-1 the labels $ijk$ are permuted to $jki$ , then the first of Eqs. 2.7-2 becomes $\bar{r}_j = a_1d_j + a_2d_k + a_3d_i$ , but $i = 2, j = 1$ , and $k = 4$ , so that $\bar{r}_1 = a_1D_1 + a_2D_4 + a_3D_2$ as before.
Another example of assembly appears in Fig. 2.7-2. Again the structure is hypothetical and is not a truss. Element matrices are shown already expanded to “structure size.” Because element node labels are not shown and specific $k_{ij}$ are not identified, Fig. 2.7-2 shows only the matrix topology of assembly. Note that $\{R\}$ and $[K]$ have the same row topology.
| DO 500 N=1, NUMELCALL ELEMENTKK(1) = NOD(1,N)KK(2) = NOD(2,N)KK(3) = NOD(3,N)DO 400 I=1,3K = KK(I) →R(K) = R(K)+RE(I)DO 300 J=1,3L = KK(J)S(K,L) = S(K,L)+SE(I,J)300 CONTINUE400 CONTINUE500 CONTINUE | Terms:S = [K]SE = [k]R = {R}RE = {r_e} | Example (Fig. 2.7-1):NOD(1,1) = 1NOD(2,1) = 4NOD(3,1) = 2NOD(1,2) = 4NOD(2,2) = 3NOD(3,2) = 2 |
| (a) | (b) | (c) |
Figure 2.7-3. (a) Fortran coding for assembly of element matrices. Each element has three nodes and one d.o.f. per node. NUMEL = number of elements in the structure. (b) Typical structural notation (as in Eqs. 2.6-7). (c) Example of array NOD.
DO 500 N=1, NUMEL
CALL ELEMENT
KK(2) = 2*NOD(1,N)
KK(1) = KK(2) - 1
KK(4) = 2*NOD(2,N)
KK(3) = KK(4) - 1
DO 400 I=1,4
K = KK(I)
R(K) = R(K) + RE(I)
DO 300 J=1,4
L = KK(J)
S(K,L)=S(K,L)+SE(I,J)
300 CONTINUE
400 CONTINUE
500 CONTINUE
(a)

text_image
D6 = v3
j=3
D5 = u3
②
D2 = v1
D1 = u1
i=1
(b)
For bar 2 (N = 2):
$$
\mathrm{NOD} (1, 2) = 1
$$
$$
\mathrm{NOD} (2, 2) = 3
$$
$$
\mathrm{KK} (2) = 2 * 1 = 2
$$
$$
\mathrm{KK} (1) = 2 - 1 = 1
$$
$$
\mathrm{KK} (4) = 2 * 3 = 6
$$
$$
\mathrm{KK} (3) = 6 - 1 = 5
$$
(c)
Figure 2.7-4. (a) Fortran coding for assembly of element matrices. Each element has two nodes and two d.o.f. per node. NUMEL = number of elements in the structure. (b) Bar 2 of the truss of Fig. 2.2-1, showing the numbering of nodes and d.o.f. (c) Contents of arrays for bar 2.
Expansion to “structure size” is a conceptual device that need not actually be carried out. Assembly can be stated as an addition algorithm that assigns element coefficients to positions dictated by structure node numbers associated with the element. Such an algorithm appears in Fig. 2.7-3. Here it is assumed that each element has three nodes, each with a single d.o.f., as in Fig. 2.7-1. Structure node numbers that correspond to element node labels i, j, and k are assumed to have been previously stored in rows 1, 2, and 3 of array NOD, which has as many columns as there are elements in the structure. Subroutine ELEMENT (not shown) is assumed to return element matrices $[k]$ and $\{r_{e}\}$ in arrays SE and RE, respectively, via a COMMON block (not shown). Information in SE and RE is repeatedly created and destroyed as subroutine ELEMENT is called for each element in turn. Information in SE and RE is added into structural arrays S and R as part of the assembly process $[K] = \Sigma [k]$ and $\{R\} = \Sigma \{r_{e}\} + \{P\}$ . Externally applied loads $\{P\}$ must be separately added to $\{R\}$ after completing the algorithm in Fig. 2.7-3. It is assumed that arrays S and R are null before executing this assembly algorithm.
A similar assembly algorithm, applicable to a plane truss, is shown in Fig. 2.7-4. Each element has two nodes and each node has two d.o.f. Otherwise, this algorithm is like that of Fig. 2.7-3.
The algorithm of Fig. 2.7-4 can easily be altered to deal with a space truss, where each node has three d.o.f. and each [k] is 6 by 6. Array KK must contain six entries. The first three are KK(3) = 3\*NOD(1,N), KK(2) = KK(3)-1, and KK(1) = KK(3)-2. Loop indices 1 and J must run from 1 to 6.
# 2.8 NODE NUMBERING THAT EXPLOITS MATRIX SPARSITY
A finite element structure with many d.o.f. has a sparse coefficient matrix [K]. That is, most of the individual coefficients $K_{ij}$ are zero. Sparsity should be exploited in order to economize on computer storage space and running time. Spars-
ity may be exploited by various schemes. In the present section we emphasize bandedness, which is among the simpler schemes.
The number of nonzero coefficients in [K], and their numerical values, are independent of how structure nodes are numbered. A change in structure node numbers changes only the arrangement of nonzero $K_{ij}$ . Figure 2.8-1 is a case in point. The topology of nonzero coefficients in Fig. 2.8-1 can be understood by recalling that for any structure, a structure stiffness coefficient $K_{ij}$ can be nonzero only if d.o.f. $i$ and $j$ are both present in at least one element.
Consider next the plane truss of Fig. 2.8-2. [K] is 12 by 12. For the first numbering, the topology of [K] is shown in Fig. 2.8-3a. The semibandwidth (also called the half-bandwidth) is given the symbol $b$ . Here $b = 6$ . Matrix [K] is symmetric and has a total bandwidth $2b - 1$ . Bandwidth $2b - 1$ indicates the horizontal span of the zone in which all nonzero $K_{ij}$ reside. This zone lies along the principal diagonal of [K]. Some zeros may appear within the band, but only zeros appear outside it.

A small semibandwidth is usually achieved by placing consecutive node numbers along the shorter dimension of a structure. The reader may check that the alternative numbering, in Fig. 2.8-2b, achieves the maximum possible semibandwidth for this problem (b = 12). A small value of b is desired.
The entire information content of a symmetric banded matrix resides in coefficients within the semiband. In practice, matrix order $n_{eq}$ may greatly exceed semibandwidth b. If we store and process only the semiband rather than all coefficients in the upper triangle of [K], we decrease storage requirements by a factor of about $n_{\mathrm{eq}}b/(n_{\mathrm{eq}}^{2}/2)=2b/n_{\mathrm{eq}}$ . In addition, as compared with processing a full but symmetric matrix, we reduce equation-solving expense by a factor of about $3b^{2}/n_{eq}^{2}$ . For example, if $n_{eq}=10b$ , then the time needed to solve for d.o.f. {D} is reduced by a factor of about 30.
A simple storage format for the semiband is shown in Fig. 2.8-3b. Each row is shifted left: 1 space for row 2, 2 spaces for row 3, and in general i - 1 spaces for row i. Thus all diagonal coefficients $K_{ii}$ of the matrix are stored in column 1 of the semiband array. To program the assembly of [K] in this form we need change only the innermost loop of the algorithm in Fig. 2.7-4. The required form of this innermost loop is shown in Fig. 2.8-4. The IF statement avoids coefficients $K_{ij}$ below the main diagonal of [K], which would fall outside the stored semiband.

Figure 2.8-1. A hypothetical four-element structure. Each element has two nodes. Each node has one d.o.f. Two different numberings (one the reverse of the other) and their associated stiffness matrices are shown. Capital letters indicate nonzero stiffness coefficients.

text_image
y,v
1
2
3
4
5
6
x,u
(good)
(a)

text_image
y,v
6
5
4
1
2
3
(poor)
x,u
(b)
Figure 2.8-2. A plane truss, showing node numberings that are (a) favorable and (b) unfavorable for achieving a banded stiffness matrix [K].
Some Computational Details. From Fig. 2.8-1 we see that the rightmost nonzero coefficient $K_{ij}$ in any row may be close to the diagonal or far away. To compute $b$ we must look for the $K_{ij}$ farthest away. Specifically, $b$ is the maximum of all $n_{\text{eq}}$ values of $b_i$ , where $b_i$ is the number of columns from and including the diagonal to the rightmost nonzero $K_{ij}$ in row $i$ . Or, we can compute $b$ by adding one to the magnitude of the maximum difference in active global d.o.f. in an element, using the element that displays the largest difference. For example, in Fig. 2.8-1a we find from element 2-5 that $b = (5 - 2) + 1 = 4$ . In Fig. 2.8-2a we obtain $b = 6$ from elements 1-3, 2-4, 3-5, and 4-6; respectively, they give the d.o.f. differences $6 - 1 = 5, 8 - 3 = 5, 10 - 5 = 5$ , and $12 - 7 = 5$ . (D.o.f. that are suppressed, as by a fixed support, may not be listed in $\{\mathbf{D}\}$ . Then the numbering of active d.o.f. will not correspond to node numbers in such a convenient way. Information needed to determine $b$ can still be found in columns of array ID. See Section 2.10.)
Both parts of Fig. 2.8-1 display a solid line that bounds the uppermost nonzero coefficient in each column of the matrix. This line is called the skyline (or envelope, or profile). We see that the matrices in Fig. 2.8-1 have the same semibandwidth but different skylines. As an alternative to the band storage scheme of Fig. 2.8-3, one could elect to store only the portion of each matrix column between

text_image
b = 6
X X X X X X
X X X X X O
X X X X X X
X X X X X O
X X X X X X
X X X X X X
X X X X X
X X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
X X X X
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
12
Symmetric
Zero
Zero
(a)

text_image
b=6
X X X X X X
X X X X X O
X X X X X X
X X X X X O
X X X X X X
X X X X X
X X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
X X X
Zero
(b)
Figure 2.8-3. (a) [K] for the plane truss of Fig. 2.8-2a (the “good” numbering). X = nonzero coefficient. (b) Band form storage of the same matrix.

text_image
DO 300 J=1,4
IF (KK(J) ,LT. K) GO TO 300
L = KK(J) - K + 1
S(K,L) = S(K,L) + SE(I,J)
300 CONTINUE
Figure 2.8-4. Altered form of the innermost loop of Fig. 2.7-4 to achieve the semiband storage format of Fig. 2.8-3b.
the skyline and the diagonal. Then Fig. 2.8-1b would be preferable to Fig. 2.8-1a. Another reason to prefer Fig. 2.8-1b is that equation solving creates fills; that is, a zero beneath the skyline is often changed to nonzero by the equation-solving process. There are three such zeros in Fig. 2.8-1a but none in Fig. 2.8-1b. Storage space must be reserved for fills, and fills must be processed after they are created.
The attention given to exploiting sparsity is worthwhile in reducing computation cost. This is clear from Fig. 2.8-5: for every nonzero coefficient in [K] there are over 100 zero coefficients. Many different storage schemes and equation-solving algorithms are available. Extensive discussion appears in Ref. 2.1.
# 2.9 AUTOMATIC ASSIGNMENT OF NODE NUMBERS
Imagine that a node must be added to the left of the truss of Fig. 2.8-2a. Two new bars will connect the new node to existing nodes 1 and 2. The entire structure must be renumbered if low bandwidth is to be preserved. It would be far more convenient if the new node could be given the next available number, 7, and the computer program could do the rest. That is, the computer program should accept arbitrary node numbers, adopt new numbers for efficient internal operations, and produce results in the user's original numbering system.

natural_image
3D wireframe model of a mechanical component with internal mesh structure (no text or symbols)
Figure 2.8-5. Finite element model of a baseplate, built of 2633 bar, plate, shell, and solid elements. There are 1005 nodes and from 3 to 6 d.o.f. per node. The semibandwidth is 852 and the density of [K] is 0.85% [2.2] (Courtesy of G.C. Everstine, David W. Taylor Naval Ship R&D Center, Bethesda, Maryland.)

Figure 2.9-1. A graph that might represent a piping system. Node numbers have been chosen by a formal algorithm rather than by inspection.
Figure 2.9-1 shows the numbering achieved by a node-renumbering algorithm. For a single d.o.f. per node the semibandwidth is $b = 8$ . Numbering by inspection, one would probably not achieve so low a value of $b$ without considerable thought and several trials.
Renumbering algorithms exploit graph theory and its terminology [2.2,2.3]. Details are not presented here. Broadly speaking, a typical reordering algorithm examines a few promising numbering patterns (of the $N!$ possibilities for a $N$ by $N$ matrix) and selects the best one. The algorithm does not guarantee an optimum numbering, or even guarantee improvement over the numbering supplied to it. But the goal of reducing bandwidth—or skyline, or fills—is usually achieved. No single strategy is best for all goals or for all finite element meshes. Interestingly, simple reversal of node numbers (as in Fig. 2.8-1) may reduce the skyline while leaving bandwidth unchanged.
A “frontal” or “wave front” equation solver processes equations in element order rather than in node order. One then uses an algorithm that produces good element numbering.
A table of nodal connectivity is needed for node numbering. There is some computational expense in generating this table and doing the renumbering. But automatic renumbering is cost-effective, especially if the same numbering is used in repeated solutions, as is the case in nonlinear problems. Automatic renumbering is always worthwhile from the viewpoint of user convenience.
# 2.10 DISPLACEMENT BOUNDARY CONDITIONS
In the structure stiffness equations $[K]\{D\} = \{R\}$ , matrix $[K]$ is singular and no unique solution for d.o.f. $\{D\}$ is possible if the structure is unsupported. Some d.o.f. in $\{D\}$ must be prescribed to enable a solution. Similarly, in a nonstructural problem where the matrices have other physical meanings, one or more d.o.f. $D_{i}$ must be prescribed. The method described by Eqs. 2.3-2 to 2.3-4 usually requires row and column interchanges. Therefore, it is not well suited to computer programming. In this section we consider alternative procedures for imposing prescribed values of one or more d.o.f. $D_{i}$ . Initially we assume that all prescribed $D_{i}$ are prescribed as zero. Prescribed nonzero $D_{i}$ are considered subsequently. ( $\frac{1}{2}$ )
A general-purpose program for structural analysis typically allows six d.o.f. per node (displacement in each coordinate direction and rotation about each coordinate axis). Often, not all of these d.o.f. are needed in the analysis of a particular structure. Indeed, for a plane structure, some must be eliminated: if no element
resists a displacement $D_{i}$ , then $K_{ii} = 0$ and [K] is singular. A plane structure, by definition, resists only in-plane distortions. Therefore, nodal d.o.f. that represent $z$ -direction motion and rotations about $x$ and $y$ axes must be eliminated (i.e., prohibited) at all nodes. For a plane truss (but not a plane frame) we must also prohibit rotation $\theta_{z}$ about the $z$ -axis at all nodes. If $\theta_{z}$ is prohibited at all nodes, then truss elements, and the truss itself, can still have rigid body rotation in the $xy$ plane because the prohibited rotations are not among their nodal d.o.f. (One can imagine that nodes of a plane truss are frictionless pins that connect bars together. A rotation $\theta_{z}$ of a pin does not deform the truss. Accordingly, $\theta_{z}$ is not resisted, and the associated rotational stiffness is zero.)
ID Array. We introduce a “destination array” ID, which is to be filled with numbers that indicate the locations in [K] to which element coefficients $k_{ij}$ are to be assigned. Array ID has as many columns as there are nodes in the structure and as many rows as the maximum number d.o.f. allowed per node (typically six rows, for three displacement d.o.f. and three rotation d.o.f.). By use of array ID we will directly assemble matrix $[K_{11}]$ of Eq. 2.3-3, although we will call it simply [K] in what follows. Coefficients in $[K_{12}]$ of Eq. 2.3-3 will be discarded, which is acceptable if $\{D_{c}\} = \{0\}$ as is currently assumed.
Consider, for example, Fig. 2.10-1. If this structure is to be analyzed by use of a program that allows six d.o.f. per node, array ID has 6 rows and 8 columns. We start with ID null and, by means of input data, insert a 1 for each d.o.f. to be eliminated because it has a prescribed zero displacement. Support conditions in Fig. 2.10-1 dictate that $v_{1} = u_{5} = v_{5} = u_{7} = 0$ . In addition, at each node i we must suppress z-direction displacement $w_{i}$ (normal to the xy plane) and rotations $\theta_{xi}, \theta_{yi}$ , and $\theta_{zi}$ about x, y, and z axes, respectively. The resulting ID array is shown in Fig. 2.10-2.
The next step is to convert array ID to a list of equation numbers by counting zeros in successive columns and converting each 1 to a zero. This counting, accomplished by the algorithm of Fig. 2.10-4, produces the result shown in Fig. 2.10-3. Zeros now indicate d.o.f. that are not to appear in vector $\{D\}$ of active d.o.f. Nonzeros indicate equation numbers associated with active d.o.f. For example, to locate the $D_{i}$ associated with node 7, we go to column 7 in Fig. 2.10-3, and find that all d.o.f. are suppressed except $v_{7}$ , which appears as $D_{10}$ in $\{D\}$ . Matrix $[K]$ for the supported structure is 12 by 12, where NEQ = 12 is computed in Fig. 2.10-4.
To assemble structural equations in the band format of Fig. 2.8-3b, while allowing only active d.o.f. to be present in $\{D\}$ , we can make use of array ID. An assembly algorithm, obtained by combining and modifying Figs. 2.7-4 and 2.8-4, is shown in Fig. 2.10-5. Array KK is filled with structural equation numbers for

text_image
y,v
x,u
2
4
6
8
1
3
5
7
Figure 2.10-1. A plane truss, showing support conditions.
$$
\begin{array}{l} \text {[ID]} = \left[ \begin{array}{c c c c c c c c} 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \end{array} \right] \begin{array}{l} u \\ v \\ w \\ \theta_ {x} \\ \theta_ {y} \\ \theta_ {z} \end{array} \end{array}
$$
Figure 2.10-2. Array ID for the truss of Fig. 2.10-1, after input data has supplied 1's for d.o.f. to be suppressed. Types of nodal d.o.f. associated with each row are shown at the right.
$$
\begin{array}{l} \text {[ID]} \\ \text {(converted)} \end{array} = \left[ \begin{array}{c c c c c c c c} 1 & 2 & 4 & 6 & 0 & 8 & 0 & 1 1 \\ 0 & 3 & 5 & 7 & 0 & 9 & 1 0 & 1 2 \\ 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 \end{array} \right]
$$
Figure 2.10-3. Array ID for the truss of Fig. 2.10-1, after conversion to a table of equation numbers (by means of Fig. 2.10-4 with NUMNP=8 and NDOF=6). It is now a “destination array.”
each bar in turn. For example, bar 1-3 of Fig. 2.10-1 yields KK entries of 1, 0, 4, and 5, from columns 1 and 3 of array ID. The first IF statement in Fig. 2.10-5 discards $K_{ij}$ and $R_i$ in rows associated with suppressed d.o.f., such as the preceding KK(2) = 0, which indicates that $v_1 = 0$ . The second IF statement discards $K_{ij}$ in columns associated with suppressed d.o.f. and also discards $k_{ij}$ that would fall below the diagonal of [K]. Any externally applied loads {P} must be separately added to {R} after completing the assembly algorithm.
Figure 2.10-5 requires element [k]'s to be 4 by 4. For generality, an arbitrary size should be allowed. Such generalizations are discussed in Ref. 2.1. As an exercise, one may imagine that the structure in Fig. 2.10-1 is a plane frame, whose nodal d.o.f. are u, v, and $\theta_{z}$ . How is the preceding discussion altered? If $\theta_{z}$ is not suppressed at any node, Fig. 2.10-2 is altered only by setting all entries in row 6 to zero. Figure 2.10-5 must be altered to allow for larger element arrays and one more d.o.f. per node.
Penalty Method. We now describe a method of imposing boundary conditions that allows prescribed d.o.f. to be either zero or nonzero. Consider again the truss of Fig. 2.2-1. Let nodal loads be $R_{1}$ , $R_{2}$ , and $R_{3}$ , as shown in Fig. 2.10-6. Imagine that vertical displacement $v_{1}$ is to be forced to have a value $\overline{v}_{1}$ . This condition can be treated as follows. Let $k_{s}$ be a large positive stiffness, say $10^{6}$ times $K_{22}$ . Add a spring of stiffness $k_{s}$ as shown in Fig. 2.10-6, and apply the large force $k_{s}\overline{v}_{1}$ in the direction of $\overline{v}_{1}$ . Load $R_{2}$ is discarded. Now solve for all three d.o.f. ( $u_{1}$ , $v_{1}$ , and $v_{3}$ ) in the usual way. If force $k_{s}\overline{v}_{1}$ were applied to only the added spring, its displacement would be precisely $\overline{v}_{1}$ . In our model, the added spring is only slightly
```txt
NEQ = 0
DO 62 N=1, NUMNP
DO 60 J=1, NDOF
C --- Transfer if D.O.F. is fixed. Otherwise increment NEQ.
IF (ID(J,N) .GT. 0) GO TO 58
NEQ = NEQ + 1
ID(J,N) = NEQ
GO TO 60
58 ID(J,N) = 0
60 CONTINUE
62 CONTINUE
```
Figure 2.10-4. Fortran statements that generate a table of equation numbers. This algorithm converts Fig. 2.10-2 to Fig. 2.10-3. Here NUMNP = total number of structure nodes, NDOF = number of d.o.f. per structure node allowed by the program, and NEQ = number of active d.o.f. = order of [K] for the constrained structure.