Virtual work, \(\delta W_i\) is the work done by a force, \(\vec{F}_i\) given a “reversible virtual displacement” that is in harmony with the given constraints, \(\delta\vec{r}_i\):
A reversible displacement is one where \(\delta\vec{r}_i\) can be replaced with \(-\delta\vec{r}_i\) without violating any of the constraints \(\delta\vec{r}_i\) is the variation of the position vector where the force is applied. By definition, a virtual displacement that is parallel to a normal force is not reversible.
Principal of virtual work and static equilibrium
The principle of virtual work states that for a static equilibrium, the sum of virtual work done by all forces is equal to zero.
We can divide this up into “external forces” (such as gravity, electric fields), \(\vec{F}^E_i\), and “internal forces” (such as tension in a rod, normal reaction forces), \(\vec{F}^I_j\).
Typically, the internal forces are related to constraints. “Workless constraints” are those that lead to forces that do no virtual work.
Example 3-1
The tension forces on each mass are equal and opposite (Newton’s third law):
Furthermore, the constraint that the rods be fixed relative to each other requires that their virtual displacement be the same:
Thus, the virtual work done by the internal forces in this case is zero:
Example 3-2
If the block is constrained to slide on the surface, the normal force is perpendicular to \(\delta \vec{r}\) and thus does no virtual work. \(\delta \vec{r}\) must be parallel to the contact surface, since it would not be reversible otherwise.
In the case of workless constraints, the total virtual work is given by the work of the external forces. It is generally true (although difficult to prove) that most constraint forces are workless and can be ignored.
For static equilibrium, the “Principal of Virtual Work” states that the total virtual work (which is done by external forces) must be zero:
This is in contrast to the vectorial approach with requires the sum of all forces (external and internal) to be zero.
Generalized forces
We continue by ignoring the internal forces and consider the virtual work done by N external forces:
If we have \(n\) degrees of freedom, we can re-write this in terms of the generalized coordinates (where holonomic constraints are used to reduce the number of coordinates, and the coordinates are thus all independent):
where we have introduced the components, \(Q_j\), of the “generalized force” which do not necessarily have the dimensions of force:
The total work is thus the scalar product of the generalized force, \(\vec Q\), and a virtual displacement vector, \(\delta \vec q\), in configuration space:
If any displacement is allowed in configuration space, \(\delta \vec{q}\), then all components of the generalized force must be zero for static equilibrium. In a holonomic system, where all coordinates are independent of each other, \(\delta {q}_i\) all correspond to allowed displacements and the generalized force components are therefore zero. Another way to picture this is that, given generalized coordinates \(q_j\), the generalized force \(Q_j\) is the force that does work \(Q_j \delta q_j\) when the system is displaced in the direction \(\delta q_j\). Since \(q_j\) is not necessarily a cartesian coordinate (it could be an angle), \(Q_j\) does not necessarily have the units of force.
Using the Principal of Virtual Work to solve statics problems
We proceed with a few examples for solving statics problems using the principal of virtual work. The general procedure will be as follows:
Identify the number of degrees of freedom and choose generalized coordinates
Identify the forces that can perform virtual work (forces acting at points where a virtual displacement is possible given the constraints, and forces that are not perpendicular to the allowable virtual displacements)
Write the position vectors of the points where the forces are applied in terms of the generalized coordinates. Then, take the variations in those vectors to obtain the \(\delta \vec r_i\)
Write out the virtual work and set it to zero
(Alternatively) Evaluate the components of the generalized force and set them equal to zero
Example 3-3
This is a rigid body, so in principle there are 6 degrees of freedom. If we choose a coordinate system at the pivot point, we can describe the position of the bar by the cartesian coordinates of the pivoting end of the bar, and 3 angles to describe the rotation of the bar about the 3 axes. However, we have the following constraints:
we are thus left with 1 degree of freedom. We choose \(\theta=\theta_z\) as the one generalized coordinate. Next we consider the virtual work of the forces that can perform non-zero virtual work (the forces at the pivot point cannot perform any virtual work, as the pivot point cannot be moved; its virtual displacement would not be in harmony with the constraints). We have gravity and \(F\) that do virtual work:
The virtual displacement vectors must be consistent with the kinematic constraints, that is, they are perpendicular to the rod (and the constraints require that \(\delta\vec{r}_1\) and \(\delta\vec{r}_2\) point in the same direction). We can write the position vectors for the points where the forces are applied and take their variation with respect to \(\theta\):
Thus:
Setting the virtual work to zero, we get the same answer as you would using introductory mechanics techniques (e.g. torques):
Let’s calculate the generalized force:
Note that \(N=2\) and there is only 1 \(q_j\), namely \(\theta\). If we write the vectors in the xy coordinates, we can evaluate the partial derivatives:
The generalized force is then given by:
And you may recognize that the generalized force in the \(\theta\) direction is the total torque! The requirement that the generalized force be zero is the same as requiring that the sum of the torques are zero.
Example 3-4
Since we have 2 particles, we have 6 possible degrees of freedom. However, each particle is constrained to move along only 1 axis, thus reducing the number of degrees of freedom by 4. Furthermore, the particles are connected by a rigid rod, which further reduces the number of degrees or freedom by 1. There is only 1 degree of freedom, and we choose \(\theta\) as our generalized coordinates. The constraint equations are:
We have 2 forces that can perform virtual work: gravity on particle 1 and \(F\) on particle 2. Gravity on particle 2 cannot perform virtual work as it is perpendicular to the allowable virtual displacements of particle 2.
Writing the position vectors for the points where the forces are applied and calculating their variation with respect to \(\theta\):
The virtual work is then:
It is straightforward to show that the generalized force is equal to the sum of the torques:
Example 3-5
There is only 1 degree of freedom, and we choose \(\theta\) as the generalized coordinate. The angles \(\phi\) and \(\theta\) are related by:
By writing the position vectors for each particle (where the forces of gravity are applied), we can get their virtual displacements:
The virtual work is then given by the weights multiplied by the y-components:
where we used the formula \(\sin{(\alpha-\beta)}=\sin\alpha\cos\beta -\cos\alpha\sin\beta\). The generalized force is: