Instead of deriving the differential equation using a balance of forces
on a differential element, we may arrive at the same problem description
via a different route - the principle of virtual work (also called the variational approach).
If we imagine there were forces (virtual forces) inside and outside of the bar, then the virtual work generated by these 'virtual forces' should conserve energy. For the bar, this principle can be stated as
![{\displaystyle \delta W_{\text{int}}=\delta W_{\text{ext}}+\delta W_{\text{body}}\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/18ea03f184f65ee283df673db31c92528e03c691)
where
is the virtual work of the internal forces,
is the virtual work of the external forces, and
is the virtual work of the body forces.
The virtual internal work is given by
![{\displaystyle \delta W_{\text{int}}=A\int _{0}^{L}{\boldsymbol {\sigma }}~\delta {\boldsymbol {\varepsilon }}~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/446413501bc8a3b47e575ebec178dc5439263bc0)
The virtual work done by the external forces is given by
![{\displaystyle \delta W_{\text{ext}}=\left.\mathbf {R} ~\delta \mathbf {u} \right|_{\mathbf {x} =L}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5da486ec9a5aaa13d4762c15bcf9c6531c6d20cd)
The virtual work done by the body forces is given by
![{\displaystyle \delta W_{\text{body}}=\int _{0}^{L}\mathbf {q} ~\delta \mathbf {u} ~dx~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c410bb259a73c43be92f70d5bc838cb175b76fb1)
The principle of virtual work for the bar can then be expressed as
![{\displaystyle A\int _{0}^{L}{\boldsymbol {\sigma }}~\delta {\boldsymbol {\varepsilon }}~dx=\int _{0}^{L}\mathbf {q} ~\delta \mathbf {u} ~dx+\left.\mathbf {R} ~\delta \mathbf {u} \right|_{\mathbf {x} =L}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/057976300a30fbb0d4cb2358169758fc891bba7b)
Now, the stress and the virtual strain expressed in terms of the
displacements are
![{\displaystyle {\boldsymbol {\sigma }}=E{\cfrac {d\mathbf {u} }{dx}}\qquad {\text{and}}\qquad \delta {\boldsymbol {\varepsilon }}={\cfrac {d(\delta \mathbf {u} )}{dx}}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/75129b2b6b8040ebf70e66f8731bc8282b73626f)
Therefore, we have
![{\displaystyle A\int _{0}^{L}E{\cfrac {d\mathbf {u} }{dx}}{\cfrac {d{\delta \mathbf {u} }}{dx}}~dx=\int _{0}^{L}\mathbf {q} ~\delta \mathbf {u} ~dx+\left.\mathbf {R} ~\delta \mathbf {u} \right|_{\mathbf {x} =L}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eb4a720723700a9ca80ae5a158954324b85c3474)
Note that the virtual displacement
is zero at points on the boundary where displacements are prescribed.
The above equation is called the variational form or weak form of the problem.
Let us start with the weak form. Using the formula for the first
variation (from variational calculus)
![{\displaystyle \delta (x^{2})=2~x~\delta x\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0a5d4304d1b29129bd00b39f437f60ae5009c7e5)
we have
![{\displaystyle A\int _{0}^{L}E~{\cfrac {d\mathbf {u} }{dx}}~{\cfrac {d\delta \mathbf {u} }{dx}}~dx=A\int _{0}^{L}{\cfrac {E}{2}}~\delta \left({\cfrac {d\mathbf {u} }{dx}}\right)^{2}~dx=\delta \left[A\int _{0}^{L}{\cfrac {E}{2}}\left({\cfrac {d\mathbf {u} }{dx}}\right)^{2}~dx\right]~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0c0d85d5e73ecb4093b165e267ce04fa10bac1a0)
Therefore, the weak form can be written as
![{\displaystyle \delta \left[\int _{0}^{L}\left({\cfrac {AE}{2}}~\left({\cfrac {d\mathbf {u} }{dx}}\right)^{2}-\mathbf {q} ~\mathbf {u} \right)~dx-\left.\mathbf {R} ~\mathbf {u} \right|_{\mathbf {x} =L}\right]=0~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9ad0249a1acebbea08a1a593ed2604f8691a25a9)
This is equivalent to the following variational statement of the
problem
where
means variation in and
is an arbitrary variation on
subject to the condition that
.
Note that the first term of
is the strain energy stored and the next two terms are the potential energy of the external forces (
).
The above variational statement can also be interpreted as statement of minimum potential energy: the total potential of the system (elastic body and external forces) attains a stationary value when equilibrium is satisfied. Further more, this stationary value is minimum. This can be reinterpreted as of all the possible displacements, the actual displacement
minimizes the potential energy of the system.
The strong and weak statements of the problem are equivalent. Since
finite elements uses the weak form of the problem statement, we
can either derive the weak form from the strong form or using the
principle of virtual work. The preferred approach is chosen on the basis of convenience.
We can derive the weak form from the strong form as follows. We multiply
the strong form with an arbitrary virtual displacement (or weighting function) and integrate over the length of the bar. Thus
![{\displaystyle {\text{(5)}}\qquad \int _{0}^{L}\left(AE{\cfrac {d^{2}\mathbf {u} }{dx^{2}}}+\mathbf {q} \right)\delta \mathbf {u} ~dx=0~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/285e64762e1a4ff1eac12358c7f21d6641b6c3dc)
Next, we integrate the first term of the equation by parts (to get rid
of the higher order derivatives of
) and get
![{\displaystyle \int _{0}^{L}AE{\cfrac {d\mathbf {u} }{dx}}{\cfrac {d(\delta \mathbf {u} )}{dx}}~dx=\int _{0}^{L}\mathbf {q} \delta \mathbf {u} ~dx+\left.AE{\cfrac {d\mathbf {u} }{dx}}\delta \mathbf {u} \right|_{0}^{L}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/02739b22395f48f1a5c8110d5b245b2ad5de31da)
Recall that
and
. Therefore, we have
![{\displaystyle \int _{0}^{L}AE{\cfrac {d\mathbf {u} }{dx}}{\cfrac {d(\delta \mathbf {u} )}{dx}}~dx=\int _{0}^{L}\mathbf {q} \delta \mathbf {u} ~dx+\left.\mathbf {R} ~\delta \mathbf {u} \right|_{x=L}~.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/dcfbf08ef10ab4d2dfeec66c0a2c5d81500efe39)
This is the same as the weak form derived from the principle of virtual work.