Nonlinear finite elements/Calculus of variations

From testwiki
Jump to navigation Jump to search

Ideas from the calculus of variations are commonly found in papers dealing with the finite element method. This handout discusses some of the basic notations and concepts of variational calculus. Most of the examples are from Variational Methods in Mechanics by T. Mura and T. Koya, Oxford University Press, 1992.

The calculus of variations is a sort of generalization of the calculus that you all know. The goal of variational calculus is to find the curve or surface that minimizes a given function. This function is usually a function of other functions and is also called a functional.

Maxima and minima of functions

The calculus of variations extends the ideas of maxima and minima of functions to functionals.

For a function of one variable f(x), the minimum occurs at some point xmin. For a functional, instead of a point minimum, we think in terms of a function that minimizes the functional. Thus, for a functional I[f(x)] we can have a minimizing function fmin(x).

The problem of finding extrema (minima and maxima) or points of inflection (saddle points) can either be constrained or unconstrained.

The unconstrained problem.

Suppose f(x) is a function of one variable. We want to find the maxima, minima, and points of inflection for this function. No additional constraints are imposed on the function. Then, from elementary calculus, the function f(x) has

  • a minimum if dfdx=0 and d2fdx2>0.
  • a maximum if dfdx=0 and d2fdx2<0.
  • a point of inflection if d2fdx2=0.

Any point where the condition dfdx=0 is satisfied is called a stationary point and we say that the function is stationary at that point.

A similar concept is used when the function is of the form f(x1,x2,x3,t). Then, the function f is stationary if

df=fx1dx1+fx2dx2+fx3dx3+ftdt=0.

Since x1, x2, x3, and t are independent variables, we can write the stationarity condition as

fx1=0;fx2=0;fx3=0;ft=0.

The constrained problem - Lagrange multipliers.

Suppose we have a function f(x1,x2,x3). We want to find the minimum (or maximum) of the function f with the added constraint that

(1)g(x1,x2,x3)=0.

The added constraint is equivalent to saying that the variables x1, x2, and x3 are not independent and we can write one of the variables in terms of the other two.

The stationarity condition for f is

(2)df=fx1dx1+fx2dx2+fx3dx3=0.

Since the variables x1, x2, and x3 are not independent, the coefficients of dx1, dx2, and dx3 are not zero.

At this stage we could express x3 in terms of x1 and x2 using the constraint equation (1), form another stationarity condition involving only x1 and x2, and set the coefficients of dx1 and dx2 to zero. However, it is usually impossible to solve equation (1) analytically for x3. Hence, we use a more convenient approach called the Lagrange multiplier method.

Lagrange multiplier method.

From equation (1) we have

dg=gx1dx1+gx2dx2+gx3dx3=0.

We introduce a parameter λ called the Lagrange multiplier and using equation (2) we get

df+λdg=0.

Then we have,

(fx1+λgx1)dx1+(fx2+λgx2)dx2+(fx3+λgx3)dx3=0.

We choose the parameter λ such that

(3)fx3+λgx3=0.

Then, because x1 and x2 are independent, we must have

(4)fx1+λgx1=0andfx2+λgx2=0

We can now use equations (1), (3), and (4) to solve for the extremum point and the Lagrange multiplier. The constraint is satisfied in the process.

Notice that equations (1), (3) and (4) can also be written as

hλ=0;hx1=0;hx2=0;hx3=0

where

h(x1,x2,x3,λ):=f(x1,x2,x3)+λg(x1,x2,x3).

Minima of functionals

Consider the functional

(5)I[y(x)]=x0x1[f(x)(dy(x)dx)2+g(x)y(x)2+2h(x)y(x)]dx.

We wish to minimize the functional I with the constraints (prescribed boundary conditions)

y(x0)=y0,y(x1)=y1.

Let the function y=y(x) minimize I. Let us also choose a trial function (that is not quite equal to the solution y(x))

(6)y=y(x)+λv(x)

where λ is a parameter, and v(x) is an arbitrary continuous function that has the property that

v(x0)=0andv(x1)=0.

(See Figure 1 for a geometric interpretation.)

File:TrialFunction.png
Figure 1. Minimizing function y(x) and trial functions.

Plug (6) into (5) to get

(8)I[y(x)+λv(x)]=x0x1[f(x)(dy(x)dx+λdvdx)2+g(x)[y(x)+λv(x)]2+2h(x)[y(x)+λv(x)]]dx.

You can show that equation (8) can be written as (show this)

I[y(x)+λv(x)]=I[y(x)]+δI+δ2Ior,I[y(x)+λv(x)]I[y(x)]=δI+δ2I

where

(9)δI=2λx0x1[f(x)(dy(x)dx)(dv(x)dx)+g(x)y(x)v(x)+h(x)v(x)]dx

and

(10)δ2I=λ2x0x1[f(x)(dv(x)dx)2+g(x)[v(x)]2]dx.

The quantity δI is called the first variation of I and the quantity δ2I is called the second variation of I. Notice that δI consists only of terms containing λ while δ2I consists only of terms containing λ2.

The necessary condition for I[y(x)] to be a minimum is

(11)δI=0.
Remark.

The first variation of the functional I[y] in the direction v is defined as

δI(y;v)=limϵ0I[y+ϵv]I[y]ϵddϵI[y+ϵv]|ϵ=0.

To find which function makes δI zero, we first integrate the first term of equation (9) by parts. We have,

x0x1(fdydx)dvdxdx=[(fdydx)v]x0x1x0x1ddx(fdydx)vdx.

Since v=0 at x0 and x1, we have

(12)x0x1(fdydx)dvdxdx=x0x1ddx(fdydx)vdx

Plugging equation (12) into (9) and applying the minimizing condition (11), we get

0=x0x1[ddx(f(x)dy(x)dx)v(x)+g(x)y(x)v(x)+h(x)v(x)]dx

or,

(13)x0x1[ddx(f(x)dy(x)dx)+g(x)y(x)+h(x)]v(x)dx=0.

The fundamental lemma of variational calculus states that if u(x) is a piecewise continuous function of x and v(x) is a continuous function that vanishes on the boundary, then

(14)x0x1u(x)v(x)dx=0u(x)=0.

Applying (14) to (13) we get

(15)ddx(f(x)dy(x)dx)+g(x)y(x)+h(x)=0.

Equation (15) is called the Euler equation of the functional I. The solution of the Euler equation is the minimizing function that we seek.

Of course, we cannot be sure that the solution represents and minimum unless we check the second variation δ2I. From equation (10) we can see that δ2I>0 if f(x)>0 and g(x)>0 and in that case the problem is guaranteed to be a minimization problem.

We often define

δy:=λv(x)andδy':=λdv(x)dx

where δy is called a variation of y(x).

In this notation, equation (9) can be written as

δI=2x0x1[f(dydx)δy'+gyδy+hδy]dx

You see this notation in the principle of virtual work in the mechanics of materials.

An example

Consider the string of length l under a tension T (see Figure 2). When a vertical load f is applied, the string deforms by an amount u(x) in the y-direction. The deformed length of an element dx of the string is

ds=1+(dudx)2dx.

If the deformation is small, we can expand the relation into a Taylor series and ignore the higher order terms to get

ds=[1+12(dudx)2]dx.
File:StringBend.png
Figure 2. An elastic string under a transverse load.

The force T in the string moves a distance

dsdx=12(dudx)2dx.

Therefore, the work done by the force T (per unit original length of the string) (the stored elastic energy) is

12T(dudx)2.

The work done by the forces f (per unit original length of string) is

fu

We want to minimize the total energy. Therefore, the functional to be minimized is

I[y]=T20l(dudx)2dx0lfudx.

The Euler equation is

Td2udx2+f=0.

The solution is

u=f2T(lx)x.

Template:Subpage navbar