# Principle of Virtual Work vs Castigliano's (Second) Theorem

I had a look online and into some literature however I did not seem to find a good comparison for the two different methods. They are both used for determining displacements and slopes (rotation by theta) at a point in a continuum. Former uses a virtual unit force which equals to the strain energy in the element (when multiplied by displacement of interest) and latter uses differential with respect to a virtual force that tends to zero.

Which one is more efficient and which one is more accurate? Why would one choose Virtual Work over Castigliano's or vice versa?

• They are both "accurate" in the mathematical sense, but in practice there are usually some approximations made to find the internal stress, strain, and strain energy. (Simple example: Euler-Timoshenko beam theory isn't "accurate" for any real engineering structure!) Commented Apr 4, 2017 at 16:59
• Well I do wonder which one proves more practical and more efficient in analysis. From what I know FE software (eg: ANSYS) seem to use virtual work and I guess it makes sense because you do not need numerical differentiation as you do with Catigliano's which may be one of the reasons. Just curious as to what kind of reasons would favour one over the other. As for the beams, I am aware that Euler-Bernoulli beam is quite popular and Euler-Timoshenko does not seem to work for long beams although I have heard that it is used in vibrations with some adjustments which makes it a better approximation. Commented Apr 4, 2017 at 21:12
• I don't get the impression that castigliano's theorem applies beyond solid mechanics. Virtual work, on the other hand, extends to many other pde models, such as heat conduction and even fluid flow.
– Paul
Commented Apr 6, 2017 at 1:22
• Well let's keep it within solid mechanics. Castigliano's theorem was invented by a railroad engineer after all. So in terms of structural analysis which one performs better and why? Fluid mechanics and heat transfer are quite different all together and they usually don't employ energy methods in this manner, more interesting in those areas are field equations and point-wise solutions. Although yes a numerical solver might still use virtual work I guess, not sure. Commented Apr 7, 2017 at 0:22

Short Answer: Castigliano gives rapid exact solutions at a few key points in a large complex structure, while virtual work gives usable approximate models to complex systems that otherwise would be unsolvable.

Castigliano's Theorem and virtual work are two sides of the same mathematical coin. Castigliano's Methods predates virtual work, but begins the fundamental principles of virtual work. It forms the simpler half of virtual work, where the displacements could be solved via linear analysis, but we use virtual work to get the answer faster. Virtual work is described for the latter half, where we could not solve the displacements with linear analysis (without solving differential equations and throwing in a bunch of coefficients), and we rely on virtual work instead to find a good approximate answer that fits many of the boundary conditions.

As stated above, inn most applications of what engineers use for Castigliano's method, the main principle is to use what is known from linear elastic beam or truss theory (it can be used in multiple aspects for these structures), and quickly solve for a structure subjected to highly unusual forces. An equation for the forces is written in terms of many unknown forces of the statically determinate structure, and then the unknown forces are removed. One of the unknown (or unusual, but known) forces are applied, and the linear models and tables used for single forces can quickly tell us the actual displacement at various points in the structure. The single force may result in 500 newtons of force at a reaction point per newton of original force, or 5 newtons. This is recorded. The unknown force is removed, and a new force is added, and tested. Once all of these reactions and forces are found, Castigliano's method can then solve for what the final deflection would be for the entire load-state, which may not be found in a table of solved load-states. This is especially useful in the case where there are elastic supports, supports that deflect based upon how much force they apply, which happens in any real system. The only limit on this approach is how detailed the tables are, and the principle of superposition. So long as the system can be treated using superposition, Castigliano's method will produce exact results (given the model used) at various points within the structure without solving for all of the other points.

The principle of virtual work extends beyond this principle - the idea is instead to simply write an equation for the displacements with unknown coefficients. It could be the solution to the governing DE, or it could be completely inaccurate, but it needs to be able to resolve all of the boundary conditions (at point A, the displacement is 0, etc). For beams, taking the second derivative of the displacement equation results in the moment equation, taking the third results in the shear equation. For plates and other continuum, the displacement is the strain times the length. Any stress terms can be written as the stiffness tensor times the strain, so the entire virtual work can be expressed simply in terms of our unknown displacement equation, in principle. Hence, the work is simply to solve for those unknown coefficients such that they minimize the virtual work (both in potential energy for static systems, or the sum of potential energy and kinetic energy for dynamic systems).

An example of this is frequently given with the equations used for finite element analysis, where instead of the normally quartic displacement equations, a cubic equation is used for the displacement. This is because we have at most two degrees of freedom for rotations, and two degrees of freedom for displacements, so the most we can have is four unknown coefficients - a cubic equation. Note this means that an FEA needs to then split a distributed load into point loads that allow the cubic equation to have the same the same deflections as the original quartic. This is what causes single elements to not show the same mid-span deflections as the original quartic:

Even without superposition, the principal of virtual work still applies, so long as your stiffness tensor accounts for the change in stress with regards to strain. This may take an independent unknown stress equation, to use in lieu of the stiffness tensor. Variations of this kind are used in many fields by the engineers who need to make mathematical models of their systems, which form the basis for practically all finite element methods. In summary, Castigliano gives rapid exact solutions at a few key points in a large complex structure, while virtual work gives usable approximate models to complex systems that otherwise would be unsolvable.

• would splitting the summary to a separate paragraph help? Commented May 17, 2018 at 5:12
• This topic would be great for wiki. Commented May 23, 2018 at 18:58
• @Katarina - I would agree. From my 10 years, this is accurate, but others may have different perspectives about the differences between the two. It's a complex subject.
– Mark
Commented May 23, 2018 at 19:39