Files
MultiPhysicsVault/.raw/ConceptsApplicationsFiniteElementAnalysis/ConceptsApplicationsFiniteElementAnalysis_008.md
T
김경종 6bca119e6c
Tests / Hermetic test suite (push) Has been cancelled
Tests / Skill frontmatter validation (push) Has been cancelled
add raw source
2026-07-02 09:18:17 +09:00

453 lines
31 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- source-page: 71 -->
DO 500 N=1, NUMEL
CALL ELEMENT
I = NOD(1,N)
J = NOD(2,N)
KK(1) = ID(1,I)
KK(2) = ID(2,I)
KK(3) = ID(1,J)
KK(4) = ID(2,J)
DO 400 I=1,4
IF (KK(I).LE.0) GO TO 400
K = KK(I)
R(K) = R(K) + RE(I)
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
400 CONTINUE
500 CONTINUE
Figure 2.10-5. Assembly of active stiffness equations in the banded format described by Fig. 2.8-3b. Arrays S and R must initially be null.
restrained by the comparatively flimsy truss, and we compute $v_{1}$ to be only slightly less than $\overline{v}_{1}$ . Computed values of $u_{1}$ and $v_{3}$ are those appropriate to the remaining loads $R_{1}$ and $R_{3}$ and the computed value of $v_{1}$ . The value $\overline{v}_{1} = 0$ is permissible, in which case the force $k_{s}\overline{v}_{1}$ is zero.
Any or all structural d.o.f. can be prescribed in the foregoing way. Each prescription adds a large diagonal stiffness to [K], and also adds a large load to {R} if the prescribed d.o.f. is nonzero. Mathematically, this procedure is called a penalty method and $k_{s}$ is called a penalty number. As $k_{s}$ approaches infinity, the constraint $v_{1} = \overline{v}_{1}$ is exactly enforced. Of course, for computational purposes, $k_{s}$ is given a finite value. A large $k_{s}$ greatly increases the maximum eigenvalues of [K] and may therefore cause trouble in a dynamic analysis.
Each prescription of a d.o.f. decreases the number of unknowns in $\{D\}$ by one. Accordingly, the size of the system $[K]\{D\} = \{R\}$ should contract. This is true if formal procedures such as Eqs. 2.3-2 through 2.3-5 are used, but rearrangement of coefficients in $[K]$ is then required, which we wish to avoid in computation. Instead, by using the penalty method, we have elected to keep $\{D\}$ the same size, and populated only with unknowns, by changing the structure: each prescription of a d.o.f. adds a stiff element, creating a new structure but leaving the number of active d.o.f. unchanged.
![](images/page-071_10972378fb87b8219740e198225383bba7d5e4eab2acb89ba369f729849a5adb.jpg)
<details>
<summary>text_image</summary>
R₃
3
R₂
kₓv̄₁
2
1
R₁
kₓ
</details>
[K] {D} = {R} for active d.o.f.:
$$
\left[ \begin{array}{c c c} K _ {1 1} & K _ {1 2} & K _ {1 3} \\ K _ {2 1} & K _ {2 2} + k _ {s} & K _ {2 3} \\ K _ {3 1} & K _ {3 2} & K _ {3 3} \end{array} \right] \left\{ \begin{array}{l} u _ {1} \\ v _ {1} \\ v _ {3} \end{array} \right\} = \left\{ \begin{array}{l} R _ {1} \\ k _ {s} \bar {v} _ {1} \\ R _ {3} \end{array} \right\}
$$
Figure 2.10-6. A method of imposing the prescribed displacement $v_{1} = \overline{v}_{1}$ by adding a large stiffness $k_{s}$ . External loads $R_{1}$ and $R_{3}$ may continue to act.
<!-- source-page: 72 -->
The procedure illustrated in Fig. 2.10-6, while couched in structural terminology, is generally applicable. For example, in heat conduction analysis [K] would be a conductance matrix, {D} a vector of temperatures, and {R} a vector of heat fluxes. The matrix operations in Fig. 2.10-6 then represent the prescription of a nodal temperature by adding a large conductance to [K] and placing a large flux in {R}.
Caution. A very stiff element should be parallel to a d.o.f. as is the case for $k_{s}$ in Fig. 2.10-6. If $k_{s}$ were inclined, or were placed within a structure, it would contribute to both diagonal and off-diagonal coefficients in [K]. This circumstance can lead to numerical difficulties (see Section 18.2).
More About Prescribed Nonzero D.O.F. Another method of imposing a prescribed displacement, either zero or nonzero, is illustrated with reference to the truss of Fig. 2.10-6. Again imagine that [K] is 3 by 3 for the supported structure and that displacement $v_{1} = \bar{v}_{1}$ is to be imposed. As a first step we take known forces to the right side (Fig. 2.10-7a). But now the square matrix is unsymmetric and singular. We can restore symmetry and nonsingularity by replacing the second equation by the trivial equation $v_{1} = \bar{v}_{1}$ (Fig. 2.10-7b). Solution of the latter set of equations gives $v_{1} = \bar{v}_{1}$ and values of $u_{1}$ and $v_{3}$ appropriate to the system
$$
\left[ \begin{array}{l l} K _ {1 1} & K _ {1 3} \\ K _ {3 1} & K _ {3 3} \end{array} \right] \left\{ \begin{array}{l} u _ {1} \\ v _ {3} \end{array} \right\} = \left\{ \begin{array}{l} R _ {1} - K _ {1 2} \bar {v} _ {1} \\ R _ {3} - K _ {3 2} \bar {v} _ {1} \end{array} \right\} \tag {2.10-1}
$$
The effect of the treatment in Fig. 2.10-7 is to obtain Eqs. 2.10-1 but without changing the size of [K].
When several d.o.f. are prescribed, one merely applies the foregoing treatment to each d.o.f. in turn. The result is a [K] with several rows and columns that are null except for 1's on the diagonal. [K] remains symmetric and banded. Results are exact, not approximate. Prescribed d.o.f. may be zero or nonzero. The method is not limited to structural problems.
Except for the load terms $K_{12}\overline{v}_{1}$ and $K_{32}\overline{v}_{1}$ , Eq. 2.10-1 could be obtained by use of array ID. This observation suggests that we use array ID as before, so as to retain only d.o.f. not prescribed, but augment the procedure so as to obtain the extra load terms. More specifically, as each element is assembled, calculate loads $\{\overline{r}\} = [k]\{d\}$ produced by prescribed d.o.f. in $\{d\}$ , subtract $\{\overline{r}\}$ from element loads $\{r_{e}\}$ , then assemble the net loads as before. If no d.o.f. are prescribed for the element at hand, or if the prescribed d.o.f. are zero, then $\{\overline{r}\} = \{0\}$ , and $\{R\}$ is not changed.
$$
\left[ \begin{array}{l l l} K _ {1 1} & 0 & K _ {1 3} \\ K _ {2 1} & 0 & K _ {2 3} \\ K _ {3 1} & 0 & K _ {3 3} \end{array} \right] \left\{ \begin{array}{l} u _ {1} \\ v _ {1} \\ v _ {3} \end{array} \right\} = \left\{ \begin{array}{l l l} R _ {1} - K _ {1 2} \bar {v} _ {1} \\ R _ {2} - K _ {2 2} \bar {v} _ {1} \\ R _ {3} - K _ {3 2} \bar {v} _ {1} \end{array} \right\}, \quad \left[ \begin{array}{l l l} K _ {1 1} & 0 & K _ {1 3} \\ 0 & 1 & 0 \\ K _ {3 1} & 0 & K _ {3 3} \end{array} \right] \left\{ \begin{array}{l} u _ {1} \\ v _ {1} \\ v _ {3} \end{array} \right\} = \left\{ \begin{array}{l} R _ {1} - K _ {1 2} \bar {v} _ {1} \\ \bar {v} _ {1} \\ R _ {3} - K _ {3 2} \bar {v} _ {1} \end{array} \right\}
$$
(a)
(b)
Figure 2.10-7. Use of the “zero-one” treatment to impose displacement $v_{1} = \overline{v}_{1}$ on the truss of Fig. 2.10-6. (a) Intermediate form. (b) Final form.
<!-- source-page: 73 -->
Bandwidth Calculation. A disadvantage of the treatment in Fig. 2.10-7 is that if many d.o.f. are prescribed, many useless zeros are stored and processed. $^{1}$ Moreover, calculation of semibandwidth b should recognize that whole groups of d.o.f. may be suppressed (e.g., rows 3, 4, 5, and 6 in the ID arrays of Figs. 2.10-2 and 2.10-3). As explained in Section 2.8, semibandwidth b can be calculated from knowledge of which structural d.o.f. are associated with nodes of each element. This information resides in columns of ID. Consider, for example, bar 2-4 in Fig. 2.10-1. We consult columns 2 and 4 in Fig. 2.10-3, ignore the zeros, and find that the largest difference among the d.o.f. numbers 2, 3, 6, and 7 is $7 - 2 = 5$ . No other element yields a larger difference. Therefore, adding 1 to include the diagonal of [K], we conclude that $b = 5 + 1 = 6$ for this problem.
# 2.11 GAUSS ELIMINATION SOLUTION OF EQUATIONS
Structural equations $[K]\{D\} = \{R\}$ can be solved by a direct method or an indirect (iterative) method. In either case there are many algorithms to choose from. Direct algorithms are favored in practice. Computational aspects of equation solving are discussed in Appendix B. In the present section we summarize Gauss elimination, which is a direct method, and illustrate its physical meaning.
Consider the application of Gauss elimination to the $n_{eq}$ by $n_{eq}$ system of stiffness equations $[K]\{D\} = \{R\}$ . The first equation is solved for $D_{1}$ , then substituted into the subsequent equations. Thus, $D_{1}$ is said to be “eliminated.” Then the second equation is solved for $D_{2}$ and substituted into subsequent equations, and so on. This forward-reduction process alters $\{R\}$ and changes $[K]$ to upper triangular form with 1s on the diagonal. Finally, numerical values of unknowns are computed by back-substitution, so that $D_{n_{eq}}$ is found first and $D_{1}$ is found last.
An example appears in Fig. 2.11-1. All d.o.f. are restrained except $u_2$ , $u_3$ , and $u_4$ . Starting with the original matrix equation, Fig. 2.11-1b, we divide the first row by 2 and add it to the second row. This completes the substitution of $u_2$ into the remaining equations (Fig. 2.11-1c). Since $u_2$ does not appear in the third equation, the third row is unaffected. A similar substitution, now of row 2 into row 3 by multiplication of row 2 by 2/3 and addition, is shown in Fig. 2.11-1d. Figure 2.11-1e shows the result of dividing each equation by its diagonal coefficient (in an actual algorithm, this step may not be postponed until last). Solution for the d.o.f. by back-substitution is shown in Fig. 2.11-1f.
The foregoing process admits a physical interpretation: that each elimination releases the corresponding d.o.f., freeing it to move as dictated by applied loads and elastic properties of the structure. Consider the result of eliminating $u_{2}$ , Fig. 2.11-1c. In the original structure, the diagonal coefficient is $K_{22} = 12$ . That is, a force of 12 is needed to produce $u_{3} = 1$ while $u_{2} = u_{4} = 0$ ; or, $K_{22} = 6 + 6$ is the sum of the adjacent bar stiffnesses seen by d.o.f. $u_{3}$ . Elimination of $u_{2}$ effectively eliminates the constraint $u_{2} = 0$ and places bars 1 and 2 in series, forming
<!-- source-page: 74 -->
![](images/page-074_b883c279ee4626f7776881329f9db61763571ffec281389792c038f014ddca26.jpg)
<details>
<summary>text_image</summary>
y
1
P=24
① 2 ② 3 ③ 4
x,u
(a)
</details>
$$
\left[ \begin{array}{r r r} 1 2 & - 6 & 0 \\ - 6 & 1 2 & - 6 \\ 0 & - 6 & 6 \end{array} \right] \left\{ \begin{array}{l} u _ {2} \\ u _ {3} \\ u _ {4} \end{array} \right\} = \left\{ \begin{array}{l} 2 4 \\ 0 \\ 0 \end{array} \right\} \tag {b}
$$
$$
\left[ \begin{array}{c c c} 1 2 & - 6 & 0 \\ 0 & 9 & - 6 \\ 0 & - 6 & 6 \end{array} \right] \left\{ \begin{array}{l} u _ {2} \\ u _ {3} \\ u _ {4} \end{array} \right\} = \left\{ \begin{array}{l} 2 4 \\ 1 2 \\ 0 \end{array} \right\} \tag {c}
$$
$$
\left[ \begin{array}{c c c} 1 2 & - 6 & 0 \\ 0 & 9 & - 6 \\ 0 & 0 & 2 \end{array} \right] \left\{ \begin{array}{l} u _ {2} \\ u _ {3} \\ u _ {4} \end{array} \right\} = \left\{ \begin{array}{l} 2 4 \\ 1 2 \\ 8 \end{array} \right\} \tag {d}
$$
$$
\left[ \begin{array}{c c c} 1 & - \frac {1}{2} & 0 \\ 0 & 1 & - \frac {2}{3} \\ 0 & 0 & 1 \end{array} \right] \left\{ \begin{array}{l} u _ {2} \\ u _ {3} \\ u _ {4} \end{array} \right\} = \left\{ \begin{array}{l} 2 \\ \frac {4}{3} \\ 4 \end{array} \right\} \tag {e}
$$
$$
\left\{ \begin{array}{l} u _ {2} \\ u _ {3} \\ u _ {4} \end{array} \right\} = \left\{ \begin{array}{c} 2 + \frac {1}{2} u _ {3} \\ \frac {4}{3} + \frac {2}{3} u _ {4} \\ 4 \end{array} \right\} = \left\{ \begin{array}{l} 4 \\ 4 \\ 4 \end{array} \right\} \tag {f}
$$
Figure 2.11-1. (a) Three-bar truss, with load $P = 24$ at node 2. (b) The structure equations $[\mathbf{K}]\{\mathbf{D}\} = \{\mathbf{R}\}$ , if $AE / L = 6$ for each bar and only active d.o.f. are retained. (c-f) Stages in a Gauss elimination solution for nodal d.o.f. $u_{2}, u_{3}$ , and $u_{4}$ (which are respectively $D_{1}, D_{2}$ , and $D_{3}$ ).
a bar with nodes 1 and 3 whose axial stiffness is 3 rather than 6. Adjacent bar stiffnesses seen by d.o.f. $u_{3}$ are now 3 (from bars 1 and 2 in series) plus 6 (from bar 3), for a total of 9. Similarly, after elimination of $u_{3}$ and $u_{4}$ (Fig. 2.11-1d), the stiffness coefficient $K_{33} = 2$ represents the stiffness seen by d.o.f. $u_{4}$ when all three elements are connected in series with $u_{2}$ and $u_{3}$ free to move.
From the foregoing physical argument we conclude that each elimination reduces the stiffnesses seen by d.o.f. not yet eliminated, but does not reduce these stiffnesses to zero unless the structure is badly modeled or is without adequate support (Fig. 2.11-2). Accordingly, if a structure is properly modeled and adequately supported, we can proceed as in Fig. 2.11-1: use the ith equation to eliminate the ith d.o.f., without rearranging coefficients and without special coding to avoid zeros on the diagonal. If a zero diagonal coefficient is encountered, the user should check for an error in modeling or support conditions. (However, if [K] is not a true stiffness matrix, as for a “mixed” structural model or a non-structural problem, zero and/or negative diagonal coefficients do not necessarily signal an error.)
After elimination of d.o.f. $D_{1}$ through $D_{i}$ , where $1 \leqslant i < n_{\text{eq}}$ , the lower right portion of [K] below row $i$ remains symmetric if [K] was originally symmetric. Semibandwidth $b$ is also preserved. Each elimination affects only $b$ rows and up to $b$ coefficients per row. These attributes are exploited in programming (see Appendix B and Ref. 2.1).
Often it is necessary to compute the response of a structure to several different sets of loads. Then one must process a single [K] but several vectors {R}. The processing of [K] need not be repeated in order to treat another {R}. This is fortunate, as the processing of [K] is by far the more expensive operation.
The notation $\{\mathbf{D}\} = [\mathbf{K}]^{-1}\{\mathbf{R}\}$ does not necessarily mean that matrix inversion is used. Often it means only that the equations $[\mathbf{K}]\{\mathbf{D}\} = \{\mathbf{R}\}$ are to be solved for
<!-- source-page: 75 -->
![](images/page-075_2f81917d5914ab86096efbeef9520c0e5bf873522601922fcb43811b1083faa6.jpg)
<details>
<summary>text_image</summary>
w₁
w₂
P₁ ← L → P₂
</details>
$$
\frac {1 2 E I}{L ^ {3}} \left[ \begin{array}{c c} 1 & - 1 \\ - 1 & 1 \end{array} \right] \left\{ \begin{array}{l} w _ {1} \\ w _ {2} \end{array} \right\} = \left\{ \begin{array}{l} P _ {1} \\ P _ {2} \end{array} \right\}
$$
(a)
![](images/page-075_b20ab59af7a65b0dfc5189e7c7b0733574379451e03a0a385d5ab57c6110c2eb.jpg)
<details>
<summary>text_image</summary>
y,v
1
2
3
x,u
L
L
P
</details>
$$
\left[ \begin{array}{c c} 2 A E / L & 0 \\ 0 & 0 \end{array} \right] \left\{ \begin{array}{l} u _ {2} \\ v _ {2} \end{array} \right\} = \left\{ \begin{array}{l} 0 \\ P \end{array} \right\}
$$
(b)
Figure 2.11-2. Structures for which Gauss elimination fails because [K] is singular. (a) One-element beam, with $\theta_{1} = \theta_{2} = 0$ the only d.o.f. prescribed. (b) Two-element truss with bars collinear at node 2.
{D} by any convenient or efficient method. Solving equations is faster than inverting a matrix. In addition, the inverse of a banded matrix is a full matrix. For these reasons matrix inversion is usually avoided.
# 2.12 STRESS COMPUTATION. SUPPORT REACTIONS
Stress Computation. After solving the global equations $[K]\{D\} = \{R\}$ for $\{D\}$ , all nodal d.o.f. of the structure are known. To compute stress in a given element we extract nodal d.o.f. $\{d\}$ of that element from $\{D\}$ , compute element strains from $\{d\}$ , and finally compute stresses from strains.
Extraction of $\{d\}$ from $\{D\}$ is straightforward if all d.o.f. of the structure reside in $\{D\}$ in a regular pattern. For a plane truss of n nodes, we may have $\{D\} = [u_{1} v_{1} u_{2} v_{2} \cdots u_{n} v_{n}]^{T}$ . This is the case if the boundary condition treatment of Fig. 2.10-7 is applied to all prescribed d.o.f. of the structure. Thus, if i and j represent structure node numbers of a particular bar, then d.o.f. in $\{d\}$ are $u_{i} = D_{2i-1}$ , $v_{i} = D_{2i}$ , $u_{j} = D_{2j-1}$ , and $v_{j} = D_{2j}$ . It does not matter that some of these d.o.f. were initially prescribed (usually as zero) rather than calculated by solving equations.
Things are not as simple if assembly makes use of array ID and the algorithm of Fig. 2.10-5. Now d.o.f. that are initially prescribed do not appear in $\{D\}$ , thus destroying the regular pattern. However, columns of array ID associated with element nodes still contain the location in $\{D\}$ of each nodal d.o.f. calculated by solving equations. An algorithm for extracting $\{d\}$ from $\{D\}$ appears in Fig. 2.12-1, in which it is assumed that all prescribed d.o.f. are zero. Prescribed nonzero d.o.f. require that the statement $\mathrm{DE}(M) = 0$ be altered.
Elongation e of a plane truss bar is computed from components of nodal d.o.f. parallel to the bar (see Fig. 2.4-2):
$$
e = (u _ {j} - u _ {i}) \cos \beta + (v _ {j} - v _ {i}) \sin \beta \tag {2.12-1}
$$
Axial strain is $\epsilon = e/L$ . The bar is in uniaxial stress. Therefore, the axial stress caused by strain is
<!-- source-page: 76 -->
M = 0
DO 220 K=1,NNEL
C --- N is the structure number of node K of the Nth element.
N = NOD(K,NTH)
DO 200 L=1,NDOF
M = M + 1
DE(M) = 0.
J = ID(L,N)
C --- J is zero only if the D.O.F. is fixed.
IF (J .GT. 0) DE(M) = D(J)
200 CONTINUE
220 CONTINUE
Figure 2.12-1. Fortran code to extract the displacement vector DE of the Nth element from the structure solution vector D when prescribed d.o.f. are zero and D lists only nonzero d.o.f. Here NNEL = number of nodes per element and NDOF = number of degrees of freedom per node allowed by the program (e.g., NDOF = 6 in Fig. 2.10-3).
$$
\sigma = E \epsilon = E \frac {e}{L} \tag {2.12-2}
$$
If the bar has thermal expansion coefficient $\alpha$ and is uniformly heated T degrees from its stress free state, then initial stress must be superposed on stress owing to mechanical strain. Thus, instead of Eq. 2.12-2, we have
$$
\sigma = E \epsilon - E \alpha T = E \left(\frac {e}{L} - \alpha T\right) \tag {2.12-3}
$$
The physical argument associated with thermal stress analysis is as follows. The argument applies to finite element structures in general, not only to a truss. With all d.o.f. fixed, compute loads that each element applies to its nodes because of heating or cooling (e.g., as in Fig. 2.6-1b). Add mechanical loads (if any). Release the d.o.f.; that is, find nodal displacements by solving $[K]\{D\} = \{R\}$ for $\{D\}$ . Compute stress caused by nodal displacements (e.g., Ee/L in Eq. 2.12-3). Algebraically add stress associated with heating or cooling of the restrained element (e.g., $-E\alpha T$ in Eq. 2.12-3). Note that stress will be zero if thermal strain is uninhibited (e.g., if $e = \alpha TL$ in Eq. 2.12-3).
In stress analysis, displacements $\{d\}$ yield strains $\{\epsilon\}$ , and strains yield stresses $\{\sigma\}$ when multiplied by elastic constants. In more general terms, $\{\epsilon\}$ is the gradient of the element displacement field produced by element d.o.f. $\{d\}$ . A similar remark applies to nonstructural problems, where typically a flow quantity is analogous to $\{\sigma\}$ . As examples, if nodal d.o.f. $\{d\}$ are voltages or temperatures, the gradient of voltage or temperature produced by $\{d\}$ yields a flow of current when multiplied by electrical conductivity, or of heat when multiplied by thermal conductivity.
Support Reactions. When all d.o.f. are known, support reactions $\{\mathbf{R}_x\}$ can be obtained from Eq. 2.3-4. Unfortunately, while imposing displacement boundary conditions by methods discussed in Section 2.10, the $K_{ij}$ belonging to arrays $[\mathbf{K}_{21}]$ and $[\mathbf{K}_{22}]$ of Eq. 2.3-4 have been discarded. One can either save the necessary coefficients in a file before imposing displacements, or regenerate the coefficients later.
A particular reaction $R_{i}$ in the list $\{R_{x}\}$ can be computed as
$$
\sum_ {j} K _ {i j} D _ {j} = R _ {i} \quad \text { or } \quad \sum_ {m} \left(\sum_ {j} k _ {i j} d _ {j}\right) = R _ {i} \tag {2.12-4}
$$
<!-- source-page: 77 -->
The first equation uses the j nonzero entries in row i of [K]. The second equation is a similar sum, taken over the m elements joined to the node that $R_{i}$ acts upon.
What is the meaning of $\{R\}$ if large stiffnesses have been added in the process of imposing nonzero values of certain d.o.f. (as in Fig. 2.10-6)? If $[K]$ pertains to the original structure, before the addition of large stiffnesses, then loads $\{R\} = [K]\{D\}$ include loads originally applied to d.o.f. that are free to move and loads that must be applied to the original structure in order to produce the prescribed d.o.f.
# 2.13 SUMMARY OF PROCEDURE
The principal computational steps of linear static stress analysis by the finite element-method are now listed. Analogous steps are used for linear time-independent analysis of a nonstructural problem.
1. Input and initialization. Input the number of nodes and elements, nodal coordinates, structure node numbers of each element, material properties, temperature changes, mechanical loads, and boundary conditions. Reserve storage space for structure arrays [K] and {R}. Initialize [K] and {R} to null arrays. If array ID is used to manage boundary conditions, initialize ID and then convert it to a table of equation numbers.
2. Compute element properties. For each element: compute element property matrix [k] and element load vector $\{r_{e}\}$ .
3. Assemble the structure. Add [k] into [K] and $\{r_{e}\}$ into $\{R\}$ . Go back to step 2. Repeat steps 2 and 3 until all elements are assembled. Add external loads $\{P\}$ to $\{R\}$ . Impose displacement boundary conditions (if not imposed implicitly during assembly by use of array ID).
4. Solve the equations $[K]\{D\} = \{R\}$ for $\{D\}$ .
5. Stress calculation. For each element, extract $\{d\}$ from $\{D\}$ . Compute mechanical strains produced by $\{d\}$ . Include initial strains, if any, and convert resultant strains to stresses.
The foregoing steps outline an austere computer program, without preprocessors or postprocessors, automatic node renumbering, and other conveniences for the user. Modifications of the procedure are possible, such as computing properties of all elements before assembling any, and alternating steps of assembly with steps of equation solving.
Example. We illustrate the foregoing steps by applying them to the three-bar truss of Fig. 2.13-1. Only axial displacements and axial loads are present. For clarity we will use symbols as well as numbers. In actual computation only numbers would be present.
1. Input and initialization. Read the number of nodes and the number of elements: NUMNP=4 and NUMEL=3. Nodal coordinates are
$$
\begin{array}{l} x _ {1} = 0 \quad x _ {2} = L \quad x _ {3} = 2 L \quad x _ {4} = 3 L \\ y _ {1} = z _ {1} = 0 \quad y _ {2} = z _ {2} = 0 \quad y _ {3} = z _ {3} = 0 \quad y _ {4} = z _ {4} = 0 \\ \end{array}
$$
<!-- source-page: 78 -->
![](images/page-078_1390c1da18222542a61d46d4160036cb6eb791eb473a4355f21fb509a862a80f.jpg)
<details>
<summary>text_image</summary>
y, v
3 @ L = 3L
1 2 3 4 x, u
F
</details>
[a]
![](images/page-078_5af2ec77da9f3e0e384ec0fdd1ba9bfb126932344b9ba9cecc18003cf93c5fc5.jpg)
<details>
<summary>text_image</summary>
2F/3 + 2AEαT/3
F/3 - 2AEαT/3
1 4
</details>
(b)
Figure 2.13-1. (a) Example problem. The bar is divided into three identical elements and has four nodes. Elements 1 and 2 only are uniformly heated T degrees. (b) Support reactions predicted by elementary mechanics of materials theory.
Node numbers associated with the three elements are
$$
\mathrm{NOD} (1, 1) = 1 \quad \mathrm{NOD} (1, 2) = 2 \quad \mathrm{NOD} (1, 3) = 3
$$
$$
\mathrm{NOD} (2, 1) = 2 \quad \mathrm{NOD} (2, 2) = 3 \quad \mathrm{NOD} (2, 3) = 4
$$
Read cross-sectional area A, elastic modulus E, and coefficient of thermal expansion $\alpha$ (the same for each element in this example). The left two elements only are uniformly heated T degrees above the stress-free temperature of the structure. External force F is applied in the negative direction at node 2. Boundary conditions prohibit all nodal motions except $u_{2}$ and $u_{3}$ . For the sake of explanation we presume that the computer program allows only three d.o.f. per node (u, v, and w). Thus for array ID we have
$$
\begin{array}{l} \text {[ID]} = \left[ \begin{array}{l l l l} 1 & 0 & 0 & 1 \\ 1 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 \end{array} \right] \quad \text { and } \quad \text {[ID]} = \left[ \begin{array}{l l l l} 0 & 1 & 2 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right] \\ \text {(input)} \end{array}
$$
2. Compute element properties. The stiffness matrix of each element is
$$
[ \mathbf {k} ] = \frac {A E}{L} \left[ \begin{array}{c c c c c c} 1 & 0 & 0 & - 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ - 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right]
$$
where, in element 1 for example, the associated structural nodal d.o.f. are $\{\mathbf{d}\} = [u_1 v_1 w_1 u_2 v_2 w_2]^T$ . From Eq. 2.6-2, nodal loads of the three elements are:
$$
\{\mathbf {r} _ {e} \} _ {1} = \{\mathbf {r} _ {e} \} _ {2} = \alpha E A T \left[ - 1 \quad 0 \quad 0 \quad 1 \quad 0 \quad 0 \right] ^ {T}
$$
$$
\{\mathbf {r} _ {e} \} _ {3} = \alpha E A T \left[ \begin{array}{l l l l l l} 0 & 0 & 0 & 0 & 0 & 0 \end{array} \right] ^ {T}
$$
3. Assemble the structure. In the assembly algorithm of Fig. 2.10-5, the contents of array KK for the successive elements are $[0\ 0\ 0\ 1\ 0\ 0]$ , $[1\ 0\ 0\ 2\ 0\ 0]$ , and $[2\ 0\ 0\ 0\ 0\ 0]$ . Information associated with nodes 1 and 4 is discarded, and the “active” structure stiffness matrix [K] is 2 by 2. For illustration, consider where this 2 by 2 matrix would appear in a 4 by 4 stiffness matrix that operates on d.o.f. $u_{1}$ through $u_{4}$ . (The entire 4 by 4 matrix need not actually be formed.) The contribution of the leftmost element to structure arrays [K] and {R} is
<!-- source-page: 79 -->
$$
\frac {A E}{L} \left[ \begin{array}{c c c c} u _ {1} & u _ {2} & u _ {3} & u _ {4} \\ 1 & - 1 & \cdot & \cdot \\ - 1 & \boxed {1} & \cdot & \cdot \\ \cdot & \cdot & \cdot & \cdot \\ \cdot & \cdot & \cdot & \cdot \end{array} \right] \quad \text {and} \quad \alpha E A T \left\{ \begin{array}{c} - 1 \\ \boxed {1} \\ \cdot \\ \cdot \end{array} \right\}
$$
where dashed lines enclose [K] and {R}. Dots indicate locations in the structure arrays that receive no contribution from the element. In similar notation, the assembly of all three elements is written
$$
[ \mathbf {K} ] = \frac {A E}{L} \left[ \begin{array}{l l} 1 & \cdot \\ \cdot & \cdot \end{array} \right] + \frac {A E}{L} \left[ \begin{array}{l l} 1 & - 1 \\ - 1 & 1 \end{array} \right] + \frac {A E}{L} \left[ \begin{array}{l l} \cdot & \cdot \\ \cdot & 1 \end{array} \right] = \frac {A E}{L} \left[ \begin{array}{l l} 2 & - 1 \\ - 1 & 2 \end{array} \right]
$$
$$
\{\mathbf {R} \} = \alpha E A T \left\{ \begin{array}{l} 1 \\ \cdot \end{array} \right\} _ {0} ^ {0} + \alpha E A T \left\{ \begin{array}{l} - 1 \\ 1 \end{array} \right\} _ {0} ^ {0} + \alpha E A T \left\{ \begin{array}{l} \cdot \\ 0 \end{array} \right\} _ {0} ^ {0} + \left\{ \begin{array}{l} - F \\ 0 \end{array} \right\} _ {0} ^ {0} = \left\{ \begin{array}{l} - F \\ \alpha E A T \end{array} \right\}
$$
4. Solve the equations $[\mathbf{K}]\{\mathbf{D}\} = \{\mathbf{R}\}$ for $\{\mathbf{D}\}$ .
$$
D _ {1} = u _ {2} = - \frac {2 F L}{3 A E} + \frac {\alpha L T}{3} \quad \text { and } \quad D _ {2} = u _ {3} = - \frac {F L}{3 A E} + \frac {2 \alpha L T}{3}
$$
5. Stress calculation. With $u_{1} = u_{4} = 0$ and the rightmost element not heated,
$$
\{\mathbf {d} \} _ {1} = \left\{ \begin{array}{l} 0 \\ u _ {2} \end{array} \right\} \quad \text { and } \quad \sigma_ {1} = E \left(\frac {u _ {2} - 0}{L} - \alpha T\right) = - \frac {2 F}{3 A} - \frac {2 \alpha E T}{3}
$$
$$
\{\mathbf {d} \} _ {2} = \left\{ \begin{array}{l} u _ {2} \\ u _ {3} \end{array} \right\} \quad \text { and } \quad \sigma_ {2} = E \left(\frac {u _ {3} - u _ {2}}{L} - \alpha T\right) = \frac {F}{3 A} - \frac {2 \alpha E T}{3}
$$
$$
\{\mathbf {d} \} _ {3} = \left\{ \begin{array}{l} u _ {3} \\ 0 \end{array} \right\} \quad \text { and } \quad \sigma_ {3} = E \left(\frac {0 - u _ {3}}{L} - 0\right) = \frac {F}{3 A} - \frac {2 \alpha E T}{3}
$$
These results agree with results given by elementary mechanics of materials. Thermal stress is constant over the entire length of the structure, as should be expected.
# PROBLEMS
# Section 2.2
2.1 For the plane truss of Fig. 2.2-1, sketch the remaining four free-body diagrams not shown in Fig. 2.2-2 and write equations analogous to Eqs. 2.2-3 and 2.2-4.
2.2 Four springs, each of stiffness k, are constrained to slide in a circular frictionless track as shown. Nodes 1, 2, 3, and 4 are allowed only small displacements u, tangent to the circular track and positive counterclockwise. Write the structure stiffness matrix [K]. What is its rank?
2.3 A plane truss is shown in the sketch. Set up an initially null matrix [K] having 12 rows and 12 columns. Indentify locations of nonzero coefficients $K_{ij}$ by inserting at proper positions in [K] a “+” sign if $K_{ij} > 0$ or a “-” sign if $K_{ij} < 0$ .
<!-- source-page: 80 -->
![](images/page-080_d2727b15c74c67fe6b7ff0b0dcba4e917f457086f030abba2555a373243a0716.jpg)
<details>
<summary>text_image</summary>
1
2
3
4
</details>
Problem 2.2
![](images/page-080_477f389f4686d6ce448ac0cee6f8123fbf5375af2a8672710ec93d0209e219b0.jpg)
<details>
<summary>text_image</summary>
y,v
x,u
2 4 6
1 3 5
</details>
Problem 2.3
2.4 (a) Follow the instructions of Problem 2.3, but with reference to the six-d.o.f. beam shown in Problem 2.12. Let the beam be uniform and let $L_{1} = L_{2}$ .
(b) Repeat part (a), but let $L_{1} > L_{2}$ .
(c) Repeat part (a), but let $L_{1} < L_{2}$ .
2.5 Follow the instructions of Problem 2.3 but with reference to the eight-d.o.f. truss shown. All bars have the same A and the same E. Each of the nodal d.o.f. ( $D_{1}$ through $D_{8}$ ) is parallel or perpendicular to one or more bars.
![](images/page-080_58d6c130e9f419c631882c9a7cb002098f32ea620ea7c936509609874040f3d1.jpg)
<details>
<summary>text_image</summary>
D₄
D₃
45°
D₈
D₇
L
D₂
45°
D₅
D₁
D₆
</details>
Problem 2.5
![](images/page-080_83227a24b7f09eb570bafa59caf021e22088afcacb24bf01f354bfa03fd050f5.jpg)
<details>
<summary>text_image</summary>
1
4
2
F
3
4
1
2
3
4
3
</details>
Problem 2.6
2.6 The plane truss shown has bars of stiffness $k_{1}, k_{2}, k_{3}$ , and $k_{4}$ , where $k_{i} = A_{i}E_{i} / L_{i}$ . Free all d.o.f., and write the structure stiffness matrix in terms of the $k_{i}$ . Let nodal d.o.f. have the order $\{\mathbf{D}\} = [u_{1} \quad v_{1} \quad u_{2} \quad v_{2} \quad u_{3} \quad v_{3} \quad u_{4} \quad v_{4}]^{T}$ .
# Section 2.3
2.7 The BettiMaxwell reciprocal theorem states that if two sets of loads $\{R\}_{1}$ and $\{R\}_{2}$ act on a structure, work done by the first set in acting through displacements caused by the second set is equal to work done by the second set in acting through displacements caused by the first set. Symbolically, $\{D\}_{1}^{T}\{R\}_{2} = \{D\}_{2}^{T}\{R\}_{1}$ . Substitute $\{D\}_{1} = [K]^{-1}\{R\}_{1}$ and $\{D\}_{2} = [K]^{-1}\{R\}_{2}$ and show that [K] is symmetric.
2.8 Consider the truss of Fig. 2.2-1. Write rigid-body motion vectors for the following cases and show that each produces zero forces $\{R\}$ . Are the three cases linearly independent?