Duke University Department of Civil and Environmental Engineering CEE 421L. Matrix Structural Analysis Henri P. Gavin Fall, 2012 Review of Strain Energy Methods and Introduction to Stiffness Matrix Methods of Structural Analysis

1 Strain Energy

Strain energy is stored within an elastic solid when the solid is deformed under load. In the absence of energy losses, such as from friction, damping or yielding, the strain energy is equal to the work done on the solid by external loads. Strain energy is a type of potential energy. Consider the work done on an elastic solid by a single point F . When the elastic solid carries the load, F , it deforms with strains ( and γ) and the material is stressed (σ and τ). D is a in the same location and in the same direction as a point force, F . D and F are colocated. The work done by the force F on the elastic solid is the area under the force vs. displacement curve.

Z W = F dD (1) This work is stored as strain energy U within the elastic solid. 1 Z U = (σxxxx + σyyyy + σzzzz + τxyγxy + τxzγxz + τyzγyz) dV. (2) 2 V This is a very general expression for the strain energy, U, and is not very practical for structural elements like bars, beams, , or frames. 2 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

1.1 Bars

For a bar in or compression, we have internal axial force, N, only,

       N N   x x   x      σ xx dl εxx dl

so σyy = 0, σzz = 0, τxy = 0, τxz = 0, and τyz = 0, and 1 Z U = σxxxx dV , 2 V

where σxx = N/A and xx = N/EA. Substituting dV = A dx we get

1 Z N(x)2 U = dx , (3) 2 L E(x) A(x) and if N, E, and A are constant 1 N 2 L U = . 2 EA Alternatively, we may express the strain as a function of the displacements along the bar ux(x), xx = ∂ux(x)/∂x, and σxx = E ∂ux(x)/∂x. Again substituting dV = A dx ,

1 Z ∂u (x)!2 U = E(x) A(x) x dx , (4) 2 L ∂x and if E, A and ∂ux/∂x = (u2 − u1)/L are constants, 1 EA U = (u − u )2 2 L 2 1

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 3

1.2 Beams

For a in bending we have internal bending moments, M, and internal shear , V . For slender beams the effects of shear are usually neglected.

y v" dl            M M   zz zz x    σ xx dl

As in the axially loaded bar, σyy = 0, σzz = 0, τxy = 0, τxz = 0, and τyz = 0, and 1 Z U = σxxxx dV . 2 V

For bending, σxx = My/I and xx = My/EI. Substituting dV = dA dx,

1 Z Z M(x)2 y2 U = dA dx , 2 L A E(x) I(x)2

R 2 where A y dA = I, so 1 Z M(x)2 U = dx . (5) 2 L E(x) I(x) Alternatively, we may express the moment in terms of the curvature of the beam, φ ≈ 2 2 ∂ uy/∂x , ∂2u (x) M(x) = E(x) I(x) y , ∂x2 2 2 2 2 from which σxx = E (∂ uy/∂x ) y and xx = (∂ uy/∂x ) y, so that

1 Z Z ∂2u (x)!2 U = E(x) y y2 dA dx 2 L A ∂x2

R 2 where, again, A y dA = I, so

1 Z ∂2u (x)!2 U = E(x) I(x) y dx . (6) 2 L ∂x2

CC BY-NC-ND H.P. Gavin 4 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

1.3 Summary

External work is done by a set of forces, Fi, on a linear elastic solid, producing a set of displacements, Di, in the same locations and directions. F F i j F1 D j Dn Fn Di D1

Fn D n D D  i j             F F  i j  F  1  Fi Fj Fn D1 D1 Di Dj Dn   F1 

         

The work done by these forces is 1 1 1 W = F D + F D + F D + ··· 2 1 1 2 2 2 2 3 3 The external forces are resisted by internal moments, M, and axial forces, N. The total strain energy stored within the solid is 1 Z M 2 1 N 2 L U = dx + X j j (7) 2 L EI 2 j Ej Aj where the first term is the integral over all lengths of all the beams and the second term is the sum over all the bars. If and shear are included, then two additional terms are 1 Z T 2 1 Z V 2 dx and dx . 2 L GJ 2 L G A/α

2 2 Alternatively, we can think of external forces producing curvatures (∂ uy/∂x ) by bend- ing, and axial stretches (∂ux/∂x). In this case Z 2 !2 1 ∂ uy 1 X Ej Aj 2 U = EI 2 dx + (u2j − u1j) (8) 2 L ∂x 2 j Lj If torsion and shear are included, then two additional terms are 1 Z ∂u !2 1 Z ∂u !2 GJ xθ dx , and G A/α y dx , 2 L ∂x 2 L ∂x

where uxθ is the torsional rotation about the x-axis, ∂uxθ/∂x is the torsional shear strain, γxθ, (on the face perpendicular to the x-axis and in the θ-direction) and ∂uy/∂x is the shear strain, γxy, (on the face perpendicular to the x-axis and in the y-direction). Analyses using expressions of the form of equations (3), (5), or (7) are called force method or flexibility method analyses. Analyses using expressions of the form of equations (4), (6), or (8) are called displace- ment method or stiffness method analyses.

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 5 2 Castigliano’s Theorems

2.1 Castigliano’s Theorem - Part I

Z U = F dD ... strain energy

 F  j      ∆ D  j   ∆ U(D) U   0 D D+∆ D j j j

∆U ∂U Fi = = ∆Di ∂Di

A force, Fi, on an elastic solid is equal to the derivative of the strain energy with respect to the displacement, Di, in the direction and location of the force, Fi.

2.2 Castigliano’s Theorem - Part II

Z U ∗ = D dF ... complementary strain energy

∆ F ∆ j F+j Fj   ∆ U* Fj U*(F)

0 Dj

∆U ∗ ∂U ∗ Di = = ∆Fi ∂Fi

A displacement, Di, on an elastic solid is equal to the derivative of the complementary strain energy with respect to the force, Fi, in the direction and location of the displacement, Di. If the solid is linear elastic, then U ∗ = U.

CC BY-NC-ND H.P. Gavin 6 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin 3 Superposition

Superposition is an extremely powerful idea that helps us solve problems that are stati- cally indeterminate. To use the principle of superposition, the system must behave in a linear elastic fashion. The principle of superposition states: Any response of a system to multiple inputs can be represented as the sum of the re- sponses to the inputs taken individually. By “response” we can mean a strain, a stress, a deflection, an internal force, a rotation, an internal moment, etc. By “input” we can mean an externally applied load, a temperature change, a support settlement, etc.

4 Detailed Example of Castigliano’s Theorem and Superposition

An example of a statically indeterminate system with external loads w(x) and three

redundant reaction forces, RB, RC , and RD, is shown below.  D

EA y  w(x) H       x  EI      ABC L

In general, the displacements at the locations of the unknown reaction forces are known, and, in this example these displacements will be taken as zero: DB = 0, DC = 0, DD = 0. Invoking the principle of superposition, we may apply the external loads, (w(x)) and the unknown reactions (RB, RC , and RD) individually, and then sum-up the responses to each individual load. Further, we may represent the response to a reaction force, (e.g., RB) as the response to a unit force co-located with the reaction force, times the value of the reaction force. Note that all four systems to the right of the equal sign in the following figure are statically determinate. Expressions for Mo(x), m1(x), m2(x), m3(x), No(x), n1(x), n2(x), and n3(x) may be found from static equilibrium alone.

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 7 R D D D N(x) No (x)   w(x) w(x)               =   A B C A B C  R R M(x) B C M o (x) n (x) 1

   +  * R   B  m (x) B 1 1

n (x) 2    +  * R    C C m (x) 1 2 1 D n (x) 3      +  * R  D  m (x) 3

In equation form, the principle of superposition says:

M(x) = Mo(x) + m1(x)RB + m2(x)RC + m3(x)RD (9)

N = No + n1RB + n2RC + n3RD (10)

(Note that in this particular example, No(x) = 0, n1 = 0, n2 = 0, n3 = 1, m1(x) = 0 for x > xB, and m2(x) = 0 for x > xC .)

CC BY-NC-ND H.P. Gavin 8 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

The total strain energy, U, in systems with bending strain energy and axial strain energy is, 1 Z L M(x)2 1 N 2 H U = dx + X (11) 2 0 EI 2 EA We are told that the displacements at points B, C, and D are all zero and we need to assume the structure behaves linear elastically in order to invoke superposition in the first place. Therefore, from Castigliano’s Second Theorem,

∂U ∗ ∂U Di = = , ∂Fi ∂Fi

we obtain three expressions for the facts that DB = 0, DC = 0, and DD = 0. ∂U DB = 0 = ∂RB ∂U DC = 0 = ∂RC ∂U DD = 0 = ∂RD Inserting equation (11) into the three expressions for zero displacement at the fixed reactions, noting that EI and EA are constants in this problem, and noting that the strain energy, U, depends on the reactions R, only through the internal forces, M and N, we obtain

1 Z L ∂M(x) H ∂N DB = 0 = M(x) dx + N EI 0 ∂RB EA ∂RB

1 Z L ∂M(x) H ∂N DC = 0 = M(x) dx + N EI 0 ∂RC EA ∂RC 1 Z L ∂M(x) H ∂N DD = 0 = M(x) dx + N EI 0 ∂RD EA ∂RD

Now, from the superposition equations (9) and (10), ∂M(x)/∂RB = m1(x), ∂M(x)/∂RC = m2(x), ∂M(x)/∂RD = m3(x), ∂N(x)/∂RB = n1, ∂N(x)/∂RC = n2, and ∂N(x)/∂RD = n3. Inserting these expressions and the superposition equations (9) and (10) into the above equations for DB, DC , and DD, 1 Z L H DB = 0 = [Mo + m1RB + m2RC + m3RD] m1 dx + [No + n1RB + n2RC + n3RD] n1 EI 0 EA 1 Z L H DC = 0 = [Mo + m1RB + m2RC + m3RD] m2 dx + [No + n1RB + n2RC + n3RD] n2 EI 0 EA 1 Z L H DD = 0 = [Mo + m1RB + m2RC + m3RD] m3 dx + [No + n1RB + n2RC + n3RD] n3 EI 0 EA

These three expressions contain the three unknown reactions RB, RC , and RD. Everything else in these equations (m1(x), m2(x) ... n3) can be found without knowing the unknown

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 9

reactions. By taking the unknown reactions out of the integrals (they are constants), we can write these three equations in matrix form.

 R L m1m1 n1n1H R L m1m2 n1n2H R L m1m3 n1n3H     R L Mom1 Non1H  0 EI dx + EA 0 EI dx + EA 0 EI dx + EA RB 0 EI dx + EA  R L m2m1 n2n1H R L m2m2 n2n2H R L m2m3 n2n3H     R L Mom2 Non2H   0 EI dx + EA 0 EI dx + EA 0 EI dx + EA   RC  = −  0 EI dx + EA  R L m3m1 n3n1H R L m3m2 n3n2H R L m3m3 n3n3H R R L Mom3 Non3H 0 EI dx + EA 0 EI dx + EA 0 EI dx + EA D 0 EI dx + EA (12) This 3-by-3 matrix is called a flexibility matrix, F. The values of the terms in the flexibility matrix depend only on the responses of the structure to unit loads placed at various points in the structure. The flexibility matrix is therefore a property of the structure alone, and does not depend upon the loads on the structure1. The vector on the right-hand-side depends on the loads on the structure. Recall that this matrix looks a lot like the matrix from the three-moment equation. All flexibility matrices share several properties:

• All flexibility matrices are symmetric.

• No diagonal terms are negative.

• Flexibility matrices for structures which can not move or rotate without deforming are positive definite. This means that all of the eigenvalues of a flexibility matrix describing a fixed structure are positive.

• The unknowns in a flexibility matrix equation are forces (or moments).

• The number of equations (rows of the flexibility matrix) equals the number of unknown forces (or moments).

1There are some fascinating cases in which the behavior does depend upon the loads, but that is a story for another day!

CC BY-NC-ND H.P. Gavin 10 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

It is instructive to now examine the meaning of the terms in the matrix, F

D

L Z m1m1 n1n1H F11 = dx + = δ11 0 EI EA

 F  11 displacement at “1” due to unit force at “1”      1 ABC

D

L Z m2m1 n2n1H F21 = dx + = δ21 0 EI EA

 F  21 displacement at “2” due to unit force at “1”      1 ABC

L D Z m1m2 n1n2H F12 = dx + = δ12 0 EI EA

F displacement at “1” due to unit force at “2” 12        1 ABC

F 31 D

L Z m3m1 n3n1H F31 = dx + = δ31 0 EI EA

  displacement at “3” due to unit force at “1”      1 ABC

The fact that F12 = F21 is called Maxwell’s Reciprocity Theorem.

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 11 5 Introductory Example of the Stiffness Matrix Method

In this simple example, elements are springs with stiffness k. A with stiffness k > 0 connecting point i to point j, will have a force f = k(dj−di) where di is the displacement of point i and dj is the displacement of point j. (Tension is positive so di points “into” the spring and dj points “away” from the spring.)

The stiffness matrix for this structure can be found using equilibrium and force-deflection relationships (f = kd) for the springs.

P #1: Fx = 0 : f1 − k1d1 + k2(d2 − d1) = 0 P #2: Fx = 0 : f2 − k2(d2 − d1) − k4d2 + k3(d3 − d2) = 0 P #3: Fx = 0 : f3 − k3(d3 − d2) − k5d3 = 0 In matrix form these three equations may be written:       k1 + k2 −k2 0 d1 f1        −k2 k2 + k3 + k4 −k3   d2  =  f2  0 −k3 k3 + k5 d3 f3 The displacements are found by solving the stiffness matrix equation for d, d = K−1 f.

• The matrix K is called a stiffness matrix. • All stiffness matrices are symmetric.

CC BY-NC-ND H.P. Gavin 12 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

• All diagonal terms of all stiffness matrices are positive.

• Stiffness matrices are diagonally dominant. This means that the diagonal terms are usually larger than the off-diagonal term.

• If the structure is not free to translate or rotate without deforming, then the stiffness matrix is positive definite. This mathematical property guarantees that the stiffness matrix is invertible, and a unique set of displacements, d, can be found by solving K d = f.

• The total potential energy, U, in this system of springs is 1 1 1 1 1 U = k d2 + k (d − d )2 + k (d − d )2 + k d2 + k d2 . 2 1 1 2 2 2 1 2 3 3 2 2 4 2 2 5 3 You should be able to confirm that this is equal to 1 U = dT K d 2 Also, note that no matter what the values of the displacements, d, may be, the energy 1 T U is always positive. The statement 2 d Kd > 0 ∀d 6= 0 is another way of saying that K is positive-definite.

• The set of forces required to deflect coordinate “i” by a deflection of “1 unit” equals the “i-th” column of the stiffness matrix. For example consider the case in which d1 = 1, d2 = 0, and d3 = 0,       k1 + k2 −k2 0 1 k1 + k2        −k2 k2 + k3 + k4 −k3   0  =  −k2  , 0 −k3 k3 + k5 0 0

which is equal to the first column of the stiffness matrix.

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 13

This fact may be used to derive the stiffness matrix:

d1 = 1, d2 = 0, d3 = 0

f1 = k1 + k2 , f2 = −k2 , f3 = 0 ... 1st column

d1 = 0, d2 = 1, d3 = 0

f1 = −k2 , f2 = k2 + k3 + k4 , f3 = −k3 ... 2nd column

d1 = 0, d2 = 0, d3 = 1

f1 = 0 , f2 = −k3 , f3 = k3 + k5 ... 3rd column

CC BY-NC-ND H.P. Gavin 14 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin 6 Basic Concepts of the Stiffness Matrix Method

The previous example illustrates some of the basic concepts needed to apply the stiffness matrix method to structures made out of bars and beams. There are, however, a few addi- tional complications. Displacements in structures can be vertical, horizontal, or rotational, and structural bars and beams have a more complicated force-displacement relationships than those of simple springs. In applying the matrix stiffness method of structural analysis, structures are described in terms of elements that connect nodes which can move in certain coordinate directions.

6.1 Elements

In the stiffness matrix method, structures are modeled as assemblies of elements such as bars, beams, cables, shafts, plates, and walls. Elements connect the nodes of the structural model. Like the simple springs in the previous example, structural elements have clearly defined, albeit more complicated, force-displacement relationships. The stiffness properties of structural elements can be determined from equilibrium equations, Castigliano’s Theorems, the principle of minimum potential energy, and/or the principle of virtual work. Structural elements can be mathematically assembled with one another (like making a structural system using a set of tinker-toys), into a system of equations for the entire structure.

6.2 Nodes

The force-displacement relationship of a structural element is defined in terms of the forces and displacements at the nodes of the element. Nodes define the points where elements meet. The nodes in the model of a are at the joints between the truss bars. The nodes in the model of a beam or a frame are at the reaction locations, at locations at which elements connect to each other, and possibly at other intermediate locations.

6.3 Coordinates

Coordinates describe the location and direction at which forces and displacements act on an element or on a structure. Trusses are loaded with vertical and horizontal forces at the joints. The joints of a 2D truss can move vertically and horizontally; so there are two coordinates per node in a 2D truss. Beams and frames carry vertical and horizontal loads as well as bending moments. The nodes of a 2D frame can move vertically, horizontally, and can rotate; so there are three coordinates per node in a 2D frame. Structural coordinates can be classified into two sets. Displacement coordinates have unknown displacements but know forces. Reaction coordinates have unknown forces but known displacements (usually zero).

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 15

6.4 Elements, Nodes and Coordinates

Planar (2D) truss bar elements have two nodes and four coordinates, two at each end.

Space (3D) truss bar elements have two nodes and six coordinates, three at each end.

Planar (2D) frame elements have two nodes and six coordinates, three at each end.

Space (3D) frame elements have two nodes and twelve coordinates, six at each end.

CC BY-NC-ND H.P. Gavin 16 CEE 421L. Matrix Structural Analysis – Duke University – Fall 2012 – H.P. Gavin

6.5 Structural Nodes and Coordinates

Planar (2D) truss nodes and coordinates

Planar (2D) frame nodes and coordinates

CC BY-NC-ND H.P. Gavin Strain Energy and Matrix Methods of Structural Analysis 17 7 Relate the Flexibility Matrix to the Stiffness Matrix • Column “j” of the stiffness matrix: The set of forces at all coordinates required to produce a unit displacement at coordinate “j”

• Column “j” of the flexibility matrix: The set of displacements at all coordinates result- ing from a unit force at coordinate “j”

• Stiffness matrix equation:       K11 K12 K13 ··· K1n d1 f1        K21 K22 K23 ··· K2n   d2   f2         K K K ··· K   d   f   31 32 33 3n   3  =  3   . . . . .   .   .   ......   .   .        Kn1 Kn2 Kn3 ··· Knn dn fn

• Flexibility matrix equation:       F11 F12 F13 ··· F1n f1 d1        F21 F22 F23 ··· F2n   f2   d2         F F F ··· F   f   d   31 32 33 3n   3  =  3   . . . . .   .   .   ......   .   .        Fn1 Fn2 Fn3 ··· Fnn fn dn

• K = F−1 and K−1 = F

• A useful fact for 2-by-2 matrices ...

−1 " a b # 1 " d −b # = c d ad − bc −c a

... you should be able to prove this fact to yourself.

CC BY-NC-ND H.P. Gavin