Sunteți pe pagina 1din 9

EM 525 Finite Element Analysis Hong

Lecture 2 Strong form and weak form (1D)


Readings
 The chapter/section regarding “weak form” in any textbook. For example, Sections
3.1.1, 3.2-3.5, 3.9 in Fish & Belytschko, Sections 3.1, 3.2, 3.7-3.9 in Zienkiewichz,
Sections 1.1-1.4 in Hughes, or Sections 6.1-6.4 in Khennane.
Equivalent weak form of a second order ordinary differential equation
Now you have all had some experience using the finite element method (FEM) through
commercial software. It is a good time to see the magic behind. In this lecture, you will see the form of
equations FEM is actually solving. This statement is vague as you probably have never thought about or
heard of the “form” of an equation. We will first illustrate this concept through an ordinary differential
equation (ODE)

𝑑2 𝑦
−𝑏 =0
𝑑𝑥 2
(1)

on the interval 𝑥 ∈ (0, 𝑙), where 𝑏 is a known constant. (Let’s leave boundary/initial conditions aside
and consider the equation first.) The equation is so simple that you don’t need to take any differential
equation course to know how to solve it analytically. The purpose is just to illustrate how FEM deals
with equations. Instead of directly working on this differential equation, let us consider the integral
𝑙
𝑑2 𝑦
∫ ( − 𝑏) 𝑤(𝑥)𝑑𝑥 = 0, ∀𝑤(𝑥)
0 𝑑𝑥 2
(2)
It could be shown that Eqs. (1) and (2) are mathematically equivalent. The proof from the differential
form to the integral form is straight forward. For the proof of the backward equivalency, one needs to
𝑑2 𝑦
construct a function 𝑤(𝑥) and argue that if 𝑑𝑥 2 − 𝑏 ≠ 0, then the integral would not vanish. Since 𝑤(𝑥)
𝑑2 𝑦
is arbitrary, such a function is easy to find. For example, you may take 𝑤(𝑥) = 𝑑𝑥 2 − 𝑏.

The integral form (2) is not yet the “weak form” used by the FEM. We need to employ a
mathematical transformation to make it “weaker”. Recall what you learned in calculus, the “product
rule” of derivatives

𝑑 𝑑𝑣 𝑑𝑤
[𝑣(𝑥)𝑤(𝑥)] = 𝑤+𝑣
𝑑𝑥 𝑑𝑥 𝑑𝑥
𝑑𝑦
Now use it the other way around by taking 𝑣 = 𝑑𝑥, and shift the second term on the right hand side:

𝑑2 𝑦 𝑑 𝑑𝑦 𝑑𝑦 𝑑𝑤
2
𝑤= [ 𝑤(𝑥)] −
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥

1/12/2018 1 Lecture 2
EM 525 Finite Element Analysis Hong

The integral form could thus be written as


𝑙 𝑙
𝑑 𝑑𝑦 𝑑𝑦 𝑑𝑤
∫ [ 𝑤(𝑥)] 𝑑𝑥 − ∫ ( + 𝑏𝑤) 𝑑𝑥 = 0
0 𝑑𝑥 𝑑𝑥 0 𝑑𝑥 𝑑𝑥

The first term is the integral of a full differential, and could be carried out directly
𝑙
′ (𝑙)𝑤(𝑙) ′ (0)𝑤(0)
𝑑𝑦 𝑑𝑤
𝑦 −𝑦 −∫ ( + 𝑏𝑤) 𝑑𝑥 = 0
0 𝑑𝑥 𝑑𝑥

This procedure is sometimes called “integration by parts”, and the resulting integral form
𝑙
𝑑𝑦 𝑑𝑤
−∫ ( + 𝑏𝑤) 𝑑𝑥 = 0, ∀𝑤(𝑥)
0 𝑑𝑥 𝑑𝑥
(3)

is called the weak form of the ODE (1), which in turn is called the strong form. The arbitrary function
𝑤(𝑥) also has a name – the test function – because it is there just to make sure the equation holds, and
it never needs to be solved.

As you have noticed, it differs from the previous integral form (2) by two terms, 𝑦 ′ (𝑙)𝑤(𝑙) and
′ (0)𝑤(0).
𝑦 That is to say, requiring the weak form (3) to vanish for arbitrary 𝑤(𝑥) is equivalent to
𝑙
𝑑2 𝑦
∫ ( − 𝑏) 𝑤(𝑥)𝑑𝑥 − 𝑦 ′ (𝑙)𝑤(𝑙) + 𝑦 ′ (0)𝑤(0) = 0, ∀𝑤(𝑥)
0 𝑑𝑥 2

It is easy to argue that the arbitrariness of function 𝑤(𝑥) requires all three terms to vanish individually

𝑑2 𝑦
−𝑏 =0
𝑑𝑥 2
𝑦 ′ (0) = 0
{ 𝑦 ′ (𝑙) = 0

Surprisingly, the weak form Eq. (3) not only gives the strong form, Eq. (1), but also provides two
boundary conditions as byproducts! These boundary conditions are called the natural boundary
conditions, as they come naturally when converting between the weak form and the strong form.

Note: Even though you don’t have to explicitly specify boundary conditions on every boundary
when you are using an FEM program, it never means that there is no boundary condition!
Because FEM uses the weak form, if no other boundary condition is specified, the natural
boundary conditions are implied.

Now let us turn to other types of boundary conditions. We will first look at something similar to
the natural boundary condition, such as 𝑦 ′ (0) = 𝑓0. Such boundary conditions can be directly
incorporated into a weak form. It turns out that all we have to do is to modify the weak form (3) into

1/12/2018 2 Lecture 2
EM 525 Finite Element Analysis Hong

𝑙
𝑑𝑦 𝑑𝑤
−∫ ( + 𝑏𝑤) 𝑑𝑥 − 𝑓0 𝑤(0) = 0, ∀𝑤(𝑥)
0 𝑑𝑥 𝑑𝑥
(4)
′ (0)
It is straight forward to show that this weak form gives the boundary condition 𝑦 = 𝑓0, but please
pay attention to the sign in front of the added term. If you need to add a boundary condition 𝑦 ′ (𝑙) = 𝑓𝑙
on the other end of the interval, you will need to add +𝑓𝑙 𝑤(𝑙) instead. Please work this out by yourself
as a practice of the integration by parts. Other types of boundary conditions, may not be directly
written in the weak form, and should be handled separately. For example, the Dirichlet boundary
condition (or given value boundary condition) 𝑦(0) = 𝑦0 , is often enforced directly on the unknown
function, and is thus also called forced boundary condition. The test function also needs to be modified
accordingly, say 𝑤(0) = 0, to be consistent. We will discuss the details later in this course.

Continuity of solutions

We have shown the equivalency between the weak form (3) or (4) and the strong form (1) and
related boundary conditions. If you are a careful mathematician, you may find that they are not
rigorously equivalent. In the strong form, a second order derivative is taken on the unknown function
𝑦(𝑥) which means it must first have second order derivative. A piecewise linear function, such as the
one shown on Fig. 1a, would never satisfy Eq. (1), as the second order derivative diverges (or does not
exist) on the kinks. The solution to a second order differential equation must have second order
derivatives, such as the one shown in Fig. 1b. These functions (of which the first-order derivative is
continuous) are said to be C1 continuous in calculus.

a b

Fig. 1. Examples of (a) C0 continuous and (b) C1 continuous functions.

The weak form (3) or (4), on the other hand, has a less stringent requirement. Since it only has
the first order derivative, the solution 𝑦(𝑥) needs not to have a second order derivative. In other words,
the solution only needs to be C0 continuous. Some function like the one shown in Fig. 1a could also be
the solution to a weak-form equation.

For an “exact solution”, the relaxed requirement in continuity makes no contribution to the
original problem. Because of the mathematical equivalence, if a function does not satisfy the original
equation, it can’t be the exact solution of the weak-form equation either. However, the weak form is

1/12/2018 3 Lecture 2
EM 525 Finite Element Analysis Hong

extremely useful in obtaining approximate solutions. Although some C0 continuous function like the one
in Fig. 1 can never be the exact solution of Eq. (1), it is possible to select the best from all functions like
this (best in the sense of minimum error). As a result, one has an approximate solution that does not
satisfy the equation on every point, but very close to the actual solution overall – it’s the best of its kind.
Such an idea is the essence of the FEM. (If you know a bit of the finite difference method, you may now
realize how different FEM is. In a finite difference method, one would try to get the function value and
its derivatives as accurate as possible, so that the next step would not amplify the error. Here, the
approximate solution does not even have a derivative at some points.)

Variational principles

The procedure seems quite mathematical. Neither the arbitrary test function nor the integral
has been linked to any physical quantities. We will now try to assign them physical significance through
specific examples. Consider a bar that deforms axially under distributed force 𝑓(𝑥). Let 𝑢(𝑥) be the
displacement of a point 𝑥 on the bar. The axial strain is directly the derivative of the displacement

𝑑𝑢
𝜖(𝑥) =
𝑑𝑥

Consequently, the axial stress is 𝜎 = 𝐸𝜖 with 𝐸 being the Young’s modulus. The axial force is then

𝑑𝑢
𝑃(𝑥) = 𝐸𝐴𝜖(𝑥) = 𝐸𝐴
𝑑𝑥

where 𝐴 is the cross-sectional area. The axial force balance requires that

𝑑𝑃
+𝑓 =0
𝑑𝑥

For the simple case when the bar is uniform, 𝐸𝐴 = 𝑐𝑜𝑛𝑠𝑡., the governing differential equation reads

𝑑2 𝑢
𝐸𝐴 +𝑓 = 0
𝑑𝑥 2

This is identical to the differential equation in strong form (1) after the change of variables (𝑏 =
− 𝑓⁄𝐸𝐴). Now let us see what the weak form actually means. You might still remember that the elastic
1 1
energy store per unit volume of linear elastic material is 2 𝜎𝜖 = 2 𝐸𝜖 2. The energy stored per unit length
1
of the bar is then 2 𝐸𝐴𝜖 2 . On the other hand, the potential energy of a small section of distributed force
𝑓𝑑𝑥 is – 𝑓𝑢𝑑𝑥 (the potential energy decreases when a force does work). Therefore, the total potential
energy of the system, including the bar and the distributed force reads:

𝑙
𝐸𝐴 𝑑𝑢 2
Π[𝑢(𝑥)] = ∫ [ ( ) − 𝑓𝑢] 𝑑𝑥
0 2 𝑑𝑥
(5)

You might have noticed that Π is already quite close to the weak form (3). Yes, we are one step away.

1/12/2018 4 Lecture 2
EM 525 Finite Element Analysis Hong

Elementary physics tells us that the total potential energy of a system is minimized at
equilibrium. From calculus, you learned that a function reaches minimum (or maximum or stationary
point) when all (partial) derivatives vanish. Here, the story is a bit different, as Π is not a function of
single or multiple variables anymore. Instead, the only thing varies in Eq. (5) is the unknown function (or
field) 𝑢(𝑥). You can think of Π as a function of infinite number of variables (with the value of 𝑢 on any
point). In mathematics, such a “function of function” is called a functional. The differential of a
functional with respect to the unknown function(s) is called variation, denoted with 𝛿 (in place of d).
While there is a branch in mathematics which deals with the calculus of functionals, here we will just
illustrate the basics. The basic operation of functional variation is very similar to differentials. Because
the variation is taken with respect to the unknown function 𝑢, rather than the spatial coordinate 𝑥,
variation can enter differentials or integrals freely. For example, the variation of the functional Π[𝑢(𝑥)]
given by Eq. (5) can be carried out as

𝑙
𝐸𝐴 𝑑𝑢 2 𝑙
𝐸𝐴 𝑑𝑢 2 𝑙
𝑑𝑢 𝑑𝑢
𝛿Π = 𝛿 ∫ [ ( ) − 𝑓𝑢] 𝑑𝑥 = ∫ 𝛿 [ ( ) − 𝑓𝑢] 𝑑𝑥 = ∫ [𝐸𝐴 𝛿 ( ) − 𝑓𝛿𝑢] 𝑑𝑥
0 2 𝑑𝑥 0 2 𝑑𝑥 0 𝑑𝑥 𝑑𝑥
𝑙
𝑑𝑢 𝑑𝛿𝑢
= ∫ [𝐸𝐴 − 𝑓𝛿𝑢] 𝑑𝑥
0 𝑑𝑥 𝑑𝑥

The necessary condition for Π to minimize is to have the variation vanish for arbitrary change in the
unknown function 𝛿𝑢:
𝑙
𝑑𝑢 𝑑𝛿𝑢
∫ [𝐸𝐴 − 𝑓𝛿𝑢] 𝑑𝑥 = 0 ∀𝛿𝑢
0 𝑑𝑥 𝑑𝑥
(6)

Equation (6) is similar to the minimization problem of a regular function (by enforcing the full
differential to be 0). If you don’t feel like the variation 𝛿𝑢 inside a derivative 𝑑⁄𝑑𝑥 operator, you can
use the same procedure we used to derive the weak form from the strong form (integration by parts) to
shift the differential away, and reduce Eq. (6) to some form closer to partial differentials. But the idea is
the same.

The variational form Eq. (6) is identical to the weak form (3) after change of parameter names.
The construction of a functional Π, together with the procedure of getting the stationary point by taking
𝛿Π = 0, is called a variational principle. Mathematically, it converts a set of differential equations to an
equivalent stationary-point problem. Establishing the variational principle is one way (but not the only
way) of obtaining a weak form of differential equations. The natural boundary conditions come
naturally through the weak form/variational principle, and the argument on forced boundary conditions
is also easier to understand. For example, if 𝑢(0) = 0 (i.e. the bar is fixed at 𝑥 = 0), the value of 𝑢 can
no longer be varied at this point, and the variation at the same point 𝛿𝑢(0) = 0 instead of being
arbitrary.

While for many real physical problems, especially equilibrium problems, the corresponding
variational principle can be directly derived from physical principles (e.g. energy minimization), no all

1/12/2018 5 Lecture 2
EM 525 Finite Element Analysis Hong

problems have variational principles, and not all variational principles have physical meanings. One
common mistake one tend to make is to “proof” the differential equations by directly using the
variational principle. For an arbitrary variational principle, this is hardly a proof, as the variational
principle may be physically wrong. It could serve as a proof (or more of a derivation) only when the
variational principle is physically meaningful, such as the example we have above.

Natural variational principles for linear, self-adjoint equations

Even though finding the weak form or variational principle of an arbitrary equation is difficult
and sometimes impossible, it is relatively simple and almost a routine procedure for getting that of a
linear, self-adjoint equation (or equation system). While every one of you must know what a linear
equation is, the self-adjointness of an equation needs to be defined. The name is from self-adjoint
operators. A (differential) operator ℒ is said to be self-adjoint over domain Ω if

∫ 𝑤 ∙ ℒ𝑢𝑑Ω = ∫ 𝑢 ∙ ℒ𝑤𝑑Ω + 𝑏. 𝑡.
Ω Ω

The integrand on the left-hand side means “𝑤 times the result of ℒ operated on 𝑢”, and 𝑏. 𝑡. are some
terms evaluated (or integrated) over the boundary. As a simple example, the second order ordinary
differential is a self-adjoint operator, as

𝑏
𝑑2 𝑢 𝑏
𝑑 𝑑𝑢 𝑑𝑤 𝑑𝑢 𝑏
𝑑𝑤 𝑑𝑢 𝑑𝑢 𝑏
∫ 𝑤 2 𝑑𝑥 = ∫ [ (𝑤 ) − ] 𝑑𝑥 = − ∫ 𝑑𝑥 + 𝑤 |
𝑎 𝑑𝑥 𝑎 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑎 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑎
𝑏
𝑑 𝑑𝑤 𝑑2 𝑤 𝑑𝑢 𝑏 𝑏
𝑑2 𝑤 𝑑𝑢 𝑑𝑤 𝑏
= −∫ [ ( 𝑢) − 𝑢] 𝑑𝑥 + (𝑤 ) = ∫ 𝑢 2 𝑑𝑥 + (𝑤 −𝑢 )
𝑎 𝑑𝑥 𝑑𝑥 𝑑𝑥 2 𝑑𝑥 𝑎 𝑎 𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑎

The scaling operator 𝛼 ∙ and identity operator 1 ∙ (𝛼 times ? or 1 times ?) are obvious self-adjoint, albeit
not differential. A linear self-adjoint equation takes the form

ℒ𝑢 + 𝑏 = 0

with ℒ being a linear self-adjoint operator. It is easy to show that for any linear self-adjoint equation,
there exists a natural variational principle

1
Π[𝑢] = ∫ ( 𝑢 ∙ ℒ𝑢 + 𝑢 ∙ 𝑏) 𝑑Ω + 𝑏. 𝑡.
Ω 2

And the strong form equation is equivalent to

𝛿Π = ∫ (𝛿𝑢 ∙ ℒ𝑢 + 𝛿𝑢 ∙ 𝑏)𝑑Ω + 𝑏. 𝑡. = 0
Ω

This mathematical theorem does nothing more than providing a general procedure of obtaining the
weak forms for differential equations if they are self-adjoint.

1/12/2018 6 Lecture 2
EM 525 Finite Element Analysis Hong

In general, all even-order differential operators are self-adjoint. Odd-order operators may not
be self-adjoint, e.g. the first-order derivative 𝑑⁄𝑑𝑥:
𝑏 𝑏
𝑑𝑢 𝑑𝑤
∫ 𝑤 𝑑𝑥 = − ∫ 𝑢 𝑑𝑥 + 𝑏. 𝑡.
𝑎 𝑑𝑥 𝑎 𝑑𝑥

(differs by a sign). But it doesn’t mean an odd-order differential equation does not have weak form or
can’t be solved by using FEM. In fact,
𝑏
𝑑𝑢
∫ 𝑤( + 𝑏) 𝑑𝑥 = 0 ∀𝑤(𝑥)
𝑎 𝑑𝑥

is already a valid weak form for the first-order ODE: 𝑑𝑢⁄𝑑𝑥 + 𝑏 = 0, without the need of performing
integration by parts.

Galerkin method

Before introducing how finite element solves the weak-form differential equations, let us study
another approximate method which uses a very similar idea. Consider the 2nd order ODE

𝑑2 𝑦 𝜋
+ sin 𝑥 = 0, 𝑥 ∈ (0, )
𝑑𝑥 2 2

with boundary conditions

𝜋
𝑦(0) = 0 and 𝑦 ′ ( 2 ) = 0

Since this is a linear self-adjoint equation, the variational principle (or weak form) is straight forward to
find
𝜋
2 𝑑𝛿𝑦 𝑑𝑦
∫ (− + 𝛿𝑦 sin 𝑥) 𝑑𝑥 = 0 ∀𝛿𝑦
0 𝑑𝑥 𝑑𝑥

𝜋
The boundary condition 𝑦 ′ ( 2 ) = 0 is a natural boundary condition, while 𝑦(0) = 0 is a forced one.

We can expand the solution into a Taylor series

𝑦(𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + ⋯

The variation of 𝑦 (or test function) can also be expanded into a Taylor series (note that 𝛿 is operated on
the unknown function, or the unknown coefficients, not 𝑥):

𝛿𝑦(𝑥) = 𝛿𝑎0 + 𝛿𝑎1 𝑥 + 𝛿𝑎2 𝑥 2 + ⋯

As 𝑦(0) = 0 is a forced boundary condition, we must enforce it explicitly, 𝑎0 = 0 and therefore 𝛿𝑎0 = 0

Let us first take only the linear terms and substitute them into the weak form

1/12/2018 7 Lecture 2
EM 525 Finite Element Analysis Hong

𝜋
2
∫ (−𝛿𝑎1 𝑎1 + 𝛿𝑎1 𝑥 sin 𝑥)𝑑𝑥 = 0
0

𝜋
2
∫ (−𝑎1 + 𝑥 sin 𝑥)𝑑𝑥 𝛿𝑎1 = 0
0

The equality holds for arbitrary 𝛿𝑦(𝑥), now for arbitrary 𝛿𝑎1 , therefore
𝜋
2
∫ (−𝑎1 + 𝑥 sin 𝑥)𝑑𝑥 = 0
0

Carrying out the integral and solve for 𝑎1 from the resulting linear equation, we arrive at

𝑎1 = 2/𝜋
The corresponding function 𝑦(𝑥) = 2𝑥/𝜋 is thus an approximate solution to the weak form as well as
the original differential equation.

Taking two terms 𝑦(𝑥) = 𝑎1 𝑥 + 𝑎2 𝑥 2 and following the same procedure, we have
𝜋
2
∫ [−(𝛿𝑎1 + 2𝑥𝛿𝑎2 )(𝑎1 + 2𝑎2 𝑥) + (𝑥𝛿𝑎1 + 𝑥 2 𝛿𝑎2 ) sin 𝑥]𝑑𝑥 = 0
0

𝜋 𝜋
2 2
∫ (−𝑎1 − 2𝑎2 𝑥 + 𝑥 sin 𝑥)𝑑𝑥 𝛿𝑎1 + ∫ (−2𝑎1 𝑥 − 4𝑎2 𝑥 2 + 𝑥 2 sin 𝑥)𝑑𝑥 𝛿𝑎2 = 0
0 0

Due to the arbitrariness of 𝛿𝑎1 and 𝛿𝑎2 , both integrals must vanish, resulting in a set of simultaneous
equations for 𝑎1 and 𝑎2 , in a matrix form
1
2 y=sin x
𝜋 𝜋 y=x
0.8
[2 4 [𝑎1 ] = [ 1 ] y=1.16x-0.332x 2
𝜋2 𝜋 3 𝑎2 𝜋−2 0.6
[4 6]
y

0.4
The solution to the linear algebraic equations, 𝑎1 = 1.16, 𝑎2 =
−0.332, constitute another approximate solution to the 0.2

original problem 0
0 0.2 0.4 0.6 0.8 1
𝑦(𝑥) ≈ 1.16𝑥 − 0.332𝑥 2 x

The two approximate solutions are plotted against the exact solution 𝑦(𝑥) = sin 𝑥. For this simple
problem, the two-term approximation is already quite close to the exact solution. You may imagine that
including more terms in the truncated series would bring higher accuracy. Such a method of using
truncated series (or combination of known functions) to solve differential equations via weak forms is
known as the Galerkin method, after Boris Grigoryevich Galerkin. The idea is simple: while the
variational principle seeks a solution to minimize the functional Π, an approximate solution could

1/12/2018 8 Lecture 2
EM 525 Finite Element Analysis Hong

possibly be found if we only look into a smaller pool of candidates. The same idea also constitutes the
fundamentals of FEM.

1/12/2018 9 Lecture 2

S-ar putea să vă placă și