Hp-DGFEM Book Small

Click here to load reader

  • date post

    26-Oct-2014
  • Category

    Documents

  • view

    47
  • download

    2

Embed Size (px)

description

master thesis on hp discontinuous galerkin finite element method

Transcript of Hp-DGFEM Book Small

A. Konrad Juethner hp-DGFEM and Transient Heat Diffusion {}(){}()()(,)[]() cqcTcccBuvDvDudxdydzhuvdSFvQvdxdydzqnvdShuvdS=+=+ffhp-DGFEM and Transient Heat Diffusion Juethner WASHINGTON UNIVERSITY SEVER INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING THE hp-DISCONTINUOUS 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 hp-DISCONTINUOUS 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 hp-Discontinuous 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 p-extension capabilities in one- and two- spatial dimensions and the time dimension. It is shown that the rate of convergence of the hp-Discontinuous Galerkin method is faster than algebraic. copyright by A. Konrad Juethner 2001 to my grandfather, Dr. Ing. Konrad Jthner iv Contents Tables................................................................................................................................ vi Figures .............................................................................................................................vii Acknowledgments............................................................................................................xii Thesis Acceptance ..........................................................................................................xiii Defense Announcement .................................................................................................. xiv Copyright TXu 658-006................................................................................................... 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 hp-Refinement ........................................................ 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 L2 Projection of Initial Conditions at t = 0+................................................ 37 4.3.1 L2 Projection of the Initial Solution f(x) = sin(x) ...................... 40 4.3.2 L2 Projection of the Initial Solution f(x) = x(1-x)........................ 45 4.4 Temporal Error Control .............................................................................. 45 4.4.1 Adaptive Time Solvers ................................................................ 46 4.4.2 p-DGFEM and hp-DGFEM in 1D-Space and Time.................... 66 4.4.3 hp-DGFEM with Temporal Grading ........................................... 73 v4.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 L2 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(1-x)y(1-y)................................................ 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 3-1. Mesh Refinement Strategy; Left Column: Overview of Solution Domain with Increased Element Count from Top To Bottom; Right Column: Close-Up of Singularity with Increased Refinement................................................................ 25 3-2. Convergence of p-Refinement of L-Shaped Domain, 1 Refinement, Polynomial Orders 1 through 8............................................................................ 27 3-3. Convergence of hp Refinement of L-Shaped Domain, 8 Refinements and Polynomial Orders 1 through 8............................................................................ 28 4-1. L2 Projection of the Polynomial Function f(x) = sin(x)..................................... 41 4-2. Refined L2-Projection of the Polynomial Function f(x) = sin(x)....................... 43 A-1. Physical Quantities and their Units as Used in this Paper ................................. 104 vii Figures 3-1. Projection of Incompatible Solution onto Finite Element Solution Space: 1 Element, p=8, Error in L2 Norm = 14.9%............................................................ 14 3-2. Projection of Incompatible Solution onto Finite Element Solution Space, 1 Element, p=16, Error in L2 Norm = 8.1%............................................................ 14 3-3. Projection of Incompatible Solution onto Finite Element Solution Space, 3 Elements, Graded Mesh 10%, p=8, Error in L2 Norm = 5.0%............................ 16 3-4. Projection of Incompatible Solution onto Finite Element Solution Space, 3 Elements, Graded Mesh 5%, p=8, Error in L2 Norm = 3.5%.............................. 16 3-5. Projection of Incompatible Solution onto Finite Element Solution Space, 3 Elements, Grading = 0.1^g, p=8, Error in L2 Can Be Made Arbitrarily Small ... 17 3-6. L-shaped 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 3-7. Domain with Re-entrant Corner .......................................................................... 19 3-8. Exact Solution of uEX, i=1...................................................................................... 20 3-9. Exact Solution (Black Circles on Cyan Stems) Superimposed on the L-shaped Domain; qn and u Displayed by Red and Blue Arrows, Respectively......................................................................................................... 21 3-10. Finite Element Solution uFE , 3 Elements, Polynomial Degree 3 ........................ 22 3-11. Convergence of p-Refinement of L-Shaped Domain, 1 Refinement, Polynomial Orders 1 through 8............................................................................ 27 3-12. Convergence of hp Refinement of L-Shaped Domain......................................... 28 3-13. Finite Element Solution of 8 Grading Refinements at Polynomial Order 8; the Relative Error with Respect to the Exact Solution is 0.2682%..................... 29 4-1. Comparison between Exact Function and its L2 Projection ................................ 41 4-2. Error Plot in the Range of 4*10-8....................................................................... 42 4-3. Comparison between Exact Function and its Projection ..................................... 43 4-4. Relative Error Plotted in the Range of 2*10-15.................................................. 44 viii 4-5. Relative Error Plotted in the Range of 4*10-15.................................................. 45 4-6. Time Integral of Relative Error in Energy Norm, Model Problem 1; 1 Element, p=8........................................................................................................ 48 4-7. Time Integral of Relative Error in Energy Norm, Model Problem 2, 1 Element, p=8........................................................................................................ 49 4-8. Time Integral of Relative Error in Energy Norm, Model Problem 3, 5 Geometrically Graded Elements, Spatial DOF = 8 Nodes+5 Elements*(8-1)* p = 39 ................................................................................................................... 49 4-9. h-DGFEM with Increasing Approximation Order rm.......................................... 51 4-10. h-DGFEM Performance at Multiple Values of rm............................................... 52 4-11. CPU Times Corresponding to Figure 4-10; Note that the Numbered Data Points Correlate Figures 4-10 and 4-11............................................................... 52 4-12. Comparison of Convergence Performance: CNM and h-DGFEM at rm = 7 ....... 53 4-13. Comparison of CPU Time in the Accuracy Range of 1.94 % to 1.22*10-5 %; The Numbered Data Points Correlate Figures 4-12 and 4-13 ............................. 53 4-14. Temporal Error Control ....................................................................................... 54 4-15. Finite Element Solution to Model Problem 1, Plotted on Uniformly Spaced Post-Process Grid................................................................................................. 55 4-16. h-DGFEM Performance at rm = 2, Time Grading Function h(t) = t7................... 56 4-17. Convergence Rate Using Various Values rm and h(t) = t7................................... 57 4-18. CPU Time Using Various Values rm and h(t) = t7............................................... 57 4-19. Integral of Error in Energy Norm Reduced to below 0.001%............................. 58 4-20. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to 1.2*10-4 % Corresponding to Figure 4-19; Note that the Numbered Data Points Correlate Figures 4-19 and 4-20............................................................... 58 4-21. Temporal Error Control, h-DGFEM.................................................................... 59 4-22. Solution to Model Problem 2; the h-DGFEM Mesh is Shown by the Heavy Lines..................................................................................................................... 60 4-23. Error in Energy Norm Reduced to below 1.0%................................................... 61 4-24. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to 1.2*10-4 % Corresponding to Figure 4-23; Note that the Numbered Data Points Correlate Figures 4-23 and 4-24............................................................... 61 4-25. Temporal Error Control; Time-Halving Leads to Relative Errors that are Better than Necessary .......................................................................................... 62 ix 4-26. Convergence of Model Problem 3 Using the Integral of er(t) ............................. 63 4-27. Error in Energy Norm Reduced to below 1.0%................................................... 64 4-28. Comparison of CPU Time Performance Corresponding to Figure 4-27; Note that the Numbered Data Points Correlate Figures 4-27 and 4-28........................ 64 4-29. Temporal Error Control ....................................................................................... 65 4-30. Solution to Model Problem 3; the h-DGFEM Mesh Is Shown by the Heavy Lines..................................................................................................................... 66 4-31. Convergence Comparison: h- and hp-DGFEM Solving Model Problem 1........ 67 4-32. Comparison of CPU Time Performance Corresponding to Figure 4-31; Note that the Numbered Data Points Correlate Figures 4-31 and 4-32........................ 68 4-33. Exponential Convergence of p-DGFEM............................................................. 68 4-34. Convergence Comparison: h- and hp-DGFEM Solving Model Problem 2........ 69 4-35. Comparison of CPU Time Performance Corresponding to Figure 4-34; Note that the Numbered Data Points Correlate with Figures 4-34 and 4-35................ 70 4-36. Initial Exponential and then Algebraic Convergence (p-DGFEM) ..................... 70 4-37. Convergence Comparison: h- and hp-DGFEM Solving Model Problem 3........ 71 4-38. Comparison of CPU Time Performance Corresponding to Figure 4-37; Note that the Numbered Data Points Correlate Figures 4-37 and 4-38........................ 72 4-39. Initial Exponential and then Algebraic Convergence (p-DGFEM) ..................... 72 4-40. Model Problem 2 Converges Faster Than Algebraic Rate .................................. 74 4-41. Model Problem 2 Convergence Close to Exponential Rate ................................ 74 4-42. Model Problem 3 Converges Faster Than Algebraic Rate .................................. 75 4-43. Model Problem 3 Convergence Close to Exponential Rate ................................ 75 4-44 Optimal Spatial Grading Factor with Respect to a Specific Experiment ............ 76 5-1. Arbitrary Initial Condition ( , ) f x y , 9 Elements, Refinement Level 1, p = 8 ..... 84 5-2. Result of Step 1 of L2-Projection ( , ) f x y : All Nodal Values are Equal to Zero...................................................................................................................... 85 5-3. Result of Step 2 of L2-Projection ( , ) f x y : All Element Sides are Equal to Zero...................................................................................................................... 85 5-4. Result of Step 3 of L2-Projection f : Error in Energy Norm = 2.59*10-5 %, Error in Maximum Norm = 1.5*10-3.................................................................... 86 5-5. Final Result. Assembled L2-Projection by Linear Combination of Projection Coefficients with the Global Shape Functions .................................................... 86 5-6. Solution Domain.................................................................................................. 89 x 5-7. Initial Solution ..................................................................................................... 89 5-8. Projection Error for the Initial Condition, Error in Energy Norm: 1.57*10-7%, Error in Maximum Norm = 5.0*10-5.................................................................... 90 5-9. Projected Initial Solution ..................................................................................... 90 5-10. Model Problem 4: Convergence of the Finite Difference Method ..................... 91 5-11. Convergence of the h-DGFEM for rm = 4............................................................ 92 5-12. Convergence of the h-DGFEM for rm = 8............................................................ 92 5-13. Temporal Solutions Corresponding to the Most Accurate Solution of Figure 5-12; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at Bottom Right (t = 1.0).......................................................................................... 93 5-14. Convergence of the p-DGFEM............................................................................ 94 5-15. Convergence of the hp-DGFEM.......................................................................... 94 5-16. Temporal Solutions Corresponding to the Most Accurate Solution of Figure 5-14; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at Bottom Right (t = 1.0).......................................................................................... 95 5-17. Initial Solution ..................................................................................................... 96 5-18. Projection Error for the Initial Condition, Error in Energy Norm = 1.3*10-28 %, Error in Maximum Norm = 8.0*10-17............................................................. 96 5-19. Projected Initial Solution ..................................................................................... 97 5-20. Convergence of the Finite Difference Method .................................................... 97 5-21. Convergence of the h-DGFEM............................................................................ 98 5-22. Convergence of the p-DGFEM............................................................................ 99 5-23. Convergence of the hp-DGFEM.......................................................................... 99 5-24. Temporal Solutions Corresponding to the Most Accurate Solution of Figure 5-21; Time Starts at Top Left (t = 0), Progresses Row by Row and Ends at Bottom Right (t = 1.0)........................................................................................ 100 B-1 2D Shape Functions. Top Row: Vertex Modes, Four Left Columns without First Row: Side Modes, Columns 5 through 9: Internal Modes ........................ 105 C-1. Convergence of Model Problem 1, 1 Element in Space, p = 3.......................... 106 C-2. Convergence of Model Problem 1, 1 Element in Space, p=4............................ 107 C-3. Convergence of Model Problem 1, 1 Element in Space, p=8............................ 107 C-4. Convergence of Model Problem 1, 10 Spatial Elements, p=8........................... 108 C-5. Convergence of Model Problem 1, 10 Spatial Elements, p=16......................... 108 C-6. Convergence of Model Problem 2, 1 Spatial Element, p=3 .............................. 109 C-7. Convergence of Model Problem 2, 1 Spatial Element, p=8 .............................. 110 xi C-8. Convergence of Model Problem 2, 10 Spatial Elements, p=8........................... 110 C-9. Convergence of Model Problem 3, 2 Spatial Elements, p=8............................. 111 C-10. Convergence of Model Problem 3, Geometrically Graded Mesh with 5 Elements, p=8, (Identical to Figure 4-8)............................................................ 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 full-time 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 all-time 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 hp-FEA 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 three-dimensional setting. Mathematical models of linear heat conduction are based on two fundamental laws of physics: Fouriers law of heat conduction and the conservation law. Fouriers law of heat conduction states that | |( ) q grad u = j (1-1) where qf is the heat flux vector with components z y x q q q , , . The following notation will be used: { })`= zyxdefqqqq qj. (1-2) qf represents the heat flux per unit area (in W/m2 or equivalent units). | | is the symmetric positive-definite thermal conductivity matrix and u is the temperature field. | | can be written as 2 | | xx xy xzyx yy yzzx zy zz ( ( = ( ( . (1-3) 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 ( ) ( ) ( ) tuc Q qzqyqx z y x= +|||

\|++ . (1-4) Combining (1-1), (1-2), (1-3), and (1-4) results in xx xy xz yx yy yzzx zy zzu u u u u ux x y z y x y zu u u uQ cz x y z t| | | | + + + + + + | | \ \ | | + + + + = | \ (1-5) where , , , and Q c t represent heat generation per unit volume per unit time, specific heat, mass density, and time, respectively. Alternatively, equation (1-5) can be written in the form: ([ ] ( )) udiv grad u Q ct + = . (1-6) 31.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: ( , ), uu u x t x = j j# 2. Prescribed heat flux: ( , ), n n qq q x t x = j j j# where the flux is normal to the boundary 3. Convection: ( ( , ) ( , )), n c c cq h u x t u x t x = j j j j where ch is the coefficient of convective heat transfer measured in [W/(m2K)] and cu is the temperature of the convective medium 4. Radiation: 4 4( ( , ) ( , )), r s rq 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< , sf 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 (1-4), we multiply by a scalar test function v and integrate: yx zqq q uv dxdydz Qv dxdydz c v dxdydzx y z t | | + + + = | \ (1-7) Using the following identities, 4 ( )( )( ) xx xyy yzz zq vv dxdydz q v q dxdydzx x xq vv dxdydz q v q dxdydzy y yq vv dxdydz q v q dxdydzz z z | |= | \ | | = | \ | |= | \ (1-8) we can rewrite (1-7) as follows: ( ) .x y zv v vdiv qv dxdydz q q q dxdydzx y zuQv dxdydz c v dxdydzt | | + + + + | \ + = j (1-9) Applying the Gauss divergence theorem, equation (1-10) results. ( ) x y zv v vq n v dS q q q dxdydzx y zuQv dxdydz c v dxdydzt | | + + + + | \ + = j j (1-10) Vector nj is the outward positive unit normal and dS is the differential surface element. Substituting (1-5) into (1-10), we have: ( ) .xx xy xzyx yy yzzx zy zzu u u vx y z xu u u vq n v dS dxdydzx y z yu u u vx y z zuQv dxdydz c v dxdydzt | || | + + + | | \ | || | | + + + + + | |\ || | |+ + + | | \ \ + = j j (1-11) 5Defining the differential operator vector: { } TdefDx y z = ` ) (1-12) we can write: { } ( ) | | { } ( )( )( ) .T uD v D u dxdydz c v dxdydztQv dxdydz q n v dS + = j j (1-13) Equation (1-13) 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 (1-13). When convection is specified ) 0 ( c then ) ( c c u u h q = is substituted for q in (1-13) such that upon rearrangement we have: { } ( ) { } ( )( )( , ) [ ]( ) .cq cTcc cB u v D v D u dxdydz h uvdSF v Qvdxdydz q n v dS h u v dS = += + f f (1-14) 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 = (1-15) 6where ( ) , B u v is a bilinear form defined on ( ) ( )1 1H H and ( ) F v is a linear functional defined on ( )1H . 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 ) , ( | ) ( (1-16) where C is some positive constant. We associate the norm ( ) Eu with the space ( ) E . By definition: ( )1|| || ( , ) .2defEu B u u = (1-17) The space ( ) E is called the energy space. Further, we define the subsets ) (~ E and ( ) E c as follows: ( ) { | ( ), ( , , ) ( , , ), ( , , ) } defuE u u E u x y z u x y z x y z = = # # (1-18) ( ) { | ( ), ( , , ) 0, ( , , ) }defuE u u E u x y z x y z = = c (1-19) The generalized solution is the function ( )EXu E # such that ( , ) ( ) ( )EXB u v F v v E = c. (1-20) This is equivalent to finding the minimum of the functional 1( , ) ( )2defB u u F u = (1-21) 7on 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 (1-13) 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 kp is assigned to each element. A brief description of S is presented in the following. 2.1 Approximation Spaces We denote the subspace ( , , )pS S Q = , and define ( )( ).defdefS S ES S E= = (2-1) 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}qst = (2-2) 9The mapping between the standard quadrilateral element and the thk partition is defined as follows: ( )( )( )( , , )( , , )( , , ) .kxkykzx Qy Qz Q= = = (2-3) Let the space of polynomials of degree p defined on st be pS . 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 thk element ( ) ( )( ),,kp ku Q S : ( )( ) {( ) ( ) ( ) ( ) ( )}( ) ( ) ( ), ,| , , , , , , , , , , 1, 2, ,kdefpp k k kx y zS S Qu u Eu Q Q Q S k M = = (2-4) where p

is the vector of polynomial degrees and Q

is the vector of mapping functions assigned to the elements ( ){ }( ){ }1 21 2, , ,, , , .defMdefMp p p pQ Q Q Q==

(2-5) The continuity property of functions in S ensures that ( ) S E . The condition that equation (1-13) must be satisfied for all v S results in a system of ordinary differential equations of the form [ ]{ } { } . K a r = (2-6) 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 FEu and hence the error EX FEu u . The spatial error is controlled by proper selection of the space S . In the p-version, a hierarchical sequence of spaces 1 2 nS S S is constructed and convergence is monitored. In the h-version, 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 h-version and the p-version. In the h-version, 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 hp-version. 112.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: ( ) ( )minEX FE EXE Eu Su u u u = (2-7) Referring to (1-17), the energy norm measure of error is: ( )1( - , )2defEX FE EX FE EX FEEu u B u u u u = . (2-8) A more useful measure is the relative error, defined by: =defEX FEErEXEu ueu. (2-9) 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 p-extensions 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 (1-21) 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 hp-Refinement An example showing how spatial errors are controlled is described. While complicated to program, hp-extensions 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. 13Let us consider a homogeneous bar of unit length, initially at a constant temperature 01 = 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 0u is said to be incompatible. It is necessary to project 0u onto the space ( ) E

. Using the 2L projection, this involves computing the minimum of the integral 210 0010( ) , where ( ) ( )=| |= |\ nj j jjI u a x dx x S E . (3-1) This results in a system of algebraic equations for , 1, 2, , = ja j n. The numerical procedure will be discussed in detail in Section 4.3. The error between 0u and 2( )01n defLj jju a== is measured in the least square sense that is the 2L norm. By definition: 2210101200nj jjLu a dxeu dx=| | |\ = . (3-2) The incompatibility of the initial solution with the polynomial finite element space is demonstrated in Figure 3-1. A single finite element is used ( ) ( )1 M = with 8 p = . The approximation is oscillatory and the error in 2L norm is 14.9%. To reduce the error in L2 norm, either the number of elements or their degrees of freedom must be increased. It is shown in Figure 3-2 that doubling the polynomial order of the element leads to a decrease in error in energy norm from 14.9% (Figure 3-1) to 8.1%. 14 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.20.40.60.81distance x [1]temperature u [1]uEX and uL2 of f(x) = 1.uEXuL2 FIGURE 3-1. Projection of Incompatible Solution onto Finite Element Solution Space: 1 Element, p=8, Error in L2 Norm = 14.9% 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.20.40.60.81distance x [1]temperature u [1]uEX and uL2 of f(x) = 1.uEXuL2 FIGURE 3-2. Projection of Incompatible Solution onto Finite Element Solution Space, 1 Element, p=16, Error in L2 Norm = 8.1% 15However, in this particular case, it is more effective to use geometric grading toward the ends of the domain. This is illustrated in Figure 3-3 where the results shown correspond to a 3-element 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 2L 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 3-4). The obvious question is, how well can 0u be approximated by this method. The 2L 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- 1Lxxu xxx = < < (3-3) we find: ( ) ( )22 212( )0 01 0 01 13L xu u dx dx y dy | | = = = |\ . (3-4) 160 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.20.40.60.81distance x [1]temperature u [1]uEX and uL2 of f(x) = 1.uEXuL2 FIGURE 3-3. Projection of Incompatible Solution onto Finite Element Solution Space, 3 Elements, Graded Mesh 10%, p=8, Error in L2 Norm = 5.0% 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.20.40.60.81distance x [1]temperature u [1]uEX and uL2 of f(x) = 1.uEXuL2 FIGURE 3-4. Projection of Incompatible Solution onto Finite Element Solution Space, 3 Elements, Graded Mesh 5%, p=8, Error in L2 Norm = 3.5% 17Similarly: ( ) ( )221 1 122( )0 01 1 011 13L xu u dx dx y dy | | = = = |\ (3-5) which indicates that the error in 2L norm is proportional to . In the numerical example under consideration, we find a very similar dependence, which is depicted in Figure 3-5. 10010110-1510-1010-5100||u(L2)0 - u0||L2 / ||u0||L2 of f(x) = 1, f(0) = f(1) = 0, M() = 3, p = 8geometric grading f actor g [1]Error in energy norm in % FIGURE 3-5. Projection of Incompatible Solution onto FE Solution Space, 3 Elements, Grading = 0.1^g, p=8, Error in L2 Can Be Made Arbitrarily Small Therefore, geometric grading coupled with p-extension 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. 183.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 L-shaped domain shown in Figure 3-6. Its re-entrant 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.500.51-1-0.500.5100.511.534521238176yxuL-shaped domain with 3 elements. FIGURE 3-6. L-shaped 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 19The exact solution of this problem in the vicinity of the re-entrant corner is of the form ii i1(cos ( 1) sin )2 1 .2iEX iiiu Ari== + = (3-6) The derivation of this is available in Finite Element Analysis [11]. The terms iA 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 3-7. FIGURE 3-7. Domain with Re-entrant Corner In this model problem 32 = , therefore 113 = . In the following discussion we define flux boundary conditions on the boundary segment such that the exact solution is 13cos - sin3 3EXu r | |= |\ . (3-7) A graphical illustration of EXu is shown in Figure 3-8. 20 FIGURE 3-8. Exact Solution of uEX, i=1 The boundary conditions can be handled in two ways. One is to project EXu onto the space of the of the basis functions on the boundaries using the 2L 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 nq and enforce the boundary conditions in the weak sense. In this work, the second method was chosen: | |n EXq n u= . (3-8) Vector n is the normal on the boundary and | | is the thermal conductivity tensor. 21In this case: 23231sin cos( , )3 3 311( , )sin cos3 3 3EXEXEXru rruu r rr | | | \ = = ` ` | | + | ) \ ). (3-9) Visual representations of the boundary conditions are shown in Figure 3-9. -0.500.511.5-1.5-1-0.500.511.500.511.5x765658414uEX (cyan, black), uq (blue), qn (red)13111212151021201731819221628 27 23924 26 29 22 35 34 29 1530 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 2418 14 131617y118791042123u FIGURE 3-9. Exact Solution (Black Circles on Cyan Stems) Superimposed on the L-shaped Domain; qn and u Displayed by Red and Blue Arrows, Respectively Solving this 3-element problem using polynomial degree 3 leads to the approximate solution shown graphically in Figure 3-10. 22 FIGURE 3-10. Finite Element Solution uFE , 3 Elements, Polynomial Degree 3 Note that the numerical solution of Figure 3-10 is substantially different from the exact solution in Figure 3-8. The error will be estimated in energy norm. Letting EX FEe u u = (3-10) we can write: 23 | |21( ) ( ) ( , ) ( )21 1( , ) ( ) ( , ) ( ) ( , )2 2( ) 0 .FE EX EX EX EXEX EX EX EXEX Eu u e B u e u e F u eB u u F u B u e F e B e eu e = = == + + == + + (3-11) Therefore, 2( ) ( )FE EXEe u u = . (3-12) Also, since 1( ) ( , ) ( )2EX EX EX EXu B u u F u = (3-13) and ( , ) ( )EX EX EXB u u F u = (3-14) we have 1 1( ) ( ) ( ) .2 2EX EX n EX EXu F u q u ds = = (3-15) Since EXu is given by equation (3-7), ( )EXu can be computed from (3-15) and knowing ( )FEu from the finite element solution: | |121 2( ) ,FE nnrru a a ar = ` )

(3-16) 24one can compute: 2( ) ( ).FE EXEe u u = (3-17) The relative error is: 100 ErEX Eeeu= (3-18) where 2 1 1( ) ( ) .2 2EX EX n EX EXEu F u q u ds= = (3-19) For the three element mesh shown in Figure 3-6 and p = 3, we have: ( ) - 6.695974660911005 - 001( ) - 8.471380026768022 - 00145.8 % .FEEXru eu ee = == (3-20) Errors of this magnitude are generally not acceptable for engineering purposes. The large error is caused by the fact that EXu is not analytic, in fact strongly singular in the reentrant corner. Hence, approximation of EXu 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 ( )22 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 3-1. 25TABLE 3-1. Mesh Refinement Strategy; Left Column: Overview of Solution Domain with Increased Element Count from Top To Bottom; Right Column: Close-Up of Singularity with Increased Refinement 26The 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 1A in equation (3-6) is not zero, 1 E keN , (3-21) see Finite Element Analysis [11]. In this model problem 113 = , hence the theoretical rate of convergence is 13. It is seen in Table 3-2 and Figure 3-11 that the numerical rate of convergence is close to 13. When the number of layers of refinement is increased with p then the rate of convergence becomes exponential. This is illustrated in Table 3-3, where it is seen that the numerical rate is increasing as the number of degrees of freedom is increased and in Figure 3-12, where the relative error vs. degrees of freedom curve on a log-log scale is seen to have an increasing downward slope. 27 TABLE 3-2. Convergence of p-Refinement of L-Shaped 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.019466711517294e-001 -7.720996474209324e-001 -7.801391374072846e-001 -7.971252036359559e-001 -8.082571556427428e-001 -8.157655245413216e-001 -8.210394799960001e-001 -8.249448993585982e-001 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 101102101.3101.4101.5101.6degrees of freedom DOF in [1]relative error er in [%]Spatial Error Control by Increased Polynomial Order||(uFE)-(uEX)|| / ||(uEX)||E FIGURE 3-11. Convergence of p-Refinement of L-Shaped Domain, 1 Refinement, Polynomial Orders 1 through 8 28 TABLE 3-3. Convergence of hp Refinement of L-Shaped 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.019466711517294e-001 -8.183934050633468e-001 -8.396427254420245e-001 -8.454936007622418e-001 -8.467569499625519e-001 -8.470453032705809e-001 -8.471145647099563e-001 -8.471319142504697e-001 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 102101degrees of freedom DOF in [1]relative error er in [%]Spatial Error Control by Increased Polynomial Order||(uFE)-(uEX)|| / ||(uEX)||E FIGURE 3-12. Convergence of hp Refinement of L-Shaped 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 3-13. 29 FIGURE 3-13. 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 (4-1), which is the one-dimensional equivalent of (1-13). ( ) ( )00 0 0( ) (0)L L Lx L xu u vc A vdx A dx AQvdx Aq v L Aq vt x x = = + = + (4-1) where A represents the cross section of a bar. 4.1 The Finite Difference Method, 1D The trial functions tu S and the test functions v S are written in the form 1( ) ( )nt i iiu a t x== (4-2) 1( )== Ni iiv b x (4-3) 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 (4-2) and (4-3) into (4-1), a system of N coupled ordinary differential equations results: 31 | |{ } | |{ } { } M a K a r + = (4-4) where the elements of matrices | | | |and M K are, respectively ijm and ijk : 00.Ldefij i jLdefjiijm cA dxddk A dxdx dx= = (4-5) The elements of vector { } r are: 1 1 0000( ), 2, 3,..., 1( ) .LxLi iLn n x Lr AQ dx Aqr AQ dx i nr AQ dx Aq=== += = =

(4-6) The time derivative in (4-4) can be approximated by a finite difference time stepping scheme: ( ) { } { } (1 ){ } { } .t t t t t ta a a a t+ + + + (4-7) At time steps and + t t t , equation (4-4) reads: | |{ } | |{ } { }| |{ } | |{ } { } .t t tt t t t t tM a K a rM a K a r+ + ++ =+ =

(4-8) Multiplying the first equation of (4-8) by (1 ) and the second equation by , one can write: 32 | |{ } | |{ } { }| |{ } | |{ } { }(1 ) (1 ) (1 ) .t t tt t t t t tM a K a rM a K a r+ + + + = + =

(4-9) Adding the equations in (4-9), we get: | | { } { } ( ) | |{ } | |{ } { } { } (1 ) (1 ) (1 ) .t t t t t t t t tM a a K a K a r r+ + + + + + = + (4-10) Recognizing that the term multiplying | |M is represented in equation (4-7), we can write: | |{ } | |{ } | |{ } | |{ }{ } { }1 1(1 ) (1 ) .t t t t t tt t tM a M a K a K at tr r+ ++ + + = = + (4-11) Combining: | | | | { } | | | | { } { } { }1 1(1 ) (1 ) .t t t t t tM K a M K a r rt t+ +| | | |+ = + + | | \ \ (4-12) 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 332. Compute stiffness matrix | |K and mass matrices | |M 3. Perform 2L 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 at+t = term1* at + term2; ii. Check time step and reduce if necessary b. End 7. Assemble solution at every time step 8. Perform post-processing operations 4.2 The Discontinuous Galerkin Method, 1D The fundamental idea of this method is to use p-extension in both space and time dimensions. To do this, we define the time domain ( ) 0, J T = and partition it into time steps mI . { }11, where ( , ), 1Mm m m mmI I t t m M= = (4-13) 34Each time step mI is associated with a temporal approximation order 0mr 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 mU on each time interval mI . , ,0( , ) ( , ) ( ) ( ), , mmrm j m j m mI xjU t x U t x u x t t I x== = (4-14) where , j mu , 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]. mU is called a trial function. The test functions are written in the form: , ,0( , ) ( ) ( ), , .mrm i m i m miV t x v x t t I x== (4-15) Using the procedure described in The Discontinuous Galerkin Time-Stepping Algorithm in hp-Version Context [6], the discontinuous Galerkin time stepping method is to find a solution ( , ) U t x by solving successively on each time step mI the problem: Find ( ) ,mU t x of the form (4-14) such that 1 11 1mmmm m m m mIm m mIUV U V dxdt U V dxtgV dxdt U V dx+ + + + + ` )= + (4-16) for all test functions ( ) ,mV t x of the form (4-15). Problem (4-16) is a discrete variational formulation of (4-1) with the special case 1 c A = and 1 kA = . ) (1x Um and 1( )mU x+ are the left and right handed limits of the function mU at the beginning of the time step mI . 35) (1x Um is also the initial data for computing mU on the time step mI . 1( )mU x+ represents the discontinuous step from ) (1x Um at 1 mt . Combining (4-14) through (4-16), 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, 000{[ ( ) ( )]( , ) [ ] ( , )}{( , ) ( , ) ( )}mm mmmrj i j i j i H j i j ii jI Iri i H o i H iiIdt t t u v dt a u vg dt v U v t+= += + + = + (4-17) where the scalar inner product ( , )j i Hu v and the energy inner product ( , )j ia 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 01 1 ( ) ( ) , .2 2t F t t t tk k t t = = + + = (4-18) For clarity, the following abbreviations are introduced: 11 ( 1) ( 1)ij j i j iA dt + + = + (4-19) 11 :ij j iB dt= (4-20) H i iv l v f ) ,( : ) (1 1= (4-21) 111 : ( )i il g F dt= (4-22) 36 H i iv l v f ) ,( : ) (2 2= (4-23) 20 : ( 1)i il U= . (4-24) With (4-19) through (4-24), (4-17) can be compactly expressed as: 1 2, 0 0 ( , ) ( , ) ( ) ( )2 2m mr rij j i H ij j i i i i ii j ik kA u v B a u v f v f v= =+ = + . (4-25) 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 pS , the test and trial functions are expressed as linear combinations of the basis functions ks . Mass and stiffness matrices are obtained which lead to the complete matrix expression of the elliptic problem (4-26). 00 01 20 0 01 20 22 2rrr rr rrkA M K A Mu f fkuf fkA M A M K (+ ( ( ( = + ` ` ` ( ( ) ) ) (+ (

(4-26) 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 373. Perform 2L projection of the initial conditions onto the finite element subspace 4. Build load vectors 1 2and 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\2k ia BM f f| |= + |\ ; 6. Assemble solution for each time interval 7. Perform post-processing operations The solution of the fully discrete system (4-26) 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 L2 Projection of Initial Conditions at t = 0+ The initial conditions ( ), 0 f x + need to be expressed in terms of the coefficient vector 0 ta +=. Therefore, ( ) , 0 f x must be projected onto the finite element space ( , , )pS Q defined in (2-4). 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 (4-27), 38 11 1.2 2k kx x x + + = + (4-27) 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 piN S : 1 1 2 2 3 3 1 1( , 0 ) .p pf x a N a N a N a N++ += + + + + (4-28) It should be noted that ( )1, 0ka f x = and ( )2 1, 0ka f x += because ( ) ( ) ( ) ( )1 1 2 21 1, 1 0, 1 1, 1 0, and 0 at 1 for 3iN N N N N i = = = = = = . Therefore we can rewrite (4-28) and define the zero-bounded function ( ) g and the difference function ( )iF a . ( )1 3 3 4 4 1 1213 3 4 4 1 111 1( ) ( ) ( )2 2( ) ( )2k kdefk k p pdefki p pg f f x f x a N a N a NlF a g a N a N a N d+ + +++ + + = = + + += (4-29) where ( 1) ( 1) 0 g g = + = . The coefficients ( ) 3, 4, , 1i ka i p = + are determined by minimizing ( )iF a with respect to ia : 0 =iaF. (4-30) The minimization condition (4-30) is necessary and sufficient for the determination of ( ) 3, 4, , 1ia 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 ( )( )( )( )13 3 4 4 1 1 3113 3 4 4 1 1 4113 3 4 4 1 1113 3 4 4 1 1 11( ) 0( ) 0( ) 0( ) 0 .p pp pp p ip p pg a N a N a N N dg a N a N a N N dg a N a N a N N dg a N a N a N N d++ +++ +++ +++ + + = = = =

(4-31) Defining 12 21, , 1, 2, , 1ij i j kc N N d i j p+ += = (4-32) and 111( ) , 1, 2, , 1i i kr g N d i p+= = (4-33) we have a system of simultaneous equations from which ( ) 3, 4, , 1i ka i p = + can be computed: 11 3 12 4 1, 1 1 121 3 22 4 2, 1 1 21 3 2 4 , 1 11,1 3 1,2 4 1, 1 1 1.p pp pi i i p p ip p p p p pc a c a c a rc a c a c a rc a c a c a rc a c a c a r + + + + + + + =+ + + =+ + + =+ + + =

(4-34) 40The terms ijc can be determined once and for all, however, the terms ir generally require numerical integration. Since all elements are mapped onto the standard element, the Gauss-Legendre quadrature was employed. 4.3.1 L2 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 pS . 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 4-1. Four positions of greater point density in Figure 4-1 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 4-2. 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 4-2 also indicates that the error, corresponding to 3 elements and 6 p = , is on the order of 10-8. 41 TABLE 4-1. L2 Projection of the Polynomial Function f(x) = sin(x) Initial Condition ( ) f x sin( ) x Number of Gauss Pts. GN 20 Solution Domain { }0 1 x x Number of Elements 3 Polynomial Order p 6 Left BC 0u ( ) 0 0 f = Right BC Lu ( ) 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.100.10.20.36 6 61Dmeshwith3elements.lengthx [1]thickness y [1] 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.9di stance x [1]temperature u [1]u0 and u(L2)0 of f(x) = sin(pi*x), f(0) = f(1) = 0, M() = 3, p = 6u0u(L2)0 FIGURE 4-1. Comparison between Exact Function and its L2 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-101234x 10-8di stance x [1]error e [1]u(L2)0 - u0, f(x) = sin(pi*x), f(0) = f(1) = 0, M() = 3, p = 6splinetrue data FIGURE 4-2. Error Plot in the Range of 4*10-8 The corresponding error in 2L norm amounts to 62.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 2L projections can be used also. Table 4-2 lists the respective element configuration. The following Figures 4-3 and 4-4 present the comparison between exact and projected functions as well as the error, which is on the order of the machine . 43 TABLE 4-2. Refined L2-Projection of the Polynomial Function f(x) = sin(x) Initial Condition ( ) f x sin( ) x Number of Gauss Pts. GN 20 Solution Domain { }0 1 x x Number of Elements 7 Polynomial Order p 10 Left BC 0u ( ) 0 0 f = Right BC Lu ( ) 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.100.10.20.310 10 10 10 10 10 101Dmesh with 7 elements.length x [1]thickness y [1] 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100.10.20.30.40.50.60.70.80.9di stance x [1]temperature u [1]u0 and u(L2)0 of f(x) = sin(pi*x), f(0) = f(1) = 0, M() = 7, p = 10u0u(L2)0 FIGURE 4-3. Comparison between the Exact Function and its Projection 44The error in 2L norm is 131.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 4-5, 5 elements are used at polynomial order 11 to achieve similar results as in Figure 4-4. 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.500.511.5x 10-15di stance x [1]error e [1]u(L2)0 - u0, f(x) = sin(pi*x), f(0) = f(1) = 0, M() = 7, p = 10splinetrue data FIGURE 4-4. Relative Error Plotted in the Range of 2*10-15 450 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-5-4-3-2-10123x 10-15di stance x [1]error e [1]u(L2)0 - u0, f(x) = sin(pi*x), f(0) = f(1) = 0, M() = 5, p = 11splinetrue data FIGURE 4-5. Relative Error Plotted in the Range of 4*10-15 4.3.2 L2 Projection of the Initial Solution f(x) = x(1-x) 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 Crank-Nicolson 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. 46Spatial 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 2L 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 (4-35), (4-36), and (4-37) 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 = = = (4-35) ( ) 2( , 0) (1 ), (0, ) 0, ( , ) 0 u x x x u t u L t = = = (4-36) ( ) 3( , 0) 1, (0, ) 0, ( , ) 0 u x u t u L t = = = (4-37) hp-DGFEM for Parabolic Evolution Problems [5] gives the exact solutions for the three model problems: ( )21( , ) sin( )tEXu x t x e= (4-38) ( )2 223 311 cos( )( , ) 4 sin( )l tEXllu x t e l xl = = (4-39) ( )2 2311 cos( )( , ) 2 sin( )l tEXllu x t e l xl = = . (4-40) 47The computer program, which was written in support of this work, computes the relative error in energy norm on the basis of (2-9). This value is compared with the maximum acceptable relative error specified by the user. Upon starting the h-DGFEM 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 hp-DFGEM 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 ( )re t or its time integral ( )01Trte t dtT =, where T is the total time of transient solution. Since 1 T = in this work, the term 1T 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 (2-9) 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. 48When 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 h-DGFEM with rm = 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 hp-extension capabilities. From the multitude of available finite difference methods, the Backward-Euler method and the CNM were chosen. Since they are both first order time approximations, they are comparable to temporal approximation order 1 of the h-DGFEM. This is illustrated in Figures 4-6, 4-7, and 4-8, where the time integral of the relative error is computed for Model Problems 1 and 2 while solving with the Backward-Euler, Crank-Nicolson, and h-DGFEM ( ) 0mr = . These errors plotted against the number of degrees of freedom on a log-log scale. 10010110210310410-210-1100101102103Comparison of Convergence Performance, DOF in Space = 7time integral of the relative error er from t=0 to TDOF in time [1]12 3 45678910111213141 234567812345678Backward Euler, p=8CNM, p=8h-DGFEM, p=8, rm=0 FIGURE 4-6. Time Integral of Relative Error in Energy Norm, Model Problem 1; 1 Element, p=8 4910010110210310410-210-1100101102103Comparison of Convergence Performance, DOF in Space = 7time integral of the relative error er from t=0 to TDOF in time [1]12 3 45678910111213141 234567812345678Backward Euler, p=8CNM, p=8h-DGFEM, p=8, rm=0 FIGURE 4-7. Time Integral of Relative Error in Energy Norm, Model Problem 2, 1 Element, p=8 10010110210310410-1100101102103Comparison of Convergence Performance, DOF in Space = 39time integral of the relative error er from t=0 to TDOF in time [1]12 3 4 56789101112131234567CNM, p=8h-DGFEM, p=8, rm=0 FIGURE 4-8. Time Integral of Relative Error in Energy Norm, Model Problem 3, 5 Geometrically Graded Elements, Spatial DOF = 8 Nodes+5 Elements*(8-1)*p = 39 50The 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 h-DGFEM 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 h-DGFEM 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. h-DGFEM outperforms CNM after the first iteration, although CNM settles at a higher rate of convergence beginning with iteration 10. Of course, Figures 4-6, 4-7, and 4-8 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 h-DGFEM, it is demonstrated in Figure 4-9 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. 5110010110210310-610-410-2100102123456781234567891234567123456Comparison of Convergence Performance, DOF in Space = 49time integral of the relative error er from t=0 to TDOF in time [1]h-DGFEM, rm=0h-DGFEM, rm=1h-DGFEM, rm=2h-DGFEM, rm=3 FIGURE 4-9. h-DGFEM with Increasing Approximation Order rm 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 h-DGFEM method, whereby an optimal polynomial approximation order mr was selected from Figures 4-10 and 4-11, which illustrate convergence paths and CPU times, respectively. From the results, it was concluded that the temporal approximation order 7mr = was the most effective temporal discretization of the h-DGFEM 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 4-12 and 4-13. 5210010110210310-610-510-410-310-210-1100101102123456789123456712345612345123412312312312Comparison of Convergence Performance, DOF in Space = 7time integral of the relative error er from t=0 to TDOF in time [1]h-DGFEM, rm=1h-DGFEM, rm=2h-DGFEM, rm=3h-DGFEM, rm=4h-DGFEM, rm=5h-DGFEM, rm=6h-DGFEM, rm=7h-DGFEM, rm=8h-DGFEM, rm=9 FIGURE 4-10. h-DGFEM Performance at Multiple Values of rm 10010110210310-210-11001011021234567891 2345672 3456123 452 3 412 312 312 31 2Comparison of Time PerformanceCPU time t [sec]DOF in time [1]h-DGFEM, rm=1h-DGFEM, rm=2h-DGFEM, rm=3h-DGFEM, rm=4h-DGFEM, rm=5h-DGFEM, rm=6h-DGFEM, rm=7h-DGFEM, rm=8h-DGFEM, rm=9 FIGURE 4-11. CPU Times Corresponding to Figure 4-10; Note that the Numbered Data Points Correlate Figures 4-10 and 4-11 5310010110210310410-610-410-2100102Comparison of Convergence Performance, DOF in Space = 7time integral of relative error er from t=0 to TDOF in time [1]1 2345678910111213123CNMh-DGFEM, rm=7 FIGURE 4-12. Comparison of Convergence Performance: CNM and h-DGFEM at rm = 7 10010110210310410-210-11001011021789101112131 2 3Comparison of Time PerformanceCPU time t [sec]DOF in time [1]CNMh-DGFEM, rm=7 FIGURE 4-13. Comparison of CPU Time in the Accuracy Range of 1.94 % to 1.22*10-5 %; The Numbered Data Points Correlate Figures 4-12 and 4-13 54When 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 4-12, the discussion will focus on iterations 6 through 13 of the CNM and 1 through 3 for the h-DGFEM. Figure 4-13 illustrates the comparison of CPU time needed to perform the computations of Figure 4-12. After 0.032 seconds of solver time, CNM and h-DGFEM reach iteration 8 and iteration 2. Their respective errors in energy norm are 24.5 10 % and 31.1 10 % . As iterations are increased from this point, the h-DGFEM outperforms the CNM with an increasing margin. At iteration 13, the CNM reaches an error of 54.9 10 % in 14.9 seconds and, after 0.047 seconds, the h-DGFEM reaches iteration 3 reporting an error of 67.5 10 % . In this particular case, the h-DGFEM outperforms the CNM by a factor of 315 on a time basis at a 6.5 fold smaller integral error. Figure 4-14 illustrates the error in energy norm over the entire time domain for the CNM and the h-DGFEM. Figure 4-15 illustrates the finite element solution FEu . 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 110-610-510-410-3Temporal Error History, IC: u(x,t = 0) = sin(pi*x), 100*||uFE-uEX||L2 / ||uEX||L2time t [sec]relative error er [%]h-DGFEM, p=8, rm=8CNM, p=8 FIGURE 4-14. Temporal Error Control 55 FIGURE 4-15. Finite Element Solution to Model Problem 1, Plotted on Uniformly Spaced Post-Process Grid The Initial Solution f(x) = x(1-x). 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 hp-DGFEM 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( )mrh t t += was used to obtain Figure 4-16. 5610010110210310-410-310-210-1100101102Comparison of Convergence Performance, DOF in Space = 63time integral of relative error er from t=0 to TDOF in time [1]123456781 234567uniform h-DGFEM, rm=2graded h-DGFEM, rm=2 FIGURE 4-16. h-DGFEM Performance at rm = 2, Time Grading Function h(t) = t7 This figure indicates that for 2mr = , the optimal convergence slope of 3 is obtained by use of the temporal grading ( ) h t . In preparation to a comparison between h-DGFEM and finite difference algorithms for this model problem, Figures 4-17 and 4-18 were prepared, which, at various values for mr , illustrate the rate of convergence and CPU time, respectively. Inspection of these figures led to the conclusion that from the range 4 9mr , the temporal approximation order 9mr = resulted in the best performance. In conjunction with the temporal grading function 2 3( )mrh t t += , the h-DGFEM 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 2L . Using these solver parameters, approximate solutions of the heat equation for Model Problem 2 over the time period of one second were computed. Performance 57comparisons with respect to convergence and CPU time are illustrated in Figures 4-19 and 4-20. 10010110210310-510-410-310-210-11001011 234561 234561 234561 23451 2 3451 2 345Comparison of Convergence Performance, DOF in Space = 23time integral of relative error er from t=0 to TDOF in time [1]h-DGFEM, rm=4h-DGFEM, rm=5h-DGFEM, rm=6h-DGFEM, rm=7h-DGFEM, rm=8h-DGFEM, rm=9 FIGURE 4-17. Convergence Rate Using Various Values rm and h(t) = t7 100101102103100101102123456123456123456123451234512345Comparison of Time PerformanceCPU time t [sec]DOF in time [1]h-DGFEM, rm=4h-DGFEM, rm=5h-DGFEM, rm=6h-DGFEM, rm=7h-DGFEM, rm=8h-DGFEM, rm=9 FIGURE 4-18. CPU Time Using Various Values rm and h(t) = t7 5810010110210310410-410-310-210-1100101102103Comparison of Convergence Performance, DOF in Space = 23time integral of relative error er from t=0 to TDOF in time [1]1 234567891011121 2 345CNMh-DGFEM, rm=9 FIGURE 4-19. Integral of Error in Energy Norm Reduced to below 0.001% 10010110210310410-210-1100101102135678910111212345Comparison of Time PerformanceCPU time t [sec]DOF in time [1]CNMh-DGFEM, rm=9 FIGURE 4-20. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to 1.2*10-4 % Corresponding to Figure 4-19; Note that the Numbered Data Points Correlate Figures 4-19 and 4-20 59Considering the magnitudes of error in energy norm in Figure 4-19, only CNM iterations 6 through 12 and all h-DGFEM are of interest from an engineering perspective. Cross-referencing Figure 4-20, the CNM converges in 7 iterations and 0.063 seconds to an error of 0.32% and the h-DGFEM 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 h-DGFEM converges to 1.2*10-4% in 5 iterations and 2.48 seconds. In this particular case, the h-DGFEM outperforms the CNM by a factor of 6.8 on a time basis at approximately equal integral error in energy norm. Figure 4-21 demonstrates the algorithmic control over the error in energy norm over the entire time domain. Figure 4-22 shows the finite element solution for Model Problem 2 and the geometrically graded 3-element 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 function2 3( )mrh 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 110-710-610-510-410-310-210-1Temporal Error History, IC: u(x,t = 0) = x.*(1-x)time t [sec]relative error er [%]h-DGFEM, p=8, rm=9CNM, p=8 FIGURE 4-21. Temporal Error Control, h-DGFEM 60 FIGURE 4-22. Solution to Model Problem 2; the h-DGFEM 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 h-DGFEM is illustrated in Figure 4-23 and the corresponding solution times are shown in Figure 4-24. 6110010110210310410-1100101102103Comparison of Convergence Performance, DOF in Space = 55time integral of relative error er from t=0 to TDOF in time [1]12 3 4 5678910111213141234CNM, p=8h-DGFEM, p=8, rm=8 FIGURE 4-23. Error in Energy Norm Reduced to below 1.0% 10010110210310410-210-110010110210313 5678910111213141 234Comparison of Time PerformanceCPU time t [sec]DOF in time [1]CNM, p-8h-DGFEM, p=8, rm=8 FIGURE 4-24. Comparison of CPU Time Performance in the Accuracy Range of 0.32 % to 1.2*10-4 % Corresponding to Figure 4-23; Note that the Numbered Data Points Correlate Figures 4-23 and 4-24 62Considering the magnitudes of error in energy norm in Figure 4-23, only CNM iterations 13 and 14 and h-DGFEM 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 h-DGFEM converges in 1.27 seconds (0.43%). Figure 4-25 illustrates the relative error in energy norm for the CNM and the h-DGFEM. The figure reveals that the simple time-halving algorithm converges to the desired accuracy with respect to both methods, however, produces inefficient time discretization. As the solvers address the start-up 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 110-510-410-310-210-1100101102Temporal Error History, IC: u(x,t = 0) = 1, 100*||uFE-uEX||L2 / ||uEX||L2time t [sec]relative error er [%]h-DGFEM, p=8, rm=8CNM FIGURE 4-25. Temporal Error Control; Time-Halving Leads to Relative Errors that are Better than Necessary Better results are expected with graded meshes. To improve the h-DGFEM, the temporal grading function 2 3( )mrh t t += was used again. Since the CNM was 63significantly outperformed in the previo