This action might not be possible to undo. Are you sure you want to continue?
https://www.scribd.com/doc/97485246/HpDGFEMBookSmall
02/01/2014
text
original
Konrad Juethner
hpDGFEM and
Transient Heat Diffusion
{
}
(
)
{
}
(
)
(
)
(
,
)
[
]
(
)
c
q
c
T
c
c
c
B
u
v
D
v
D
u
d
x
d
y
d
z
h
u
v
d
S
F
v
Q
v
d
x
d
y
d
z
q
n
v
d
S
h
u
v
d
S
Ω
Γ
Ω
Γ
Γ
=
Λ
+
=
−
⋅
+
∫
∫
∫
∫
∫
∫
∫
∫
∫
∫
∫
∫
f
f
hpDGFEM and Transient Heat Diffusion Juethner
WASHINGTON UNIVERSITY
SEVER INSTITUTE OF TECHNOLOGY
DEPARTMENT OF MECHANICAL ENGINEERING
THE hpDISCONTINUOUS GALERKIN FEM APPLIED
TO TRANSIENT HEAT DIFFUSION PROBLEMS
by
A. Konrad Juethner
Prepared under the direction of Professor Barna A. Szabó
A thesis presented to the Sever Institute of
Washington University in partial fulfillment
of the requirements for the degree of
MASTER OF SCIENCE
December, 2001
Saint Louis, Missouri
WASHINGTON UNIVERSITY
SEVER INSTITUTE OF TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE
ABSTRACT
THE hpDISCONTINUOUS GALERKIN FEM APPLIED
TO TRANSIENT HEAT DIFFUSION PROBLEMS
by A. Konrad Juethner
ADVISOR: Professor Barna A. Szabó
December, 2001
Saint Louis, Missouri
This work addresses the application of the hpDiscontinuous Galerkin algorithm to
transient heat diffusion problems. Strong and weak formulations of the heat diffusion
equation are established first. Then, approximation spaces and convergence
characteristics are discussed. Model problems, for which exact solutions are available,
are used for investigating convergence behavior and efficiency of finite difference and
finite element methods. Separately, spatial and temporal error control methodologies
are investigated and demonstrated. For this purpose, a finite element software code was
written with h and pextension capabilities in one and two spatial dimensions and the
time dimension. It is shown that the rate of convergence of the hpDiscontinuous
Galerkin method is faster than algebraic.
copyright by
A. Konrad Juethner
2001
to my grandfather,
Dr. Ing. Konrad Jüthner
iv
Contents
Tables................................................................................................................................ vi
Figures .............................................................................................................................vii
Acknowledgments............................................................................................................xii
Thesis Acceptance ..........................................................................................................xiii
Defense Announcement .................................................................................................. xiv
Copyright TXu 658006................................................................................................... xv
1. Mathematical Derivations of Heat Conduction ...................................................... 1
1.1 Strong Formulation....................................................................................... 2
1.2 Boundary Conditions .................................................................................... 3
1.3 Generalized Formulation .............................................................................. 3
2. Numerical Approximation of the Generalized Formulation in Steady State....... 8
2.1 Approximation Spaces.................................................................................. 8
2.2 Spatial Error Control................................................................................... 10
2.3 Convergence Characteristics....................................................................... 10
2.3.1 Natural Norm............................................................................... 11
3. Control of Spatial Errors in the Presence of Singularities................................... 12
3.1 Spatial Error in 1D by hpRefinement ........................................................ 12
3.2 Singularity in 2D ........................................................................................ 18
4. Spatial and Temporal Error Control in 1D Diffusion Problems......................... 30
4.1 The Finite Difference Method, 1D ............................................................ 30
4.2 The Discontinuous Galerkin Method, 1D .................................................. 33
4.3 L
2
Projection of Initial Conditions at t = 0
+
................................................ 37
4.3.1 L
2
Projection of the Initial Solution f(x) = sin(πx) ...................... 40
4.3.2 L
2
Projection of the Initial Solution f(x) = x(1x)........................ 45
4.4 Temporal Error Control .............................................................................. 45
4.4.1 Adaptive Time Solvers ................................................................ 46
4.4.2 pDGFEM and hpDGFEM in 1DSpace and Time.................... 66
4.4.3 hpDGFEM with Temporal Grading ........................................... 73
v
4.5 The Influence of the Spatial Grading Factor on the Temporal Error.......... 76
5. Temporal Error Control in 2D Time Dependent Problems ................................ 77
5.1 The Finite Difference Method, Two Spatial Dimensions........................... 78
5.2 The Discontinuous Galerkin Method, 2D................................................... 82
5.3 L
2
Projection of Initial Conditions at t = 0+ ............................................... 82
5.4 Model Problems in 2D................................................................................ 87
5.4.1 Model Problem 4.......................................................................... 88
5.4.2 Model Problem 5.......................................................................... 88
5.5 The Initial Solution f(x,y,0) = sin(πx)sin(πy)............................................. 88
5.5.1 The Finite Difference Time Solver .............................................. 91
5.5.2 The Discontinuous Galerkin Time Solvers.................................. 91
5.6 The Initial Solution f(x,y,0) = x(1x)y(1y)................................................ 95
5.6.1 The Finite Difference Time Solver .............................................. 97
5.6.2 The Discontinuous Galerkin Time Solvers.................................. 98
6. Conclusions............................................................................................................. 101
Appendix A  Conventions ............................................................................................ 104
Appendix B  Shape Functions in 2D for Quadrilateral Elements with p = 8............... 105
Appendix C  Appropriate Spatial Discretizations for Model Problems 1, 2, and 3 ..... 106
Appendix D  MATLAB
®
ODE Solver: ode15s............................................................ 113
References...................................................................................................................... 114
Vita................................................................................................................................. 116
vi
Tables
31. Mesh Refinement Strategy; Left Column: Overview of Solution Domain with
Increased Element Count from Top To Bottom; Right Column: CloseUp of
Singularity with Increased Refinement................................................................ 25
32. Convergence of pRefinement of LShaped Domain, 1 Refinement,
Polynomial Orders 1 through 8............................................................................ 27
33. Convergence of hp Refinement of LShaped Domain, 8 Refinements and
Polynomial Orders 1 through 8............................................................................ 28
41. L
2
Projection of the Polynomial Function f(x) = sin(πx)..................................... 41
42. Refined L
2
Projection of the Polynomial Function f(x) = sin(πx)....................... 43
A1. Physical Quantities and their Units as Used in this Paper ................................. 104
vii
Figures
31. Projection of Incompatible Solution onto Finite Element Solution Space: 1
Element, p=8, Error in L
2
Norm = 14.9%............................................................ 14
32. Projection of Incompatible Solution onto Finite Element Solution Space, 1
Element, p=16, Error in L
2
Norm = 8.1%............................................................ 14
33. Projection of Incompatible Solution onto Finite Element Solution Space, 3
Elements, Graded Mesh 10%, p=8, Error in L
2
Norm = 5.0%............................ 16
34. Projection of Incompatible Solution onto Finite Element Solution Space, 3
Elements, Graded Mesh 5%, p=8, Error in L
2
Norm = 3.5%.............................. 16
35. Projection of Incompatible Solution onto Finite Element Solution Space, 3
Elements, Grading = 0.1^g, p=8, Error in L
2
Can Be Made Arbitrarily Small ... 17
36. Lshaped Domain. Nodes are Numbered in Black; Elements are Numbered
in Red; Zero Temperature is Prescribed between Nodes 2 and 1; Zero Flux is
Prescribed between Nodes 1 and 8 ...................................................................... 18
37. Domain with Reentrant Corner .......................................................................... 19
38. Exact Solution of u
EX, i=1
...................................................................................... 20
39. Exact Solution (Black Circles on Cyan Stems) Superimposed on the L
shaped Domain; q
n
and ∇u
Γ
Displayed by Red and Blue Arrows,
Respectively......................................................................................................... 21
310. Finite Element Solution u
FE
, 3 Elements, Polynomial Degree 3 ........................ 22
311. Convergence of pRefinement of LShaped Domain, 1 Refinement,
Polynomial Orders 1 through 8............................................................................ 27
312. Convergence of hp Refinement of LShaped Domain......................................... 28
313. Finite Element Solution of 8 Grading Refinements at Polynomial Order 8;
the Relative Error with Respect to the Exact Solution is 0.2682%..................... 29
41. Comparison between Exact Function and its L
2
Projection ................................ 41
42. Error Plot in the Range of ±4*10
8
....................................................................... 42
43. Comparison between Exact Function and its Projection ..................................... 43
44. Relative Error Plotted in the Range of ±2*10
15
.................................................. 44
viii
45. Relative Error Plotted in the Range of ±4*10
15
.................................................. 45
46. Time Integral of Relative Error in Energy Norm, Model Problem 1; 1
Element, p=8........................................................................................................ 48
47. Time Integral of Relative Error in Energy Norm, Model Problem 2, 1
Element, p=8........................................................................................................ 49
48. Time Integral of Relative Error in Energy Norm, Model Problem 3, 5
Geometrically Graded Elements, Spatial DOF = 8 Nodes+5 Elements*(81)*
p = 39 ................................................................................................................... 49
49. hDGFEM with Increasing Approximation Order r
m
.......................................... 51
410. hDGFEM Performance at Multiple Values of r
m
............................................... 52
411. CPU Times Corresponding to Figure 410; Note that the Numbered Data
Points Correlate Figures 410 and 411............................................................... 52
412. Comparison of Convergence Performance: CNM and hDGFEM at r
m
= 7 ....... 53
413. Comparison of CPU Time in the Accuracy Range of 1.94 % to 1.22*10
5
%;
The Numbered Data Points Correlate Figures 412 and 413 ............................. 53
414. Temporal Error Control ....................................................................................... 54
415. Finite Element Solution to Model Problem 1, Plotted on Uniformly Spaced
PostProcess Grid................................................................................................. 55
416. hDGFEM Performance at r
m
= 2, Time Grading Function h(t) = t
7
................... 56
417. Convergence Rate Using Various Values r
m
and h(t) = t
7
................................... 57
418. CPU Time Using Various Values r
m
and h(t) = t
7
............................................... 57
419. Integral of Error in Energy Norm Reduced to below 0.001%............................. 58
420. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to
1.2*10
4
% Corresponding to Figure 419; Note that the Numbered Data
Points Correlate Figures 419 and 420............................................................... 58
421. Temporal Error Control, hDGFEM.................................................................... 59
422. Solution to Model Problem 2; the hDGFEM Mesh is Shown by the Heavy
Lines..................................................................................................................... 60
423. Error in Energy Norm Reduced to below 1.0%................................................... 61
424. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to
1.2*10
4
% Corresponding to Figure 423; Note that the Numbered Data
Points Correlate Figures 423 and 424............................................................... 61
425. Temporal Error Control; TimeHalving Leads to Relative Errors that are
Better than Necessary .......................................................................................... 62
ix
426. Convergence of Model Problem 3 Using the Integral of e
r
(t) ............................. 63
427. Error in Energy Norm Reduced to below 1.0%................................................... 64
428. Comparison of CPU Time Performance Corresponding to Figure 427; Note
that the Numbered Data Points Correlate Figures 427 and 428........................ 64
429. Temporal Error Control ....................................................................................... 65
430. Solution to Model Problem 3; the hDGFEM Mesh Is Shown by the Heavy
Lines..................................................................................................................... 66
431. Convergence Comparison: h and hpDGFEM Solving Model Problem 1........ 67
432. Comparison of CPU Time Performance Corresponding to Figure 431; Note
that the Numbered Data Points Correlate Figures 431 and 432........................ 68
433. Exponential Convergence of pDGFEM............................................................. 68
434. Convergence Comparison: h and hpDGFEM Solving Model Problem 2........ 69
435. Comparison of CPU Time Performance Corresponding to Figure 434; Note
that the Numbered Data Points Correlate with Figures 434 and 435................ 70
436. Initial Exponential and then Algebraic Convergence (pDGFEM) ..................... 70
437. Convergence Comparison: h and hpDGFEM Solving Model Problem 3........ 71
438. Comparison of CPU Time Performance Corresponding to Figure 437; Note
that the Numbered Data Points Correlate Figures 437 and 438........................ 72
439. Initial Exponential and then Algebraic Convergence (pDGFEM) ..................... 72
440. Model Problem 2 Converges Faster Than Algebraic Rate .................................. 74
441. Model Problem 2 Convergence Close to Exponential Rate ................................ 74
442. Model Problem 3 Converges Faster Than Algebraic Rate .................................. 75
443. Model Problem 3 Convergence Close to Exponential Rate ................................ 75
444 Optimal Spatial Grading Factor with Respect to a Specific Experiment ............ 76
51. Arbitrary Initial Condition ( , ) f x y , 9 Elements, Refinement Level 1, p = 8 ..... 84
52. Result of Step 1 of L
2
Projection ( , ) f x y : All Nodal Values are Equal to
Zero...................................................................................................................... 85
53. Result of Step 2 of L
2
Projection ( , ) f x y : All Element Sides are Equal to
Zero...................................................................................................................... 85
54. Result of Step 3 of L
2
Projection f : Error in Energy Norm = 2.59*10
5
%,
Error in Maximum Norm = 1.5*10
3
.................................................................... 86
55. Final Result. Assembled L
2
Projection by Linear Combination of Projection
Coefficients with the Global Shape Functions .................................................... 86
56. Solution Domain.................................................................................................. 89
x
57. Initial Solution ..................................................................................................... 89
58. Projection Error for the Initial Condition, Error in Energy Norm: 1.57*10
7
%,
Error in Maximum Norm = 5.0*10
5
.................................................................... 90
59. Projected Initial Solution ..................................................................................... 90
510. Model Problem 4: Convergence of the Finite Difference Method ..................... 91
511. Convergence of the hDGFEM for r
m
= 4............................................................ 92
512. Convergence of the hDGFEM for r
m
= 8............................................................ 92
513. Temporal Solutions Corresponding to the Most Accurate Solution of Figure
512; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0).......................................................................................... 93
514. Convergence of the pDGFEM............................................................................ 94
515. Convergence of the hpDGFEM.......................................................................... 94
516. Temporal Solutions Corresponding to the Most Accurate Solution of Figure
514; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0).......................................................................................... 95
517. Initial Solution ..................................................................................................... 96
518. Projection Error for the Initial Condition, Error in Energy Norm = 1.3*10
28
%, Error in Maximum Norm = 8.0*10
17
............................................................. 96
519. Projected Initial Solution ..................................................................................... 97
520. Convergence of the Finite Difference Method .................................................... 97
521. Convergence of the hDGFEM............................................................................ 98
522. Convergence of the pDGFEM............................................................................ 99
523. Convergence of the hpDGFEM.......................................................................... 99
524. Temporal Solutions Corresponding to the Most Accurate Solution of Figure
521; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0)........................................................................................ 100
B1 2D Shape Functions. Top Row: Vertex Modes, Four Left Columns without
First Row: Side Modes, Columns 5 through 9: Internal Modes ........................ 105
C1. Convergence of Model Problem 1, 1 Element in Space, p = 3.......................... 106
C2. Convergence of Model Problem 1, 1 Element in Space, p=4............................ 107
C3. Convergence of Model Problem 1, 1 Element in Space, p=8............................ 107
C4. Convergence of Model Problem 1, 10 Spatial Elements, p=8........................... 108
C5. Convergence of Model Problem 1, 10 Spatial Elements, p=16......................... 108
C6. Convergence of Model Problem 2, 1 Spatial Element, p=3 .............................. 109
C7. Convergence of Model Problem 2, 1 Spatial Element, p=8 .............................. 110
xi
C8. Convergence of Model Problem 2, 10 Spatial Elements, p=8........................... 110
C9. Convergence of Model Problem 3, 2 Spatial Elements, p=8............................. 111
C10. Convergence of Model Problem 3, Geometrically Graded Mesh with 5
Elements, p=8, (Identical to Figure 48)............................................................ 112
xii
Acknowledgements
This thesis marks my most significant academic accomplishment to date. Its creation
was eye opening, enjoyable, and revealing, yet, difficult, arduous, and extremely time
consuming. Certainly not an easy feat since fulltime employment at Watlow Inc
required my full attention. Although I was advised of the challenges of the dual life as
an engineer and graduate student, I saw in this task an integral part of a Master of
Science Program.
As I now reflect upon the accomplishment, I realize how much it has reduced the
interactions with my family and friends during the past two years. My wife, Salomé,
probably carried the biggest burden, dealing with my mood swings, incoherent
ramblings about mathematical tasks in delirious morning hours, the experiences of all
time highs when things worked well, and alltime lows when programming bugs left me
searching for weeks. Many thanks for her patience and understanding during this time.
She is simply the best!
The very generous tuition reimbursement program by Watlow Inc and the supportive
mentor, Louis P. Steinhauser made this graduate work possible. Their support of both
my professional and academic careers dates back to May of 1995 and there are no words
to express my gratitude. Thank you!
I like to think of my thesis advisor, Dr. Barna Szabó, as a brilliant, picky, meticulous,
hardworking, and patient gentleman, who has driven me “bananas” during this work. I
would like to thank him for his patience in his attempt to teach me hpFEA and DG
principles, to enhance my understanding of Mathematics, to improve my technical
writing style, and to make me a more mature engineer.
xiii
xiv
xv
xvi
1
Chapter 1
Mathematical Derivations of Heat Conduction
The derivation of the equations of linear heat conduction and the corresponding notation
are presented in fully threedimensional setting. Mathematical models of linear heat
conduction are based on two fundamental laws of physics: Fourier’s law of heat
conduction and the conservation law. Fourier’s law of heat conduction states that
 
( ) q grad u = − Λ ⋅
j
(11)
where q
f
is the heat flux vector with components
z y x
q q q , , . The following notation will
be used:
{ }
¦
)
¦
`
¹
¦
¹
¦
´
¦
= ≡
z
y
x
def
q
q
q
q q
j
. (12)
q
f
represents the heat flux per unit area (in W/m
2
or equivalent units).
 
Λ is the
symmetric positivedefinite thermal conductivity matrix and u is the temperature field.
 
Λ can be written as
2
 
xx xy xz
yx yy yz
zx zy zz
( λ λ λ
(
Λ = λ λ λ
(
(
λ λ λ
¸ ¸
. (13)
From the condition of symmetry it follows that
xy yx
λ = λ , etc.
1.1 Strong Formulation
The conservation law states that the heat flow rate into any volume element plus the heat
generated per unit time in the volume element equals the specific heat multiplied by the
mass density and the rate of change in temperature. In Cartesian coordinates, the
mathematical statement of the conservation law is
( ) ( ) ( )
t
u
c Q q
z
q
y
q
x
z y x
∂
∂
= +


¹

\

∂
∂
+
∂
∂
+
∂
∂
− ρ . (14)
Combining (11), (12), (13), and (14) results in
xx xy xz yx yy yz
zx zy zz
u u u u u u
x x y z y x y z
u u u u
Q c
z x y z t
    ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂
λ + λ + λ + λ + λ + λ +
 
∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂
\ ¹ \ ¹
  ∂ ∂ ∂ ∂ ∂
+ λ + λ + λ + = ρ

∂ ∂ ∂ ∂ ∂
\ ¹
(15)
where , , , and Q c t ρ represent heat generation per unit volume per unit time, specific
heat, mass density, and time, respectively. Alternatively, equation (15) can be written
in the form:
([ ] ( ))
u
div grad u Q c
t
∂
Λ ⋅ + = ρ
∂
. (16)
3
1.2 Boundary Conditions
Four types of boundary conditions will be considered in the following. The boundary of
the solution domain Ω will be denoted by Γ. The boundary is divided into four non
overlapping regions, which collectively cover the entire boundary:
1. Prescribed temperature: ( , ),
u
u u x t x = ∈Γ
j j
#
2. Prescribed heat flux: ( , ),
n n q
q q x t x = ∈Γ
j j j
# where the flux is normal to the
boundary
3. Convection: ( ( , ) ( , )),
n c c c
q h u x t u x t x = − ∈Γ
j j j j
where
c
h is the coefficient of
convective heat transfer measured in [W/(m
2
K)] and
c
u is the temperature of the
convective medium
4. Radiation:
4 4
( ( , ) ( , )),
r s r
q f f u x t u x t x
ε ∞
= κ⋅ ⋅ ⋅ − ∈Γ
j j j j
where κ is the Stefan
Boltzmann Constant, f
ε
is the emissivity function with 0 1 f
ε
< ≤ ,
s
f is the view
factor function, u is the temperature function of the radiating body, and u
∞
is
the reference temperature of the environment that absorbs the radiation
1.3 Generalized Formulation
To arrive at the generalized weak form of equation (14), we multiply by a scalar test
function v and integrate:
y
x z
q
q q u
v dxdydz Qv dxdydz c v dxdydz
x y z t
Ω Ω Ω
∂   ∂ ∂ ∂
− + + + = ρ

∂ ∂ ∂ ∂
\ ¹
∫∫∫ ∫∫∫ ∫∫∫
(17)
Using the following identities,
4
( )
( )
( )
x
x x
y
y y
z
z z
q v
v dxdydz q v q dxdydz
x x x
q
v
v dxdydz q v q dxdydz
y y y
q v
v dxdydz q v q dxdydz
z z z
Ω Ω
Ω Ω
Ω Ω
∂ ∂ ∂  
= −

∂ ∂ ∂
\ ¹
∂
  ∂ ∂
= −

∂ ∂ ∂
\ ¹
∂ ∂ ∂  
= −

∂ ∂ ∂
\ ¹
∫∫∫ ∫∫∫
∫∫∫ ∫∫∫
∫∫∫ ∫∫∫
(18)
we can rewrite (17) as follows:
( )
.
x y z
v v v
div qv dxdydz q q q dxdydz
x y z
u
Qv dxdydz c v dxdydz
t
Ω Ω
Ω Ω
  ∂ ∂ ∂
− ⋅ + + + +

∂ ∂ ∂
\ ¹
∂
+ ⋅ = ρ ⋅
∂
∫∫∫ ∫∫∫
∫∫∫ ∫∫∫
j
(19)
Applying the Gauss divergence theorem, equation (110) results.
( )
x y z
v v v
q n v dS q q q dxdydz
x y z
u
Qv dxdydz c v dxdydz
t
Γ Ω
Ω Ω
  ∂ ∂ ∂
− • ⋅ + + + +

∂ ∂ ∂
\ ¹
∂
+ ⋅ = ρ ⋅
∂
∫∫ ∫∫∫
∫∫∫ ∫∫∫
j j
(110)
Vector n
j
is the outward positive unit normal and dS is the differential surface element.
Substituting (15) into (110), we have:
( )
.
xx xy xz
yx yy yz
zx zy zz
u u u v
x y z x
u u u v
q n v dS dxdydz
x y z y
u u u v
x y z z
u
Qv dxdydz c v dxdydz
t
Γ Ω
Ω Ω
 
  ∂ ∂ ∂ ∂
λ + λ + λ +


∂ ∂ ∂ ∂
\ ¹


  ∂ ∂ ∂ ∂

− • ⋅ − + λ + λ + λ + +

∂ ∂ ∂ ∂ 
\ ¹

  ∂ ∂ ∂ ∂

+ λ + λ + λ


∂ ∂ ∂ ∂
\ ¹
\ ¹
∂
+ ⋅ = ρ ⋅
∂
∫∫ ∫∫∫
∫∫∫ ∫∫∫
j j
(111)
5
Defining the differential operator vector:
{ }
T
def
D
x y z
¦ ¹ ∂ ∂ ∂
=
´ `
∂ ∂ ∂
¹ )
(112)
we can write:
{ } ( )   { } ( )
( )
( )
.
T u
D v D u dxdydz c v dxdydz
t
Qv dxdydz q n v dS
Ω Ω
Ω Γ
∂
Λ + ρ
∂
= − •
∫∫∫ ∫∫∫
∫∫∫ ∫∫
j j
(113)
Equation (113) is the generic form of the weak or generalized formulation of the
transient heat equation. The generic form is modified by the boundary conditions. The
prescribed temperature on
u
∂Ω is enforced by restriction. When heat flux is specified
) 0 ( ≠ Γ
q
then the specified heat flux q
~
is substituted for q in equation (113). When
convection is specified ) 0 ( ≠ Γ
c
then ) (
c c
u u h q − = is substituted for q in (113) such
that upon rearrangement we have:
{ } ( ) { } ( )
( )
( , ) [ ]
( ) .
c
q c
T
c
c c
B u v D v D u dxdydz h uvdS
F v Qvdxdydz q n v dS h u v dS
Ω Γ
Ω Γ Γ
= Λ +
= − ⋅ +
∫∫∫ ∫∫
∫∫∫ ∫∫ ∫∫
f f
(114)
For completeness, radiation heat transfer is mentioned as a boundary condition.
However, it is a nonlinear problem and will not be considered in the following. As a
short form for this equation, it is customary to write
) ( ) , ( v F v u B = (115)
6
where ( ) , B u v is a bilinear form defined on ( ) ( )
1 1
H H Ω × Ω and ( ) F v is a linear
functional defined on ( )
1
H Ω . The space ( ) E Ω is defined by a set of functions
( ) , , u x y z that have finite energy on Ω, which is satisfied by the following condition:
{ } ∞ < ≤ = Ω C u u B u E ) , (  ) ( (116)
where C is some positive constant. We associate the norm
( ) E
u
Ω
with the space
( ) E Ω . By definition:
( )
1
  ( , ) .
2
def
E
u B u u
Ω
= (117)
The space ( ) E Ω is called the energy space. Further, we define the subsets ) (
~
Ω E and
( ) E Ω
c
as follows:
( ) {  ( ), ( , , ) ( , , ), ( , , ) }
def
u
E u u E u x y z u x y z x y z Ω = ∈ Ω = ∈Γ
#
# (118)
( ) {  ( ), ( , , ) 0, ( , , ) }
def
u
E u u E u x y z x y z Ω = ∈ Ω = ∈Γ
c
(119)
The generalized solution is the function ( )
EX
u E ∈ Ω
#
such that
( , ) ( ) ( )
EX
B u v F v v E = ∀ ∈ Ω
c
. (120)
This is equivalent to finding the minimum of the functional π
1
( , ) ( )
2
def
B u u F u π = − (121)
7
on the space ) (
~
Ω E . Proof and further discussion on this subject can be found, for
example, in Finite Element Analysis [11].
8
Chapter 2
Numerical Approximation of the Generalized
Formulation in Steady State
To solve (113) numerically, the domain Ω is partitioned into k tetrahedral, hexahedral,
and pentahedral elements, 1, 2, , ( ) k M = ∆ … . A particular partition is called a finite
element mesh and is denoted by ∆. A finite dimensional subspace S of ( ) E Ω is
characterized by ∆ and a polynomial degree
k
p is assigned to each element. A brief
description of S is presented in the following.
2.1 Approximation Spaces
We denote the subspace ( , , )
p
S S Q = Ω ∆
, and define
( )
( ).
def
def
S S E
S S E
= ∩ Ω
= ∩ Ω
(21)
S is constructed according to the partition ∆ whereby each element k is mapped from
a standard element
st
Ω by the mapping functions. For example, the standard
quadrilateral element
st
Ω is defined as:
( )
{ , , 1, 1, 1}
q
st
Ω = ξ η ζ ξ ≤ η ≤ ζ ≤ (22)
9
The mapping between the standard quadrilateral element and the
th
k partition is defined
as follows:
( )
( )
( )
( , , )
( , , )
( , , ) .
k
x
k
y
k
z
x Q
y Q
z Q
= ξ η ζ
= ξ η ζ
= ξ η ζ
(23)
Let the space of polynomials of degree p defined on
st
Ω be
p
S . The finite element
space S is defined as the set of all functions ( ) , , u x y z , which lie in the energy space
( ) E Ω and on the
th
k element ( ) ( )
( )
,,
k
p k
u Q S ∈ :
( )
( ) {
( ) ( ) ( ) ( ) ( )}
( ) ( ) ( )
, ,
 ,
, , , , , , , , , 1, 2, ,
k
def
p
p k k k
x y z
S S Q
u u E
u Q Q Q S k M
≡ Ω ∆ =
∈ Ω
ξ η ζ ξ η ζ ξ η ζ ∈ = ∆
…
(24)
where p
is the vector of polynomial degrees and Q
is the vector of mapping functions
assigned to the elements
( )
{ }
( )
{ }
1 2
1 2
, , ,
, , , .
def
M
def
M
p p p p
Q Q Q Q
∆
∆
=
=
…
…
(25)
The continuity property of functions in S ensures that ( ) S E ⊂ Ω . The condition that
equation (113) must be satisfied for all v S ∈
results in a system of ordinary differential
equations of the form
[ ]{ } { } . K a r = (26)
10
where
[ ]
K is called the stiffness matrix and { } r the load vector. The size of matrix
[ ]
K is called the number of degrees of freedom and is denoted by N .
2.2 Spatial Error Control
The subspace S determines the finite element solution
FE
u and hence the error
EX FE
u u − . The spatial error is controlled by proper selection of the space S . In the p
version, a hierarchical sequence of spaces
1 2 n
S S S ⊂ ⊂ … is constructed and
convergence is monitored. In the hversion, various adaptive methods have been
proposed in A Posteriori Error Estimates for the Finite Element Method [1] and Error
Estimates for Adaptive Finite Element Computations [2].
2.3 Convergence Characteristics
There are two fundamentally different approaches to the implementation of the finite
element method, called the hversion and the pversion. In the hversion, the solution
domain is partitioned into elements and the solution is approximated by piecewise
polynomials, defined on elements of low polynomial degree, usually 1 or 2.
Convergence is achieved by letting the size of the elements approach zero. In the p
version, on the other hand, the partition is generally fixed and the polynomial degree of
elements is increased. Convergence is achieved by letting the lowest polynomial degree
approach infinity. Both versions can be used in combination by refining the mesh and
increasing the polynomial degree of the elements so that the finite element solution
converges to the exact solution in an optimal or nearly optimal rate. This method is
called the hpversion.
11
2.3.1 Natural Norm
The errors can be measured in various norms. The most commonly used norm is the
energy norm. The energy norm is called the natural norm because the finite element
solution satisfies the following relationship:
( ) ( )
min
EX FE EX
E E
u S
u u u u
Ω Ω
∈
− = − (27)
Referring to (117), the energy norm measure of error is:
( )
1
(  , )
2
def
EX FE EX FE EX FE
E
u u B u u u u
Ω
− = − . (28)
A more useful measure is the relative error, defined by:
−
=
def
EX FE
E
r
EX
E
u u
e
u
. (29)
The model problems discussed herein have been selected so as to make comparisons
with known exact solutions possible. Since exact solutions are generally not known in
engineering applications, this error can be estimated using an a posteriori estimation
procedure. Because pextensions produce a sequence of hierarchic finite element
spaces, the convergence of the functional π with respect to the number of degrees of
freedom N given by (121) is monotonic.
12
Chapter 3
Control of Spatial Errors in
the Presence of Singularities
In the following, numerical examples are presented that illustrate the application of the
finite element method to heat conduction problems. A finite element code with hp
extension capabilities in one dimension (1D) and two dimensions (2D) was written in
MATLAB
®
.
3.1 Spatial Error in 1D by hpRefinement
An example showing how spatial errors are controlled is described. While complicated
to program, hpextensions allow for very efficient treatment of any elliptic problem.
Spatial errors occur unless the exact solution happens to lie in the finite element space.
As most finite element software is based on polynomial basis functions, it is useful to
investigate how well incompatible initial solutions, such as step functions, can be
approximated. Specifically, the initial condition ( ) 1 u x = with prescribed boundaries
( ) 0 0 u = and ( ) 1 0 u = at 0 t
+
= , defined on the solution domain ( ) 0,1 Ω = will be
discussed.
13
Let us consider a homogeneous bar of unit length, initially at a constant temperature
0
1 = u . Let us further assume that at 0 t
+
= the temperature is dropped to zero at the
ends of the bar. Thus the solution for 0 > t lies in
{ } ( )  ( ), (0) 0 (1) 0 E u u E u u Ω = ∈ Ω = =
, . Since the solution at 0 = t is not in ( ) E Ω
, the
initial condition
0
u is said to be incompatible. It is necessary to project
0
u onto the
space ( ) E Ω
. Using the
2
L projection, this involves computing the minimum of the
integral
2
1
0 0
0
1
0
( ) , where ( ) ( )
=
 
= − Φ Φ ∈ ⊂ Ω

\ ¹
∑
∫
n
j j j
j
I u a x dx x S E . (31)
This results in a system of algebraic equations for , 1, 2, , = …
j
a j n. The numerical
procedure will be discussed in detail in Section 4.3. The error between
0
u and
2
( )
0
1
n def
L
j j
j
u a
=
= Φ
∑
is measured in the least square sense that is the
2
L norm. By definition:
2
2
1
0
1
0
1
2
0
0
n
j j
j
L
u a dx
e
u dx
=
 
− Φ

\ ¹
=
∑
∫
∫
. (32)
The incompatibility of the initial solution with the polynomial finite element space is
demonstrated in Figure 31. A single finite element is used ( ) ( )
1 M ∆ = with 8 p = .
The approximation is oscillatory and the error in
2
L norm is 14.9%. To reduce the error
in L
2
norm, either the number of elements or their degrees of freedom must be increased.
It is shown in Figure 32 that doubling the polynomial order of the element leads to a
decrease in error in energy norm from 14.9% (Figure 31) to 8.1%.
14
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
distance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
EX
and u
L2
of f(x) = 1.
u
EX
u
L2
FIGURE 31. Projection of Incompatible Solution onto Finite Element Solution
Space: 1 Element, p=8, Error in L
2
Norm = 14.9%
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
distance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
EX
and u
L2
of f(x) = 1.
u
EX
u
L2
FIGURE 32. Projection of Incompatible Solution onto Finite Element Solution
Space, 1 Element, p=16, Error in L
2
Norm = 8.1%
15
However, in this particular case, it is more effective to use geometric grading toward the
ends of the domain. This is illustrated in Figure 33 where the results shown correspond
to a 3element mesh. The large element is 80% of the total length, the small elements
are 10% each. It is seen that the oscillations are confined to the small elements only.
The relative error in
2
L norm is 5.0 %.
By increasing the large element to 90% and reducing the small elements to 5% each, the
relative error in energy norm is further reduced to 3.5% (Figure 34). The obvious
question is, how well can
0
u be approximated by this method.
The
2
L norm error is dependent on the size of the smallest element at the end points and
can be made arbitrarily small. Considering, for example,
2
( )
0
, 0
1, 1
1
, 1 1
L
x
x
u x
x
x
¦
≤ ≤ ε
¦
ε
¦
= ε < < ε
´
¦
−
¦ ε ≤ ≤
ε ¹
(33)
we find:
( ) ( )
2
2 2
1
2
( )
0 0
1 0 0
1 1
3
L
x
u u dx dx y dy
ε ε
ε  
− = − = ε − =

ε
\ ¹
∫ ∫ ∫
. (34)
16
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
distance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
EX
and u
L2
of f(x) = 1.
u
EX
u
L2
FIGURE 33. Projection of Incompatible Solution onto Finite Element Solution
Space, 3 Elements, Graded Mesh 10%, p=8, Error in L
2
Norm = 5.0%
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.2
0.4
0.6
0.8
1
distance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
EX
and u
L2
of f(x) = 1.
u
EX
u
L2
FIGURE 34. Projection of Incompatible Solution onto Finite Element Solution
Space, 3 Elements, Graded Mesh 5%, p=8, Error in L
2
Norm = 3.5%
17
Similarly:
( ) ( )
2
2
1 1 1
2
2
( )
0 0
1 1 0
1
1 1
3
L
x
u u dx dx y dy
−ε −ε
− ε  
− = − = ε − =

ε
\ ¹
∫ ∫ ∫
(35)
which indicates that the error in
2
L norm is proportional to ε . In the numerical
example under consideration, we find a very similar dependence, which is depicted in
Figure 35.
10
0
10
1
10
15
10
10
10
5
10
0
u
(L
2
)
0
 u
0

L2
/ u
0

L2
of f(x) = 1, f(0) = f(1) = 0, M(∆) = 3, p = 8
geometric grading f actor g [1]
E
r
r
o
r
i
n
e
n
e
r
g
y
n
o
r
m
i
n
%
FIGURE 35. Projection of Incompatible Solution onto FE Solution Space, 3
Elements, Grading = 0.1^g, p=8, Error in L
2
Can Be Made Arbitrarily Small
Therefore, geometric grading coupled with pextension is an effective tool for
approximating incompatible initial solutions. Although heat transfer problems are
generally "well behaved", this kind of grading is very effective for projecting
incompatible initial conditions onto the finite element space.
18
3.2 Singularity in 2D
Singularities may arise from material discontinuities, sharp corners, and abrupt changes
in boundary conditions. To demonstrate singularities in two dimensions (2D), we
consider the Lshaped domain shown in Figure 36. Its reentrant corner induces a
geometric singularity. Zero flux is prescribed on the edge between nodes 1 and 8 and
zero temperature on the edge between nodes 1 and 2.
0.5
0
0.5
1
1
0.5
0
0.5
1
0
0.5
1
1.5
3
4
5
2
1
2
3
8
1
7
6
y
x
u
Lshaped domain with 3 elements.
FIGURE 36. Lshaped Domain. Nodes are Numbered in Black; Elements are
Numbered in Red; Zero Temperature is Prescribed between Nodes 2 and 1; Zero
Flux is Prescribed between Nodes 1 and 8
19
The exact solution of this problem in the vicinity of the reentrant corner is of the form
i
i i
1
(cos ( 1) sin )
2 1
.
2
i
EX i
i
i
u Ar
i
∞
λ
=
= λ θ+ − λ θ
−
λ = π
α
∑
(36)
The derivation of this is available in Finite Element Analysis [11]. The terms
i
A are the
expansion coefficients that depend on the other boundary conditions. α is the
complement of the angle of the reentrant corner as shown in Figure 37.
FIGURE 37. Domain with Reentrant Corner
In this model problem
3
2
π
α = , therefore
1
1
3
λ = . In the following discussion we define
flux boundary conditions on the boundary segment such that the exact solution is
1
3
cos  sin
3 3
EX
u r
θ θ  
=

\ ¹
. (37)
A graphical illustration of
EX
u is shown in Figure 38.
20
FIGURE 38. Exact Solution of u
EX, i=1
The boundary conditions can be handled in two ways. One is to project
EX
u onto the
space of the of the basis functions on the boundaries using the
2
L projection method. In
this case, the boundary conditions are enforced by restriction on the space of admissible
functions. The other method is to compute the normal flux
n
q and enforce the boundary
conditions in the weak sense. In this work, the second method was chosen:
 
ˆ
n EX
q n u
Γ
= − Λ ∇ . (38)
Vector ˆ n
Γ
is the normal on the boundary Γ and
 
Λ is the thermal conductivity tensor.
21
In this case:
2
3
2
3
1
sin cos
( , )
3 3 3
1
1
( , )
sin cos
3 3 3
EX
EX
EX
r
u r
r
u
u r
r
r
−
−
¦ ¹
θ θ  
∂ ¦ ¹
− −
θ ¦ ¦ 
¦ ¦
¦ ¦ ¦ \ ¹¦ ∂
∇ = =
´ ` ´ `
∂
θ θ  
¦ ¦ ¦ ¦
θ
− +

¦ ¦ ¦ ¦
∂θ ¹ )
\ ¹
¹ )
. (39)
Visual representations of the boundary conditions are shown in Figure 39.
0.5
0
0.5
1
1.5
1.5
1
0.5
0
0.5
1
1.5
0
0.5
1
1.5
x
7
6
5
6
5
8
4
14
u
EX
(cyan, black), ∇u
Γq
(blue), q
n
(red)
13
11
12
12
15
10
21
20
17
3
18
19
22
16
28 27 23
9
24 26 29 22 35 34 29 15
30 33 36 28 42 41 35 21 36 40 43 34 49 48 41 27 42 47 50 40 56 55 47 33 48 54 57 46 63 62 51 39 61 64 50 45 160 49 58 59 53 44 43 51 52 46 38 37 44 45 39 32 31 37 38 32 26 25 30 31 25 20 19 23 24
18 14 13
16
17
y
11
8
7
9
10
4
2
1
2
3
u
FIGURE 39. Exact Solution (Black Circles on Cyan Stems) Superimposed on the
Lshaped Domain; q
n
and ∇u
Γ
Displayed by Red and Blue Arrows, Respectively
Solving this 3element problem using polynomial degree 3 leads to the approximate
solution shown graphically in Figure 310.
22
FIGURE 310. Finite Element Solution u
FE
, 3 Elements, Polynomial Degree 3
Note that the numerical solution of Figure 310 is substantially different from the exact
solution in Figure 38. The error will be estimated in energy norm.
Letting
EX FE
e u u = − (310)
we can write:
23
 
2
1
( ) ( ) ( , ) ( )
2
1 1
( , ) ( ) ( , ) ( ) ( , )
2 2
( ) 0 .
FE EX EX EX EX
EX EX EX EX
EX
E
u u e B u e u e F u e
B u u F u B u e F e B e e
u e
Π = Π − = − − − − =
= − + − + =
= Π + +
(311)
Therefore,
2
( ) ( )
FE EX
E
e u u = Π −Π . (312)
Also, since
1
( ) ( , ) ( )
2
EX EX EX EX
u B u u F u Π = − (313)
and
( , ) ( )
EX EX EX
B u u F u = (314)
we have
1 1
( ) ( ) ( ) .
2 2
EX EX n EX EX
u F u q u ds
Γ
Π = − = −
∫
(315)
Since
EX
u is given by equation (37), ( )
EX
u Π can be computed from (315) and
knowing ( )
FE
u Π from the finite element solution:
 
1
2
1 2
( ) ,
FE n
n
r
r
u a a a
r
¦ ¹
¦ ¦
¦ ¦
Π = −
´ `
¦ ¦
¦ ¦
¹ )
…
(316)
24
one can compute:
2
( ) ( ).
FE EX
E
e u u = Π −Π (317)
The relative error is:
100
E
r
EX
E
e
e
u
= (318)
where
2 1 1
( ) ( ) .
2 2
EX EX n EX EX
E
u F u q u ds
Γ
= =
∫
(319)
For the three element mesh shown in Figure 36 and p = 3, we have:
( )  6.695974660911005  001
( )  8.471380026768022  001
45.8 % .
FE
EX
r
u e
u e
e
Π =
Π =
=
(320)
Errors of this magnitude are generally not acceptable for engineering purposes. The
large error is caused by the fact that
EX
u is not analytic, in fact strongly singular in the
reentrant corner. Hence, approximation of
EX
u with piecewise polynomials is not easy.
It is known that, in such cases, meshes graded in geometric progression toward the
singular point with the grading factor of
( )
2
2 1 − are optimal. This topic is further
discussed in Finite Element Analysis [11]. The optimal mesh refinement strategy for
controlling the error associated with the singularity at the reentrant corner is illustrated
in Table 31.
25
TABLE 31. Mesh Refinement Strategy; Left Column: Overview of Solution
Domain with Increased Element Count from Top To Bottom; Right Column:
CloseUp of Singularity with Increased Refinement
26
The optimal rate of convergence is exponential as discussed in Finite Element Analysis
[11]. To realize exponential convergence it is necessary to increase both the number of
geometrically graded layers of elements and the polynomial degree. The asymptotic rate
of convergence when p is increased on a fixed mesh is algebraic. Specifically,
provided that
1
A in equation (36) is not zero,
1 E
k
e
N
λ
≤ , (321)
see Finite Element Analysis [11].
In this model problem
1
1
3
λ = , hence the theoretical rate of convergence is
1
3
. It is seen
in Table 32 and Figure 311 that the numerical rate of convergence is close to
1
3
.
When the number of layers of refinement is increased with p then the rate of
convergence becomes exponential. This is illustrated in Table 33, where it is seen that
the numerical rate is increasing as the number of degrees of freedom is increased and in
Figure 312, where the relative error vs. degrees of freedom curve on a loglog scale is
seen to have an increasing downward slope.
27
TABLE 32. Convergence of pRefinement of LShaped Domain, 1 Refinement,
Polynomial Orders 1 through 8
Run# DOF Potential Energy Convergence Rate True Relative Error [%]
1
2
3
4
5
6
7
8
12
33
54
84
123
171
228
294
7.019466711517294e001
7.720996474209324e001
7.801391374072846e001
7.971252036359559e001
8.082571556427428e001
8.157655245413216e001
8.210394799960001e001
8.249448993585982e001
0.0000
0.3262
0.1151
0.3309
0.3301
0.3256
0.3199
0.3188
41.3993
29.7622
28.1227
24.2976
21.4235
19.2441
17.5522
16.1857
10
1
10
2
10
1.3
10
1.4
10
1.5
10
1.6
degrees of freedom DOF in [1]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
i
n
[
%
]
Spatial Error Control by Increased Polynomial Order
Π(u
FE
)Π(u
EX
) / Π(u
EX
)
E
FIGURE 311. Convergence of pRefinement of LShaped Domain, 1 Refinement,
Polynomial Orders 1 through 8
28
TABLE 33. Convergence of hp Refinement of LShaped Domain, 8 Refinements
and Polynomial Orders 1 through 8
Run# DOF Potential Energy Convergence Rate True Relative Error [%]
1
2
3
4
5
6
7
8
12
51
114
228
411
681
1056
1554
7.019466711517294e001
8.183934050633468e001
8.396427254420245e001
8.454936007622418e001
8.467569499625519e001
8.470453032705809e001
8.471145647099563e001
8.471319142504697e001
0.0000
0.5597
0.8355
1.0942
1.2407
1.3996
1.5671
1.7439
41.3993
18.4205
9.4063
4.4058
2.1209
1.0461
0.5260
0.2682
10
2
10
1
degrees of freedom DOF in [1]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
i
n
[
%
]
Spatial Error Control by Increased Polynomial Order
Π(u
FE
)Π(u
EX
) / Π(u
EX
)
E
FIGURE 312. Convergence of hp Refinement of LShaped Domain
Note the substantially reduced relative error, which is 0.2682%, at 1554 degrees of
freedom. The corresponding finite element solution is illustrated in Figure 313.
29
FIGURE 313. Finite Element Solution of 8 Grading Refinements at Polynomial
Order 8; the Relative Error with Respect to the Exact Solution is 0.2682%
30
Chapter 4
Spatial and Temporal Error Control
in 1D Diffusion Problems
The model problem to serve as the basis of the following discussion is equation (41),
which is the onedimensional equivalent of (113).
( ) ( )
0
0 0 0
( ) (0)
L L L
x L x
u u v
c A vdx A dx AQvdx Aq v L Aq v
t x x
= =
∂ ∂ ∂
ρ + λ = − +
∂ ∂ ∂
∫ ∫ ∫
(41)
where A represents the cross section of a bar.
4.1 The Finite Difference Method, 1D
The trial functions ∈
t
u S and the test functions v S ∈
are written in the form
1
( ) ( )
n
t i i
i
u a t x
=
= Φ
∑
(42)
1
( )
=
= Φ
∑
N
i i
i
v b x (43)
where N is the number of degrees of freedom and
∗
= + n N n , where
*
n represents the
number of coefficients determined by the essential boundary conditions. On substituting
(42) and (43) into (41), a system of N coupled ordinary differential equations results:
31
 { }  { } { } M a K a r + = (44)
where the elements of matrices
   
and M K are, respectively
ij
m and
ij
k :
0
0
.
L
def
ij i j
L
def
j
i
ij
m cA dx
d
d
k A dx
dx dx
λ
= Φ Φ
Φ
Φ
=
∫
∫
(45)
The elements of vector { } r are:
1 1 0
0
0
0
( )
, 2, 3,..., 1
( ) .
L
x
L
i i
L
n n x L
r AQ dx Aq
r AQ dx i n
r AQ dx Aq
=
=
= Φ +
= Φ = −
= Φ −
∫
∫
∫
(46)
The time derivative in (44) can be approximated by a finite difference time stepping
scheme:
( ) { } { } (1 ){ } { } .
t t t t t t
a a a a t
+∆ +∆
≈ + −θ + θ ∆ (47)
At time steps and + ∆ t t t , equation (44) reads:
 { }  { } { }
 { }  { } { } .
t t t
t t t t t t
M a K a r
M a K a r
+∆ +∆ +∆
+ =
+ =
(48)
Multiplying the first equation of (48) by (1 ) −θ and the second equation by θ , one can
write:
32
 { }  { } { }
 { }  { } { }
(1 ) (1 ) (1 )
.
t t t
t t t t t t
M a K a r
M a K a r
+∆ +∆ +∆
−θ + −θ = −θ
θ + θ = θ
(49)
Adding the equations in (49), we get:
  { } { } ( )  { }  { } { } { } (1 ) (1 ) (1 ) .
t t t t t t t t t
M a a K a K a r r
+∆ +∆ +∆
−θ + θ + −θ + θ = −θ + θ (410)
Recognizing that the term multiplying
 
M is represented in equation (47), we can
write:
 { }  { }  { }  { }
{ } { }
1 1
(1 )
(1 ) .
t t t t t t
t t t
M a M a K a K a
t t
r r
+∆ +∆
+∆
− + −θ + θ =
∆ ∆
= −θ + θ
(411)
Combining:
    { }     { } { } { }
1 1
(1 ) (1 ) .
t t t t t t
M K a M K a r r
t t
+∆ +∆
   
+ θ = − −θ + −θ + θ
 
∆ ∆
\ ¹ \ ¹
(412)
This equation is well suited for electronic computations. If 0.5 θ ≥ then the method is
known to be unconditionally stable through many references, such as Solution of
Diffusion Problems by the Finite Element Method [10]. If ∆t is not changed, then the
coefficient matrix on the left needs to be reduced only once. The computation of time
steps involves successive substitutions.
An algorithm was developed and programmed in MATLAB
®
. A linear and constant
time stepping scheme is outlined in the following:
1. Define geometry, boundary conditions, and material properties, specify
constant time step t ∆
33
2. Compute stiffness matrix
 
K and mass matrices
 
M
3. Perform
2
L projection of the initial conditions onto the finite element
subspace
4. Build load vector { } r incorporating the boundary conditions and modify
   
and K M accordingly
5. Prepare time integration by reducing to upper triangular form and solving
by Gaussian elimination (see “\” operator in MATLAB
®
):
a. term1 = (M+θ*∆t *K)\(M(1θ)*∆t *K);
b. term2 = (M+θ*∆t *K)\( ∆t *r);
6. Solve at every time step:
a. For I = 2 to number of time steps
i. Compute a
t+∆t
= term1* a
t
+ term2;
ii. Check time step and reduce if necessary
b. End
7. Assemble solution at every time step
8. Perform postprocessing operations
4.2 The Discontinuous Galerkin Method, 1D
The fundamental idea of this method is to use pextension in both space and time
dimensions. To do this, we define the time domain ( ) 0, J T = and partition it into time
steps
m
I .
{ }
1
1
, where ( , ), 1
M
m m m m
m
I I t t m M
−
=
= ≤ ≤ (413)
34
Each time step
m
I is associated with a temporal approximation order 0
m
r ≥ and a
similar or same finite element space as the spatial problem introduced in Chapters 1 and
2. With this approach, we seek fully discrete solutions
m
U on each time interval
m
I .
, ,
0
( , ) ( , ) ( ) ( ), ,
m
m
r
m j m j m m
I x
j
U t x U t x u x t t I x
Ω
=
= = ϕ ∈ ∈Ω
∑
(414)
where
, j m
u , respectively
, j m
ϕ , is a spatial basis function, respectively a polynomial time
function. As used in Chapter 3 to represent geometric basis functions, scaled Legendre
polynomials are also employed here as time basis functions
, j m
ϕ . More information on
these functions can be found in Finite Element Analysis [11].
m
U is called a trial
function. The test functions are written in the form:
, ,
0
( , ) ( ) ( ), , .
m
r
m i m i m m
i
V t x v x t t I x
=
= ϕ ∈ ∈Ω
∑
(415)
Using the procedure described in The Discontinuous Galerkin TimeStepping Algorithm
in hpVersion Context [6], the discontinuous Galerkin time stepping method is to find a
solution ( , ) U t x by solving successively on each time step
m
I the problem: Find
( ) ,
m
U t x of the form (414) such that
1 1
1 1
m
m
m
m m m m m
I
m m m
I
U
V U V dxdt U V dx
t
gV dxdt U V dx
+ +
− −
Ω Ω
− +
− −
Ω Ω
∂ ¦ ¹
+∇ ∇ +
´ `
∂
¹ )
= +
∫ ∫ ∫
∫ ∫ ∫
(416)
for all test functions ( ) ,
m
V t x of the form (415). Problem (416) is a discrete variational
formulation of (41) with the special case 1 c A ρ = and 1 kA = . ) (
1
x U
m
−
−
and
1
( )
m
U x
+
−
are
the left and right handed limits of the function
m
U at the beginning of the time step
m
I .
35
) (
1
x U
m
−
−
is also the initial data for computing
m
U on the time step
m
I .
1
( )
m
U x
+
−
represents the discontinuous step from ) (
1
x U
m
−
−
at
1 m
t
−
.
Combining (414) through (416), implementing the scaled Legendre polynomials as
temporal shape functions, considering the generic time step ( )
0 1
, I t t = , and omitting the
time step index m to avoid cumbersome notation, the following is true:
0 0
, 0
0
0
{[ ( ) ( )]( , ) [ ] ( , )}
{( , ) ( , ) ( )}
m
m m
m
m
r
j i j i j i H j i j i
i j
I I
r
i i H o i H i
i
I
dt t t u v dt a u v
g dt v U v t
+
=
− +
=
′ ϕ ϕ + ϕ ϕ + ϕ ϕ
= ϕ + ϕ
∑
∫ ∫
∑
∫
(417)
where the scalar inner product ( , )
j i H
u v and the energy inner product ( , )
j i
a u v are the
mass and stiffness matrices,
   
and M K , respectively. The time step I can be
mapped from the reference interval (1,1) by using the following domain mapping:
0 1 1 0
1 1
ˆ ˆ
( ) ( ) , .
2 2
t F t t t tk k t t = = + + = − (418)
For clarity, the following abbreviations are introduced:
1
1
ˆ
ˆ
ˆ ˆ ˆ ˆ ( 1) ( 1)
ij j i j i
A dt
+ +
−
′ = ϕ ϕ + ϕ − ϕ −
∫
(419)
1
1
ˆ
ˆ
ˆ ˆ :
ij j i
B dt
−
= ϕ ϕ
∫
(420)
H i i
v l v f ) ,
ˆ
( : ) (
ˆ
1 1
= (421)
1
1
1
ˆ
ˆ
ˆ : ( )
i i
l g F dt
−
= ϕ
∫
(422)
36
H i i
v l v f ) ,
ˆ
( : ) (
ˆ
2 2
= (423)
2
0
ˆ
ˆ : ( 1)
i i
l U
−
= ϕ − . (424)
With (419) through (424), (417) can be compactly expressed as:
1 2
, 0 0
ˆ ˆ ˆ ˆ
( , ) ( , ) ( ) ( )
2 2
m m
r r
ij j i H ij j i i i i i
i j i
k k
A u v B a u v f v f v
= =
+ = +
∑ ∑
. (425)
The matrices A
ˆ
and B
ˆ
are hierarchical. This is exploited computationally by
calculating the largest temporal approximation order once and writing the matrices to a
storage medium for all future references.
The spatial problems are discretized as in Chapter 2. By using a finite dimensional
subspace
p
S
, the test and trial functions are expressed as linear combinations of the
basis functions
k
s . Mass and stiffness matrices are obtained which lead to the complete
matrix expression of the elliptic problem (426).
00 0
1 2
0 0 0
1 2
0
ˆ ˆ
2
2
ˆ ˆ
2
r
r
r r
r rr
k
A M K A M
u f f
k
u
f f
k
A M A M K
(
+
(
¦ ¹ ¦ ¹
¦ ¹
(
¦ ¦ ¦ ¦ ¦ ¦
(
= +
´ ` ´ ` ´ `
(
¦ ¦ ¦ ¦ ¦ ¦
(
¹ )
¹ ) ¹ )
(
+
(
¸ ¸
(426)
An algorithm was developed and programmed in MATLAB
®
. Its adaptive time
stepping scheme is outlined:
1. Define geometry, boundary conditions, and material properties, specify
constant time step t ∆
2. Compute stiffness matrix
 
K and mass matrix
 
M
37
3. Perform
2
L projection of the initial conditions onto the finite element
subspace
4. Build load vectors
1 2
and f f
incorporating the boundary conditions,
modify K and M accordingly, and build block matrix BM by Kronecker
tensor product
5. Solve each time interval by reducing to upper triangular form and solving
by Gaussian elimination (see “\” operator in MATLAB
®
): at every time
step I :
( )
1 2
\
2
k i
a BM f f
 
= +

\ ¹
;
6. Assemble solution for each time interval
7. Perform postprocessing operations
The solution of the fully discrete system (426) for large systems is demanding
computationally. For efficient implementation of engineering problems, this system
should be decoupled. It has been shown that these systems are diagonalizable in the
complex number space at least up to a temporal approximation order of 100 (hp
Discontinuous Galerkin Time Stepping for Parabolic Problems [13].) Since the size of
matrices considered herein is small, diagonalization was not implemented.
4.3 L
2
Projection of Initial Conditions at t = 0
+
The initial conditions
( )
, 0 f x
+
need to be expressed in terms of the coefficient vector
0 t
a
+
=
. Therefore, ( ) , 0 f x must be projected onto the finite element space ( , , )
p
S Q Ω ∆
defined in (24). The solution domain is partitioned into k elements of polynomial
order p . Each element is mapped from the standard element 1 1 − ≤ ξ ≤ via the mapping
function (427),
38
1
1 1
.
2 2
k k
x x x
+
−ξ + ξ
= + (427)
We need to express
( )
, 0 f x
+
as a piecewise polynomial function. On 1 1 − ≤ ξ ≤ , it can
be approximated with linear combinations of the basis functions in
p
i
N S
:
1 1 2 2 3 3 1 1
( , 0 ) .
p p
f x a N a N a N a N
+
+ +
= + + + + … (428)
It should be noted that ( )
1
, 0
k
a f x = and ( )
2 1
, 0
k
a f x
+
= because
( ) ( ) ( ) ( )
1 1 2 2
1 1, 1 0, 1 1, 1 0, and 0 at 1 for 3
i
N N N N N i − = = = − = = ξ = ± ≥ . Therefore
we can rewrite (428) and define the zerobounded function ( ) g ξ and the difference
function ( )
i
F a .
( )
1 3 3 4 4 1 1
2
1
3 3 4 4 1 1
1
1 1
( ) ( ) ( )
2 2
( ) ( )
2
k k
def
k k p p
def
k
i p p
g f f x f x a N a N a N
l
F a g a N a N a N d
+ + +
+
+ +
−
−ξ + ξ
ξ = − − = + + +
= ξ − − − − ξ
∫
…
…
(429)
where ( 1) ( 1) 0 g g − = + = . The coefficients ( ) 3, 4, , 1
i k
a i p = + … are determined by
minimizing ( )
i
F a with respect to
i
a :
0 =
∂
∂
i
a
F
. (430)
The minimization condition (430) is necessary and sufficient for the determination of
( ) 3, 4, , 1
i
a i p = − … because F is a convex quadratic function, the minimum of which
is necessarily global. This results in a system of simultaneous equations:
39
( )
( )
( )
( )
1
3 3 4 4 1 1 3
1
1
3 3 4 4 1 1 4
1
1
3 3 4 4 1 1
1
1
3 3 4 4 1 1 1
1
( ) 0
( ) 0
( ) 0
( ) 0 .
p p
p p
p p i
p p p
g a N a N a N N d
g a N a N a N N d
g a N a N a N N d
g a N a N a N N d
+
+ +
−
+
+ +
−
+
+ +
−
+
+ + +
−
ξ − − − − ξ =
ξ − − − − ξ =
ξ − − − − ξ =
ξ − − − − ξ =
∫
∫
∫
∫
…
…
…
…
(431)
Defining
1
2 2
1
, , 1, 2, , 1
ij i j k
c N N d i j p
+ +
−
= ξ = −
∫
… (432)
and
1
1
1
( ) , 1, 2, , 1
i i k
r g N d i p
+
−
= ξ ξ = −
∫
… (433)
we have a system of simultaneous equations from which ( ) 3, 4, , 1
i k
a i p = + … can be
computed:
11 3 12 4 1, 1 1 1
21 3 22 4 2, 1 1 2
1 3 2 4 , 1 1
1,1 3 1,2 4 1, 1 1 1
.
p p
p p
i i i p p i
p p p p p p
c a c a c a r
c a c a c a r
c a c a c a r
c a c a c a r
− +
− +
− +
− − − − + −
+ + + =
+ + + =
+ + + =
+ + + =
…
…
…
…
(434)
40
The terms
ij
c can be determined once and for all, however, the terms
i
r generally
require numerical integration. Since all elements are mapped onto the standard element,
the GaussLegendre quadrature was employed.
4.3.1 L
2
Projection of the Initial Solution f(x) = sin(πx)
The initial solution ( ) ( ) sin f x x = π cannot be represented exactly because the sine
function is not in the finite element space
p
S
. However, when ( ) f x is a smooth
function as in this case, then the error in maximum norm can be made arbitrarily small
by choosing p sufficiently high. For example, considering the finite element space in
Table 41.
Four positions of greater point density in Figure 41 coincide with the element
transitions. This is because the location of points corresponds to the quadrature points.
The approximation error corresponding to 3 elements and 6 p = is shown in Figure 42.
The error at every element boundary is zero because the function values are assigned by
collocation.
In addition, it should be noted that the center element produces a much smaller error,
which can be explained by the fact that for the center element all of the asymmetric
basis functions are zero and the symmetric basis functions are good approximations of
the sinusoidal exact solution. Figure 42 also indicates that the error, corresponding to 3
elements and 6 p = , is on the order of 10
8
.
41
TABLE 41. L
2
Projection of the Polynomial Function f(x) = sin(πx)
Initial Condition
( ) f x
sin( ) x π
Number of Gauss Pts.
G
N
20
Solution Domain
Ω
{ }
0 1 x x ≤ ≤
Number of Elements
∆ 3
Polynomial Order p
6
Left BC
0
u
( ) 0 0 f =
Right BC
L
u
( ) 0 f L =
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.3
0.2
0.1
0
0.1
0.2
0.3
6 6 6
1Dmeshwith3elements.
lengthx [1]
t
h
i
c
k
n
e
s
s
y
[
1
]
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
di stance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
0
and u
(L
2
)
0
of f(x) = sin(pi*x), f(0) = f(1) = 0, M(∆) = 3, p = 6
u
0
u
(L
2
)
0
FIGURE 41. Comparison between Exact Function and its L
2
Projection
42
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
4
3
2
1
0
1
2
3
4
x 10
8
di stance x [1]
e
r
r
o
r
e
[
1
]
u
(L
2
)
0
 u
0
, f(x) = sin(pi*x), f(0) = f(1) = 0, M(∆) = 3, p = 6
spline
true data
FIGURE 42. Error Plot in the Range of ±4*10
8
The corresponding error in
2
L norm amounts to
6
2.7 10 %
−
⋅ . Spatial error control can be
exercised by increasing the number of degrees of freedom. One can either increase the
number of elements or raise their polynomial order or both. In this particular case, we
found by trial and error that 7 elements of polynomial order 10 are sufficient to reach the
error, which is of the order of the machine ε . Of course, other
2
L projections can be
used also. Table 42 lists the respective element configuration. The following Figures
43 and 44 present the comparison between exact and projected functions as well as the
error, which is on the order of the machine ε .
43
TABLE 42. Refined L
2
Projection of the Polynomial Function f(x) = sin(πx)
Initial Condition
( ) f x
sin( ) x π
Number of Gauss Pts.
G
N
20
Solution Domain
Ω
{ }
0 1 x x ≤ ≤
Number of Elements
∆ 7
Polynomial Order p
10
Left BC
0
u
( ) 0 0 f =
Right BC
L
u
( ) 0 f L =
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.3
0.2
0.1
0
0.1
0.2
0.3
10 10 10 10 10 10 10
1Dmesh with 7 elements.
length x [1]
t
h
i
c
k
n
e
s
s
y
[
1
]
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
di stance x [1]
t
e
m
p
e
r
a
t
u
r
e
u
[
1
]
u
0
and u
(L
2
)
0
of f(x) = sin(pi*x), f(0) = f(1) = 0, M(∆) = 7, p = 10
u
0
u
(L
2
)
0
FIGURE 43. Comparison between the Exact Function and its Projection
44
The error in
2
L norm is
13
1.6 10
−
⋅ . In summary, we have seen three methods that will
improve projection error and, as we will later see, increase the quality of the numerical
solution. The first is to increase in the number of elements, the second is to increase the
polynomial order of the elements, and the third is to apply geometric grading toward the
end points of the solution domain. The third method is effective for unsmooth problems.
The first two methods were presented herein. An application of the third method was
demonstrated in Chapter 3. Equivalently, fewer elements and higher polynomial order
will work as well. In Figure 45, 5 elements are used at polynomial order 11 to achieve
similar results as in Figure 44.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
3
2.5
2
1.5
1
0.5
0
0.5
1
1.5
x 10
15
di stance x [1]
e
r
r
o
r
e
[
1
]
u
(L
2
)
0
 u
0
, f(x) = sin(pi*x), f(0) = f(1) = 0, M(∆) = 7, p = 10
spline
true data
FIGURE 44. Relative Error Plotted in the Range of ±2*10
15
45
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
5
4
3
2
1
0
1
2
3
x 10
15
di stance x [1]
e
r
r
o
r
e
[
1
]
u
(L
2
)
0
 u
0
, f(x) = sin(pi*x), f(0) = f(1) = 0, M(∆) = 5, p = 11
spline
true data
FIGURE 45. Relative Error Plotted in the Range of ±4*10
15
4.3.2 L
2
Projection of the Initial Solution f(x) = x(1x)
In the special case when ( ) f x is a polynomial or piecewise polynomial function, the
initial condition can be represented exactly. For example, if ( ) (1 ) f x x x = − then a
single element with 2 p ≥ is sufficient for the description of the initial condition. This
would not be sufficient to represent the solution in time, however.
4.4 Temporal Error Control
The CrankNicolson method (CNM) is second order accurate in time and is
unconditionally stable. For this reason, it is a widely used method for integrating
ordinary differential equations. Higher order time methods can be used for integrating
smooth solutions more accurately, however, they are not applicable when the solution
changes substantially over small time intervals. Lower order methods have greater
generality in this regard.
46
Spatial errors largely depend upon the smoothness of the initial conditions. Since spatial
solution gradients diminish with time, the solution becomes smoother and smoother.
Therefore spatial errors decrease with time. Both the spatial and temporal errors will be
investigated with respect to specific cases.
4.4.1 Adaptive Time Solvers
The finite difference and discontinuous Galerkin algorithms described in Sections 4.1
and 4.2 were implemented in MATLAB
®
. These solvers enabled performance tests with
respect to convergence and CPU time. The tests were conducted using the three initial
conditions, representing two very smooth and compatible initial conditions and one
incompatible initial condition, which were
2
L projected in Sections 4.3 and 3.1. The
boundary conditions were enforced by restriction in the boundary points. The three
problem statements are expressed in (435), (436), and (437) and will be referred to as
Model Problems 1, 2, and 3, respectively.
( ) 1
( , 0) sin( ), (0, ) 0, ( , ) 0 u x x u t u L t = π = = (435)
( ) 2
( , 0) (1 ), (0, ) 0, ( , ) 0 u x x x u t u L t = − = = (436)
( ) 3
( , 0) 1, (0, ) 0, ( , ) 0 u x u t u L t = = = (437)
hpDGFEM for Parabolic Evolution Problems [5] gives the exact solutions for the three
model problems:
( )
2
1
( , ) sin( )
t
EX
u x t x e
−π
= π ⋅ (438)
( )
2 2
2
3 3
1
1 cos( )
( , ) 4 sin( )
l t
EX
l
l
u x t e l x
l
∞
− π
=
− π
= π
π
∑
(439)
( )
2 2
3
1
1 cos( )
( , ) 2 sin( )
l t
EX
l
l
u x t e l x
l
∞
− π
=
− π
= π
π
∑
. (440)
47
The computer program, which was written in support of this work, computes the relative
error in energy norm on the basis of (29). This value is compared with the maximum
acceptable relative error specified by the user. Upon starting the hDGFEM option, the
solver starts with one finite time increment, computes a numerical solution for the entire
time domain, and determines the maximum relative error in energy norm. As long as
the maximum acceptable error in energy norm is smaller than the computed value, the
solver automatically creates a new mesh in the time domain, using a temporal grading
function, and starts over. In hpDFGEM mode, the solver increases the degrees of
freedom in time by both doubling the number of elements in time and their polynomial
order. There is also a program option that provides a choice between monitoring the
relative spatial error in energy norm with respect to time ( )
r
e t or its time integral
( )
0
1
T
r
t
e t dt
T
=
∫
, where T is the total time of transient solution. Since 1 T = in this work,
the term
1
T
is omitted in the following.
The numerical experiments were performed with both error options. The first and more
stringent error option strongly enforces the error limit, which might lead to unreasonably
fine and computationally expensive discretizations. In these cases, the overall solution
quality is driven well below the error limit only to accommodate a localized error. For
example, this is true for incompatible initial conditions. The second and less stringent
error option is used throughout this work.
In the following, convergence is investigated by monitoring the maximum relative error
using (29) versus the degrees of freedom of the increasingly refined mesh. To assess
solver performance, the CPU time of all solver runs inclusive of assembly time is
recorded within the program. Since the computation of the exact solutions is very time
intensive for Model Problems 2 and 3 and is not indicative of solver performance, its
clock time is subtracted from the total CPU time.
48
When computing with finite difference methods, most of the computer time is spent on
computing the continuously changing coefficient vector of the spatial solution through
time. It should be pointed out that, in the interest of numerical efficiency, all matrix
reductions were performed before this loop was entered.
The Performance of the hDGFEM with r
m
= 0 is Similar to that of a Finite
Difference Solver.
Certain similarities exist between the implementations of finite difference and
discontinuous Galerkin solvers. Both implementations employ spatial finite element
solvers with hpextension capabilities. From the multitude of available finite difference
methods, the BackwardEuler method and the CNM were chosen. Since they are both
first order time approximations, they are comparable to temporal approximation order 1
of the hDGFEM. This is illustrated in Figures 46, 47, and 48, where the time integral
of the relative error is computed for Model Problems 1 and 2 while solving with the
BackwardEuler, CrankNicolson, and hDGFEM ( ) 0
m
r = . These errors plotted against
the number of degrees of freedom on a loglog scale.
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 7
t
i
m
e
i
n
t
e
g
r
a
l
o
f
t
h
e
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE 46. Time Integral of Relative Error in Energy Norm, Model Problem 1;
1 Element, p=8
49
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 7
t
i
m
e
i
n
t
e
g
r
a
l
o
f
t
h
e
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE 47. Time Integral of Relative Error in Energy Norm, Model Problem 2,
1 Element, p=8
10
0
10
1
10
2
10
3
10
4
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 39
t
i
m
e
i
n
t
e
g
r
a
l
o
f
t
h
e
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
1
2
3
4
5
6
7
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE 48. Time Integral of Relative Error in Energy Norm, Model Problem 3,
5 Geometrically Graded Elements, Spatial DOF = 8 Nodes+5 Elements*(81)*p =
39
50
The convergence paths of Model Problems 1 and 2 have almost identical appearance.
However, close inspection reveals that they are slightly different from one another. The
rates of convergence of the CNM and the hDGFEM are approximately equal. While
the CNM has a smaller error in the time integral of the relative error in energy norm in
the first iteration, the hDGFEM takes over in all following iterations. The Backward
Euler Method has lower errors than the other methods, however, it generates larger
errors beginning at iteration 3. In addition, its rate of convergence is smaller than those
displayed by the other two methods.
Due to extremely slow convergence of Model Problem 3, the Backward Euler algorithm
was not used. However, to reach an error in energy norm less than 1.0%, geometric
grading had to be used in this case to control the spatial error. hDGFEM outperforms
CNM after the first iteration, although CNM settles at a higher rate of convergence
beginning with iteration 10.
Of course, Figures 46, 47, and 48 are only meaningful if the spatial error is negligible
in relation to the temporal error. By observing temporal convergence characteristics for
increasingly refined spatial discretizations, it was determined that one element at
polynomial order 8 is sufficient for Model Problems 1 and 2. Model Problem 3 requires
a geometrically graded mesh of 5 elements. See Appendix C for more detail.
The Initial Solution f(x) = sin(πx).
By increasing the temporal approximation order of the hDGFEM, it is demonstrated in
Figure 49 that the rate of convergence increases linearly. Slopes of 1, 2, 3, and 4 are
obtained for approximation orders 0, 1, 2, and 3, respectively. When comparing the h
DGFEM with finite difference solvers through experimental computations, the finite
difference solvers were adjusted for best performance. By trial and error, it was
determined that one element with a spatial polynomial order of 8 resulted in the best
convergence at minimal solution times.
51
10
0
10
1
10
2
10
3
10
6
10
4
10
2
10
0
10
2
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
1
2
3
4
5
6
Comparison of Convergence Performance, DOF in Space = 49
t
i
m
e
i
n
t
e
g
r
a
l
o
f
t
h
e
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
hDGFEM, r
m
=0
hDGFEM, r
m
=1
hDGFEM, r
m
=2
hDGFEM, r
m
=3
FIGURE 49. hDGFEM with Increasing Approximation Order r
m
In this exploratory procedure, it was also determined that the finite difference solvers
can reach a relative error in energy norm of less than 10
4
% within reasonable CPU
time. Accordingly, one spatial element was used for the hDGFEM method, whereby an
optimal polynomial approximation order
m
r was selected from Figures 410 and 411,
which illustrate convergence paths and CPU times, respectively.
From the results, it was concluded that the temporal approximation order 7
m
r = was the
most effective temporal discretization of the hDGFEM to reach an error in energy norm
of less than 10
4
% and to meet the requirement of converging slightly better than the
CNM. Using these solver parameters, approximate solutions of the heat equation for
Model Problem 1 over the time period of one second were computed. Performance
comparisons of temporal approximation orders 1 through 9 with respect to convergence
and CPU time are given in Figures 412 and 413.
52
10
0
10
1
10
2
10
3
10
6
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
1
2
3
4
5
6
1
2
3
4
5
1
2
3
4
1
2
3
1
2
3
1
2
3
1
2
Comparison of Convergence Performance, DOF in Space = 7
t
i
m
e
i
n
t
e
g
r
a
l
o
f
t
h
e
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
hDGFEM, r
m
=1
hDGFEM, r
m
=2
hDGFEM, r
m
=3
hDGFEM, r
m
=4
hDGFEM, r
m
=5
hDGFEM, r
m
=6
hDGFEM, r
m
=7
hDGFEM, r
m
=8
hDGFEM, r
m
=9
FIGURE 410. hDGFEM Performance at Multiple Values of r
m
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
10
2
1
2
3
4
5
6
7
8
9
1 2
3
4
5
6
7
2 3
4
5
6
1
2
3
4
5
2
3
4
1
2
3
1
2
3
1
2
3
1 2
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
hDGFEM, r
m
=1
hDGFEM, r
m
=2
hDGFEM, r
m
=3
hDGFEM, r
m
=4
hDGFEM, r
m
=5
hDGFEM, r
m
=6
hDGFEM, r
m
=7
hDGFEM, r
m
=8
hDGFEM, r
m
=9
FIGURE 411. CPU Times Corresponding to Figure 410; Note that the Numbered
Data Points Correlate Figures 410 and 411
53
10
0
10
1
10
2
10
3
10
4
10
6
10
4
10
2
10
0
10
2
Comparison of Convergence Performance, DOF in Space = 7
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
1
2
3
CNM
hDGFEM, r
m
=7
FIGURE 412. Comparison of Convergence Performance: CNM and hDGFEM at
r
m
= 7
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
1
7
8
9
10
11
12
13
1 2
3
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
CNM
hDGFEM, r
m
=7
FIGURE 413. Comparison of CPU Time in the Accuracy Range of 1.94 % to
1.22*10
5
%; The Numbered Data Points Correlate Figures 412 and 413
54
When the mesh is coarse then the CPU time is very short and therefore it is not very
repeatable. Hence, a comparison is difficult. However, for coarse meshes the relative
errors are so large that they are not important for engineering purposes. For this reason,
relative errors greater than 2.0% were disregarded. Based on Figure 412, the discussion
will focus on iterations 6 through 13 of the CNM and 1 through 3 for the hDGFEM.
Figure 413 illustrates the comparison of CPU time needed to perform the computations
of Figure 412. After 0.032 seconds of solver time, CNM and hDGFEM reach iteration
8 and iteration 2. Their respective errors in energy norm are
2
4.5 10 %
−
⋅ and
3
1.1 10 %
−
⋅ .
As iterations are increased from this point, the hDGFEM outperforms the CNM with an
increasing margin. At iteration 13, the CNM reaches an error of
5
4.9 10 %
−
⋅ in 14.9
seconds and, after 0.047 seconds, the hDGFEM reaches iteration 3 reporting an error of
6
7.5 10 %
−
⋅ . In this particular case, the hDGFEM outperforms the CNM by a factor of
315 on a time basis at a 6.5 fold smaller integral error. Figure 414 illustrates the error
in energy norm over the entire time domain for the CNM and the hDGFEM. Figure 4
15 illustrates the finite element solution
FE
u .
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
10
6
10
5
10
4
10
3
Temporal Error History, IC: u(x,t = 0) = sin(pi*x), 100*u
FE
u
EX

L2
/ u
EX

L2
time t [sec]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
[
%
]
hDGFEM, p=8, r
m
=8
CNM, p=8
FIGURE 414. Temporal Error Control
55
FIGURE 415. Finite Element Solution to Model Problem 1, Plotted on Uniformly
Spaced PostProcess Grid
The Initial Solution f(x) = x(1x).
Analogously, an approximate solution of the heat equation was computed for this model
problem. This solution is “not arbitrarily smooth in time and therefore convergence
rates are dominated by the temporal regularity” of the solution, as stated in hpDGFEM
for Parabolic Evolution Problems [5]. However, the same reference indicates that “the
optimal convergence rates can be recovered by the use of graded time meshes.” In
accordance with the cited reference, the temporal grading function
2 3
( )
m
r
h t t
+
= was used
to obtain Figure 416.
56
10
0
10
1
10
2
10
3
10
4
10
3
10
2
10
1
10
0
10
1
10
2
Comparison of Convergence Performance, DOF in Space = 63
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
1 2
3
4
5
6
7
uniform hDGFEM, r
m
=2
graded hDGFEM, r
m
=2
FIGURE 416. hDGFEM Performance at r
m
= 2, Time Grading Function h(t) = t
7
This figure indicates that for 2
m
r = , the optimal convergence slope of –3 is obtained by
use of the temporal grading ( ) h t . In preparation to a comparison between hDGFEM
and finite difference algorithms for this model problem, Figures 417 and 418 were
prepared, which, at various values for
m
r , illustrate the rate of convergence and CPU
time, respectively. Inspection of these figures led to the conclusion that from the range
4 9
m
r ≤ ≤ , the temporal approximation order 9
m
r = resulted in the best performance.
In conjunction with the temporal grading function
2 3
( )
m
r
h t t
+
= , the hDGFEM
converged to an error in energy norm of less than 10
3
%, which was slightly better than
the CNM. In addition, one geometrically graded layer of elements had to be used at the
boundary points to achieve errors below 10
1
%. This demonstrates the fact that the
solution to Model Problem 2 is not arbitrarily smooth although its initial solution lies in
2
L . Using these solver parameters, approximate solutions of the heat equation for
Model Problem 2 over the time period of one second were computed. Performance
57
comparisons with respect to convergence and CPU time are illustrated in Figures 419
and 420.
10
0
10
1
10
2
10
3
10
5
10
4
10
3
10
2
10
1
10
0
10
1
1 2
3
4
5
6
1 2
3
4
5
6
1 2
3
4
5
6
1 2
3
4
5
1 2
3
4
5
1 2
3
4
5
Comparison of Convergence Performance, DOF in Space = 23
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
hDGFEM, r
m
=4
hDGFEM, r
m
=5
hDGFEM, r
m
=6
hDGFEM, r
m
=7
hDGFEM, r
m
=8
hDGFEM, r
m
=9
FIGURE 417. Convergence Rate Using Various Values r
m
and h(t) = t
7
10
0
10
1
10
2
10
3
10
0
10
1
10
2
1
2
3
4
5
6
1
2
3
4
5
6
1
2
3
4
5
6
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
hDGFEM, r
m
=4
hDGFEM, r
m
=5
hDGFEM, r
m
=6
hDGFEM, r
m
=7
hDGFEM, r
m
=8
hDGFEM, r
m
=9
FIGURE 418. CPU Time Using Various Values r
m
and h(t) = t
7
58
10
0
10
1
10
2
10
3
10
4
10
4
10
3
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 23
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
1 2
3
4
5
CNM
hDGFEM, r
m
=9
FIGURE 419. Integral of Error in Energy Norm Reduced to below 0.001%
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
1
3
5
6
7
8
9
10
11
12
1
2
3
4
5
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
CNM
hDGFEM, r
m
=9
FIGURE 420. Comparison of CPU Time Performance in the Accuracy Range of
0.32 % to 1.2*10
4
% Corresponding to Figure 419; Note that the Numbered Data
Points Correlate Figures 419 and 420
59
Considering the magnitudes of error in energy norm in Figure 419, only CNM
iterations 6 through 12 and all hDGFEM are of interest from an engineering
perspective. Crossreferencing Figure 420, the CNM converges in 7 iterations and
0.063 seconds to an error of 0.32% and the hDGFEM converges in 1 iteration and
0.078 seconds to an error of 0.44%. As iterations are increased from this point, the h
DGFEM again outperforms the CNM with increasing margin. In 12 iterations, the CNM
reaches 3.3*10
4
% in 17.1 seconds; the hDGFEM converges to 1.2*10
4
% in 5
iterations and 2.48 seconds. In this particular case, the hDGFEM outperforms the
CNM by a factor of 6.8 on a time basis at approximately equal integral error in energy
norm. Figure 421 demonstrates the algorithmic control over the error in energy norm
over the entire time domain. Figure 422 shows the finite element solution for Model
Problem 2 and the geometrically graded 3element mesh used in connection with the h
DGFEM solution. In the time domain, the adaptive time solver used 4 temporal
elements of increasing length. The increasing length is based on the temporal grading
function
2 3
( )
m
r
h t t
+
= . The superimposed grid indicates the location of 20 Gauss points,
which were specified along both spatial and temporal elements.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
10
7
10
6
10
5
10
4
10
3
10
2
10
1
Temporal Error History, IC: u(x,t = 0) = x.*(1x)
time t [sec]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
[
%
]
hDGFEM, p=8, r
m
=9
CNM, p=8
FIGURE 421. Temporal Error Control, hDGFEM
60
FIGURE 422. Solution to Model Problem 2; the hDGFEM Mesh is Shown by the
Heavy Lines
The Initial Solution f(x) = 1, f(0) = f(1) = 0.
Approximate solutions of the heat equation were computed for this model problem. In
this case, the initial solution has strongly singular characteristics at the boundary points
of the domain. Furthermore, the projected initial solution exhibits oscillations at the
boundary points. A comparison of solver performance between CNM and hDGFEM is
illustrated in Figure 423 and the corresponding solution times are shown in Figure 424.
61
10
0
10
1
10
2
10
3
10
4
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 55
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
CNM, p=8
hDGFEM, p=8, r
m
=8
FIGURE 423. Error in Energy Norm Reduced to below 1.0%
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
1
3 5
6
7
8
9
10
11
12
13
14
1
2
3
4
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
CNM, p8
hDGFEM, p=8, r
m
=8
FIGURE 424. Comparison of CPU Time Performance in the Accuracy Range of
0.32 % to 1.2*10
4
% Corresponding to Figure 423; Note that the Numbered Data
Points Correlate Figures 423 and 424
62
Considering the magnitudes of error in energy norm in Figure 423, only CNM
iterations 13 and 14 and hDGFEM iterations 3 and 4 are of interest from an engineering
perspective. To reach an error in energy norm of less than 1.0%, the CNM takes 415.69
seconds (0.74%) while the hDGFEM converges in 1.27 seconds (0.43%).
Figure 425 illustrates the relative error in energy norm for the CNM and the hDGFEM.
The figure reveals that the simple timehalving algorithm converges to the desired
accuracy with respect to both methods, however, produces inefficient time
discretization. As the solvers address the startup singularity with repeated refinements
along the entire time domain, the error toward the end of the time domain becomes
smaller than necessary. More sophisticated adaptive algorithms are likely to improve
this inefficiency.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
Temporal Error History, IC: u(x,t = 0) = 1, 100*u
FE
u
EX

L2
/ u
EX

L2
time t [sec]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
[
%
]
hDGFEM, p=8, r
m
=8
CNM
FIGURE 425. Temporal Error Control; TimeHalving Leads to Relative Errors
that are Better than Necessary
Better results are expected with graded meshes. To improve the hDGFEM, the
temporal grading function
2 3
( )
m
r
h t t
+
= was used again. Since the CNM was
63
significantly outperformed in the previous calculation, the MATLAB
®
internal ODE
Solver Suite was substituted. Trial and error experimentation indicated that from
various solver options, the option ode15s, described in Appendix E, performed best with
respect to this model problem. Since substantial local errors at time zero were expected,
integral error monitoring was chosen. A 5element geometrically graded mesh with
8 p = was employed.
Using the grading function ( ) h t , the convergence paths of several temporal
approximation orders were computed. The results are shown in Figure 426.
10
0
10
1
10
2
10
3
10
3
10
2
10
1
10
0
10
1
10
2
Convergence for Increasing Temporal Polynomial Order, DOF in Space = 55
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1 2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
1
2
3
4
hDGFEM, r
m
=3
hDGFEM, r
m
=4
hDGFEM, r
m
=5
hDGFEM, r
m
=6
hDGFEM, r
m
=7
hDGFEM, r
m
=8
FIGURE 426. Convergence of Model Problem 3 Using the Integral of e
r
(t)
Selecting 8
m
r = , the hDGFEM is compared with ode15s. The convergence paths and
corresponding CPU times are shown in Figures 427 and 428. In the interest of keeping
the spatial error small, a geometrically graded mesh with 7 elements at 8 p = was used.
64
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
Comparison of Convergence Performance, DOF in Space = 55
t
i
m
e
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
f
r
o
m
t
=
0
t
o
T
DOF in time [1]
1
1
2
3
4
ode15s
hDGFEM, p=8, r
m
=8
FIGURE 427. Error in Energy Norm Reduced to below 1.0%
10
0
10
1
10
2
10
3
10
1
10
0
10
1
1
1
2
3
4
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
ode15s
hDGFEM, p=8, r
m
=8
FIGURE 428. Comparison of CPU Time Performance Corresponding to Figure 4
27; Note that the Numbered Data Points Correlate Figures 427 and 428
65
Comparing the ode15s iteration 1 and hDGFEM iteration 4, it is found that these
algorithms converge to errors in energy norm of 0.02% in 0.69 seconds and to 0.04% in
1.42 seconds, respectively. Although ode15s is slightly better than hDGFEM, it is
interesting to note this research version of hDGFEM is quite effective and competitive
with this professionally developed solver. Therefore the development of a sophisticated
adaptive algorithm for hDGFEM appears very promising.
Figure 429 illustrates the relative error in energy norm for the ode15s and the h
DGFEM. The solvers behave in very similar fashion. Since they have been developed
from one another independently, it is reassuring of the validity of this work.
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
10
4
10
3
10
2
10
1
10
0
10
1
10
2
Temporal Error History, IC: u(x,t = 0) = 1, 100*u
FE
u
EX

L2
/ u
EX

L2
time t [sec]
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
[
%
]
hDGFEM, p=8, r
m
=8
ode15s
FIGURE 429. Temporal Error Control
Finally, Figure 430 illustrates the hDGFEM solution.
66
FIGURE 430. Solution to Model Problem 3; the hDGFEM Mesh Is Shown by the
Heavy Lines
4.4.2 pDGFEM and hpDGFEM in 1DSpace and Time
The pDGFEM and hpDGFEM introduced in Chapter 4.2 were also programmed in
MATLAB
®
. To produce higher degrees of freedom systematically, the pDGFEM
increments the temporal approximation order to achieve higher degrees of freedom.
Analogously, the hpDGFEM increases the temporal approximation order and the
number of elements in the time domain simultaneously. With these methods, greater
speeds of convergence than that of hDGFEM are expected for Model Problems 1, 2,
and 3.
67
The Initial Solution f(x) = sin(πx).
Using 4 spatial elements with temporal approximation order 7
m
r = , it is illustrated in
Figure 431 that the hpDGFEM converges faster than the hDGFEM. The
corresponding CPU times are plotted in Figure 432. Since the exact solution of Model
Problem 1 can be computed directly, very small errors in energy norm can be achieved
within relatively short CPU times. In Figure 433, it is demonstrated that the pDGFEM
converges exponentially when the exact solutions are analytic in time.
10
0
10
1
10
2
10
3
10
12
10
10
10
8
10
6
10
4
10
2
10
0
10
2
Comparison of Convergence Performance, DOF in Space = 39
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
2
3
4
5
6
7
hDGFEM, r
m
=7
hpDGFEM, r
m
=7
FIGURE 431. Convergence Comparison: h and hpDGFEM Solving Model
Problem 1
68
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
1
2
3
4
5
2
3
4
5
6
7
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
hDGFEM, r
m
=7
hpDGFEM, r
m
=7
FIGURE 432. Comparison of CPU Time Performance Corresponding to Figure 4
31; Note that the Numbered Data Points Correlate Figures 431 and 432
0 2 4 6 8 10 12 14 16
10
7
10
6
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
10
3
Time Convergence, Spatial DOF = 39
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
[
%
]
DOF in time [1]
100* ∫ e
r
(t)dt
FIGURE 433. Exponential Convergence of pDGFEM
69
The Initial Solution f(x) = x(1x).
Figures 434 and 435 illustrate that the hpDGFEM does not improve performance
when using a 4element mesh with 8 p = and grading toward the endpoints. h and hp
methods exhibit approximately the same performance. In Section 4.4.3, it is shown that
the hpDGFEM will outperform the hDGFEM when an appropriate time grading is
used.
The pDGFEM, however accomplishes faster than algebraic convergence initially and
then algebraic convergence once the spatial error becomes dominant (Figure 436.) To
continue faster than algebraic convergence as degrees of freedom in time are increased,
the spatial discretization would need to be refined. Appendix C provides examples to
verify this point.
10
0
10
1
10
2
10
3
10
4
10
3
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 63
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
2
3
4
5
6
7
hDGFEM, r
m
=9
hpDGFEM, r
m
=9
FIGURE 434. Convergence Comparison: h and hpDGFEM Solving Model
Problem 2
70
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
1
2
3
4
5
2
3
4
5
6
7
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
hDGFEM, r
m
=9
hpDGFEM, r
m
=9
FIGURE 435. Comparison of CPU Time Performance Corresponding to Figure 4
34; Note that the Numbered Data Points Correlate Figures 434 and 435
0 2 4 6 8 10 12
10
1
10
0
10
1
10
2
10
3
Time Convergence, Spatial DOF = 63
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
[
%
]
DOF in time [1]
100* ∫ e
r
(t)dt
FIGURE 436. Initial Exponential and then Algebraic Convergence (pDGFEM)
71
The Initial Solution f(x) = 1, f(0) = f(1) = 0.
Figures 437 and 438 illustrate that the hpDGFEM does not improve performance
when using a 4element mesh with 8 p = and grading order 2 at the endpoints of the
domain.
hDGFEM and hpDGFEM methods display approximately equal performance. As will
be seen in the next section, the hpDGFEM will outperform the hDGFEM and p
DGFEM when an appropriate time grading is used. The pDGFEM achieves close to
exponential convergence initially and then algebraic convergence once the spatial error
becomes dominant (Figure 439.)
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 63
i
n
t
e
g
r
a
l
o
f
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
6
2
3
4
5
6
7
hDGFEM, r
m
=9
hpDGFEM, r
m
=9
FIGURE 437. Convergence Comparison: h and hpDGFEM Solving Model
Problem 3
72
10
0
10
1
10
2
10
3
10
2
10
1
10
0
10
1
1
2
3
4
5
6
2
3
4
5
6
7
Comparison of Time Performance
C
P
U
t
i
m
e
t
[
s
e
c
]
DOF in time [1]
hDGFEM, r
m
=9
hpDGFEM, r
m
=9
FIGURE 438. Comparison of CPU Time Performance Corresponding to Figure 4
37; Note that the Numbered Data Points Correlate Figures 437 and 438
0 2 4 6 8 10 12 14
10
0
10
1
10
2
10
3
Time Convergence, Spatial DOF = 63
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
[
%
]
DOF in time [1]
100* ∫ e
r
(t)dt
FIGURE 439. Initial Exponential and then Algebraic Convergence (pDGFEM)
73
4.4.3 hpDGFEM with Temporal Grading
Finally, it is shown that with the appropriate time grading functions ( ) h t , faster
convergence than that achieved in Section 4.4.2 can be achieved with the hpDGFEM.
In this algorithm, both spatial and temporal polynomial degrees are incremented to
achieve greater rates of convergence. An example of such a time grading function is:
( )
n
h t t = (441)
where n is a positive real number.
In addition, a temporal approximation order function can be defined and used in the
search for optimal convergence. An example of such a function is:
m
r m = µ (442)
where µ is a positive real number.
By experimenting with the temporal grading function (441) using 2 3
m
n r = + and the
temporal approximation order function (442) using 0.5, 0.75, 1.0, and 1.5 µ = , very
high rates of convergence can be achieved. Figures 440 and 442 illustrate faster than
algebraic convergence on a semilogarithmic scale. Representing the same data on a
logarithmic scale in Figures 441 and 443, close to exponential convergence is
observed.
74
The Initial Solution f(x) = x(1x).
10
0
10
1
10
2
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 59
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
1
2
3
4
1
2
3
4
1
2
3
4
µ = 0.5
µ =0.75
µ =1.0
µ = 1.5
FIGURE 440. Model Problem 2 Converges Faster Than Algebraic Rate
0 5 10 15 20 25 30 35 40 45 50
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 59
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
1
2
3
4
1
2
3
4
1
2
3
4
µ = 0.5
µ =0.75
µ =1.0
µ = 1.5
FIGURE 441. Model Problem 2 Convergence Close to Exponential Rate
75
The Initial Solution f(x) = 1, f(0) = f(1) = 0.
10
0
10
1
10
2
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 59
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
1
2
3
4
5
1
2
3
4
1
2
3
4
µ = 0.5
µ =0.75
µ =1.0
µ = 1.5
FIGURE 442. Model Problem 3 Converges Faster Than Algebraic Rate
0 10 20 30 40 50 60 70
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 59
i
n
t
e
g
r
a
l
o
f
e
r
(
t
)
DOF in time [1]
1
2
3
4
5
1
2
3
4
5
1
2
3
4
1
2
3
4
µ = 0.5
µ =0.75
µ =1.0
µ = 1.5
FIGURE 443. Model Problem 3 Convergence Close to Exponential Rate
76
4.5 The Influence of the Spatial Grading Factor on the
Temporal Error
In the balance between temporal and spatial errors, it is of interest which kind of spatial
grading will be optimal for controlling the error of approximations in time. At this
point, it is not known what kind of grading is optimal and whether it is a constant or a
function. An experiment performed with 8 time elements using 8
m
r = and
2 3
( )
m
r
h t t
+
=
verifies the existence of the optimal spatial grading factor, which amounts to 0.14 in this
particular case. This is captured in Figure 444.
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
8.929
8.9295
8.93
8.9305
8.931
8.9315
grading factor [1]
e
r
r
o
r
i
n
e
n
e
r
g
y
n
o
r
m
o
f
t
e
m
p
o
r
a
l
s
o
l
u
t
i
o
n
[
%
]
m(∆) = 2, grading level = 2
FIGURE 444. Optimal Spatial Grading Factor with Respect to a Specific
Experiment
77
Chapter 5
Temporal Error Control in 2D Time
Dependent Problems
The transient solver feature described in Chapter 4 was combined with the 2D spatial
solver described in Chapter 3 and integrated with the MATLAB
®
program structure.
The result of this effort was a two dimensional (2D) spatial solver with h, p, and hp
extension capabilities in both the spatial and time domains. The model problem to serve
as the basis of discussion is equation (51), which is the twodimensional equivalent of
equation (113).
{ } ( )   { } ( )
=
c
q c
T
z c z z
z n z c c z
u
D v D u t dxdy h uvt ds c vt dxdy
t
Qvt dxdy q vt ds h u vt ds
Ω Γ Ω
Ω Γ Γ
∂
Λ + + ρ =
∂
− +
∫∫ ∫ ∫∫
∫∫ ∫ ∫
(51)
where
z
t is the element thickness, and
{ }
T
def
D
x y
¦ ¹ ∂ ∂
=
´ `
∂ ∂
¹ )
. (52)
The remaining variables are defined in Chapter 1.
78
5.1 The Finite Difference Method, Two Spatial Dimensions
Equation (412) is applicable to twodimensional problems without any changes.
However, the spatial approximation requires a new set of shape functions and
computation of the stiffness matrix
 
K , the mass matrix
 
M , and the load vector { } r
in two dimensions. The hierarchic shape functions described in Finite Element Analysis
[11] and illustrated in Appendix B were implemented.
The coefficients
ij
k of the stiffness matrix
 
K are computed element by element and the
global stiffness matrix is assembled by summing the elementlevel stiffness matrices
( )
   
( )
e
ij ij
e
e
e
k k
K K
=
=
∑
∑
(53)
where e is the element number, the subscripts and i j represent the serial numbers of
the basis functions defined on the solution domain Ω ,
 
( ) e
K are the inflated elemental
stiffness matrices, and
( )
 { } ( )   { }
( )
e
T
e
ij i j z
k D D t dxdy
Ω
= Φ Λ Φ
∫∫
. (54)
It should be noted that the local stiffness matrices
 
( ) e
K are inflated to enable the
simple notation of equation (53). A one to one relationship between the global basis
function numbers i and the local basis function numbers I is required.
( , )
( , ) .
i i I e
I I i e
=
=
(55)
79
With the nodal coordinates denoted by
1 1
( , ) X Y ,
2 2
( , ) X Y ,
3 3
( , ) X Y , and
4 4
( , ) X Y , the
mapping
( ) ( )( ) ( )( )
( )( ) ( )( )
( )
1 2
3 4
1
, 1 1 1 1
4
1 1 1 1
k
x
x Q X X
X X
= ξ η = −ξ −η + + ξ −η +
¸
( + + ξ + η + −ξ + η
¸
(56)
( ) ( )( ) ( )( )
( )( ) ( )( )
( )
1 2
3 4
1
, 1 1 1 1
4
1 1 1 1
k
y
y Q Y Y
Y Y
= ξ η = −ξ −η + + ξ −η +
¸
( + + ξ + η + −ξ + η
¸
(57)
was used. Only straightsided quadrilaterals were employed in this investigation.
Therefore the relationship between the polynomial shape functions
I
N and the basis
functions ( ) ,
i
x y Φ is given by
( )
( )
( )
( )
( )
( )
, , , ,
e e
I i x y
N Q Q ξ η = Φ ξ η ξ η . (58)
The elemental stiffness matrices are computed by evaluating
( )
{ }
( )
  { }
( )
( )
* *
, , 1, 2, , 2
st
T
e e
IJ I J z
k D N D N J t d d I J n
Ω
 
( ( = Λ ξ η =

¸ ¸ ¸ ¸
\ ¹
∫∫
… . (59)
where
 
J is the Jacobian matrix
 
def
x y
J
x y
∂ ∂ (
(
∂ξ ∂ξ
(
=
∂ ∂ (
(
∂η ∂η
¸ ¸
(510)
80
and
*
D (
¸ ¸
is obtained from
 
D by applying the chain rule to (511) and (512):
11 12
J J
x y
∂ ∂ ∂
= +
∂ξ ∂ ∂
(511)
21 22
J J
x y
∂ ∂ ∂
= +
∂η ∂ ∂
. (512)
Denoting the inverse of the Jacobian matrix by
*
J (
¸ ¸
,
*
D (
¸ ¸
is obtained by substituting
the following terms into
 
D :
* *
11 12
J J
x
∂ ∂ ∂
= +
∂ ∂ξ ∂η
(513)
* *
21 22
J J
y
∂ ∂ ∂
= +
∂ ∂ξ ∂η
. (514)
Using Gaussian quadrature with
G
N points and weights
r
w and
s
w , the numerical
computation involves the evaluation of a double sum:
( )
{ }
( )
  { }
* *
1 1
G G
r
s
N N
T
e
IJ r s I J z
r s
k w w D N D N J t
ξ=ξ
= =
η=η
 
( ( = Λ

¸ ¸ ¸ ¸
\ ¹
∑∑
. (515)
Analogously, the mass matrix terms
ij
m are
( )
1 1
1 1
e
IJ I J
m N N J d d
− −
= ξ η
∫ ∫
. (516)
Integrating by the Gaussian quadrature, once again a double sum must be evaluated:
81
( )
( ) ( ) ( )
1 1
, ,
G G
r
s
N N
e
IJ r s I J z
r s
m w w N N J t
ξ=ξ
η=η
= =
= ξ η ξ η
∑∑
. (517)
The convective term in equation (51),
c
c z
h uvt ds
Γ
∫
(518)
modifies the stiffness matrix K and is computed by
( ) ( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
2 2
11 22
2 2
21 22
,
2 2
1
11 12
2 2
21 22
, if 1
, if 2
,
, if 3
, if 4
G
s s
i i
s s
N
def i i
s s s
IJ c i i I i J i s z s
s s
i
i i
s s
i i
J P J P s
J P J P s
k h w N P N P t
J P J P s
J P J P s
=
¦
+ =
¦
¦
¦ + =
¦
= α α =
´
¦
+ =
¦
¦
+ =
¦
¹
∑
(519)
and the integer s denotes the element side number and
( ) s
i
P is a vector quantity
denoting the coordinates of the
th
i Gauss point along side s .
Finally, the load vector r is composed from the boundary condition terms on the right
hand side of equation (51). Denoting the heat generation load vector component
Q
r ,
the flux component by
q
r , and the convective component by
c
r , we have:
Q q c
r r r r = + + (520)
with
( )
( )
( )
( )
( )
( )
( )
( )
( )
( ) ( )
1 1
, , , , , ,
G G
s
r
N N
e e e e
Q r s x y z x y
r s
r w w Q Q Q t Q Q J
ξ=ξ
= = η=η
= ξ η ξ η ξ η ξ η
∑∑
, (521)
82
( ) ( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
2 2
11 22
2 2
21 22
, , ,
2 2
1
11 12
2 2
21 22
, if 1
, if 2
, where
, if 3
, if 4
G
s s
i i
s s
N
def i i
s s
q I n i i I i i s z s
s s
i
i i
s s
i i
J P J P s
J P J P s
r q w N P t
J P J P s
J P J P s
=
¦
+ =
¦
¦
¦ + =
¦
= β β =
´
¦
+ =
¦
¦
+ =
¦
¹
∑
(522)
and
( ) ( ) ( )
( )
11
22
, , , ,
1 11
22
, if 1
, if 2
, where
, if 3
, if 4
G
N
s s s
c I c i c i i I i i s z s
i
J s
J s
r h u w N P t
J s
J s
=
= ¦
¦
=
¦
= χ χ =
´
=
¦
¦
=
¹
∑
. (523)
5.2 The Discontinuous Galerkin Method, 2D
The changes to the mass matrix and stiffness matrix, as discussed in Section 5.1, apply
here as well. The boundary conditions were implemented in accordance with the
procedure described in Section 5.1.
5.3 L
2
Projection of Initial Conditions at t = 0+
The
2
L projection, introduced in Section 4.3, is the linear combination of shape
functions that, with respect to the particular discretization, optimally represents an initial
condition in the space
2
L . In two dimensions, the coefficients of this linear combination
are obtained in three steps: First, the vertex modes, multiplied by the corresponding
values of the initial temperature distribution, are subtracted from the initial temperature
distribution function ( , ) f x y :
83
4
1
( , ) ( , ) ( , )
l l l
l
f x y f x y N f x y
=
= −
∑
. (524)
Then all element sides are L
2
projected by using the set of all elemental side modes,
which is analogous to the procedure of Section 4.3:
( )
1
1
( , ) ( , ) ( , ), , ,
p
e
m m s s
m
f x y f x y a x y m x y
−
=
= − Φ ∈ϒ ∈Γ
∑
(525)
where
s
ϒ is the set of indices of all side modes,
m
a are the side mode coefficients, and
( ) e
s
Γ are the corresponding element boundaries. Finally, all internal modes are projected,
which completes the operation:
( )
( , ) ( , ) ( , ), n , ,
e
n n
n
f x y f x y b x y x y = − Φ ∈Ζ ∈Ω
∑
(526)
where Ζ is the set of indices of all internal modes,
n
b are the internal mode coefficients,
and
( ) e
Ω are the corresponding element domains. The function ( , ) f x y is the error
between the original function ( ) , f x y and the projected function. These three steps
fully define the coefficient vector from which the initial condition is determined as a
linear combination of the global shape functions.
To illustrate the above procedure, the Lshaped domain from Chapter 3 was used and
imposed with the initial condition
( , ) sin( ) cos( ) f x y x y = π π . (527)
84
Figures 51, 52, 53, 54, and 55 illustrate the initial condition, the results of the three
projection steps, and the final projected result. The error in energy norm with respect to
the projected solution is 2.6*10
5
% and the error in maximum norm is 1.5*10
3
%
FIGURE 51. Arbitrary Initial Condition ( , ) f x y , 9 Elements, Refinement Level 1,
p = 8
85
FIGURE 52. Result of Step 1 of L
2
Projection ( , ) f x y : All Nodal Values are
Equal to Zero
FIGURE 53. Result of Step 2 of L
2
Projection ( , ) f x y : All Element Sides are
Equal to Zero
86
FIGURE 54. Result of Step 3 of L
2
Projection f : Error in Energy Norm =
2.59*10
5
%, Error in Maximum Norm = 1.5*10
3
FIGURE 55. Final Result. Assembled L
2
Projection by Linear Combination of
Projection Coefficients with the Global Shape Functions
87
5.4 Model Problems in 2D
The performance of the adaptive time solvers of Chapter 4 in 2D has been investigated
with respect to two model problems, as introduced in hp Discontinuous Galerkin Time
Stepping for Parabolic Problems [13]. The following transient heat conduction problem
was solved:
{ }
{ }
in
, 0 , 1
0 1
u u g J
t
x y x y
J t t
∂
− ∆ = Ω×
∂
Ω = ≤ ≤
= ≤ ≤
(528)
0 on u J = ∂Ω× (529)
( ) , , 0 ( , , 0) in u x y t f x y = = Ω (530)
where the heat generation term 0 g = and ( , , 0) f x y is the initial condition. Temporal
error control was added to finite difference and discontinuous Galerkin methods and
comparisons with respect to speed and convergence were performed. The tests were
conducted using two initial conditions. To ensure compatibility with the finite element
space, these initial conditions were projected onto the space
2
L . The constant
temperature boundary conditions were enforced by restriction at the domain boundaries.
The initial conditions in (531) and (533) will be referred to as Model Problems 4 and
5.
Since exact solutions need to be calculated to assess convergence, the following
problems had to be calculated on a rectangular domain. One pelement was used for all
numerical experiments.
88
5.4.1 Model Problem 4
( ) 4
( , , 0) sin( ) sin( ), 0 u x y x y g = π π = (531)
As stated in hp Discontinuous Galerkin Time Stepping for Parabolic Problems [13],
( ) 4
( , , 0) u x y is actually the first eigenfunction of the Laplacian and compatible with
being in
1
0
( ) H Ω . The corresponding exact solution
( ) 4
( , , )
EX
u x y t is smooth in space and
time:
( ) 4 2
( , , ) exp( 2 ) sin( ) sin( )
EX
u x y t t x y = − π π π (532)
5.4.2 Model Problem 5
( ) 5
( , , 0) (1 ) (1 ), 0 u x y x x y y g = − − = (533)
The initial condition
( ) 5
( , , 0) u x y is also compatible with being in
1
0
( ) H Ω . The exact
solution
( ) 5
( , , )
EX
u x y t is represented as a Fourier series with coefficients
5,kl
a :
( )
2 2 2
5 ( )
5,
1 1
( , , ) sin( ) sin( )
t l k
EX kl
l k
u x y t a e l x k y
∞ ∞
−π +
= =
= π π
∑∑
(534)
5,
3 3 6
(1 cos( ))(1 cos( ))
16
kl
l k
a
l k
− π − π
=
π
. (535)
5.5 The Initial Solution f(x,y,0) = sin(πx)sin(πy)
One element with 8 p = was used to solve this problem. The projection error in energy
norm amounts 1.57*10
7
% at a maximum norm of 5.0*10
5
. The Figures 56, 57, 58,
89
and 59 illustrate the solution domain, the initial solution, the projection error, and the
projected initial solution, respectively.
FIGURE 56. Solution Domain
FIGURE 57. Initial Solution
90
FIGURE 58. Projection Error for the Initial Condition, Error in Energy Norm:
1.57*10
7
%, Error in Maximum Norm = 5.0*10
5
FIGURE 59. Projected Initial Solution
91
5.5.1 The Finite Difference Time Solver
At 8 p = , the finite difference solver reduces the error in energy norm to 10
4
by
implementing more than 400 time steps within 17.24 seconds. The convergence path is
illustrated in Figure 510.
10
0
10
1
10
2
10
3
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
10
3
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 510. Model Problem 4: Convergence of the Finite Difference Method
5.5.2 The Discontinuous Galerkin Time Solvers
At 8 p = and
m
4 and r 8
m
r = = were used, requiring total CPUtimes of 6.61 and 1.61
seconds to converge to an error below 10
4
% (hDGFEM.) Respectively, convergence
is illustrated in Figures 511 and 512. Faster than algebraic convergence and only
algebraic convergence was observed when using 4 and 8
m m
r r = = , respectively. Again,
this is explained by the interplay between spatial and temporal errors. The DGFEM
converges faster than algebraic as long as the temporal error is larger than the spatial
error. As the spatial error becomes dominant, the solver performance returns to
92
algebraic (see Appendix C). A few temporal solution steps of the most accurate overall
time solution are shown in Figure 513.
10
0
10
1
10
2
10
5
10
4
10
3
10
2
10
1
10
0
10
1
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 511. Convergence of the hDGFEM for r
m
= 4
10
0
10
1
10
2
10
7
10
6
10
5
10
4
10
3
10
2
10
1
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 512. Convergence of the hDGFEM for r
m
= 8
93
FIGURE 513. Temporal Solutions Corresponding to the Most Accurate Solution
of Figure 512; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0)
At 8 p = , the pDGFEM required 6.92 seconds to converge to an error in energy norm
of 10
4
. The convergence behavior is plotted in Figure 514. The last iteration of this
solution illustrates again departure from faster than algebraic convergence, which is
discussed in Appendix C. The hpDGFEM requires 7.59 seconds to reduce the relative
error in energy norm to 10
4
%. Convergence is illustrated in Figure 515. Figure 516
illustrates a few temporal solutions.
94
10
0
10
1
10
4
10
3
10
2
10
1
10
0
10
1
10
2
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 514. Convergence of the pDGFEM
10
0
10
1
10
2
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 515. Convergence of the hpDGFEM
95
FIGURE 516. Temporal Solutions Corresponding to the Most Accurate Solution
of Figure 514; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0)
5.6 The Initial Solution f(x,y,0) = x(1x)y(1y)
One element with 8 p = was used to solve this problem. Since this initial solution lies
in in the space
2
L , the projection error in energy norm amounts to only 1.3*10
28
% and
a maximum norm of 8.0*10
17
. Figures 517, 518, and 519 illustrate the initial
solution, the projection error, and the projected initial solution, respectively.
96
FIGURE 517. Initial Solution
FIGURE 518. Projection Error for the Initial Condition, Error in Energy Norm =
1.3*10
28
%, Error in Maximum Norm = 8.0*10
17
97
FIGURE 519. Projected Initial Solution
5.6.1 The Finite Difference Time Solver
At 8 p = , the finite difference solver reduces the error to less than 10
4
% within 39.22
seconds. The convergence path behavior is illustrated in Figure 520.
10
0
10
1
10
2
10
3
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
10
3
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 520. Convergence of the Finite Difference Method
98
5.6.2 The Discontinuous Galerkin Time Solvers
At 8 p = and 8
m
r = , the hDGFEM solver requires a total CPUtime of 15.58 seconds
to reduce the error in energy norm to less than 10
4
%. The convergence path is
illustrated in Figure 521. pDGFEM and hpDGFEM computed for 21.93 and 31.93
seconds, respectively. Their convergence plots are shown in Figures 522 and 523,
respectively. The last five iterations of Figure 522 again exemplify the interplay
between spatial and temporal errors, which is discussed in Appendix C. Corresponding
to the most accurate solution of Figure 521, Figure 524 illustrates a few temporal
solutions.
10
0
10
1
10
2
10
5
10
4
10
3
10
2
10
1
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 521. Convergence of the hDGFEM
99
10
0
10
1
10
2
10
4
10
3
10
2
10
1
10
0
10
1
10
2
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 522. Convergence of the pDGFEM
10
0
10
1
10
2
10
5
10
4
10
3
10
2
10
1
10
0
10
1
10
2
DOF in time [1]
i
n
t
e
g
r
a
l
e
r
r
o
r
:
1
0
0
*
∫
e
r
(
t
)
d
t
[
%
]
Time Convergence, Spatial DOF = 14
100* ∫ e
r
(t)dt
FIGURE 523. Convergence of the hpDGFEM
100
FIGURE 524. Temporal Solutions Corresponding to the Most Accurate Solution
of Figure 521; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at
Bottom Right (t = 1.0)
101
Chapter 6
Conclusions
This work was concerned with the numerical solution of transient heat diffusion
problems in the light of a new technique that has gained much popularity in the Applied
Mathematics community in recent years. The method is called the hpDiscontinuous
Galerkin FEM (hpDGFEM) and promises, upon selecting optimal combinations of h
and p, faster than algebraic, and even exponential, convergence, a fact that has long been
established for steady state hpFEM applications. High convergence rates are of interest
in engineering applications from a perspective of time saving. In addition, the hierarchy
of the hp method makes it feasible to use a posteriori error estimates to assess solution
quality.
Since hpDGFEM is in the research stage, the topic was approached from the point of
view of implementation. Steady state hpFEM in one and two dimensions was
implemented. The algorithmic structure of the implementation is outlined in Chapters 1
and 2. Chapter 3 presents the first set of examples in which spatial errors are controlled
by systematic mesh refinement in problem areas. This is shown by the construction of a
very singular problem on the Lshaped domain and solving the same via successive
refinement in its reentrant corner. Theoretically predicted convergence rates were
achieved which provided verification of the developed code.
Next, the work focused on the time domain. The initial conditions required special
treatment. For compatibility with the finite element formulation, initial conditions need
102
to either lie in the energy space or they need to be projected into the energy space prior
to time integration. This was accomplished by the development of an
2
L projection
algorithm, which ensured that any numerical problem was transitioned consistently into
the FEM. The early parts of Chapters 4 and 5 discuss this issue in great detail. It is
shown that arbitrarily high accuracy of an incompatible solution in one dimension can
be obtained.
Following this preliminary investigation, work on the actual time solvers was
performed. First the backward Euler and the CrankNicolson finite difference solvers
were implemented. Next, the more complicated hpDiscontinuous Galerkin solver was
realized. Eventually, a program structure resulted which enabled the investigation of
temporal solver performance in one and twodimensions.
The research software was written in MATLAB
®
and designed for comparing various
time solvers. In this framework, the Backward Euler Finite Difference Method, the
CrankNicolson Finite Difference Method, and the Discontinuous Galerkin Method with
h, p, and hpextensions were developed and investigated experimentally. In addition,
the builtin MATLAB
®
ODE Solver Suite was included as a benchmark. Solver
performance was evaluated on the basis of speed and accuracy with respect to known
exact solutions of special model problems. These model problems are popular
benchmarks in the research of time dependent problems and represent an interface to
other studies.
The current hpDGFEM research code delivers a much better performance than the
finite difference methods and is comparable with the professionally developed ode15s,
although performance optimization was not an objective of this work. In addition, it was
demonstrated that the DG solvers converge faster than algebraic.
103
The interplay between spatial and temporal errors was often manifest during this study
and is discussed in various sections. It is concluded that optimal solver performance
will depend on a sound balance between these two errors. From the numerical
experiments, it became evident that solver optimality will also depend on the balance
between the h and p discretization of the time solver. Therefore, solver optimality
studies are one of the logical extensions of this work. Since the main focus of this work
rested on the implementation of the hpDGFEM algorithm, such an optimal time/space
solver algorithm was not investigated. However, time solver optimality was considered
with respect to geometric grading. While the grading factor of 0.14 worked best in a
specific example, much more work needs to be done to obtain general results.
From an applied engineering perspective, future work may consider a posteriori error
estimators, optimal time/space solver algorithms, the addition of the third geometric
dimension, and convection as well as radiation boundary conditions in the hpDGFEM
context.
Furthermore, the numerical computation of equation (426) could be accelerated by
decoupling as described in hp Discontinuous Galerkin Time Stepping for Parabolic
Problems [13]. Furthermore, replacement of critical MATLAB
®
interpreter functions
with dynamic link libraries written in C/C
++
would improve software performance. For
example, the interpreted MATLAB
®
function ‘kron.m’ currently handles the block
matrix assembly of (426). It is expected that the performance of this function revealed
that its performance could be enhanced by orders of magnitude.
104
Appendix A
Conventions
It should be mentioned that the material properties λ , c , and ρ generally depend on
direction and temperature. However, all numerical calculations presented herein were
limited to isotropic and constant material properties. All quantities are given in SI units,
whereas the units themselves are generally omitted. Table A1 references the physical
quantities used and their respective units.
TABLE A1. Physical Quantities and their Units as Used in this Paper
Physical Quantity Variable SI Units Units in Words
Time t [s] Seconds
Distance
, , x y z
[m] Meters
Area A [m
2
] Square Meters
Temperature u [ºC], [K] Degrees Celsius, Kelvin
Density
ρ
[kg/m
3
] Kilograms per Cubic Meter
Specific Heat C [J/(kg*K)] Joules per Kilogram and
Kelvin
Thermal Conductivity λ [W/(m*K)] Watts per Meters and Kelvin
Thermal Diffusivity α [m
2
/s] Square Meters per Second
105
Appendix B
Shape Functions in 2D for Quadrilateral
Elements with p = 8
FIGURE B1. 2D Shape Functions. Top Row: Vertex Modes, Four Left Columns
without First Row: Side Modes, Columns 5 through 9: Internal Modes
106
Appendix C
Appropriate Spatial Discretizations
for Model Problems 1, 2, and 3
Figures C1 through C5 illustrate the convergence of Model Problem 1,
( ) sin( ), (0) 0, (1) 0 f x x f f = π = = , with respect to an increasingly refined discretization.
To reach an error in energy norm of less than 10
1
%, it is concluded by inspection that
one element with 8 p = refines the solution domain sufficiently. Figures C3, C4, and
C5 are virtually identical, indicating that the spatial solution has converged.
10
0
10
1
10
2
10
3
10
4
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 2
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9 10
11
1
2
3
4
5
6
7 8 9 10 11 12
1
2
3
4
5
6 7 8 9
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C1. Convergence of Model Problem 1, 1 Element in Space, p = 3
107
10
0
10
1
10
2
10
3
10
4
10
5
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 3
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C2. Convergence of Model Problem 1, 1 Element in Space, p=4
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 7
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C3. Convergence of Model Problem 1, 1 Element in Space, p=8
108
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 79
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C4. Convergence of Model Problem 1, 10 Spatial Elements, p=8
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 159
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C5. Convergence of Model Problem 1, 10 Spatial Elements, p=16
109
Figures C6 through C8 illustrate the convergence of Model Problem 2,
( ) (1 ), (0) 0, (1) 0 f x x x f f = − = = , with respect to an increasingly refined discretization.
To reach an error in energy norm of less than 10
1
%, it is concluded by inspection that
one element with 8 p = refines the solution domain sufficiently. Figures C7 and C8
are virtually identical, indicating that the spatial solution has converged.
10
0
10
1
10
2
10
3
10
4
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 2
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
1
2
3
4
5
6
7 8 9 10 11
1
2
3
4
5
6 7 8 9
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C6. Convergence of Model Problem 2, 1 Spatial Element, p=3
110
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 7
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C7. Convergence of Model Problem 2, 1 Spatial Element, p=8
10
0
10
1
10
2
10
3
10
4
10
2
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 79
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
Backward Euler, p=8
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C8. Convergence of Model Problem 2, 10 Spatial Elements, p=8
111
Figures C9 and C10 illustrate the convergence of Model Problem 3,
( ) 1, (0) 0, (1) 0 f x f f = = = , with respect to an increasingly refined discretization. To
reach an error in energy norm of less than 10
1
%, it is concluded by inspection that five
geometrically graded elements with 8 p = are required to refine the solution domain
sufficiently. The steady algebraic convergence of Figure C10 supports this claim.
10
0
10
1
10
2
10
3
10
4
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 14
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3 4
5
6
7
8
9
10
11
12
1
2
3
4
5
6
7
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C9. Convergence of Model Problem 3, 2 Spatial Elements, p=8
112
10
0
10
1
10
2
10
3
10
4
10
1
10
0
10
1
10
2
10
3
Comparison of Convergence Performance, DOF in Space = 39
r
e
l
a
t
i
v
e
e
r
r
o
r
e
r
=
1
0
0
*


u
F
E

u
E
X


L
2
/


u
E
X


L
2
[
%
]
DOF in time [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
1
2
3
4
5
6
7
CNM, p=8
hDGFEM, p=8, r
m
=0
FIGURE C10. Convergence of Model Problem 3, Geometrically Graded Mesh
with 5 Elements, p=8, (Identical to Figure 48)
113
Appendix D
MATLAB
®
ODE Solver: ode15s
MATLAB The Language of Technical Computing [12] states that “ode15s is a variable
order solver based on the numerical differentiation formulas (NDFs). Optionally, it uses
the backward differentiation formulas (BDFs, also known as Gear's method) that are
usually less efficient. ode15s is a multistep solver.” More information about this solver
is available in Matlab program documentation and on the Internet by simply using the
keyword ode15s. In addition, http://www.mathworks.com/ is another resource.
From MATLAB The Language of Technical Computing [12] :
ODE15S is a quasiconstant step size implementation in
terms of backward differences of the Klopfenstein
Shampine family of Numerical Differentiation Formulas
of orders 15. The natural "free" interpolants are used.
Local extrapolation is not done. By default, Jacobians are
generated numerically. Details are to be found in The
MATLAB ODE Suite, L. F. Shampine and M. W.
Reichelt, SIAM Journal on Scientific Computing, 181,
1997, and in Solving Index1 DAEs in MATLAB and
Simulink, L. F. Shampine, M. W. Reichelt, and J. A.
Kierzenka, SIAM Review, 413, 1999.
114
References
[1] Babuška, I. and W.C. Rheinboldt. 1978. A Posteriori Error Estimates for the
Finite Element Method.. International Journal of. Numerical Methods in
Engineering, Vol 12, pp. 15971615.
[2] Babuška, I. and W.C. Rheinboldt. 1978. Error Estimates for Adaptive Finite
Element Computations. SIAM J. Numerical Analysis Vol. 15, pp. 736754.
[3] Kwon, Young W. and H. Bang. 1997. The Finite Element Method using
MATLAB. 1
st
ed. New York, N.Y.: CRC Press.
[4] Rektorys, Karel. 1980. Variational Methods in Mathematics, Science and
Engineering. 2
nd
ed. D. Reidel Publishing Company, Boston, MA, USA.
[5] Schötzau, Dominik. 1999. hpDGFEM for Parabolic Evolution Problems.
Swiss Federal Institute of Technology, Zürich, Switzerland, Diss. ETH No.
13041.
[6] Schötzau, Dominik. 1999. The Discontinuous Galerkin TimeStepping
Algorithm in hpVersion Context. ETH Zürich, CH8092 Zürich, Switzerland,
Seminar für Angewandte Mathematik.
[7] Shampine, L.F. 1997. The MATLAB ODE Suite. SIAM Journal on Scientific
Computing, Vol. 18, pp 122.
[8] Shampine, L.F. 1999. Solving Index1 DAEs in MATLAB and Simulink.
SIAM Review, Vol. 41, pp 538552.
115
[9] Simmons, George F. 1991. Differential Equations with Applications and
Historical Notes. 2
nd
ed. International Series in Pure and Applied Mathematics.
Hightstown, N.J.: McGrawHill, Inc.
[10] Szabó, Barna A. 1998. Solution of Diffusion Problems by the Finite Element
Method. Lecture Material from Course ME 547Advanced Finite Element
Analysis. Washington University in Saint Louis, Department of Mechanical
Engineering.
[11] Szabó, Barna A. and Ivo Babuška. 1991. Finite Element Analysis. 1
st
ed. New
York, N.Y.: John Wiley & Sons, Inc.
[12] The Mathworks Inc. 2000. MATLAB The Language of Technical Computing.
Using MATLAB, Version 6.
[13] Werder, T., K. Gerdes, D. Schötzau., and C. Schwab. 2000. hp Discontinuous
Galerkin Time Stepping for Parabolic Problems. Eidgenössische Technische
Hochschule, CH8092 Zürich, Switzerland, Seminar für Angewandte
Mathematik, Research Report No. 200001.
116
Vita
A. Konrad Juethner
Born on 14 Mar 1968 in Dortmund, NorthRhine Westfalia, Germany
Professional Accomplishments
• Establishment and Leadership of Numerical Solutions Team at Watlow Inc
• Coinventor of USPatents 5,786,838, 6,124,579, and 6,147,335
• COOP Student with Watlow Inc from May 1995 through December 1996
• Mandatory Military Service in German Army (Deutsche Bundeswehr),
August 1988 through October 1989
Professional Society Memberships
• National Society of Professional Engineers (NSPE), EIT Certificate
• Society for Industrial and Applied Mathematics (SIAM)
Academic Accomplishments
• Acceptance of Contributed Talk to a SIAM Conference in Berlin Germany in
August 2001
• Bachelor of Science in Mechanical Engineering from Washington University
in Saint Louis, Missouri, December 1996
• Pi Tau Sigma, Honorary Mechanical Engineering Fraternity, April 1996
• Bachelor of Arts, Major in Physics, Minor in Mathematics, Drury University
in Springfield, Missouri, May 1994
• Kappa Mu Epsilon, Mathematics Honor Society, February 1994
117
• PreClinical Program (9 Courses), LudwigMaximillians Universität Medical
School, July 1991
• “Abitur”, German High School Diploma, Gymnasium Bad Aibling in Bad
Aibling, Bavaria, Germany, July 1988
December, 2001
Short Title: hpDiscontinuous Galerkin FEM A. Konrad Juethner, M.S. 2001
This action might not be possible to undo. Are you sure you want to continue?