## The Principle of Virtual Work: Illustrative Examples for the Principle of Virtual Work

#### Learning Outcomes

the different expressions that appear in the statement of virtual work in a continuum.__Describe__the different expressions that appear in the statement of virtual work in an Euler Bernoulli beam.__Describe__

### Example 1: Illustrative Example of the Principle of Virtual Work Applied to a Continuum

The Cauchy stress distribution in the shown plate is given by:

where and are the coordinates inside the plate with units of . Find the equilibrium body forces vector applied to the plate. Find the traction forces on the boundary edges , , , and of the plate. Verify the principle of virtual work assuming a virtual displacement field .

##### SOLUTION:

The equilibrium body forces applied to the plate can be obtained using the equilibrium equations:

The plate is in a state of plane stress, so, the problem can be reduced to . The area vectors for the boundary edges , and are given by:

The traction vectors in units of on the boundary edges , , , and are given by:

Therefore,

The virtual displacement vector is:

The gradient of the virtual displacement tensor is:

The associated virtual strain is given by:

The internal virtual work can be calculated as follows:

There are five components for the external virtual work. The first one is the external virtual work due to the external body forces applied to the plate. This component is a volume integral:

The second component is the external virtual work due to the external forces acting on side . This is a surface integral and is evaluated for side where :

The third component is the external virtual work due to the external forces acting on side . This is a surface integral and is evaluated for side where :

The fourth component is the external virtual work due to the external forces acting on side . This is a surface integral and is evaluated for side where :

The fifth component is the external virtual work due to the external forces acting on side . This is a surface integral and is evaluated for side where :

Therefore, the total external virtual work is:

View Mathematica Code

x = {x1, x2, x3};

rhob1 = -Sum[D[s[[j, 1]], x[[j]]], {j, 1, 2}]

rhob2 = -Sum[D[s[[j, 2]], x[[j]]], {j, 1, 2}]

rhob3 = -Sum[D[s[[j, 3]], x[[j]]], {j, 1, 2}]

(*We will only consider the 2 dimensional matrices as all out of plane components are equal to 0*)

ustar = {a*x1 + b*x2, 0};

ustara = ustar /. x1 -> 2;

ustarb = ustar /. x2 -> 1;

ustarc = ustar /. x1 -> 0;

ustard = ustar /. x2 -> 0;

s = {{x1*x2, 5}, {5, x1}};

na = {1, 0};

nb = {0, 1};

nc = {-1, 0};

nd = {0, -1};

ta = s.na /. x1 -> 2

tb = s.nb /. x2 -> 1

tc = s.nc /. x1 -> 0

td = s.nd /. x2 -> 0

Gradustar = Table[D[ustar[[i]], x[[j]]], {i, 1, 2}, {j, 1, 2}]

estar = 1/2*(Gradustar + Transpose[Gradustar])

ststrain = Sum[s[[i, j]]*estar[[i, j]], {i, 1, 2}, {j, 1, 2}]

IVW = Integrate[ststrain, {x1, 0, 2}, {x2, 0, 1}, {x3, 0, t}]

EVWBodyForces = Integrate[rhob1*ustar[[1]], {x1, 0, 2}, {x2, 0, 1}, {x3, 0, t}]

EVWa = Integrate[(ta.ustara) /. x1 -> 2, {x2, 0, 1}, {x3, 0, t}]

EVWb = Integrate[(tb.ustarb) /. x2 -> 1, {x1, 0, 2}, {x3, 0, t}]

EVWc = Integrate[(tc.ustarc) /. x1 -> 0, {x2, 0, 1}, {x3, 0, t}]

EVWd = Integrate[(td.ustard) /. x2 -> 0, {x1, 0, 2}, {x3, 0, t}]

EVW = FullSimplify[EVWBodyForces + EVWa + EVWb + EVWc + EVWd]

##### Video

### Example 2: Illustrative Example of the Principle of Virtual Work Applied to an Euler Bernoulli Beam

A fixed ends Euler Bernoulli beam is subjected to a distributed load . Assuming that Young’s modulus, the length, and the moment of inertia for the beam are , , and , respectively, verify that the principle of virtual work applies when a virtual parabolic displacement , is applied to the beam.

##### SOLUTION:

The principle of virtual work applies to the equilibrium internal forces. So, the first step is to find the internal forces at the state of equilibrium. For this, we will solve the differential equation of equilibrium:

The integration constants , , , and can be obtained using the four boundary conditions of a fixed ends beam:

Therefore, the equilibrium displacement of the beam is:

The bending moment and the shearing force equations at equilibrium are:

The external forces acting on the ends of the beam are given by:

Note that the convention for positive end forces is shown in Figure 3. The virtual end displacements and rotations are given by:

Therefore, the internal virtual work is given by:

The external virtual work has three components, the first is the external virtual work due to the distributed load q:

The second component is the external virtual work due to the reactions at end 1:

The third component is the external virtual work due to the reactions at end 2:

The total external virtual work is:

View Mathematica Code

q = -5 x

s = DSolve[{EI*y””[x] == q, y[0] == 0, y'[0] == 0, y[L] == 0, y'[L] == 0}, y[x], x]

y = y[x] /. s[[1]]

th = D[y, x]

M = FullSimplify[EI*D[y, {x, 2}]]

V = FullSimplify[EI*D[y, {x, 3}]]

M1 = M /. x -> 0

M2 = M /. x -> L

V1 = V /. x -> 0

V2 = V /. x -> L

ystar = a*x^2;

thstar = D[ystar, x];

ystar1 = ystar /. x -> 0

ystar2 = ystar /. x -> L

thstar1 = thstar /. x -> 0

thstar2 = thstar /. x -> L

Print[“IVW”]

IVW = Integrate[M*D[ystar, {x, 2}], {x, 0, L}]

EVWq = Integrate[q*ystar, {x, 0, L}]

EVW1 = +V1*ystar1 – M1*thstar1

EVW2 = -V2*ystar2 + M2*thstar2

Print[“EVW”]

EVW = EVWq + EVW1 + EVW2

##### Video

### Example 3: Application 1 of the Principle of Virtual Work

The shown beam has its neutral axis aligned with the axis. Find the reactions , , and using the equilibrium equations and then using the principle of virtual work.

##### SOLUTION:

There are three equilibrium equations which can be used to find the three unknown reactions:

Therefore, the three unknown reactions are:

The principle of virtual work can be used by applying a virtual smooth rigid body displacement to the beam. The rigid body displacement will in fact have three unknown variables. Each variable will correspond to an equilibrium of motion. In this example, the virtual vertical displacement field:

and a horizontal displacement equal to . In essence, the rigid body displacement has three variables, , , and . corresponds to moving the beam vertically upwards and will be used to write the equation of equilibrium that states that the sum of vertical forces is equal to zero. corresponds to moving the beam horizontally and will be used to write the equation of equilibrium that states that the sum of the horizontal forces is equal to zero. corresponds to rotating the beam around point 1 which will be used to write the equation of equilibrium that states that the sum of moments around point 1 is equal to zero.

The statement of virtual work of the system is:

and are the virtual displacements of points 2 and 3 and can be replaced with and so the equation becomes:

The above equation can be rearranged to have the following form:

Since the virtual displacement field is arbitrary and the statement applies for any choices of the variables , and , then, their coefficients are equal to zero. Therefore, the three equations of equilibrium are retrieved:

Therefore, the same reactions are obtained. Note that the chosen virtual displacement field guarantees that the associated internal virtual work is equal to zero.

##### Video

### Example 4: Application 1 of the Principle of Virtual Work

The shown beam has its neutral axis aligned with the axis. Find the reactions , and using the equilibrium equations and then using the principle of virtual work.

##### SOLUTION:

There are three equilibrium equations which can be used to find the three unknown reactions:

Therefore, the three unknown reactions are:

The principle of virtual work can be used by applying a virtual smooth rigid body displacement to the beam. The rigid body displacement will in fact have three unknown variables. Each variable will correspond to an equilibrium of motion. In this example, the virtual vertical displacement field:

and a horizontal displacement equal to . In essence, the rigid body displacement has three variables, , , and . corresponds to moving the beam vertically upwards and will be used to write the equation of equilibrium that states that the sum of vertical forces is equal to zero. corresponds to moving the beam horizontally and will be used to write the equation of equilibrium that states that the sum of the horizontal forces is equal to zero. corresponds to rotating the beam around point 1 which will be used to write the equation of equilibrium that states that the sum of moments around point 1 is equal to zero.

The statement of virtual work of the system is:

After substituting for and integrating, the above equation can be rearranged to have the following form:

Notice that the displacement field is chosen small enough such that . The above equation can then be rearranged to have the following form:

Since the virtual displacement field is arbitrary and the statement applies for any choices of the variables , , and , then, their coefficients are equal to zero. Therefore, the three equations of equilibrium are retrieved:

Therefore, the same reactions are obtained. Note that the chosen virtual displacement field guarantees that the associated internal virtual work is equal to zero.

### Example 5: Application 2 of the Principle of Virtual Work

Use the principle of virtual work to find the displacement at the free end of the shown cantilever beam. Assume EI is constant and ignore the shearing force and normal force deformations.

##### SOLUTION:

The bending moment of the structure with the original load (distributed load) is given by the equation:

After removing the loads from the structure and applying a unit load at the point of interest, the bending moment equation for the structure with the unit load is given by the equation:

Applying the statement of virtual work as described above for this application:

Therefore:

### Example 6: Application 3 of the principle of Virtual Work

Use the principle of virtual work to find an approximate cubic polynomial displacement solution for the shown beam. Compare with the exact solution for unit and unit where and are the Young’s modulus, beam’s length, and moment of inertia respectively. Ignore Poisson’s ratio.

##### SOLUTION:

First, we will find the exact displacement shape by solving the differential equation of equilibrium. Because of symmetry, we are going to solve the equation for only half the beam with the boundary conditions shown in the figure.

The constants , and are integration constants and can be obtained from the four boundary conditions:

Therefore, the displacement function for is given by:

The displacement function for can be obtained by replacing with in and thus the final displacement shape has the form:

The following are two important observations about the exact solution:

- The exact solution is a polynomial of the third degree for each half.

We wish now to find an approximate solution for the displacement. We will force the solution however, to be continuous and differentiable at by assuming that the approximate solution is a cubic function applied from the whole length of the beam:

The first step in finding the appropriate coefficients , and is to ensure that this approximate solution satisfies the boundary conditions of displacement and rotation if any. Therefore we need to ensure:

Therefore,

Thus, the approximate displacement shape that would satisfy the boundary conditions has the form:

The associated bending moment diagram in this case has the following form:

In order to apply the principle of virtual work, a virtual displacement needs to be assumed. Since the principle of virtual work applies for any assume virtual displacement, the most general virtual displacement field within the space of possible functions will be assumed. Since we restricted the solutions to be quadratic functions satisfying the boundary conditions, the most general virtual displacement has the form:

and the associated second derivative has the form:

The internal virtual work can be calculated as follows:

On the other hand, the external virtual work has only one component due to the virtual work done by the force as the virtual displacement at the reactions is equal to zero:

Since the principle of virtual applies to any choice for and , their multipliers on both sides of the equation of virtual work have to be equal. Therefore, we get the following two equations:

Solving the above two equations yields:

Therefore, the best approximate solution that satisfies the virtual work principle is;

The approximate solution can be compared with the exact solution when units. The plot of versus shows that the approximate solution under-predicts the displacement of the structure. In other words, the approximate solution gives a stiffer structure compared to the exact solution.

View Mathematica Code

(*Exact solution*);

s = DSolve[{y””[X1] == 0, y[0] == 0, y”[0] == 0, y'[L/2] == 0, y”'[L/2] == P/2/EI}, y[X1], X1];

y1 = FullSimplify[y[X1] /. s[[1]]];

y2 = FullSimplify[y1 /. X1 -> L – X1];

yexact = Piecewise[{{y1, 0 <= X1 < L/2}, {y2, L/2 <= X1 <= L}}];

(*Approximate solution*)

yapprox = a2*X1*(X1 – L) + a3*X1*(X1^2 – L^2);

ystar = yapprox /. {a2 -> a2s, a3 -> a3s};

EVW = -P*ystar /. X1 -> L/2 ;

IVW = Integrate[EI*D[yapprox, {X1, 2}]*D[ystar, {X1, 2}], {X1, 0, L}] ;

Eq1 = Coefficient[IVW, a2s] – Coefficient[EVW, a2s] ;

Eq2 = Coefficient[IVW, a3s] – Coefficient[EVW, a3s] ;

s = Solve[{Eq1 == 0, Eq2 == 0}, {a2, a3}] ;

yapprox = yapprox /. s[[1]] ;

yp = yapprox /. {P -> 1, EI -> 1, L -> 1};

yexactp = yexact /. {P -> 1, EI -> 1, L -> 1};

Plot[{yp, yexactp}, {X1, 0, 1}, PlotLegends -> {“Approximate”, “Exact”}, AxesLabel -> {“X1 (Length units)”, “y (Length units)”}]

##### Video

### Problems

- Use the principle of virtual work to find the reactions for the following statically determinate structures.
- Use the principle of virtual work to find the reactions for the following statically determinate structures.
- The shown beams have Young’s modulus and moment of inertia . Verify that the virtual work principle applies assuming a virtual displacement field where .
- Repeat the previous question assuming a virtual displacement field where .
- The Cauchy stress distribution in the shown plate is given by:
- Assuming a virtual displacement field .
- Assuming a virtual displacement field .

- The Cauchy stress distribution on the shown unit length cube is given by:
- Find the equilibrium body forces vector applied on the cube.
- Find the traction vectors on the boundary faces , and of the cube.
- Verify the principle of virtual work for the following virtual displacement field

- Use the principle of virtual work to find approximate linear, quadratic, cubic, and quartic polynomial displacement solutions for a simply supported beam with length , Young’s modulus , moment of inertia , and a distributed load . Compare the approximate solutions with the exact solution for units, units, and units. Ignore Poisson’s ratio.