# 5.6 The Virtual Work Method

*Virtual work* is perhaps the most useful and widely applicable of the methods described in this chapter. Unlike the moment area method and the conjugate beam method, it can be used to find the deflections of trusses, beams or frames (or, in fact any mechanical system).

## Work

The *work* in virtual work clearly implies energy, since work is a form of energy. Work is energy that is required to move mass around in space. You may recall that the expression for work ($W$) is equal to:

\begin{equation}

\boxed{W = P\Delta} \label{eq:work}

\end{equation}

where $P$ is a force on a body or structure and $\Delta$ is the displacement of that body or structure. This results in units of force times distance like $\SI{}{kNm}$. Work can also be expressed in terms of energy units where $\SI{1000}{J} = \SI{1}{kNm}$. Likewise, in a rotational sense, work can also be defined as a moment multiplied by a rotation:

\begin{equation}

\boxed{W = M \theta}

\end{equation}

where $M$ is a moment acting on a body or structure and $\theta$ is the rotation of that body or structure. This type of work has the same units since it equals a moment (in $\SI{}{kNm}$ for example) times a rotation (in $\SI{}{rad}$ example). Radians are not really a unit of measurement in the conventional sense (nor are degrees). So, since rotation is effectively unit-less, units for work resulting from a moment are also in terms of a force times distance.

A classical example of work being done is shown in Figure 5.14. In this figure, a constant force $P$ is applied to a body (the square box), causing it to slide to the right. The force is just enough to overcome the surface friction between the body and the ground. As the body is pushed, it displaces to the right by some amount $\Delta$. The work done by the force on the body is equal to the product of $P$ and $\Delta$ as previously shown in equation \eqref{eq:work}. This is also equal to the area underneath the force-displacement plot as shown on the right side of the figure.

A much more common type of work that is encountered in structural engineering is work done through the deformation of structural parts. An example of this for a simple bar is shown in Figure 5.15. If a load is gradually applied to the bar in tension, as shown in the figure, then the displacement of the right side of the bar also increases gradually. If the material is elastic, then the displacement is linearly related to the force as per Hooke's Law:

\begin{equation}

F = kx

\end{equation}

Where $F$ is the force, $k$ is the axial stiffness, and $x$ is the deformation of the bar. Recall that this is a compatibility relationship (see Section 1.4). In our terms, where the force is $P$ and the deformation of the bar is equal to the displacement of the right side of the bar $\Delta$:

\begin{equation}

P = k \Delta

\end{equation}

The plot of this relationship is shown on the right side of the figure. As it was for the body being pushed, the work done in displacing the right end of the bar is equal to the area under the force-displacement plot as shown:

\begin{equation}

W = \frac{P\Delta}{2}

\end{equation}

Notice that this is similar to the general work equation from equation \eqref{eq:work}, but divided by two. This new equation is valid when the displacement is caused by the added force $P$.

The work caused by the external force ($P\Delta$) in Figure 5.15 is called the *external work* (here written as $W_e$). In any closed system, energy can never be created or destroyed (recall the *Law of Conservation of Energy* from physics). Since work is a type of energy, that work energy has to go somewhere. In a structural system that is deformed slowly, the external work energy is typically stored as strain energy in the structural members. This strain energy ($U$) can also be called the *internal work* (here written as $W_i$). The total strain energy in a simple bar that is deformed by a force gradually from zero to the maximum force is equal to:

\begin{equation}

U = \frac{p\delta}{2}

\end{equation}

where $p$ is the force in the bar and $\delta$ is the deformation of the bar. Recalling for the deformation of a linear axial element:

\begin{align}

\delta &= \frac{pL}{EA} \\

U &= \frac{p^2L}{2EA}

\end{align}

where $L$ is the length of the bar, $E$ is the Young's Modulus of the bar material, and $A$ is the cross-sectional area of the bar. If there is only one bar in the system, then the total internal work is:

\begin{align*}

W_i = U = \frac{p^2L}{2EA}

\end{align*}

Since energy must be conserved in the system, all of the work that is applied to from the outside, must be balanced by the work done on the inside (through strain energy), so:

\begin{equation}

\boxed{W_e = W_i} \label{eq:consv-energy}

\end{equation}

or the external work must equal the internal work. This is true as long as all of the energy is work. It will not apply if some of the energy is kinetic energy (i.e. the structure is moving dynamically at some speed) or if some of the energy is dissipated as heat. So, for the system shown in Figure 5.15, the external work is equal to the internal work in the form of strain energy of the bar.

A force does not have to be directly causing a displacement in order to do work. This point is worth repeating:

A force on a structure can do work, even if it is just 'along for the ride.' An example of such a case is shown in Figure 5.16. In this figure, first a force $P$ is gradually added to the bar. The external work done by this force up to a deformation of $\Delta_P$ is equal to:

\begin{equation*}

W_{P0,e}=\frac{P \Delta_P}{2}

\end{equation*}

where $\Delta_P$ is the deformation of the bar caused by force $P$. This is the same as the work described in previous Figure 5.15.

But, what if we now add another force to the bar (force $Q$ in Figure 5.16) while keeping the original force $P$ constant? The external work done by the addition of force $Q$, which gradually increases from zero up to its maximum value, is similar to the original work that was done by force P when it was applied:

\begin{equation*}

W_{Q,e}=\frac{Q \Delta_Q}{2}

\end{equation*}

However, since force $Q$ deforms the bar by an additional amount $\Delta_Q$, the original force $P$ continues to do work as the bar is deformed, *even though it is not causing the deformation*. Also, the amount of work done by $P$ in this situation is not the same as it would have been if $P$ caused the deformation. Since the force $P$ is constant the entire time that force $Q$ is deforming the bar, the additional external work caused by force $P$ is equal to:

\begin{align*}

W_{P,e} = P \Delta_Q

\end{align*}

or the force $P$ multiplied by the deformation caused by $Q$. Notice that for this type of work (where the force doesn't cause the work), there is no more factor of $\frac{1}{2}$ in the work equation. This distinction will be important in the development of the principle of virtual work.

## The Principle of Superposition

One more concept that we need to understand before we can really talk about the method of virtual work is the *principle of superposition*. In brief, the principle of superposition is that, for a linear structure, the effects of different loadings and actions may be determined separately and then superimposed (added together) to get the full behaviour of the structure.

This concept is demonstrated in Figure 5.17. A simple beam structure is shown in part (a) of the figure. This beam has two loads and the full solution for the beam, including the displaced shape is shown on the right side of the figure part (a).

Part (b) of Figure 5.17 looks at the same beam structure, but this time the two point loads are applied separately and a full analysis is done for each, including determination of the displaced shape. As you can see from the figure, the total solution for the structure in part (a) may be found by adding together the two separate solutions in part (b). If the shears from the two parts are added at each location along the beam, then the full shear response would result. The same is true for the moment. Perhaps most importantly, the same is also true for the displaced shape. If the displaced shape of the structure subjected to all the loads is represented by the function $\Delta_{total}(x)$ and the displaced shape for each individual load is represented by $\Delta_1(x)$ and $\Delta_2(x)$, then:

\begin{equation}

\Delta_{total}(x) = \Delta_1(x) + \Delta_2(x)

\end{equation}

and in general for any number of loads or load effects:

\begin{equation}

\Delta_{total}(x) = \sum_{i=1}^n \Delta_i(x)

\end{equation}

The principle of superposition is useful because it means that we can analyse a structure subject to individual loads and then sum all of the resulting shears, moments and deflections to find the total response (instead of having to analyse the structure for all of the loads at once). It also comes in handy for the application of virtual work as will be discussed below.

## Development of the Principle of Virtual Work

There are two different *principles of virtual work*, one for rigid bodies, and one for deformable bodies. The *principle of virtual work for rigid bodies* is akin to equilibrium, but is beyond the scope of this text.

The *principle of virtual work* (for deformable bodies) says that the *external virtual work* must equal the *internal virtual work*:

\begin{equation}

\boxed{W_{v,e} = W_{v,i}} \label{eq:virtual-work}

\end{equation}

From the previous section we are familiar with the idea that the external work should equal the internal work (because of conservation of energy), but what is a 'virtual' work?

The principle of virtual work will be developed using the example structure shown in Figure 5.18. Similar to the situation described in previous Figure 5.16, in this structure, there is a single bar with a pin at one end and a roller at the other. This time, the bar is on an angle with respect to the horizontal, but the pin and roller at either end cause it to act like a truss member. Like the previous example, this structure has two loads. One $P_v$ which is added first, and another one $P_r$ that is added after the full application of $P_v$.

The first stage in the analysis is to add force $P_v$ as shown in Figure 5.18 part (b). This will be the force that we will consider to be our 'virtual' force. Once this virtual force $P_v$ is added, it has done external work $W_{0,e}$ on the bar by displacing the roller support at the right end horizontally by an amount $\Delta_v$. The plots of the external force versus displacement and the internal bar force versus deformation are shown on the right side of the figure. Since the bar is on an angle, the force ($p_v$) and deformation ($\delta_v$) in the bar are not the same as the applied external force ($P_v$) and displacement ($\Delta_v$). The bar force will be higher than the external force (because of the angle), and the deformation of the bar will be less than the displacement (also because of the angle, try out the trigonometry for yourself); however, the external work must still be equal to the internal work due to the conservation of energy:

\begin{align*}

W_{0,e} &= W_{0,i} \\

\frac{P_v \Delta_v}{2} &= \frac{p_v \delta_v}{2}

\end{align*}

So, the lightly shaded area under the left plot must equal the area under the right plot.

Now, if the 'virtual' force $P_v$ is held constant, what happens if we apply a new force $P_r$? The addition of this new force is shown in Figure 5.18 part (c). We will consider this new force to be our 'real' force. As this new force $P_r$ is applied, it displaces the roller support to the right by an additional $\Delta_r$. In so doing, the force $P_r$ does an amount of external work of $W_{r,e}$ and a corresponding internal work of $W_{r,i}$ as shown by the lightly shaded triangles in the plots on the right side of the figure part (c). Again, the internal and external work done by $P_r$ must be equal to each other due to conservation of energy:

\begin{align*}

W_{r,e} &= W_{r,i} \\

\frac{P_r \Delta_r}{2} &= \frac{p_r \delta_r}{2}

\end{align*}

While the force $P_r$ is doing work, displacing the end and deforming the bar, force $P_v$ is still present, and therefore also still does work. This work is shown as the dark shaded regions in the plots on the right side of Figure 5.18 part (c). Since the 'virtual' force $P_v$ is constant while the 'real' force $P_r$ is being applied, the external and internal work cause by that force are equal to:

\begin{equation}

W_{v,e} = P_v \Delta_r

\end{equation}

and

\begin{equation}

W_{v,i} = p_v \delta_r

\end{equation}

without the factor of $\frac{1}{2}$. These are the expressions for the *external virtual work* and *internal virtual work*, respectively for this bar. The external virtual work is equal to the virtual external force ($P_v$) multiplied by the real external displacement ($\Delta_r$) and the internal virtual work is equal to the virtual internal force ($p_v$) multiplied by the real internal deformation ($\delta_r$).

It goes without saying that the total external work for the entire system shown in Figure 5.18 part (c) must be equal to the total internal work for the system. That total work consists of three components, the work done by 'virtual' force $P_v$ when it is applied (the light-shaded triangle on the left of the plot), the work done by 'real' force $P_r$ when it is applied (the light-shaded triangle on the top of the plot), and the 'virtual work' done by 'virtual' force $P_v$ as the real force $P_r$ is applied. We have already established that the internal and external work are equal for the first two (the application of forces $P_v$ and $P_r$), therefore since the total must be equal, then the internal virtual work must equal the external virtual work:

\begin{align*}

W_e &= W_i \\

W_{0,e} + W_{v,e} + W_{r,e} &= W_{0,i} + W_{v,i} + W_{r,i} \\

\text{but} \; W_{0,e} &= W_{0,i} \\

\text{and} \; W_{r,e} &= W_{r,i}

\end{align*}

Therefore,

\begin{equation*}

W_{v,e} = W_{v,i}

\end{equation*}

which is the principle of virtual work introduced previously in equation \eqref{eq:virtual-work}.

## Application of Virtual Work

So, now that we have developed this concept of virtual work, how does that help us to find displacements of structures? Why is the virtual force called 'virtual'? What does any of this mean, anyway?

Let's start with the 'virtual' part first. The force is 'virtual' because we will introduce that force as kind of a place-holder, so that we can keep track of what is going on at that position on the structure. It doesn't matter what the size of the force is for the principle of virtual work to apply. The key part is though, that because of the principle of superposition), we can add that virtual force and observe the effects on the total combined system (real and virtual) without affecting the behaviour of the real system itself. In a virtual work problem, we have three different systems:

- The real system - the structure with all of the real loadings
- The virtual system - the same structure but with a single virtual load or point moment
- The combined system - this the the superposition of the real and virtual systems where the virtual load is applied first, and then the real loadings are applied after (as was shown in Figure 5.18).

If we assume that the virtual load is applied first in the combined system, then based on the development of the principle of virtual work in the previous section, we know from equation \eqref{eq:virtual-work} that:

\begin{align*}

W_{v,e} = W_{v,i}

\end{align*}

where the internal virtual work $W_{v,i}$ is the sum of all the virtual internal forces multiplied by the real internal deformations that are associated with each internal force, and the external virtual work $W_{v,e}$ is the virtual external load multiplied by the real external displacement at the *same location and direction where that load is applied*.

The definition of the external virtual work is what makes the principle of virtual work useful for finding structural deflections. Since the behaviour of the virtual system does not affect the behaviour of the real system, then we can choose any arbitrary set of virtual external loadings that we want (position, magnitude and direction). These external virtual forces will be multiplied by real external deflections that are in the same location and direction as the external force. The deflections are what we would like to find. So, if we choose a single external virtual force and locate it in the position and direction where we want to find the displacement, then we can solve for that displacement directly using virtual work.

Of course to solve for that displacement, we also need to know the value of the internal virtual work. So that means that we have to find all of the virtual internal forces and the real internal deformations. If we can find these, and we select an appropriate virtual external load then we can use virtual work to solve for the real external displacement at a specific point.

To summarize:

\begin{align*}

W_{v,e} &= W_{v,i} \\

\text{External Virtual Work} &= \text{Internal Virtual Work}

\end{align*}

\begin{equation}

\boxed{ \sum \left( \begin{array}{l}

\text{Virtual Ext. Forces} \; \times \\

\text{Real Ext. Deflections}

\end{array} \right) = \sum \left( \begin{array}{l}

\text{Virtual Int. Forces} \; \times \\

\text{Real Int. Deformations}

\end{array} \right) }

\end{equation}

Finally, an example of what each of these components are for a beam is shown in Figure 5.19. The goal of this analysis is to find the vertical deflection of the cantilever at point B on the real system shown on the left side of the figure. This unknown deflection is the real external deflection for our virtual work balance. To find this real external deflection, we need to construct an appropriate virtual system with a single load in the same location and in the same direction as the real deflection that we are trying to find. The appropriate virtual system is shown on the right side of the figure. The virtual work done by this load will be equal to the magnitude of the load multiplied by the real external deflection (with no factor of $\frac{1}{2}$ because remember that we are assuming that the virtual load is applied first and does that work while the real loads are applied).

Now we have the external virtual work, we also need the internal virtual work. A frame element, unlike the truss bar element that we discussed previously, has multiple different ways to store strain energy. In addition to axial strain (like the bar), a frame element can also store strain energy as bending strain and shear strain. For beam bending problems like this, the axial and shear stresses and strains are typically insignificant in comparison to the bending stresses and strains. So, for a problem like this, we can get a very good estimate of the deflection by only considering the internal virtual work done by bending stresses. For that calculation, we need the virtual internal forces (in this case, the moment at every point on the virtual beam) and the real internal deformations (in this case, the slope at every point on the real beam, which can be found by integrating the curvature). To find the sum for the internal virtual work in this case, we have to integrate over the length of the beam:

\begin{align*}

W_{v,i} &= \sum \left( \text{Virtual Int. Forces} \; \times

\text{Real Int. Deformations} \right) \\

W_{v,i} &= \int \phi_r(x) M_v(x) \, dx

\end{align*}

where $\phi_r(x)$ is the curvature in the real beam, which is known based on the real loading, and $M_v(x)$ is the moment in the virtual beam, which is also known based on the virtual loading.

Now applying the principle of virtual work:

\begin{align*}

W_{v,e} &= W_{v,i} \\

P_v \Delta_B &= \int \phi_r(x) M_v(x) \, dx \\

\Delta_B &= \frac{\int \phi_r(x) M_v(x) \, dx}{P_v}

\end{align*}

As mentioned previously, since the virtual system is arbitrary, we can select any magnitude for the virtual force that we want. So, it's convenient to select a unit value of 1, so that the unknown real external deflection is simply equal to the internal virtual work:

\begin{align*}

\Delta_B = \frac{\int \phi_r(x) M_v(x) \, dx}{1}

\end{align*}

The full methods for calculating internal virtual work for truss systems and beam/frame systems will be discussed below.

## Using Virtual Work to Calculate Truss Deflections

The use of virtual work for truss deflection analysis follows directly from the development of virtual work. The only difference is that for a full truss system, the internal virtual work must simultaneously include the forces and deformations in all of the truss elements.

The real system will consist of the truss with the applied real external loads. From that system, we will define the unknown external deflection of a specific joint in a specific direction (this is the deflection that we want to find). We must also get from that system the known internal deformations, which follow directly from an analysis of the truss to find the internal axial forces in each truss member.

The virtual system will consist of a known single external unit load (the virtual external force) which will be placed on the joint that we want to find the deflection for. This force must also be in the same direction as the deflection that we want to find. This virtual external force will create known virtual internal forces which may be found using an analysis of the truss (with the virtual external force only).

Together, these will result in the following virtual work balance for trusses:

\begin{equation}

W_{v,e} = W_{v,i}

\end{equation}

\begin{equation}

\boxed{1(\Delta_r) = \sum_{j=1}^n \left( p_{vj} \delta_{rj} \right)}

\end{equation}

where $1$ is the virtual external unit load, $\Delta_r$ is the external real deflection, $p_{vj}$ is the virtual internal axial force in each truss member in the virtual system, and $\delta_{rj}$ is the real internal deformation of each truss element in the real system.

The real internal deformation for each member can be due to the applied loading, temperature changes, fabrication errors, or any other source of deformation. These are all treated the same way, as long as you are consistent about whether elongation or contraction are considered positive. In this book, elongation deformations will be considered positive, which correspond to deformations arising from tension forces, increase in temperature, or members that have been fabricated to be longer than necessary.

For truss member deformations caused by force, the real internal deformation of an individual member is:

\begin{equation}

\boxed{\delta_{rj} = \frac{p_{rj}L}{EA}} \label{eq:strain_def}

\end{equation}

where $p_{rj}$ is the real internal force in that member, $L$ is the length of the bar, $E$ is the Young's Modulus of the bar material, and $A$ is the cross-sectional area of the bar.

For truss member deformations caused by changes in temperature, the real internal deformation of an individual member is:

\begin{equation}

\boxed{\delta_{rj} = \alpha (\Delta T) L } \label{eq:temp_def}

\end{equation}

where $\alpha$ is the coefficient of thermal expansion for the material, $\Delta T$ is the change in temperature (positive is increase, and negative is decrease), and $L$ is the length of the member. Typical coefficients of thermal expansion $\alpha$ for steel and concrete are both somewhere around $\SI{12.0E-6}{/\degreeCelsius}$.

For truss member deformations caused by fabrication errors (i.e. a truss element was manufactured to be too long or too short), the real internal deformation of an individual member is:

\begin{equation}

\boxed{\delta_{rj} = \text{change in member length} }

\end{equation}

So, if the member was fabricated to be $\SI{10}{mm}$ too short, then $\delta_{rj} = \SI{-10}{mm}$.

Since superposition still applies, even within the analysis of a single truss element within a truss, if there are two different effects that elongate or contract the member, then the total deformation $\delta_{rj}$ is the sum of the deformations from each effect. For example, if a truss member experiences both a tension force that would cause a $\SI{10}{mm}$ elongation and a decrease in temperature that would cause a $\SI{3}{mm}$ contraction, then the total real internal deformation of that member would be $\delta_{rj}=10-3=\SI{7}{mm}$.

### Example

The use of the principle of virtual work to find deflections of trusses will be illustrated using the example truss structure shown in Figure 5.20. This is a simple determinate truss with two point loads at the top joint (joint D) and a temperature change on the member in the middle (member BD). The goal is to find the vertical deflection of point B.

The first step is to analyse the real structure to find all of the real internal truss deformations. To do this, we need the truss internal axial forces for all of the members. The result of this analysis is shown in Figure 5.21 on the left side. This analysis is easily performed using the method of joints from Section 3.5. This analysis only finds the deformations in the truss members caused by the external forces on the truss, and does not include the deformation to member BD caused by the temperature change. That deformation will be considered later.

The next step is to construct an appropriate virtual system. Since we want to find the vertical displacement of joint B, we will add a virtual external unit force to joint B that acts vertically. This virtual system is shown on the right side of Figure 5.21. Notice that the unit load at B, while vertical, is pointing down. This means that we are assuming that the deflection of the real system at B ($\Delta_{Br}$) will be downwards. If, at the end of the solution, we get a negative value for $\Delta_{Br}$, this means that the assumption that we made about the direction was wrong and point B actually deflects upwards in the real system.

Once we have determined the location and direction of the virtual external unit load, we can analyse the truss to find the virtual internal axial forces in all of the members. The resulting internal forces are shown on the right side of Figure 5.21.

As an aside, looking at the virtual system in Figure 5.21, notice that we actually have more than one external virtual load, because there are reaction forces at joints A and C. Of course, the structure cannot tell the difference between external forces caused by loads and external forces caused by reactions. Will this cause problems for the virtual work analysis? Aren't we are only supposed to have one virtual external load? No, these reaction forces will not cause any problems, because they are applied at the support locations, where there are no displacements in either the real or virtual system (by definition). If there is no displacement at the location of an external force, then that force cannot do any work (and therefore will not be included in the virtual work balance).

We now have to calculate the deformations caused by the real internal forces and calculate the total internal virtual work (not forgetting about the real deformation caused by the temperature change on member BD, which we have not yet considered). This total internal virtual work is the sum of the internal virtual work done on each member in the truss. These calculations are summarized in Table 5.2.

Table 5.2 has one row for each member. The column labelled $L$ is the row length. The column labelled $p_rj$ is the real internal force in each truss member $j$. These values come straight from the results of the analysis of the real structure in Figure 5.21 with positive values for tension force and negative for compression force. The next column labelled $\Delta T$ is the change in temperature for each member. The column labelled $\delta_{rj}$ is the real internal deformation of each truss member calculated as a sum of the deformation caused by the internal force and the deformation caused by the temperature change (a sum of equations \eqref{eq:strain_def} and \eqref{eq:temp_def}:

\begin{equation*}

\delta_{rj} = \frac{p_{rj}L}{EA} + \alpha (\Delta T) L

\end{equation*}

where

\begin{align*}

EA &= (\SI{200000}{MPa})(\SI{1000}{mm^2}) \\

&= \SI{200000E3}{N} \\

&= \SI{200000}{kN}

\end{align*}

The next column labelled $p_{vj}$ is the virtual internal force in each truss member. These values come straight from the results of the analysis of the virtual structure in Figure 5.21 with positive values for tension force and negative for compression force. The last column labelled $W_{vj,i}$ is the internal virtual work for each truss member which is equal to the product of the internal virtual force and the internal real deformation. This column is summed at the bottom of the table to find the total internal virtual work in the truss system.

Now that we have the total internal virtual work, we can use the virtual work balance to calculate the real external deflection that we are trying to find:

\begin{align*}

W_{v,e} &= W_{v,i} \\

(\SI{1.0}{kN})(\Delta_{Br}) &= \SI{5.34E-3}{kNm} \\

\Delta_{Br} &= \SI{5.34E-3}{m}

\end{align*}

\begin{equation*}

\boxed{\Delta_{Br} = \SI{5.34}{mm} \downarrow}

\end{equation*}

We know that the deflection is down because we assumed a downwards unit load when we defined the virtual system loading and the resulting $\Delta_{Br}$ from the virtual work came out positive (so our assumption was correct).

## Using Virtual Work to Calculate Beam Deflections

Virtual work for beams is different than for truss elements because beams can deform and store strain energy in multiple different ways. Like truss elements, beams can deform axially, but they can also bend and shear. As mentioned previously in Application of Virtual Work, for beam bending problems, the axial and shear stresses and strains are typically insignificant in comparison to the bending stresses and strains. So, for beams, we can get a very good estimate of the deflections by considering only the internal virtual work done by bending moments.

In addition, beams have both deflections and rotations along their length, so we need to be able to solve for both of these. To account for rotations, the unit virtual external force on a beam can be either a unit point load or a unit point moment. It still must be located at the location along the beam where we want to find the displacement/rotation and must be in the same direction as the displacement/rotation that we want to find. For example, for a vertical displacement, we must use a vertical virtual unit load, and for a clockwise rotation, we may assume a clockwise point moment. Other than this, the external virtual force and external real displacement/rotation work the same way as they did for virtual work analysis of trusses. So, the external virtual work is still equal to:

\begin{align*}

\boxed{W_{v,e} = (1)(\Delta_r \, \text{or} \, \theta_r)}

\end{align*}

where $(1)$ is the unit load or unit point moment, $\Delta_r$ is a real external displacement that we are trying to find (in the same location and direction as the unit point load), or $\theta_r$ is a real external rotation that we are trying to find (in the same location and direction as the unit point moment).

The internal virtual work calculations are completely different than they were for trusses. For truss members, we had to sum up discrete deformations and forces for each truss member. The internal real deformations were equal to the deformation of each truss element in the real system and the internal virtual forces were equal to the internal axial forces in each truss element in the virtual system. For a beam, since we are only considering work that is stored in the form of bending strains in the beam, the internal real deformations are equal to the curvatures along the length of the beam in the real system, and the internal virtual forces are equal to the moments along the length of the beam in the virtual system.

Since we now have a continuous beam instead of discrete truss elements, we must look at small pieces of the beam and integrate them along the length to find the total internal virtual work. Recall that the internal virtual work is equal to:

\begin{equation*}

W_{v,i} = \sum \left( \text{Virtual Int. Forces} \; \times

\text{Real Int. Deformations} \right)

\end{equation*}

For our continuous beam, we can look at the small increment of work that is added for each small piece of the beam:

\begin{align}

dW_{v,i} = M_v (d \theta_r) \label{eq:virt-beam-dW}

\end{align}

where $M_v$ is the virtual internal moment applied to that small piece and $d\theta_r$ is the real system change in slope from one side of the small piece to the other. Recall also from the Bernoulli-Euler Beam theory equation, that:

\begin{align}

d\theta_r = \frac{M_r}{EI} dx \label{eq:virt-beam-dtheta}

\end{align}

where $M_r$ is the real internal moment, $E$ is the Young's modulus of the material, $I$ is the moment of inertia of the beam cross section, and $x$ is the position along the length of the beam. Recall that $M_r/EI$ is equal to the curvature of the real beam $\phi_r$. Combining equations \eqref{eq:virt-beam-dW} and \eqref{eq:virt-beam-dtheta}, we get:

\begin{align}

dW_{v,i} = M_v \frac{M_r}{EI} dx

\end{align}

To find the total work over the entire length of the beam, we can integrate to get:

\begin{equation}

\boxed{W_{v,i} = \int_0^L \frac{M_vM_r}{EI} dx} \label{eq:Virtual-Work-Internal-Beams}

\end{equation}

where $L$ is the length of the beam. Note that in this equation, $M_v$, $M_r$, $E$ and $I$ may all be functions of the position along the beam $x$. This equation may also be rewritten as:

\begin{equation}

\boxed{W_{v,i} = \int_0^L M_v \phi_r dx}

\end{equation}

Now that we have expressions for internal and external virtual work for beams, we can combine them together into a single virtual work balance:

\begin{align*}

W_{v,e} = W_{v,i}

\end{align*}

\begin{equation}

\boxed{(1)(\Delta_r \, \text{or} \, \theta_r) = \int_0^L \frac{M_vM_r}{EI} dx} \label{eq:Virtual-Work-Balance-Beams}

\end{equation}

This seems like this will be a difficult solution because it requires integration of the product of the virtual moment diagram and the real curvature diagram (which it does). If we find the virtual moment and real curvature for the beam as a function of the position $x$, then we can simply plug those functions into equation \eqref{eq:Virtual-Work-Balance-Beams} and solve the integral. This is not too tricky because our functions for moment and curvature are typically polynomials; however, we can use tables of product integrals to make this process significantly easier.

A virtual work product integration table is shown in Figure 5.22. Using this table, the virtual moment and real curvature diagrams may be split into simply-shaped pieces and the integral of the product of a curvature diagram piece multiplied by the moment diagram pieces may be found using the expressions in the figure. The individual pieces must be for the same portion of the beam for both the virtual system and the real system (e.g. both pieces cover the beam between $x = \SI{2}{m}$ and $x = \SI{5}{m}$.

### Example

The use of the virtual work product integration table to calculate the total internal virtual work will be illustrated using the example beam shown in Figure 5.23. It is a simply supported beam with a thick left section and a point load at point D towards the right. Therefore, this example will also demonstrate the effect of a varying beam moment of inertia ($I$) on the curvature diagram.

The real and virtual systems for the example beam are shown in Figure 5.24, with the real system at the top and the virtual system at the bottom. The real system free body diagram is shown with the support reaction forces at either end. Below that, is the moment diagram of the real beam, which is not affected by the higher moment of inertia between points A and B. Below the real moment diagram is the real beam curvature diagram, which represents the real internal deformation for the calculation of the internal virtual work. This curvature diagram has a step up at point B. This step is due to the change in the moment of inertia of the beam cross section from $3I$ to $I$. The curvature values in the diagram are given as a function of $1/EI$. So, when $I$ triples, the curvature is divided by three. After the curvature diagram is constructed, it is divided into simple shapes that can be found in Figure 5.22 as shown by the varying shading in Figure 5.24. The real curvature diagram in the example is split into two triangles and two trapezoids, each shape being numbered '1' through '4.'

The lower half of Figure 5.24 shows the virtual system. Since we want to find the vertical deflection at point C, the virtual external unit load is placed at point C and directed vertically. The resulting free body diagram for that virtual system is shown, including the support reaction forces (which, as described previously, do not affect the external virtual work because the displacement of the support reactions must be zero).

Then, then moment diagram for the virtual system may be constructed as shown at the bottom of Figure 5.24. This moment diagram represents the virtual internal force. There is no need to calculate the curvature diagram for the virtual system because there is no need for virtual internal deformations in our virtual work balance.

The resulting virtual moment diagram is, in itself, a simple shape -- a triangle, which is a shape that can be found in Figure 5.22; however, when using the product integral expressions from Figure 5.22 to find the total internal virtual work, the divided sections must be in the same locations for both the real and virtual systems. So, the virtual moment diagram must be divided up into equivalent sections to those from the real curvature diagram. These four sections for the virtual moment diagram are shown using shading and are numbered '1' to '4' to match each section from the real curvature diagram.

Once we have constructed the real curvature diagram and the virtual moment diagram, and subdivided them into simple shapes, we can use the product integrals from Figure 5.22 to calculate the total internal virtual work for the combined real-virtual system. This entails selecting the right expression from the figure for each section of the beam ('1' through '4'). For using Figure 5.22, the real curvature will typically be the 'M' system, and the virtual moment diagram will be the 'Q' system (as indicated in Figure 5.24).

For section '1,' the real curvature diagram is a triangle and the virtual moment diagram is also a triangle. Looking at Figure 5.22, the integral for the product of a triangle and another triangle where the high side of both is on the same side is:

\begin{align*}

\int_0^L M Q \, dx = \frac{LMQ}{3}

\end{align*}

from the second row, second column, which, in our terms, is equivalent to:

\begin{align*}

\int_0^3 \phi_r M_v \, dx &= \frac{1}{3} \left( 3 \right) \left( \frac{35}{EI} \right) \left( 1.5 \right) \\

&= \frac{\SI{52.5}{kN^2 m^3}}{EI}

\end{align*}

which is the first term of our internal virtual work. The units of the numerator are $\SI{}{kN^2m^3}$ because we have a curvature (units $\SI{}{kNm/EI}$), multiplied by a moment (units $\SI{}{kNm}$), multiplied by a length (units $\SI{}{m}$). It is important to note that if the high side of the triangle for the real curvature was on the left and the high side of the triangle for the virtual moment was on the right, then a different equation from Figure 5.22 would apply (second row, third column $\frac{LMQ}{6}$).

For section '2,' the real curvature diagram is a trapezoid and the virtual moment diagram is also a trapezoid. Looking at Figure 5.22 again, the integral of the product of two trapezoids is:

\begin{align*}

\int_0^L M Q \, dx = \frac{L}{6} \left[ Q_a (2M_a + M_b) + Q_b (M_a + 2M_b) \right]

\end{align*}

from the fifth row, fourth column, which, in our terms, is equivalent to:

\begin{align*}

\int_0^3 \phi_r M_v \, dx &= \frac{1}{6} \left[ 1.5 \left( 2 \left( \frac{105}{EI} \right) + \frac{140}{EI} \right) + 2.0 \left( \frac{105}{EI} + 2 \left( \frac{140}{EI} \right) \right) \right] \\

&= \frac{\SI{215.8}{kN^2 m^3}}{EI}

\end{align*}

Continuing in this way for the rest of the sections:

\begin{align*}

W_{v,i} &= \int \text{Section 1} + \int \text{Section 2} + \int \text{Section 3} + \int \text{Section 4} \\

&= \frac{L}{6} \left[ Q_a (2M_a + M_b) + Q_b (M_a + 2M_b) \right] \\

& \;\; + \frac{1}{6} \left[ 1.5 \left( 2 \left( \frac{105}{EI} \right) + \frac{140}{EI} \right) + 2.0 \left( \frac{105}{EI} + 2 \left( \frac{140}{EI} \right) \right) \right] \\

& \;\; + \frac{2}{6} \left[ 2 \left( 2 \left( \frac{140}{EI} \right) + \frac{210}{EI} \right) + 1.0 \left( \frac{140}{EI} + 2 \left( \frac{210}{EI} \right) \right) \right] \\

& \;\; + \frac{1}{3} \left( 2 \right) \left( \frac{210}{EI} \right) \left( 1.0 \right) \\

&= \frac{52.5 + 215.8 + 513.3 + 140}{EI} \\

W_{v,i} &= \frac{\SI{921.6}{kN^2m^3}}{EI}

\end{align*}

Since this is not the final answer yet, it's okay to keep a couple extra significant figures.

Now applying our virtual work balance:

\begin{align*}

W_{v,e} &= W_{v,i} \\

(\SI{1}{kN}) (\Delta_{Cr}) &= \frac{\SI{921.6}{kN^2m^3}}{EI} \\

\Delta_{Cr} &= \frac{\SI{921.6}{kN^2m^3}}{(\SI{1}{kN}) (\SI{200000}{MPa}) (\SI{300E6}{mm^4})} \\

\Delta_{Cr} &= \frac{\SI{921.6E15}{N^2mm^3}}{(\SI{1000}{N}) (\SI{200000}{MPa}) (\SI{300E6}{mm^4})}

\end{align*}

\begin{equation}

\boxed{\Delta_{Cr} = \SI{15.4}{mm} \downarrow }

\end{equation}

The deflection is downwards because our assumed virtual external unit force was assumed to point downward and the answer for $\Delta_{Cr}$ was positive. In the above expression, all of the units were converted into $\SI{}{N}$, $\SI{}{mm}$ and $\SI{}{MPa}$ first so that the answer would be in $\SI{}{mm}$ (recall that $\SI{1}{MPa}=\SI{1}{N/mm^2}$).

## Using Virtual Work to Calculate Frame Deflections

For analysis of frame deflections using virtual work the process is exactly the same as for beams, as long as we can still assume that the deformations due to axial forces and shear are still insignificant relative to the bending deformations. This is still usually a good assumption for frames. One examples where this may not be a good assumption is for a tall frame structure, where the axial deformation of the columns on either side of the frame may contribute significantly to the lateral displacement at the top of the building. This type of frame effectively acts as a cantilever, with bending tension and compression stresses being taken by different columns. Another situation where this may not be a good assumption is for short deep beams in bending and shear, where the shear deformations may become significant relative to the bending deformations. Lastly, if the desired unknown deformation for the frame will rely directly on the axial deformation of a specific member, for example if you want to find the vertical deformation at the top of a column that has a vertical axial load, but no lateral load, then you may need to include the work done by axial deformations within the virtual work balance.

To consider axial deformations in addition to bending (which is typically not necessary for frames), another term is simply added to the total internal virtual work:

\begin{equation}

\boxed{W_{v,i} = \int_0^L \frac{M_vM_r}{EI} dx + \sum_j \left( \frac{p_{rj} L_j}{E_j A_j} \right) p_{v_j} } \label{eq:Virtual-Work-Internal-Frames}

\end{equation}

where $p_{rj}$ is the real internal axial force in member $j$ (as long as the axial force is constant), $L_j$ is the length of member $j$, $E_j$ is the Young's modulus of member $j$, $A_j$ is the cross-sectional area of member $j$, and $p_{v_j}$ is the virtual internal axial force in member $j$.

If axial force is not considered, then the equation for the internal virtual work for beams (equation \eqref{eq:Virtual-Work-Internal-Beams}) may be used instead. For frames with multiple members, the total internal virtual work is simply the sum of the internal virtual work for each member.

### Example

The use of virtual work product to find the rotation of a single point in a frame will be illustrated using the example frame shown in Figure 5.25. Work arising from both bending and axial deformations will be considered to show the effect of neglecting the axial work. The frame has a constant $EI$ and cross-sectional area $A$ for all members. We would like to determine the rotation of joint C ($\theta_{Cr}$) due to the applied real external load at point B.

The real and virtual systems for this structure are analysed in Figure 5.26. The top of the figure shows the free body diagram for each system. The virtual external force on the virtual system for this problem is a unit point moment of $\SI{1}{kNm}$ at point C (because we want to find the rotation of point C). This point moment is assumed to be counter-clockwise, but if the resulting solution for $\theta_{Cr}$ is negative, then we will know that the rotation is actually clockwise. Below the free body diagrams, each system, real and virtual, is analysed to determine the axial load for each, the curvature diagram for the real system (the real internal deformation), and the moment diagram for the virtual system (the virtual internal force).

Since the axial force in member CD is constant for both the real and virtual systems, the internal virtual work contribution due to the axial forces may be easily determined using the second term of equation \eqref{eq:Virtual-Work-Internal-Frames}:

\begin{align*}

W_{v,i, axial} &= \sum_j \left( \frac{p_{rj} L_j}{E_j A_j} \right) p_{v_j} \\

&= \frac{\SI{-26}{kN} (\SI{6.40}{m})}{ \SI{200000}{MPa} (\SI{16500}{mm^2}) } (\SI{0.0650}{kN}) \\

&= \frac{\SI{-26000}{N} (\SI{6400}{mm})}{ \SI{200000}{MPa} (\SI{16500}{mm^2}) } (\SI{65}{N}) \\

W_{v,i, axial} &= \SI{-3.28}{Nmm} = \SI{-3.28E-6}{kNm}

\end{align*}

Notice that the real internal axial force was negative since it is a compression force and the virtual internal axial force was positive because it is a tension force.

Now, let's find the internal virtual work due to bending deformations using the expressions from Figure 5.22 to calculate the product integrals:

\begin{align*}

W_{v,i, bending} &= \int \text{Section 1} + \int \text{Section 2} + \int \text{Section 3} \\

&= \frac{LMQ}{3} + \frac{L}{6} \left[ Q_a (2M_a + M_b) + Q_b (M_a + 2M_b) \right] + \frac{LMQ}{3} \\

&= \frac{1}{3} \left( 4 \right) \left( \frac{266.7}{EI} \right) \left( 0.333 \right) \\

& \;\; + \frac{4}{6} \left[ 0.333 \left( 2 \left( \frac{266.7}{EI} \right) + \frac{133.3}{EI} \right) + 0.666 \left( \frac{266.7}{EI} + 2 \left( \frac{133.3}{EI} \right) \right) \right] \\

& \;\; + \frac{1}{3} \left( 6.4 \right) \left( \frac{133.3}{EI} \right) \left( -0.333 \right) \\

&= \frac{118.4 + 384.8 - 94.7}{EI} \\

W_{v,i, bending} &= \frac{\SI{408.5}{kN^2m^3}}{EI} \\

W_{v,i, bending} &= \frac{\SI{408.5E15}{N^2mm^3}}{(\SI{200000}{MPa}) (\SI{300E6}{mm^4})} \\

W_{v,i, bending} &= \SI{6808.3}{Nmm} = \SI{6810E-6}{kNm}

\end{align*}

So, $W_{v,i, axial}$ is approximately $0.05\%$ of $W_{v,i, bending}$ for this example problem. Therefore would clearly have been a good assumption to neglect it. The accuracy of our numbers is about $0.1\%$ at best, recall the discussion of significant figures in Section 1.7.

So, continuing the problem without the contribution of the axial deformations to the total internal virtual work:

\begin{align*}

W_{v,i} = W_{v,i, bending}

\end{align*}

Applying the virtual work balance:

\begin{align*}

W_{v,e} &= W_{v,i} \\

(\SI{1}{kNm}) (\theta_{Cr}) &= \SI{6810E-6}{kNm} \\

\theta_{Cr} &= \SI{0.00681}{rad}

\end{align*}

\begin{equation}

\boxed{\theta_{Cr} = \ang{0.390} \curvearrowleft}

\end{equation}

The rotation is counter-clockwise because we assumed a counter-clockwise unit point moment and the result was positive.