You are on page 1of 8

Strong, Weak and Finite Element Formulations of

1-D Scalar Problems


ME 964; Krishnan Suresh
1. From Strong to Weak
Strong statement:
d  du 
−a  = f u(0) = 0; −au,x (1) = −Q (1.1)
dx  dx 
To convert into weak form:
1. Multiply ODE by a virtual function u v (x ) satisfying u v (0) = 0 :
(−au,x ),x u v = fu v (1.2)
2. Shift Derivatives: Recall that
(−au,x u v ),x ≡ (−au,x ),x u v + (−au,x ) u,vx (1.3)
Thus, replacing LHS
(−au,x u v ),x − (−au,x )u,vx = fu v (1.4)
3. Integrate:
1 1 1

∫ (−au u ) dx − ∫ (−au )u dx = ∫ fu (x )dx


v v v
,x ,x ,x (1.5)
,x
0 0 0
i.e.,
1 1
−au,x u v  + au,x u,vxdx =
1
0 ∫ ∫ fu (x )dx
v
 (1.6)
0 0
4. Apply boundary conditions:
1 1

−Qu v (1) + ∫ au,x u,vxdx = ∫ fu (x )dx


v
(1.7)
0 0
i.e.,
1 1

∫ au u dx = ∫ fu (x )dx + Qu (1)
v v v
,x ,x (1.8)
0 0
5. Arrive at weak statement:
Find u(x ), where, u(0) = 0, s.t.
1 1

∫ au u dx = ∫ fu (x )dx + Qu (1)
v v v
,x ,x (1.9)
0 0

∀u v (x )where, u (0) = 0 v

2. Graphical Interpretation of Strong & Weak Forms


Strong form:
Strong Form
f ( x) du
u ( x) Kinetic Law : g ( x ) = −
dx
du
Kinetic Law Balance Law Fourier Law : q( x) = − a
dx
Balance Law : Heat balance in x
g ( x) q ( x)
Material Law q( x + dx) − q ( x ) = f ( x )dx
dq
= f
dx
d  du 
 −a  = f
dx  dx 

d  du 
Differential Equation :  −a  = f
dx  dx 
4

Weak Forms
u ( x) f ( x) u v ( x)

Kinetic Law

g ( x) q( x) g v ( x)
Material Law

1 1

v
Virtual Work Law: ∫ qg v dx = ∫ fu v dx
du du
Kinetic Law : g = − & gv = − 0 0

 du   du 
1 v 1
dx dx
∫0  dx   dx  ∫0 fu dx
− − = v
 a    dx
du
Fourier Law : q = − a
dx 1
 du   du 
v 1

∫0  a dx   dx  dx = ∫0 fu dx
v

3. Equivalence
Equation (1.1) is 'equivalent' to Equation (1.9).
Consider the example:
d  du 
−  = 1 u(0) = 0; u,x (1) = −1 (1.10)
dx  dx 
i.e., f = 1 & Q = −1 The exact solution is u(x ) = −x 2 / 2 as one can easily verify. Let us
find the same solution via Equation (1.9). Search for a solution of the form
u(x ) = Ax + Bx 2 (satisfies the essential boundary condition). Similarly, let
u v (x ) = Av x + B v x 2 . Substituting in Equation (1.9):
Find A & B, s.t.
1 1

∫ (A + 2Bx )(A + 2B x )dx = ∫ (A x + B x )dx − (Av + B v )


v v v v 2
(1.11)
0 0

∀Av & B v
i.e.,
1 1

∫ (A + 2B x )(A + 2Bx )dx = ∫ (A x + B x )dx − (Av + B v )


v v v v 2
(1.12)
0 0
i.e.,
1
 1  A 1
 x  1
∫ {A } { }   dx = ∫ {A }  2  dx − A { B v  }
v v v v v
B   1 2x B (1.13)
2x  B  x  1
0     0   
i.e.,
1  1   A
1  x  1

{A v
B v
}  ∫ {
2x  
}
  1 2x dx    = A
 B 
v
{ B v
}∫   dx − Av
 2
x  { }
B v  
1
(1.14)
0      0    
i.e.,
1 1 2x   A 1
 x  1
{A }   dx    = Av
{ }∫ { } 
 ∫  2  dx − A
v v v v v
B 2x 2   B B  (1.15)
4x   B  x  1
0     0   
i.e.,
1 1  A 1/ 2 1
{Av B v 
1 4 / 3
}
   = Av
 B  { }
B v   − Av
1/ 3 { }
B v  
1
(1.16)
       
Find A & B, s.t.
1 1  A −1/ 2
{Av B v 
1 4 / 3
}   = Av
 B  { }
B v  

−2 / 3
(1.17)
     
∀Av & B v

This is true if and only if:


1 1  A −1/ 2
    
1 4 / 3 B  = −2 / 3 (1.18)
     
i.e., A = 0, B = −1/ 2 , i.e., u(x ) = −x 2 / 2 . We obtain the same solution.
4. Why Weak Formulation?
Consider the example:
d  du  −1
−  = u(0) = 0; u,x (1) = 0 (1.19)
 
dx  dx  1 + x 2
It is difficult to integrate Equation (1.19) to obtain the exact solution. So, let us try an
approximate solution: u(x ) = Ax + Bx 2 where A and B are constants (satisfies the
essential boundary condition). Substituting in Equation (1.19), we have:
−1
−B = A + 2B = 0 (1.20)
1 + x2
The above suggests that B is not a constant (that's about it!!).
Now consider the weak formulation. As before, let u(x ) = Ax + Bx 2 and
u v (x ) = Av x + B v x 2 . Substituting:
Find A & B, s.t.
1 1  A 1
 −1 
{A v
B v
}   
1 4 / 3 B  = ∫ (Av x + B v x 2 )  dx
1 + x 2 
(1.21)
    0

∀Av & B v
Evaluate right hand side numerically, we have:
1 1  A  −0.3469 
    
1 4 / 3 B  = −0.21439 (1.22)
     
i.e., u(x ) ≈ −0.75x + 0.4x 2
Weak formulations naturally promote computing approximate solutions to challenging
problems, and are 'equivalent' to strong forms.

5. Finite Element Solutions of Weak Formulation


Consider the model problem:
Find u(x ), where, u(0) = 0, s.t.
1 1

∫ au u dx = ∫ fu (x )dx + Qu (1)
v v v
,x ,x (1.23)
0 0

∀u v (x )where, u v (0) = 0
Break up the domain into finite elements; thus:
x i +1 x i +1

∑∫e
au,x u,vxdx = ∑ ∫ fu vdx + Qu v (1)
e
(1.24)
xi xi

Define linear shape functions:


1 − ξ  1 + ξ 
L1(ξ ) =   ; L2 (ξ ) =  , −1 ≤ ξ ≤ 1
 2 
 (1.25)
 2 
Now, let (over a single element):
x = L1 (ξ )x i + L2 (ξ )x i +1
u = L1(ξ )ui + L2 (ξ)ui +1 (1.26)
u v = L1(ξ )uiv + L2 (ξ )uiv+1
Note that:
dx x − xi h
= L1,ξ x i + L2,ξ x i +1 = i +1 =
dξ 2 2
 ui 
u,x =
2
h
(L1,ξui + L2,ξui +1 ) =
2
h
L1,ξ { }
L2,ξ u 
 i +1 
(1.27)

L1,ξ 
u,vx =
2
h
(L1,ξuiv + L2,ξu,vi +1 ) =
2 v
h
ui { }
u,vi +1  
L2,ξ 
 
Considering integration over a single element:L
x i +1 1 L1,ξ  2  ui  h
∫ au,x u,vxdx = ∫a
2 v
h
ui { }
u,vi +1   L1,ξ L2,ξ
L2,ξ  h
{ } u  d ξ
 i +1  2
xi −1  
 1 L1,ξ L1,ξ L1,ξ L2,ξ    ui 

=
2 v
h
ui { u,vi +1 } ∫
a 
L L L L
  
d ξ ui +1 
−1  2,ξ 1,ξ 2,ξ 2,ξ 
    (1.28)
and
x i +1 1 L1  h
∫ fu vdx = ∫ { f uiv }
u,vi +1   d ξ
L2  2
xi −1  
Thus, from Equation (1.24) and Equation (1.28), we have:
 1 L1,ξ L1,ξ L1,ξ L2,ξ    ui 


2 v
e h
ui { }
u,vi +1  ∫ a 
 −1 L2,ξ L1,ξ
d ξ  
L2,ξ L2,ξ   ui +1 
 
(1.29)
1 L1  h
= ∑ ∫ f uiv { u,vi +1 }   d ξ + Qu v (1)
 
L2  2
e −1  
The element stiffness matrix and element forcing vector are :
h  L1,x L1,x L1,x L2,x  
1

Ke =  ∫ a  d ξ 
2  −1 L2,x L1,x L2,x L2,x  
 
(1.30)
1
L1  h
fe = ∫ f   d ξ
−1 
L2  2
 
After assembly, and eliminating the virtual variables, we have:
Ku = f (1.31)
where
K = ∑ Ke
e
(1.32)
f = ∑ fe + fQ
e
The essential (Dirichlet) boundary conditions are imposed via the Lagrange multiplier
method:
Ku = f (1.33)
where
K C T  u  f 
K =   , u =   , f =  
λ   (1.34)
C 0   
 
b 
  
where C & b capture the boundary condition at x = 0 . The variables λ are the Lagrange
multipliers that contain useful information about the sensitivity of the essential boundary
conditions.

6. Non-Linear Problems
Equations (1.31) and (1.33)is valid for both linear and non-linear problems. For linear
problems, the equation is solved once since the stiffness matrix and forcing vector are
independent of u . On the other hand, for non-linear problems, either the stiffness matrix or
the forcing vector or both is dependent on u . So, Equation (1.31) reads:
[K (u )]u = f (u ) (1.35)
where:
K (u ) = ∑ Ke (u )
e
(1.36)
f (u ) = ∑ fe (u ) + fQ
e
and
2  L1,ξ L1,ξ L1,ξ L2,ξ  
1

Ke (u ) =  ∫ a(u )  d ξ 
h  −1 L2,ξ L1,ξ L2,ξ L2,ξ  

(1.37)
1
L1  h
fe (u ) = ∫ f (u )   d ξ
L2  2
−1  
while Equation (1.33) reads
K (u )u = f (u ) (1.38)
i.e., a non-linear problem.
We will consider two different methods of solving Equation (1.38):
1. Picard iteration
2. Newton Raphson iteration

6.1 Picard Iteration

Theorems (for Picard's Method)


Theorem 1: (Banach's Fixed Point Theorem) If ϕ(x ) : ℜn → ℜn is a continuous function
such that:
d (ϕ(x ), ϕ(y )) < d (x , y ), ∀x , y (1.39)
where d (.,.) is an appropriate metric defined in ℜ , then the iteration:
n

x n +1 = ϕ(x n ) (1.40)
will converge (to a fixed point of ϕ(x ) ).

Theorem 2: If ϕ(x ) is a differentiable function in a range [a, b ] , then ϕ(x ) has a unique
fixed point if ϕ,x (x ) < 1 for all x ∈ [a, b ] .
Proof: Mean Value Theorem.

−1
From Equation (1.38), ϕ(u ) : K (u ) f (u )
Suppose:
−1 −1
K (u ) f (u ) − K (v ) f (u ) < u − v , ∀u, v (1.41)
 
then the Picard iteration for Equation (1.35) will proceed as follows:
1. Guess u 0 (say 0). Set n = 0.
2. Assemble K (u n ) & f (u n )
 
−1
3. Compute u = K (u n ) f (u n )
n +1

4. Stop when u n +1 − u n < ε , else go to step 2.


Of course, establishing Equation (1.41) is not easy … a case-by-case analysis at best! We will
later consider stiffening versus softening non-linear problems, and study the convergence of
Picard iteration.

6.2 Newton-Raphson Iteration


Theorem (for N-R Method): If h(x ) is a second order differentiable in [a, b ] , and if
h(x * ) = 0 where x * = [a, b ] , and h,x (x * ) = 0 then the sequence:
x n +1 = x n − h(x n )/ h,x (x n ) (1.42)
*
will converge to x
Proof: See popular text-books on numerical methods.

Derivation of the Tangent Matrix


The non-linear equation that we must solve is:
R(u ) = [K (u )]u − f = 0 (1.43)
Applying Equation (1.42):
−1
u n +1 = u n − [T (u n )] R(u n ) (1.44)
where T (u n ) is the tangent or Jacobian matrix given by:
 
∂ ∑ K im um 
∂Ri  m 
Tij = = (1.45)
∂u j ∂u j
Considering a single element (for linear shape functions m = 1, 2 ):
 2 e 
∂ ∑ K im um 
  2
∂ (K im
e
um ) 2
∂K im
e 2
e ∂um
Tije = m =1 =∑ =∑ um + ∑ K im (1.46)
∂u j m =1 ∂u j m =1 ∂u j m =1 ∂u j
Considering the definition of element stiffness matrix in Equation (1.30), we have:
∂K im
e
∂ h 1   h
1
∂u 

∂u j
=
∂u j  2 ∫ a (x , u )Li ,x Lm ,x d ξ
  2 ∫
 = a ,u (x , u )
∂u j
Li ,x Lm ,x d ξ  (1.47)
 −1 −1 
Further, since u = L1u1 + L2u2 , we have:
∂K im
e h 1 
=  ∫ a,u (x , u )Lj Li,x Lm,xd ξ  (1.48)
∂u j  2 −1 
The second term in Equation (1.46):
2
∂ um
∑K
m =1
e
im
∂u j
= K ije (1.49)

Thus, substituting Equation (1.48) and Equation (1.49) in Equation (1.46), we have:
h 1
2 
e 
T = ∑  ∫ a,u (x , u )Lj Li,x Lm ,xd ξ  um + K ije (1.50)
ij
m =1 
 2 −1 
h 1  2
e 
Tij =  ∫ a,u (x , u )Lj Li ,xd ξ  ∑ Lm ,x um + K ije (1.51)
 2 −1  m =1
Thus, Equation (1.51) is used to assemble the tangent matrix.
Applying zero boundary conditions on ∆u n , we have:
T (u n ) C T  ∆u n  R(u n )
  = 
 C      (1.52)
 0   ζ  
  0 
 
Thus, we must assemble both the stiffness matrix and the tangent matrix T (u n ) defined via
Equation in each step.

Thus, the Newton-Raphson iteration will proceed as follows:


1. Guess u 0 (say 0). Set n = 0.
2. Assemble [K (u n )] & f (u n )
3. Assemble/ compute [T (u n )] & R(u n )
−1
4. Compute ∆u n +1 = T (u n ) R(u n ) per Equation (1.52)
5. Compute u n +1 = u n + ∆u n +1
6. Stop when u n +1 − u n < ε , else go to step 2.

You might also like