Introduction to Variational CalculusandVariational Formulations
in FEMJayadeep U. B.M.E.D., NIT CalicutRef.: Forray, Marvin J.,
Variational Calculus in Science and Engineering, McGraw Hill
International Edn.Reddy, J. N., An Introduction to the Finite
Element Method, McGraw Hill International Edition.Zienkiewicz, O.
C., and Morgan, K., Finite Elements and Approximation, John Wiley
& Sons.
Department of Mechanical Engineering, National Institute of
Technology Calicut
IntroductionConsider the problem of the bending of a cantilever
under loads as in figure below:
The Fundamental Idea:The displacement function w(x) at
equilibrium will be the one, corresponding to which, the internal
forces, generated due to resistance of beam to deform, and the
external forces are equal.
From an energy perspective, the equilibrium of the system
corresponds to minimum potential energy.
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Introduction contd. Assuming that the potential energy (P.E.) of
the initial system to be zero, P.E. of the final system has two
parts: Strain energy stored in the cantilever beam Reduction in
P.E. of the force
If the stiffness of the beam and the force are constant and
known, the P.E. becomes a function of only the displacement, which
by itself is a function.
For example, in this problem of the cantilever, the admissible
displacements, satisfying the specified B.C. are the functions
with:
However, the P.E. corresponding to these different functions
will be different. The displacement of the physical system, will
correspond to minimum P.E.
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Introduction contd. Hence, the analysis problem is solved, if we
can find the displacement function, which minimizes the P.E. of the
system, from a space of admissible functions.
To be more precise, P.E. is a scalar valued function, in the
form of an integral over the complete domain, of the displacement
function. Such a quantity is called as a Functional. Variational
Calculus is the calculus of Functionals (mainly concerned with
extremization problems).
General form of a functional, with only one independent variable
, one dependent variable and its first order derivative w.r.t. the
independent variable:
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Minimization & MaximizationBefore delving into the details
of variational calculus, let us have a brief review of the
minimization/maximization problems in ordinary calculus (extremum
value of a function).
A general problem:
Necessary and Sufficient conditions for a minimum at x = x0:
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Minimization & Maximization contd.We know that at the
minimum value of a function:
Sufficiency condition:
The Basics:Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Minimization & Maximization contd.In case of a problem with
multiple independent variables:
Necessary conditions for a minimum at x = c, y = d:
Sufficiency condition is more complicated. The Hessian
Matrix:
These rules can be generalized for any number of independent
variables.
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Minimization & Maximization contd.A symmetric matrix [K] is
said to be positive definite, if:
An example is the stiffness matrix in (linear elastic)
structural systems, where the quadratic form above is twice the
strain energy, which is positive for any displacement vector and
zero only if the displacement is identically zero. (It is assumed
that the system is properly constrained; otherwise, the stiffness
matrix is positive semi-definite).
All the Eigen values of a positive definite matrix are positive
(think of buckling loads and natural frequencies).
Positive Definiteness:A symmetric matrix [A] is negative
definite, if [A] is positive definite. Sufficiency condition for
maximum is that the Hessian Matrix should be negative definite.
Lecture - 01
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational CalculusThe word Brachistochrone means
shortest-time. The problem was formulated by John Bernoulli in
1696.
The problem is to find the path corresponding to shortest-time
for a particle sliding from point (x0, y0) to (x1, y1) in the
vertical plane, under the action of gravity.
The Beginnings Brachistochrone Problem:Ans.: Cycloidal Curve
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
Brachistochrone Problem contd. The time take for the travel, is
a scalar-valued function of the path (a function) followed a
Functional.
The time taken for any small segment (length = ds) is depends on
the instantaneous velocity (v).
Assuming the path to be frictionless & zero initial
velocity, the instantaneous velocity at any point depends on the
vertical distance (of fall) from that point to starting point.
If the path is expressed by the function y y(x):
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
Brachistochrone Problem contd. To solve the problem, we need to
find the function y(x), which minimizes the functional, which is
the total time taken by the particle to travel from (x0, y0) to
(x1, y1).
Similar to the ordinary calculus, the methods to solve this
problem is based on finding the value of functional such that for
small changes in the path, the functional is not affected the
functional becomes Stationary.
The major difference is that in finding the extremum of a
function, we find the point at which it happens, while in checking
the stationary character, the requirement is to find the
corresponding function.
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
Other Classical ProblemsShortest-Length Problem: Perhaps the
most basic problem in variational calculus is to find the curve
with minimum length, connecting two points, say (x0, y0) & (x1,
y1).
The answer is obviously a straight line.
Minimum Surface of Revolution: The aim is to find the curve
connecting two points, which when rotated about the x-axis, gives
minimum surface area.
The answer is a Catenary Curve.
Isoperimetric Problem: In this case, the objective is to find
the curve with a specified length, which encloses the maximum area.
We have two functionals here the length of curve (perimeter) and
the area enclosed. The objective is to maximize the area, while the
perimeter acts like a constraint.
The answer is a Circle.
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Basic ProblemWe have to find the stationary condition of a
general functional, depending on the independent variable (x),
dependent variable (y) and its first order derivative (y), with
prescribed end values y0 & y1 the simplest case.
Let u u(x) be the function, which minimizes the functional I.
Any small change in this function, satisfying the B.C. called a
Weak Variation can be written as:
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Basic Problem contd. Substituting into the expression for
the functional:
Note that, in this equation, I() is not a functional, it is
function of .
Hence we can use the usual methods of calculus to find the
extremum.
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Basic Problem contd. Since 0, we can simplify this equation
as:
The second term inside the integral can be evaluated using
integration by parts:
Substituting:
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Basic Problem contd. The Fundamental Lemma of Variational
Calculus:Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Basic Problem contd. Using this fundamental lemma:
This equation is called the Euler Equation or Euler-Lagrange
Equation in Variational Calculus.
For the stationarity of a functional, Euler equation must be
satisfied, along with the B.C.:
Note that these conditions are only the necessary conditions.
The sufficient condition for a minimum in general case is difficult
to obtain. One option is to compute value of the functional for
solutions of Euler equation and few other functions and decide
whether it is minimum/maximum.
Another significant point is: there exists an Euler equation for
any functional, while it is not true the other way.
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
Example Shortest-Length ProblemThe functional corresponding to
the length of curve connecting two points is obtained as:
Corresponding Euler equation (assuming u(x) minimizes I) is:
Therefore, we get:
Lecture - 02
Department of Mechanical Engineering, National Institute of
Technology Calicut
Euler Equations for General CasesMore than one Dependent
Variable:
Corresponding Euler equations:
Integrals with Higher Derivatives:
Corresponding Euler equation:
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Euler Equations for General Cases contd.More than one
Independent Variable:
Corresponding Euler equations:
In these cases, the boundary conditions will have to be suitably
modified.
In the last case, Greens Lemma will have to be used instead of
the integration by parts.
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Natural Boundary ConditionsLet us consider the basic problem
again, but with the difference in B.C. as shown below:
considering a Weak Variation from the function minimizing the
functional:
Substituting into the expression for the functional:
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Natural Boundary Condition contd. Differentiating I w.r.t. :
The second term inside the integral can be evaluated using
integration by parts:
Substituting:
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Natural Boundary Condition contd. Since (x) is an arbitrary
function, these two terms should separately be equal to zero.
Therefore we have the conditions:
The second requirement above is called the natural boundary
condition (This is same as the natural B.C., we have seen in the
W.R. formulation).
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Example: Hanging RodThe objective is to formulate the
functional, derive Euler equation and natural B.C. for the 1D
problem below:
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
Hanging Rod Example contd. Euler Equation:
This is the same as the governing D.E. of the problem. Natural
B.C. at x = L:
This is same as the natural B.C. that the force acting at the
lower end of the rod is zero.
Lecture - 03
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Variational NotationConsider a general functional:
For a fixed value of x, the integrand depends on y(x) and its
derivative y(x). The change in y(x) for a fixed value of x:
It may be noted that:
In other words, the derivative of variation with respect to an
independent variable is same as variation of the derivative.
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Variational Notation contd. Ignoring the higher order terms
in , the variation in F:
The change in F, caused by the change y:
Similar to derivative, variation and integration commute. Hence,
the First Variation in the functional give:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
The Variational Notation contd. If the B.C. are specified at
both x = a and x = b, the boundary terms will be identically
zero.
Integration by parts, of the second term gives:
The integrand in the above equation is identically equal to
zero, form Eulers equation. Hence we get, another form of the
necessary condition for a functional to be stationary, which is
given by the equation:
If the boundaries are not fully constrained, we need to satisfy
the natural B.C., in addition to the above equation.
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Rayleigh-Ritz MethodLet the solution be approximated as:
If there is a functional corresponding to a problem, the
solution is the function, which makes the functional stationary. If
we have the functional:
Substituting the approximation into the functional, the
functional becomes an ordinary function of the unknown parameters
am. Hence, the necessary condition for stationarity becomes:
This is a set of M equations for determining the M unknown
parameters (Ritz Coefficients).
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Stress AnalysisHence the solution is
the displacement function, which minimizes the P.E.:
We have the potential energy of the system, as the functional
for stress analysis problems.
Strain Energy (3D):
(-ve of) Change in Potential of loads:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Stress Analysis contd.The elemental
contribution to the strain energy:
Using a finite element discretization, net P.E. can be
considered as sum of elemental contributions:
Elemental contribution to potential of loads:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Stress Analysis contd.Assembling
these elemental systems, we get the global system, given as:
Using the final step in Rayleigh-Ritz method, i.e. taking
partial derivatives w.r.t. the nodal displacements:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Heat TransferHence the solution is
the temperature function, which makes this functional stationary,
which is given by:
The functional corresponding to heat transfer problems is given
by:
Using the finite element method:
Rayleigh-Ritz method is to make:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Heat Transfer contd.Substitution
gives:
Considering the elemental contribution & the finite element
approximation over any given element:
Rewriting the functional as:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Variational Formulation in Heat Transfer contd.We get the
elemental contribution:
Equating the partial derivatives to zero, the elemental system
is obtained as:
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Assignment No. 3Exercise Problem No: 3.2, 3.5, 3.14, 6.2 &
6.3 in the book: Finite Elements and Approximation by Zienkiewicz,
O. C., and Morgan, K.
Due Date: As announced in the class.
Any suitable assumptions can be made, but clearly state the
assumptions and their justifications along with the answers.
Lecture - 04
Department of Mechanical Engineering, National Institute of
Technology Calicut
Isoperimetric Problems & Essential B.C.Problem of Dido: The
requirement is to find the closed curve of given length, with
maximum enclosed area. The answer: circle.
Another similar problem: Of all the rectangles of same
perimeter, we have to find the one with maximum area. The answer:
Square.
In both the above problems, we can express the perimeter &
enclosed area as functionals.
Hence the objective is to find the maximum or minimum of a
functional, while keeping another functional constant.
Such problems are generally called Isoperimetric Problems, even
when the functional involved is not a perimeter.
Hence, we can call even the inverse problem of Dido, i.e., to
find the curve minimizing the perimeter, for a given area as an
isoperimetric problem.
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Isoperimetric Problems & Essential B.C. contd.For a general
isoperimetric problem:
We can use the Lagrange Multiplier method for solving such
problems. We shall formulate a new problem:
The function, which makes this functional stationary will be the
answer to the initial problem.
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Isoperimetric Problems & Essential B.C. contd.Coming back to
problem of FE formulation:
Using Lagrange Multiplier method, the problem is re-formulated
as:
The Lagrange Multiplier is a function of space coordinates.
Hence we have the stationarity condition:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Isoperimetric Problems & Essential B.C. contd.The first
variation in the new functional:
Since this should be true for any arbitrary variation, all the
terms in R.H.S. above must be zero. The first term gives:
Using the Fundamental Lemma of variational calculus, the second
term gives:
And since the Lagrange Multiplier is an arbitrary parameter,
third term gives:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Isoperimetric Problems & Essential B.C. contd.This last
equation needs some explanation. For the essential B.C., the
variation:
In general:
The same result can be arrived by noting that: since r is
independent of , it should remain unaffected due to the variation
in .
We can apply the Rayleigh-Ritz method to solve this new
functional.
Generally, we will have to enforce the essential B.C. in this
manner, since the original functional could be incorporating the
effect of natural B.C.
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. using Lagrange MultipliersConsidering a stress
analysis problem, without surface & body forces, the functional
to be minimized is:
Using FE formulation, the functional (P.E.) becomes a function
of nodal displacements:
Re-writing:
Let us assume that we have to enforce the essential B.C.:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. & Lagrange Multipliers contd.Rewriting the
original functional:
To enforce the essential B.C., a new functional (or function of
nodal displacements) can be formulated:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. & Lagrange Multipliers contd.The first
equation is obtained by taking partial derivatives:
Simplifying:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. & Lagrange Multipliers contd.We can re-write
this equation as:
The last equation can be obtained by taking the partial
derivative:
Writing in a more convenient form:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. & Lagrange Multipliers contd.Combining all
the equations:
Thus we have the same system, as was obtained in the discrete
system analysis.
All the arguments, for & against the use of this method, are
still valid.
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. using Penalty MethodThis method also can be
thought as a modification to the functional to be minimized.
However, there are some major differences. The modified functional
is:
Taking partial derivatives, we get the first equation:
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Essential B.C. using Penalty Method contd.This equation can be
re-written as:
The complete system is:
This is the Penalty Method, we have seen earlier!!!
Lecture - 05
Department of Mechanical Engineering, National Institute of
Technology Calicut
Concluding RemarksThe variational calculus gives an alternate
method to arrive at the finite element stiffness matrices, if a
functional corresponding to the problem could be found.
The scope of Galerkin WR method is clearly wider, but there are
some specific merits for variational formulation:
Variational formulation is physically more meaningful as
compared to WR statements (e.g.: minimization of P.E.)
Many methods used in FEA, which were known to work, were given
proper mathematical reasoning by the use of variational
calculus.
Other methods, like Least-square method, can also be used for
the finite element formulation. However, they are not widely used
like the Galerkin and Variational methods.
Lecture - 05