• No se han encontrado resultados

Truncation error estimation in the Discontinuous Galerkin Spectral Element Method

N/A
N/A
Protected

Academic year: 2020

Share "Truncation error estimation in the Discontinuous Galerkin Spectral Element Method"

Copied!
164
0
0

Texto completo

(1)UNIVERSIDAD POLITÉCNICA DE MADRID ESCUELA TÉCNICA SUPERIOR DE INGENIEROS AERONÁUTICOS. Truncation error estimation in the Discontinuous Galerkin Spectral Element Method. Doctoral Thesis. By Gonzalo Rubio Calzado Aeronautical Engineer. Madrid, April 2015.

(2)

(3) ESCUELA TÉCNICA SUPERIOR DE INGENIEROS AERONÁUTICOS UNIVERSIDAD POLITÉCNICA DE MADRID. Doctoral Thesis. Truncation error estimation in the Discontinuous Galerkin Spectral Element Method. by Gonzalo Rubio Calzado Aeronautical Engineer. Advisors Eusebio Valero Sánchez and Javier de Vicente Buendı́a. Madrid, April 2015.

(4)

(5) El tribunal nombrado por el Sr. Rector Magnı́fico de la Universidad Politécnica de Madrid, el dı́a .................... de ...................... de 20..... Presidente: Vocal: Vocal: Vocal: Secretario: Suplente: Suplente:. Realizado el acto de defensa y lectura de la Tesis el dı́a ....... de .................. de 20....... en la E.T.S.I./Facultad ............................................... Calificación ........................................................... EL PRESIDENTE. LOS VOCALES. EL SECRETARIO.

(6)

(7) iii. Truncation error estimation in the Discontinuous Galerkin Spectral Element Method Abstract In this thesis, the τ -estimation method to estimate the truncation error is extended from low order to spectral methods. While most works in the literature rely on fully time-converged solutions on grids with different spacing to perform the estimation, only one grid with different polynomial orders is used in this work. Furthermore, a non timeconverged solution is used resulting in the quasi-a priori τ -estimation method. The quasi-a priori approach estimates the error when the residual of the time-iterative method is not negligible. It is shown in this work that some of the fundamental assumptions about error tendency, well established for low order methods, are no longer valid in high order schemes, making necessary a complete revision of the error behavior before redefining the algorithm. To facilitate this task, the Chebyshev Collocation Method is considered as a first step, limiting their application to simple geometries. The extension to the Discontinuous Galerkin Spectral Element Method introduces additional features to the accurate definition and estimation of the error due to the weak formulation, multidomain discretization and the discontinuous formulation. First, the analysis focuses on scalar conservation laws to examine the accuracy of the estimation of the truncation error. Then, the validity of the analysis is shown for the incompressible and compressible Euler and Navier Stokes equations. The developed quasi-a priori τ -estimation method permits one to decouple the interfacial and the interior contributions of the truncation error in the Discontinuous Galerkin Spectral Element Method, and provides information about the anisotropy of the solution, as well as its rate of convergence in polynomial order. It is demonstrated here that this quasi-a priori approach yields a spectrally accurate estimate of the truncation error.. Keywords: discontinuous Galerkin, spectral methods, τ -estimation, truncation error, a posteriori error estimation, compressible Navier Stokes, incompressible Navier Stokes, hp-adaptation.

(8)

(9) v. Truncation error estimation in the Discontinuous Galerkin Spectral Element Method Resumen En esta tesis, el método de estimación de error de truncación conocido como τ estimation ha sido extendido de esquemas de bajo orden a esquemas de alto orden. La mayorı́a de los trabajos en la bibliografı́a utilizan soluciones convergidas en mallas de distinto refinamiento para realizar la estimación. En este trabajo se utiliza una solución en una única malla con distintos órdenes polinómicos. Además, no se requiere que esta solución esté completamente convergida, resultando en el método conocido como quasi-a priori τ -estimation. La aproximación quasi-a priori estima el error mientras el residuo del método iterativo no es despreciable. En este trabajo se demuestra que algunas de las hipótesis fundamentales sobre el comportamiento del error, establecidas para métodos de bajo orden, dejan de ser válidas en esquemas de alto orden, haciendo necesaria una revisión completa del comportamiento del error antes de redefinir el algoritmo. Para facilitar esta tarea, en una primera etapa se considera el método conocido como Chebyshev Collocation, limitando la aplicación a geometrı́as simples. La extensión al método Discontinuouos Galerkin Spectral Element Method presenta dificultades adicionales para la definición precisa y la estimación del error, debidos a la formulación débil, la discretización multidominio y la formulación discontinua. En primer lugar, el análisis se enfoca en leyes de conservación escalares para examinar la precisión de la estimación del error de truncación. Después, la validez del análisis se demuestra para las ecuaciones incompresibles y compresibles de Euler y Navier Stokes. El método de aproximación quasi-a priori τ -estimation permite desacoplar las contribuciones superficiales y volumétricas del error de truncación, proveyendo información sobre la anisotropı́a de las soluciones ası́ como su ratio de convergencia con el orden polinómico. Se demuestra que esta aproximación quasi-a priori produce estimaciones del error de truncación con precisión espectral.. Keywords: Galerkin discontinuo, métodos espectrales, τ -estimation, error de truncación, estimación de error a posteriori, Navier Stokes compresible, Navier Stokes incompresible.

(10)

(11) vii. Acknowledgements First, I would like to thank my advisors, Javier de Vicente and Eusebio Valero, for their support during these years. This work would not have been possible without their help. I also would like to thank Vincent Couaillier and Marta de la Llave for hosting me during my visit to Paris. I am extremely grateful to David Kopriva both for the visits to Tallahassee and for his invaluable help in the development of this doctoral thesis. Besides, I would like to thank the Applied Mathematics and Statistics Department for creating a perfect work environment. I could not write some acknowledgments without including my family, my friends and especially Paloma, without whom I could have never finished a PhD. Finally, I want to thank the Universidad Politécnica de Madrid that have funded this doctoral thesis through the PhD grant Ayudas para la realización del doctorado (RR01/2010)..

(12)

(13) ix. Agradecimientos En primer lugar, me gustarı́a agradecer a mis directores de tesis, Javier de Vicente y Eusebio Valero, su apoyo durante estos años. Sin su ayuda, este trabajo no habrı́a sido posible. También me gustarı́a agradecer a Vincent Couaillier y a Marta de la Llave por acogerme durante mi estancia en Parı́s. Quiero agradecer especialmente a David Kopriva tanto por las estancias en Tallahassee como por su inestimable ayuda en el desarrollo de esta tesis doctoral. También me gustarı́a agradecer al Departamento de Matemática Aplicada y Estadı́stica por crear un espacio ideal para trabajar. No podı́a escribir unos agradecimientos sin nombrar a mi familia, amigos y especialmente a Paloma, sin los cuales no podrı́a haber finalizado un doctorado. Finalmente, agradecer a la Universidad Politécnica de Madrid, que ha financiado esta tesis a través de la beca de doctorado Ayudas para la realización del doctorado (RR01/2010)..

(14)

(15) Contents 1 Introduction 1.1 Discretization schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 About this work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1 1 2 5. 2 Spectral Methods 2.1 The Continuous Fourier Expansion . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Fourier Truncated Series . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Convergence of the Fourier Series . . . . . . . . . . . . . . . . . . . . 2.2 The Discrete Fourier Expansion . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Fourier Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Fourier Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Fourier Interpolation Error . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Differentiation through Fourier Interpolation . . . . . . . . . . . . . 2.3 Polynomial Basis Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Polynomial Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Convergence of Polynomial Series . . . . . . . . . . . . . . . . . . . . 2.3.3 Polynomial Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.4 Orthogonal Polynomial Interpolation . . . . . . . . . . . . . . . . . . 2.3.4.1 Orthogonal Polynomial Interpolation Error . . . . . . . . . 2.3.4.2 Differentiation through Orthogonal Polynomial Interpolation 2.4 Approximating Solutions of PDE . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 The Chebyshev Collocation Method . . . . . . . . . . . . . . . . . . 2.4.2 Discontinuous Galerkin Spectral Element Method . . . . . . . . . . .. 9 10 11 11 14 15 15 16 17 18 20 21 23 25 25 27 27 29 30. 3 Numerical Errors 3.0 About Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Analysis of the Errors in Chebyshev Collocation Method . . . . . . . . . . 3.2.1 Basic Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Analysis of the Truncation Error . . . . . . . . . . . . . . . . . . . 3.2.3 Extension to Several Dimensions and Systems of Equations . . . . 3.3 Analysis of the Errors in the DGSEM . . . . . . . . . . . . . . . . . . . . 3.3.1 Basis Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Truncation Error Analysis in the DGSEM . . . . . . . . . . . . . . 3.3.2.1 Isolated Truncation Error . . . . . . . . . . . . . . . . . . 3.3.2.2 Truncation Error Dependence on Discretization and Interpolation Errors . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2.3 Anisotropic Behavior of the Truncation Error . . . . . . .. 35 35 37 39 39 40 42 43 43 44 45. . . . . . . . . . .. . 46 . 47. 4 Truncation Error Estimation: τ -estimation 49 4.1 Quasi-a priori Truncation Error Estimation in the Chebyshev Collocation Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.2 Quasi-a priori Truncation Error Estimation in the DGSEM . . . . . . . . . 54.

(16) xii. Contents. 4.3. Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Computational Cost . . . . . . . . . . . . . . . . . . . . 4.3.1.1 Operation Count . . . . . . . . . . . . . . . . . 4.3.1.2 Memory Requirements . . . . . . . . . . . . . 4.3.1.3 Multiple Estimates for Different Coarse Grids 4.3.2 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . .. . . . . . .. 58 58 59 60 61 61. 5 Numerical Results 5.1 Chebyshev Collocation Method . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Detailed Analysis on Reference Problems . . . . . . . . . . . . . . . 5.1.1.1 One Dimensional Problems. Diffusion and Nonlinear Advection Diffusion Equation . . . . . . . . . . . . . . . . . . 5.1.1.2 Two Dimensional Problems. Poisson Equation . . . . . . . 5.1.2 Numerical Experiments . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2.1 Method of Manufactured Solutions . . . . . . . . . . . . . . 5.1.2.2 Kovasznay Flow . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2.3 Lid Driven Cavity . . . . . . . . . . . . . . . . . . . . . . . 5.2 DGSEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 Detailed Analysis on Reference Problems . . . . . . . . . . . . . . . 5.2.1.1 One dimensional Problems. Linear and Nonlinear Advection Equation . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1.2 Two dimensional Problems. Nonlinear Advection Equation 5.2.2 Numerical Experiments . . . . . . . . . . . . . . . . . . . . . . . . .. 65 65 65 66 70 73 76 77 84 88 89 89 92 98. 6 Conclusions and future work. 107. A Estimates for the Chebyshev Interpolation Error. 109. B Differences between the One dimensional and the Two dimensional Analysis 111 C A non conforming DGSEM solver for the Navier Stokes equations C.1 DGSEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.2 DG in Elliptic Problems . . . . . . . . . . . . . . . . . . . . . . . . . . C.2.1 DG in Elliptic Problems . . . . . . . . . . . . . . . . . . . . . . C.2.2 Numerical Fluxes . . . . . . . . . . . . . . . . . . . . . . . . . . C.3 DGSEM in non Conforming Geometries: the Mortar Method . . . . . C.3.1 The Mortar Method for hp non Conforming Interfaces . . . . . C.4 Application Test Case: Navier Stokes Equations . . . . . . . . . . . . C.4.1 Test Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.4.2 Test Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography. . . . . . . . . .. . . . . . . . . .. 113 . 113 . 115 . 116 . 117 . 117 . 118 . 122 . 123 . 124 131.

(17) List of Figures 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9. Real and imaginary parts (eix = cos(x) + i sin(x)) of the first function of the Fourier basis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Periodic extension of three different functions. . . . . . . . . . . . . . . . . Fourier coefficients ck vs k for three different functions. . . . . . . . . . . . Fourier coefficients ck vs k. Kinds of spectral convergence. . . . . . . . . . Strip of convergence of Fourier Series. . . . . . . . . . . . . . . . . . . . . Chebyshev polynomials from degree two to five. . . . . . . . . . . . . . . . Legendre polynomials from degree two to five. . . . . . . . . . . . . . . . . Chebyshev ellipse of convergence for different values of η. . . . . . . . . . Subdivision of the physical domain into K elements. The DGSEM does not enforce continuity at the element boundaries. A Riemann problem is solved to determine the value of the fluxes at the boundaries. . . . . . . . . . . .. Truncation error and discretization error for the linear case of (5.1). Validation of the bounds derived for the discretization error (3.31) and for the truncation error (3.30) for linear equations. . . . . . . . . . . . . . . . . . 5.2 Truncation error and discretization error for the nonlinear case of (5.1). Validation of the bounds derived for the discretization error (3.39) and for the truncation error (3.38) for nonlinear equations. . . . . . . . . . . . . . 5.3 Error in the truncation error estimate for the linear case. Converged solution N = 13. Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4). . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Error in the truncation error estimate for the nonlinear case. Converged solution N = 15. Validation of the Chebyshev truncation error estimate theorem for nonlinear operators (4.5). . . . . . . . . . . . . . . . . . . . . 5.5 Error in the truncation error estimate for the linear case. Behavior with the number of iterations for the non converged case (with and without correction). N = 4, P = 17. Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4). . . . . . . . . . . . . . . . . . 5.6 Error in the truncation error estimate for the nonlinear case. Behavior with the number of iterations for the non converged case (with and without correction) N = 4, P = 17. Validation of the Chebyshev truncation error estimate theorem for nonlinear operators (4.5). . . . . . . . . . . . . . . . 5.7 Discretization and truncation error for the linear case. Validation of the two dimensional decoupling of the errors (3.40) and (3.42). . . . . . . . . 5.8 Discretization error for fixed values of Nx and Ny . Validation of the two dimensional decoupling of the discretization error (3.40). . . . . . . . . . . 5.9 Exact truncation error for fixed values of Nx and Ny . Validation of the two dimensional decoupling of the truncation error (3.42). . . . . . . . . . . . 5.10 Error in the truncation error estimate for the 2D linear case. Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4) in 2D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. 11 12 13 13 14 19 20 22. . 31. 5.1. . 67. . 68. . 69. . 69. . 71. . 71 . 73 . 74 . 74. . 75.

(18) xiv. List of Figures. 5.11 Error in the truncation error estimate for the 2D linear case for fixed values of Nx and Ny . Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4) in 2D. . . . . . . . . . . . . . . . . . . . . 5.12 Manufactured solution for the Euler test case (5.11). . . . . . . . . . . . . . 5.13 Discretization and truncation error for the Euler case. Validation of the two dimensional decoupling of the errors (3.40) and (3.42). . . . . . . . . . 5.14 Sectioned views of the Discretization error for the Euler case Fig. 5.13a. Validation of the two dimensional decoupling of the discretization error (3.40). 5.15 Sectioned views of the truncation error for the Euler case Fig. 5.13b. Validation of the two dimensional decoupling of the truncation error (3.42). . . 5.16 Error in the truncation error estimate for the Euler case. Validation of the Chebyshev truncation error estimate theorem for nonlinear operators (4.5) in 2D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.17 Sectioned views of the truncation error estimation for the Euler case Fig. 5.16. Validation of the Chebyshev truncation error estimate theorem for nonlinear operators (4.5) in 2D. . . . . . . . . . . . . . . . . . . . . . . . . . 5.18 Kovasznay Flow velocity field, (5.12), for Re = 40. . . . . . . . . . . . . . . 5.19 Discretization error for the Kovasznay flow. Validation of the two dimensional decoupling of the discretization error (3.40). . . . . . . . . . . . . . . 5.20 Truncation error for the Kovasznay flow. Validation of the two dimensional decoupling of the truncation error (3.42). . . . . . . . . . . . . . . . . . . . 5.21 Discretization error for the horizontal velocity u and fixed values of Nx and Ny . Validation of the two dimensional decoupling of the discretization error (3.40). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.22 Truncation error for the first momentum equation and fixed values of Nx and Ny . Validation of the two dimensional decoupling of the truncation error (3.42). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.23 Error in the truncation error estimate for the 2D linear case. Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4) in 2D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.24 Error in the truncation error estimate for the 2D linear case for fixed values of Nx and Ny . Validation of the Chebyshev truncation error estimate theorem for linear operators (4.4) in 2D. . . . . . . . . . . . . . . . . . . . . 5.25 Solution of the LDC problem in a 20 × 20 mesh. . . . . . . . . . . . . . . . 5.26 Truncation error estimate in the first momentum equation, second momentum and continuity equations. . . . . . . . . . . . . . . . . . . . . . . . . . . 5.27 Sectioned views of the truncation error estimate for the continuity equation. 5.28 Sectioned views of the truncation error estimate using different fine meshes for the continuity equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.29 Test Problem 5.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.30 Discretization N , truncation τ N and isolated truncation τ̂ N error convergence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.31 Accuracy of the estimates of the truncation error τPN and the isolated truncation error τ̂PN . The coarse mesh is fixed N = 4 while the fine mesh varies P = 5, . . . , 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.32 Linear advection equation. Truncation error τPN and isolated truncation error τ̂PN estimates with and without correction. The residual here is defined  as RP ũP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 75 78 78 79 79. 80. 80 81 82 83. 83. 84. 84. 85 86 87 87 88 90 91. 91. 92.

(19) List of Figures. 5.33 Nonlinear advection equation. Truncation error τPN and isolated truncation error τ̂PN estimates with and without correction. The residual here is defined  as RP ũP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.34 Exact solution for the nonlinear advection problem, (5.18). The element k = 20 is used to show detailed results. . . . . . . . . . . . . . . . . . . . . 5.35 Error maps for the 2D nonlinear advection equation with a polynomial order of [3 × 3]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.36 Error maps for the 2D nonlinear advection equation with a polynomial order of [3 × 8]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.37 Convergence of the errors for the 2D Nonlinear advection equation with different polynomial orders for element k = 20. . . . . . . . . . . . . . . . 5.38 Sections of Fig. 5.37 for constant values of Nx = 8 and Ny = 8. . . . . . . 5.39 Convergence of the approximated errors for the 2D Nonlinear advection equation with different polynomial orders for element k = 20. The errors are estimated using a fine mesh of P = [8 × 8]. . . . . . . . . . . . . . . .  5.40 Maximum value of the residual RP ũP with the number of iterations of the RK3 low storage method [Williamson 1980]. . . . . . . . . . . . . . . . 5.41 Accuracy of the estimated error maps for a residual of 10−2 with correction term. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.42 Accuracy of the estimated error maps for a residual of 10−4 without correction term. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.43 Steady solution of the boundary layer simulation with a polynomial order P = 10. Density, ρ, contours. . . . . . . . . . . . . . . . . . . . . . . . . . 5.44 Steady solution of the boundary layer simulation with a polynomial order P = 10. Horizontal velocity, u, contours. . . . . . . . . . . . . . . . . . . . 5.45 Steady solution of the boundary layer simulation with a polynomial order P = 10. Vertical velocity, v, contours. . . . . . . . . . . . . . . . . . . . . 5.46 Steady solution of the boundary layer simulation with a polynomial order P = 10. Pressure, p, contours. . . . . . . . . . . . . . . . . . . . . . . . . . 5.47 Truncation error estimation map for the boundary layer problem with a polynomial order N = 8. Estimation calculated with the a posteriori τ estimation method, Algorithm 1, with a polynomial order in the fine mesh of P = 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.48 Isolated truncation error estimation map for the boundary layer problem with a polynomial order N = 8. Estimation calculated with the a posteriori τ -estimation method, Algorithm 1, with a polynomial order in the fine mesh of P = 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.49 Discretization error estimation map for the boundary layer problem with a polynomial order N = 8. The estimation is calculated approximating the exact solution with a higher order solution P = 10. Marked elements A, B and C are used for detailed analysis. . . . . . . . . . . . . . . . . . . . . . 5.50 Convergence of the approximated errors for the boundary layer with different polynomial orders for element A. The errors are estimated using a fine mesh of P = [10 × 10]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.51 Convergence of the approximated errors for the boundary layer with different polynomial orders for element B. The errors are estimated using a fine mesh of P = [10 × 10]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. xv. . 92 . 93 . 94 . 94 . 95 . 96. . 96 . 96 . 97 . 97 . 100 . 100 . 101 . 101. . 103. . 103. . 104. . 104. . 105.

(20) xvi. List of Figures. 5.52 Convergence of the approximated errors for the boundary layer with different polynomial orders for element C. The errors are estimated using a fine mesh of P = [10 × 10]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 C.1 C.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9 C.10 C.11 C.12 C.13 C.14 C.15 C.16 C.17. Two elements with different polynomial order. . . . . . . . . . . . . . . . . . Non conforming mesh with three elements. . . . . . . . . . . . . . . . . . . Outside of the mortar structure. . . . . . . . . . . . . . . . . . . . . . . . . Inside of the mortar structure. . . . . . . . . . . . . . . . . . . . . . . . . . Convergence of the DGSEM for test case 1. Maximum value of Q(4) = ρe. . Different meshes and polynomial orders in test case 1. . . . . . . . . . . . . Manufactured solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manufactured solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Convergence with polynomial order. . . . . . . . . . . . . . . . . . . . . . . Maximum error for ρ with a minimum polynomial order N = 2. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 3. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 4. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 5. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 6. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 7. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 8. . . . . . . . Maximum error for ρ with a minimum polynomial order N = 9. . . . . . . .. 119 119 119 119 123 124 124 125 125 126 126 127 127 128 128 129 129.

(21) List of Tables 4.1. Summary of the features of the three algorithms . . . . . . . . . . . . . . . 64. 5.1 5.2. Details on the test case of τ −estimation in the LDC . . . . . . . . . . . . . Time cost of solving the CFD problem compared to the truncation error estimate. These results where obtained in a MacBook Pro with a 2.4 GHz Intel Core 2 Duo processor and 4 GB of RAM memory. . . . . . . . . . . . Computational cost in time (s) of the three algorithms . . . . . . . . . . . . Computational cost in time (s) of the estimates . . . . . . . . . . . . . . . . Computational cost in time (s) of multiple estimates with “correction” term Computational cost in time of the three algorithms. The dimensionless time represent the comparison to obtain a fully converged solution. . . . . . . . .. 5.3 5.4 5.5 5.6. 86. 88 97 98 98 106.

(22)

(23) Chapter 1. Introduction. Contents 1.1. Discretization schemes . . . . . . . . . . . . . . . . . . . . . . . . . .. 1. 1.2. Error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2. 1.3. About this work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5. A mathematical model is a system of partial differential or integral equations along with auxiliary equations, geometry, boundary and initial conditions that describes a physical phenomena. Mathematical models are usually very complex and only admit analytical solutions in simplified situations. As a result, numerical approximations of the analytical solutions should be sought. Scientific computing is concerned with the numerical approximation of the solutions of mathematical models. Numerical methods discretize the physical dimensions of the problem into a grid, where the solution is approximated by functions of varying complexity. Since the 50’s and due to the constant increase of computational resources, a great variety of discretization schemes have been proposed. Several of these methods are reviewed in this introduction. Numerical errors, which are a natural consequence of the discretization process, should be understood in order to be minimized, as well as estimated so they can be kept within the desired accuracy limits of the simulation. The present work deals with the truncation error estimation, but a short review on error estimation methods is examined here.. 1.1. Discretization schemes. During the last decades, one of the most used methods to solve convective dominated problems has been the Finite Volume (FV) method [Eymard 2000]. This method finds approximate solutions of the conservative form of the system of Partial Differential Equations (PDE), which permits a proper treatment of the propagation of the information. Furthermore, the unstructured meshes used in FV permit a high degree of geometrical flexibility, fundamental to solve practical problems. A different approach is the one followed by spectral methods [Canuto 2006]. These methods project the solution onto a high order space of functions. This approximation involves several advantages such as lower numerical dissipation and lower number of Degrees of Freedom (DoF) for the same accuracy. However, the lack of flexibility to adapt to complex geometries prevented its generalized use. During the last decades, a great effort has been done in order to increase flexibility of spectral methods while maintaining their original properties. The Cell average Flux-Corrected Transport (FCT) method of Karniadakis [Giannakouros 1994], the penalty method of Hesthaven, Gotlieb and Furano [Funaro 1991, Hesthaven 1996] or the staggered grid method of Kopriva [Kopriva 1998] are examples of this work..

(24) 2. Chapter 1. Introduction. In the last decade, the Discontinuous Galerkin (DG) method started to be widely used in the computational physics community. DG methods were first introduced by Reed and Hill [Reed 1973] to solve the neutron transport equation. They have emerged in recent years as an efficient and flexible method to solve elliptic and convection-diffusion problems [Bassi 1997, Baumann 1997, Cockburn 1998, Cockburn 2000]. Since, DG methods have proven useful in solving the compressible, e.g. [Bassi 1997, Landmann 2008, Nguyen 2007, Oliver 2007], and the incompressible Navier Stokes equations, e.g. [Bassi 2006, Riviere 2008, Cockburn 2009, Shahbazi 2007, Ferrer 2011, Ferrer 2012]. The Discontinuous Galerkin Spectral Element Method (DGSEM) [Black 1999, Hesthaven 2003, Lu 2004, Kopriva 2006, Kopriva 2009] can be seen as a Spectral Element Method (SEM) [Canuto 2006] where the continuity requirement across element boundaries is relaxed, or as a high order FV method with a compact stencil. As in a usual FV method, the Riemann Solver [Toro 2009] stabilizes the solution. However in this case higher accuracy may be achieved by increasing the order of the approximation, N , as well as by reducing the size of the elements, h. The DGSEM is used in a wide range of applications such as compressible flows [Black 2000, Rasetarinera 2001a], electromagnetics and optics [Acosta 2011, Kopriva 2002, Deng 2007, Deng 2004], heat transfer [Mao 2005], aeroacoustics [Rasetarinera 2001b, Stanescu 2012, Stanescu 2009, Castel 2009], meteorology [Giraldo 2002, Giraldo 2008, Restelli 2009], and geophysics [Fagherazzi 2004a, Fagherazzi 2004b].. 1.2. Error estimation. In the framework of this thesis, any time dependent Partial Differential Equation (PDE) can be written as du = L(u) − f, (1.1) dt where L stands for the spatial differential operator and f is a forcing term. Numerical methods used to obtain approximate solutions of the aforementioned PDE involve different sources of numerical errors [Bathe 2006, Szabo 1991]. In this work three sources of numerical error are discussed: discretization error, truncation error and iteration error. The largest and usually the most difficult error to estimate is the spatial discretization error, N , [Roy 2010], which is the difference between the exact and the numerical solution, N = u − uN .. (1.2). The spatial truncation error is defined as the difference between the discrete partial differential operator and the exact partial differential operator both applied to the steady, exact solution of the problem, as follows τ N = LN (u) − f N − (L (u) − f ) .. (1.3). Both the discretization and the truncation error are related through the Discretization Error Transport Equation (DETE) [Roy 2010], where the truncation error acts as a local source for the discretization error, LN (N ) = τ N .. (1.4).

(25) 1.2. Error estimation. 3. Equation (1.4) is only valid for linear problems, however it can be extended to nonlinear problems by linearizing the discrete partial differential operator around the solution. The DETE implies that the discretization error is convected and diffused through the domain in the same manner as the solution, with the truncation error acting as the source term. The resulting discretization error is the total of locally generated error and error transported to the rest of the domain. This relationship makes the truncation error especially well suited to act as a sensor for a mesh adaptation algorithm [Syrakos 2012, Fraysse 2012c, Choudhary 2013, Fraysse 2014, Derlaga 2015], showing the regions where the mesh should be adapted to reduce the error. Moreover, an accurate estimate of the truncation error also allows for an increase in the order of the scheme via a procedure known as τ -extrapolation [Fraysse 2013]. Iteration error is defined as the difference between the exact steady solution of the algebraic system of the discretization and the iterative non time converged solution of the same system. The iteration error is coupled through the discrete partial differential operator to the iterative residual. Due to this fact, it can be easily estimated. Error estimates have been extensively used in numerical simulation as they provide valuable information about the quality of the solution [Oberkampf 2010, Roache 1998], and are an integral part of every mesh adaptation algorithm [Zienkiewicz 2006, Löhner 1995]. Error estimation methods can be classified into two categories: a priori and a posteriori. A priori methods are those that allow a bound to be placed on the discretization error before obtaining any numerical solution. They are generally only useful for assessing the formal order of accuracy of the discretization scheme and are not in the scope of this work. On the other hand, a posteriori methods provide error estimates after a numerical solution has been computed. Beginning with the pioneering work of Babuška and Rheinboldt [Babuška 1978a, Babuška 1978b], a lot of work has been done, specially by the Finite Element community (see Aisworth and Oden [Ainsworth 2011]), in a posteriori error estimation. These methods have been extended to the Discontinuous Galerkin framework, see [Adjerid 2002, Karakashian 2003, Cockburn 2000, Ainsworth 2007]. In general, most of these methods are strongly problem dependent, e.g. they work better for elliptic problems than for hyperbolic problems (as they were developed for the former). Furthermore, the level of complexity of the problem is also an important issue: discontinuities, singularities and geometrical complexity can significantly reduce the reliability of the a posteriori estimation methods. Following [Roy 2010, Fraysse 2012a, Phillips 2014], a posteriori discretization error estimation methods are sorted into two groups: higher order estimates and residual based methods. Higher order estimates rely on a better approximation of the solution to estimate the error while residual based methods use a discrete solution along with additional information of the problem being solved. Several examples of both approaches are given below. Higher order estimates One of the most representative methods of this category is Richardson extrapolation [Richardson 1911]. Richardson extrapolation permits, knowing the formal rate of convergence of a discretization method with mesh refinement, and if discrete solutions in one mesh and in a second mesh obtained by systematic refinement are available, obtain an estimate of the exact solution of the mathematical model. This approximation can be used to estimate the discretization error. The main advantage of.

(26) 4. Chapter 1. Introduction. Richardson extrapolation is that it is valid for any discretization method and can be used in a post-processing manner. On the other hand, the main drawback of this method is that it is expensive as two converged solutions are required (three if the formal rate of convergence is not known). It is also possible to employ several discretizations on the same mesh but with differing orders of accuracy. The approximate solutions are then combined to produce a discretization error estimate. These methods are known as order refinement methods. Order refinement methods have been implemented within the context of Finite Element methods under the name of hierarchical bases by Bank [Bank 1996]. In the Spectral Element community, Mavriplis [Mavriplis 1994, Mavriplis 1989] estimates the local discretization error by measuring the norm/energy associated to the different modes. This method provides an immediate strategy to perform h-refinement (increase the mesh resolution) or p-refinement (increase the order of the method) depending on the rate of convergence. A similar strategy is used by Henderson [Henderson 1994]. In this case the tail of the spectrum is used to form an estimate of the discretization error. These two methods have been compared by Barosan [Barosan 2006] to perform mesh adaptation in order to capture the discontinuities in a multiphase diffuse interphase method. Similar approaches have been used by Persson [Persson 2006] and more recently by Casoni [Casoni 2011] in the scope of high order shock capturing schemes or by Rosenberg et al. [Rosenberg 2006] for the development of a geophysical and astrophysical spectral element method with adaptive refinement. A different approach developed by the Finite Element community e.g., [Zienkiewicz 1987], are recovery methods. These methods make use of the superconvergence feature of Finite Element methods to reconstruct a gradient of higher order of accuracy than the gradient found in the solution. With the two gradients an estimate of the discretization error in the energy norm can be calculated. It should be noticed that superconvergence occurs when certain regularity conditions on the mesh and the solution are met [Wahlbin 1995], and it is difficult to attain for complex scientific computing applications. Residual Based methods Residual based methods use only one discrete solution along with information from the problem being solved such as the mathematical model or the discrete equations to estimate the discretization error. As a result, they permit to obtain more information about the discretization error and its various sources. However the drawback is that they are usually more code intrusive. First introduced by Babuška and Rheinboldt [Babuška 1978a, Babuška 1978b], the Discretization Error Transport Equation (DETE) permits the estimation of the discretization error if an accurate estimation of the truncation error is in hand. The DETE is derived by linearizing the original governing equation about a solution so that the discretization error is directly computed. This method has been used in Finite Volume by Zhang et al [Zhang 2000] and Shih and Williams [Shih 2009]. A different option is followed by the Finite Element Residual Methods, which make use of the continuos representation provided by the approximate solution of the Finite Element scheme to evaluate a continuos representation of the residual [Ainsworth 2011]. They can be classified into Explicit and Implicit Residual Methods. Explicit Residual Methods directly make use of the solution and the continuous residual to evaluate the estimate. They can therefore be seen as a truncation error estimation technique. Implicit Residual Methods seek solutions to the residual equations that govern the transport and.

(27) 1.3. About this work. 5. generation of the discretization error. In recent years much work has been done on the estimation of the relative discretization error associated with functional outputs. This family of methods is called adjoint methodology [Venditti 2000]. Adjoint methodology permits accurate grid-induced corrections, specially for hyperbolic problems [Venditti 2002, Venditti 2003]. However, its main drawback is its cost, as this approach requires the solution of the dual problem and usually the explicit storage of an embedded grid. In a high order context, this methodology has been recently used by Wang and Mavriplis [Wang 2009] to estimate the error and perform mesh adaptation, in a Discontinuous Galerkin (DG) method. Other authors have used this method to perform adaptation also in a DG framework. Some examples can be found in the work of Leicht, Hartmann, Held and Prill [Hartmann 2010, Hartmann 2011]. As has been seen, some of the previous methods require an estimate of the truncation error. Furthermore it has been explained that the truncation error can be used as a mesh adaptation sensor or for other purposes (τ -extrapolation). Some truncation error estimation techniques are reviewed below. Truncation Error estimation The analysis of the truncation error can be carried out in two ways. First, the analysis can be performed by deriving analytical expressions from Taylor series expansions, and second, by deriving a methodology to approximate the error. The scope of the former approach, usually known as the modified equation, comprises the study of one and two dimensional scalar problems in simple geometries [Hoffman 1982, Jeng 1992, Leonard 1994, Hagen 2001, Qin 2003, Kallinderis 2009], as an expression for the truncation error can be difficult to derive for complex, nonlinear problems. Schemes with arbitrary polynomial order, complex geometry or complicated numerical fluxes, such as those used for the solution of the Navier Stokes equations, also make the analytical derivation very complicated. Within the latter approach is the work of Shih and Williams [Shih 2009] that proposed a multiple grid method with interpolation from the coarse to the fine grid. However the main drawback of this approach is that it tends to overpredict the truncation error [Phillips 2014]. Also in the line of deriving a methodology to approximate the error, is the τ -estimation method of Brandt [Brandt 1984]. This method relies on the evaluation of the discrete PDE operator on a hierarchy (fine to coarse) of meshes, which provides accurate estimates of the truncation error. The original works of Berger [Berger 1987], Bernert [Bernert 1997] and Fulton [Fulton 2003] posed the fundamentals of the method and studied the conditions on the restriction operators for transfers from fine to coarse and coarse to fine grids, mainly for finite difference uniform meshes. Syrakos and Goulas [Syrakos 2006] successfully implemented τ -estimation for finite volume (FV) discretizations of the incompressible Navier Stokes equations. More recently, Fraysse et al. [Fraysse 2012b] have extended those previous analyses to FV discretizations on any kind of meshes, with an interesting extension to non converged solutions [Fraysse 2013].. 1.3. About this work. In this work, the τ -estimation method is extended from low order to high order schemes, in particular, to the Chebyshev Collocation Method and to the Discontinuous Galerkin Spectral Element Method (DGSEM). The τ -estimation method for low order schemes es-.

(28) 6. Chapter 1. Introduction. timates the truncation error in a coarse mesh by using a previously computed solution in a fine mesh. On the contrary, the τ -estimation method developed in this work takes advantage of the features of high order schemes to estimate the truncation in the same mesh where the solution is computed. In particular, truncation error estimates are determined for any polynomial order lower than the one used to compute the solution. Special attention is given to the rate of convergence of the error, specially in anisotropic problems, as this is of critical importance to perform adaptation in high order methods. Furthermore and as a particularity of the extension of the method to the DGSEM, the interior and interfacial contributions of the truncation error are separated resulting on the definition of the isolated truncation error. The isolated truncation error is more accurate when trying to measure the error within an element, which is also important for adaptation. Moreover, the quasi-a priori approach of the method developed for Finite Volumes by Fraysse et al. [Fraysse 2012b] is applied to improve the computational efficiency of the procedure. In linear problems, the quasi-a priori τ -estimation method permits to perform an accurate estimation at the first iteration, yielding a robust a priori error estimator. For nonlinear problems it is not possible to completely remove the effect of the iteration error, although the method mitigates the introduced inaccuracy. Parts of this thesis have been presented and published in the Journal of Scientific Computing [Rubio 2013, Rubio 2014]. Other parts are under review for publication in the Journal of Computational Physics [Kompenhans 2015]. The author has also collaborated during his PhD studies in the following journal publications [Fraysse 2013, Fraysse 2014, Browne 2014]. The present thesis is organized as follows: • Chap. 2 contains a brief introduction to spectral methods. The objective of this chapter is twofold: first, to introduce the DGSEM and second, to present some fundamental results about the convergence of spectral methods. These results are later used in Chaps. 3 and 4. This chapter starts with the introduction of the best known spectral method, the Fourier expansion. The Fourier expansion is constrained to the approximation of periodic functions. This limitation is bypassed making use of orthogonal polynomial expansions (Chebyshev and Legendre). Once the spectral basis have been introduced, two methods to approximate PDE are explained. The Chebyshev Spectral Collocation method is interesting, as it is one of the most straightforward ways to approximate PDE with spectral methods. Furthermore, it serves as a basis for the more complicated Discontinuous Galerkin Spectral Element Method which is introduced next. To improve the readability of this chapter, some of the technical details are presented as appendices. • Chap. 3 contains a detailed analysis of the numerical errors studied in this work, i.e., the discretization error, the truncation error and the iteration error. The numerical errors are first examined in the Chebyshev Spectral Collocation method where, from basic assumptions about the discretization error, the behavior of the truncation error is derived. Special attention is paid to the effect of nonlinearities, anisotropy of the problem and the extension to system of equations. Once the basis about the behavior of the truncation error have been established for the Chebyshev Spectral Collocation method, the truncation error in the DGSEM is analyzed. This study results in the.

(29) 1.3. About this work. 7. separation of the truncation error into an interior and an interfacial contribution, which is a particularity of the extension to the DGSEM and could be interesting for applications to mesh adaptation algorithms. The interior contribution to the truncation error is defined as isolated truncation error. The effect of anisotropic solutions in the truncation error and its relation with discretization and interpolation errors are also studied. • Chap. 4 extends the τ -estimation technique to spectral methods. The extension is particularized first for the Chebyshev Spectral Collocation Method and later to the DGSEM. Special attention is paid to the quasi-a priori τ -estimation method, where a non fully converged solution is used for the estimation. This method includes a special treatment for the iteration error to minimize its effect. Furthermore, the quasi-a priori τ -estimation method is modified to estimate the isolated truncation error. Three algorithms to efficiently estimate the truncation error are developed. The algorithms permit the extraction of information about the anisotropy, the rate of convergence of the problem and the separation of the interior and the interfacial contributions. The computational cost of the algorithms is analyzed. • Chap. 5 contains the numerical experiments carried out to support the theory developed in the previous chapters. These experiments include one and two dimensional scalar conservation laws. The method is also applied to the incompressible and compressible Euler and Navier Stokes equations..

(30)

(31) Chapter 2. Spectral Methods. Contents 2.1. 2.2. 2.3. 2.4. The Continuous Fourier Expansion . . . . . . . . . . . . . . . . . . .. 10. 2.1.1. Fourier Truncated Series . . . . . . . . . . . . . . . . . . . . . . . . . . 11. 2.1.2. Convergence of the Fourier Series . . . . . . . . . . . . . . . . . . . . . 11. The Discrete Fourier Expansion . . . . . . . . . . . . . . . . . . . . .. 14. 2.2.1. Fourier Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15. 2.2.2. Fourier Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15. 2.2.3. Fourier Interpolation Error . . . . . . . . . . . . . . . . . . . . . . . . 16. 2.2.4. Differentiation through Fourier Interpolation . . . . . . . . . . . . . . 17. Polynomial Basis Functions . . . . . . . . . . . . . . . . . . . . . . .. 18. 2.3.1. Polynomial Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20. 2.3.2. Convergence of Polynomial Series . . . . . . . . . . . . . . . . . . . . . 21. 2.3.3. Polynomial Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . 23. 2.3.4. Orthogonal Polynomial Interpolation . . . . . . . . . . . . . . . . . . . 25. Approximating Solutions of PDE . . . . . . . . . . . . . . . . . . . .. 27. 2.4.1. The Chebyshev Collocation Method . . . . . . . . . . . . . . . . . . . 29. 2.4.2. Discontinuous Galerkin Spectral Element Method . . . . . . . . . . . . 30. In this chapter some basic ideas about spectral methods are reviewed. The aim of this review is to make this work self-contained and to set some notation that is used within this thesis. Most of the results presented here can be found in classical references for spectral methods [Boyd 1989, Canuto 2006, Kopriva 2009]. The final goal of this thesis is to develop an efficient and accurate estimation technique for the truncation error in spectral methods. As an intermediate step, the behavior of the truncation error and other errors that arise in the spectral discretization are studied. Therefore this review is focused in errors and convergence of spectral methods. The basic idea under spectral methods is to assume that any function (i.e. the solution of a PDE) can be approximated as a sum of terms composed of orthogonal functions multiplied by some coefficients. These basis functions are chosen to assure that accurate approximations of the function are obtained with a minimum number of summands. The most famous spectral basis is the Fourier basis, however it is only valid to approximate periodic functions. That is why other basis are also considered, i.e. Chebyshev or Legendre polynomials for non periodic problems in finite domains. The first part of this chapter is devoted to the theory of the approximation of functions, integrals and derivatives with high order orthogonal functions. The second part makes use of the theory developed in the first part to present two representative examples of spectral methods to approximate the solutions of PDE..

(32) 10. Chapter 2. Spectral Methods. This chapter is organized as follows: First, in Sec. 2.1, the Fourier series expansion is reviewed, paying special attention to the convergence of the error. Second, in Sec. 2.2, how the Fourier continuous expansion can be used in a discrete form is explained. Third, in Sec. 2.3, the theory developed for Fourier to orthogonal polynomial expansions is extended, in particular to Chebyshev and Legendre polynomials. Finally, in Sec. 2.4, two methods to find approximate solutions of PDE are introduced: the Chebyshev Collocation Method and the Discontinuous Galerkin Spectral Element Method (DGSEM).. 2.1. The Continuous Fourier Expansion. Any square integrable complex-valued function, f ∈ L2 (0, 2π), can be represented using its Fourier series ∞ X f (x) = ck eikx , (2.1) k=−∞. where the complex numbers ck are the Fourier coefficients defined by ck =. 1 2π. 2π. Z. f (x)e−ikx dx.. (2.2). 0. Equations (2.1-2.2) are a consequence of the orthogonality property of the set of functions φk (x) = eikx in the L2 (0, 2π) space. L2 (0, 2π) is a complex Hilbert space with inner product Z 2π. (u, v) =. u(x)v(x)dx,. (2.3). 0. and norm Z. 2π 2. ||u|| =. |u(x)| dx. 1/2 .. (2.4). 0. So the orthogonality relation between φj (x) = eijx and φk (x) = eikx means Z (φj (x), φk (x)) =. 2π. eijx e−ikx dx = 2πδjk .. (2.5). 0. Equation (2.3) says that each of the terms of the Fourier series, i.e. projection of the function onto the corresponding Fourier polynomial.. ck eikx , is the. It is possible as well (recall Euler’s formula eix = cos(x) + i sin(x)) to introduce a Fourier cosine transform and a Fourier sine transform as Z 2π 1 f (x) cos (nx)dx, an = 2π 0 (2.6) Z 2π 1 bn = f (x) sin (nx)dx. 2π 0 The three Fourier transforms of f (x), (2.1) and (2.6) are related by the formula cn = an − ibn. n = 0, ±1, ±2, . . .. (2.7). From now on it will be assumed that the function f (x) is real-valued, although some.

(33) 2.1. The Continuous Fourier Expansion. 11. theorems will be formulated in its more generalized complex form. For the particular scenario of f (x) being real valued, an and bn are real numbers, and c−k = c¯k . The Fourier expansion assumes a periodic extension of the function outside the interval [0, 2π]. This is a consequence of the periodicity of the basis functions, (Fig. 2.1), as well as the scalar product chosen. As a result, when a function f (x) is projected using (2.2), the result is not the projection of the function, but the projection of the periodic extension of the function. This fact has implications in the rate of convergence of Fourier series. 1.0. cos(x) sin(x). 0.5 0 −0.5 −1.0 −6. −4. −2. 0. 2. 4. 6. 8. 10. 12. Figure 2.1: Real and imaginary parts (eix = cos(x) + i sin(x)) of the first function of the Fourier basis.. 2.1.1. Fourier Truncated Series. The Fourier series, (2.1), is infinite. Therefore, to use Fourier series for practical problems, it should be truncated f (x) =. ∞ X k=−∞. ikx. ck e. =. N/2 X k=−N/2. ∞ X. ck eikx +. ck eikx = PN f (x) + τ,. (2.8). |k|=N/2+1. where τ is the truncation error of the Fourier series. Taking into account the orthogonality of the basis functions and that ||eikx ||2 = 2π, it can be shown that the truncation error of the Fourier series follows kτ k2 = kf (x) − PN f (x)k2 = 2π. ∞ X. |ck |2 .. (2.9). |k|=N/2+1. For practical issues, it is not only important the convergence of Fourier series, but how rapidly it converges, i.e. how rapidly its coefficients decay to zero (ck → 0). As a rule of thumb “the smoother the function, the more rapidly its spectral coefficients converge” [Boyd 1989]. As the Fourier approximation assumes the periodic extension of the approximated function f (x), only periodic functions will produce smooth periodic extensions. The Fourier series exhibits exponential convergence for analytic and periodic functions. The different rates of convergence of the Fourier series are covered in detail in the following section.. 2.1.2. Convergence of the Fourier Series. In the previous section it was explained that, the Fourier series converges better for smooth functions. It is possible to show (see for example [Boyd 1989]) that the Fourier expansion.

(34) 12. Chapter 2. Spectral Methods. 7 3.0. 10 6. 4 3. f(x) = 3/(5-4cos(x)). f(x) = x(2π-x). f(x) = x. 2.5. 8. 5. 6. 4. 2 2. 1 0 0. 5. 10. 15. 1.0. 0 −5. 0. x. (a) f1 = x. 1.5. 0.5. 0 −5. 2.0. 5. 10. 15. −5. 0. x. (b) f2 = x(2π − x). 5. 10. 15. x. (c) f3 = 3/(5 − 4 cos (x)). Figure 2.2: Periodic extension of three different functions. for periodic functions presents: • Algebraic convergence of order m + 1 for functions f (x) ∈ C m . The exact rate of convergence of the coefficients is ck = O(1/k m+1 ). • Exponential convergence for analytic functions. This means that the Fourier coefficients decrease faster than 1/k m for any finite power of m. This is valid also for non periodic functions, analyzing the smoothness of its periodic extension. This can be better explained by using an example. The coefficients of the Fourier series for three different functions are calculated f1 = x, f2 = x(2π − x), 3 f3 = . 5 − 4 cos (x). (2.10). This example has been taken from [Canuto 2006]. The periodic expansion of the three functions can be seen in Fig. 2.2. The functions exhibit different degrees of smoothness. The first function, f1 , is continuous within the interval (0, 2π), however, as it is non periodic, its periodic expansion is not continuous in the whole domain. The periodic expansion of the second one, f2 , is continuous C 0 . Finally, the periodic expansion of the function f3 is C ∞ . In Fig. 2.3 the decay rate of the absolute value of the coefficients of the Fourier expansions for the three functions is shown. As can be seen, algebraic convergence results in a straight line with slope m = 1 and m = 2 for functions f1 and f2 respectively. On the other hand, exponential convergence shows an “unbounded negative slope” for function f3 . A few remarks are in order. First, the orders of convergence are only meaningfully asymptotically (for large number of basis functions, k). For example, in Fig. 2.3, the decay rate for f2 is better than for f3 for the first k 0 s. However, for higher k 0 s, the convergence rate for f3 is the best. Secondly, the spectral convergence means how rapidly the coefficients decrease for k → ∞ for a fixed approximated function f (x) ∈ C m , and not how rapidly the coefficients decrease for m → ∞ with fixed k. Lastly, if the coefficients are computed numerically, the asymptotic order may be defeated by the “Roundoff Plateau” (it is not possible to perform operations under the machine precision)..

(35) 2.1. The Continuous Fourier Expansion. 13. 1 10−1. |ck|. 10−2 10−3 10−4 10−5 10−6. f=x f=x(2π-x) f=3/(5-4cos(x)) 1. 10 k. Figure 2.3: Fourier coefficients ck vs k for three different functions.. Three different types of spectral convergence are considered in [Boyd 1989]: subgeometric, geometric and supergeometric. In Fig. 2.4 a qualitative plot of the three types of spectral convergence compared with algebraic convergence is shown. Subgeometric convergence rarely occurs for problems in finite intervals. As infinite intervals will not be covered in this work, geometric and supergeometric convergence is assumed. 1 Algebraic Subgeometric. Geometric Supergeometric 10−10 5. 10. 15. 20. 25. 30. 35. 40. Figure 2.4: Fourier coefficients ck vs k. Kinds of spectral convergence.. The strip of convergence theorem for the Fourier series [Boyd 1989] is introduced to differentiate when geometric and supergeometric convergence are expected:. Strip of convergence: Fourier series. Let z = x + iy and let ρ denote the absolute value of the imaginary part of the location of the singularity of f : C → C (being f the periodic expansion of the approximated function), f (z) which is nearest the real z − axis (Fig. 2.5). Then the Fourier series converges uniformly and absolutely within the strip in the complex z − plane, centered on the real axis, which is defined by |y| < ρ and diverges outside the strip |y| > ρ. The asymptotic coefficients of the Fourier series are related to ρ by lim sup log |ck /ck+1 | = ρ (2.11) k→∞.

(36) 14. Chapter 2. Spectral Methods. 2 z = x+iy/ρ 1 i y/ρ. Strip of convergence 0. −1. −2 −2. −1. 0. 1. 2. x. Figure 2.5: Strip of convergence of Fourier Series.. • If the function has a singularity in the real z − axis then ρ=0 and there is algebraic convergence.. • If the function has a singularity at a distance 0 < ρ < ∞ of the z − axis then the asymptotic rate of convergence for real z is given by ρ. This means that ck = O(exp (−kρ)) (geometric convergence).. • If the function is entire (no singularities in the whole complex plane), the coefficients go as ck = O(exp (−(k/A) log (k) + O(k)) for some constant A (supergeometric convergence).. Therefore all the periodic, analytic functions in the real interval present, at least, exponential convergence, ck = O(exp (−kρ)). However the rate of exponential convergence, ρ, depends on its regularity in the complex plane. Furthermore, entire functions exhibit supergeometric convergence ck = O(exp (−(k/A) log (k) + O(k)) which is better than exponential. The importance of this result is highlighted in the following sections, where it is shown that the convergence of spectral methods is linked to the convergence of the coefficients of the series.. 2.2. The Discrete Fourier Expansion. In many practical situations, it is not possible to implement the Fourier expansion as explained in the previous section. The coefficients calculation in the continuous expansion (2.2) requires the evaluation of integrals, which is not easy (or possible) in a general problem. Therefore it is necessary to find a method to numerically calculate these coefficients. The integrals can be evaluated using a quadrature rule, however to find one that retains the essential properties of spectral methods is required: namely spectral accuracy (so the convergence is fast) and orthogonality (so each coefficient of the expansion can be calculated by orthogonal projection)..

(37) 2.2. The Discrete Fourier Expansion. 2.2.1. 15. Fourier Quadrature. A quadrature rule is a formula to approximate the integral of a function as the sum of the value of the function in a set of points multiplied by certain weight function, b. Z. u(x)dx = Q[u] + E = a. N X. u(xj )wj + E.. (2.12). j=0. There are two sets of degrees of freedom to decrease the error E in (2.12): the nodes xj and the weights wj . The result of seeking a quadrature rule under which as many possible Fourier basis functions remain orthogonal, is the composite trapezoidal rule with N equispaced nodes. The composite trapezoidal rule integrates exactly the complex exponentials eikx for k = 0, ±1, ±2..., ±(N − 1). The exact result of the integral can not be assured for |k| > N − 1, since the product of eimx and einx is nonzero for n − m = ±pN . The quadrature error for higher k 0 s is the origin of the aliasing error, which will describe later. Therefore the Fourier quadrature rule in the interval [0, 2π] reads QF [u] =. N −1 2π X u(xj ), N. xj = 2jπ/N.. (2.13). j=0. Equation (2.13) is the composite trapezoidal rule with equispaced nodes for the particular case of periodic functions in the interval [0, 2π]. A more detailed explanation can be found in [Kopriva 2009].. 2.2.2. Fourier Interpolation. The Fourier quadrature rule (2.13) allows us to introduce the definition of the Fourier interpolant as N/2−1 X IN f (x) = c̃k eikx , (2.14) k=−N/2. The coefficients of the Fourier interpolant are computed by applying the Fourier quadrature to (2.2) resulting in c̃k =. N −1 2π X f (xj )e−ikxj , N. xj = 2jπ/N.. (2.15). j=0. It can be shown, e.g. see [Kopriva 2009], that (2.14) fulfills IN f (xj ) = f (xj ),. j = 0, 1, ..., N − 1,. (2.16). or, in other words, that it is the N/2 degree trigonometric interpolant of f (x). It is useful to rewrite (2.14) as N −1 X IN f (x) = f (xj )hj (x), (2.17) j=0.

(38) 16. Chapter 2. Spectral Methods. where hj are the Cardinal functions (hj (xn ) = δj,n for |n − j| < N ) hj (x) =. 1 N. N/2−1. X. eik(x−xj ) ,. j = 0, 1, ..., N − 1.. (2.18). k=−N/2. It should be noticed that (2.17) is equivalent to (2.14), where the unknowns are the function values in a set of nodes instead of the coefficients of the modes. The former approach is known as modal in the literature and the latter as nodal.. 2.2.3. Fourier Interpolation Error. It is expected that the quadrature rule described in the previous section introduces an additional source of error in the approximation. As a consequence, the Fourier interpolation, (2.17), will produce a worse approximation than Fourier truncated series with the exact coefficients, (2.2). In this section the accuracy of the Fourier interpolation and the Fourier truncated series is compared. The exact Fourier series for a function f (x) reads f (x) =. ∞ X. ck eikx ,. (2.19). k=−∞. and the Fourier interpolant of order N/2 for the same function is N/2−1. X. IN f (x) =. c̃k eikx .. (2.20). k=−N/2. The Fourier interpolant coefficients and the Fourier series coefficients can be related by substituting the definition of the Fourier series, (2.1), into the definition of the Fourier interpolant coefficients (2.15), N −1 N −1 2π X 2π X c̃k = f (xj )e−ikxj = N N j=0. j=0. ∞ X. ∞ X. ! ck e. e−ikxj = ck +. ikx. ck+jN ,. (2.21). j=−∞ j6=0. k=−∞. for xj = 2jπ/N . The discrete orthogonality property of the Fourier quadrature has been used to simplify the last expression. Substituting (2.21) into (2.14)   N/2−1. IN f (x) =. ∞ X  X  ikx ck + ck+jN   e =. k=−N/2. j=−∞ j6=0. N/2−1. X. N/2−1. ck e. k=−N/2. ikx. +. X. ∞ X. ck+jN eikx .. k=−N/2 j=−∞ j6=0. (2.22) The last expression can be compared with the complete Fourier series for the function f (x), (2.19), and the expression of the Fourier truncation error, (2.8), to get f (x) − IN f (x) =. ∞ X |k|=N/2. N/2−1. ck e. ikx. +. X. ∞ X. k=−N/2 j=−∞ j6=0. ck+jN eikx = τ + RN f,. (2.23).

(39) 2.2. The Discrete Fourier Expansion. 17. where τ is the truncation error defined in (2.9) and RN f is known as aliasing error. It is important to note that, due to the orthogonality of the Fourier series, the truncation error τ and the aliasing error RN f are orthogonal so kf − IN f k2 = kf − PN f k2 + kRN f k2 .. (2.24). This means that the approximation obtained using the Fourier interpolation is never better than the one obtained using the Fourier truncated series (for more details see [Canuto 2006]). Furthermore, from (2.23) and taking into account that the Fourier basis functions eikx are bounded by one,   ∞  X  |f (x) − IN f (x)| ≤ 2 |ck | . (2.25)   |k|=N/2. This result means that an upper bound for the interpolation error is twice the truncation error. Moreover, it should be noticed that both the truncation and the interpolation errors depend on the coefficients of the exact Fourier series. As a consequence of the spectral accuracy, in the asymptotic range and for sufficiently smooth functions it is known that |cn+1 | << |cn |. This results in a useful bound for the error made in Fourier interpolation, |f (x) − IN f (x)| ∼ cN +1 .. (2.26). The obtained result provides an order of magnitude error for the Fourier interpolation. However it should be used carefully, as it is only valid for smooth functions in the asymptotic range of convergence.. 2.2.4. Differentiation through Fourier Interpolation. It is possible to approximate the derivative of a function by differentiating its interpolant (2.17). As a result of the basis functions used, to differentiate a Fourier expansion results in a multiplication by (ik)l where l is the order of differentiation as, N/2−1. (IN f ). (l). =. X. (ik)l c̃k eikx .. (2.27). k=−N/2. As in the previous section, the focus of this work is in the error made in this approximation. The error made in the approximation of the derivative is compared with the error made in the approximation of the function. It is possible to differentiate (2.23) to obtain, ∞ X. 0. 0. f (x) − (IN f (x)) =. N/2−1. ikck e. ikx. +. X. ∞ X. ikck+jN eikx ,. (2.28). (ik)l ck+jN eikx .. (2.29). k=−N/2 j=−∞ j6=0. |k|=N/2. and for higher order derivatives, (l). (l). f (x) − (IN f (x)). =. ∞ X. N/2−1 l. (ik) ck e. |k|=N/2. ikx. +. X. ∞ X. k=−N/2 j=−∞ j6=0.

(40) 18. Chapter 2. Spectral Methods. Taking into account the orthogonality of the Fourier basis, the following holds   ∞   X k l |ck | . |f (l) (x) − (IN f (x))(l) | ≤ 2  . (2.30). |k|=N/2. By comparing (2.25) with (2.30) it can be seen that increasing by l the order of differentiation worsens the approximation by an algebraic factor of k l .. 2.3. Polynomial Basis Functions. In the previous section, the Fourier expansion was introduced. It was shown that Fourier series provides exponential convergence for periodic and analytic functions. However, exponential convergence was lost for non periodic functions. In this section alternatives to the Fourier series for non periodic functions are presented. (α,β) The Jacobi polynomials, Pk (x), are a family of polynomials with the form (α,β) Pk (x).   k  1 X k+α k+β = k (x − 1)i (x + 1)k−i . i k−i 2. (2.31). i=0. They are orthogonal with respect to the weight w(x) = (1 − x)α (1 + x)β on the interval (−1, 1), Z 1 (α,β) (α,β) Pk (x)Pm (x)w(x)dx = δkm . (2.32) −1. Jacobi polynomials can be found as a solution of the Sturm-Liouville problem or applying Gram-Schmidt orthogonalization method to the polynomials with respect to that weight. This family of polynomials is complete in the space L2w (−1, 1) and forms an orthogonal basis with the inner product Z. 1. (u, v)w =. u(x)v(x)w(x)dx. (2.33). 1/2 |u(x)|2 w(x)dx .. (2.34). −1. and norm Z. 1. ||u||w = −1. Moreover, the decay rate of the coefficients of the truncated series depends only on the smoothness of the function being expanded without any requirement for periodicity at the boundaries [Canuto 2006]. Therefore they are a good alternative to Fourier basis for non periodic functions. The parameters α and β in (2.31) define different polynomials. There are two important special cases for the solutions of PDE in bounded domains: Legendre polynomials, where (0,0) α = 0 and β = 0, Lk (x) = Pk (x) and Chebyshev polynomials, where α = −1/2 and (−1/2,−1/2) β = −1/2, Tk (x) = Pk (x). Legendre polynomials are of interest because of the associated weight function w(x) = 1, making integrals such as (2.33) easier to evaluate analytically. Chebyshev polynomials can be also obtained from the Fourier series with a change of variable. Therefore they have powerful approximation properties and the theory developed for Fourier also applies for Chebyshev with minor modifications..

(41) 2.3. Polynomial Basis Functions. 19. 1.0. 0.5 Tk(x). T4. T3. T5. 0. −0.5 T2 −1.0 −1.0. −0.5. 0. 0.5. 1.0. x Figure 2.6: Chebyshev polynomials from degree two to five.. Chebyshev Polynomials Chebyshev polynomials are the special case of Jacobi polynomials for α = β = −1/2. They satisfy the three-term recursion rule, Tk+1 (x) = 2xTk (x) − Tk−1 (x),. (2.35). with T0 = 1 and T1 = x. Their L2 norms are. π (2.36) 2 where ck = 2 for k = 0 and ck = 1 for k > 0. In Fig. 2.6 Chebyshev polynomials from degree two to five are shown. ||Tk ||2w = ck. Legendre Polynomials Legendre polynomials are the special case of Jacobi polynomials for α = β = 0. They satisfy the three-term recursion rule, Lk+1 (x) =. 2k + 1 k xLk (x) − Lk−1 (x) k+1 k+1. (2.37). with L0 (x) = 1 and L1 (x) = x. Their L2 norms are. 2 . 2k + 1 In Fig. 2.7 Legendre polynomials from degree two to five are shown. ||Lk ||2 =. (2.38).

(42) 20. Chapter 2. Spectral Methods. 1.0 L2. Lk(x). L4. L3. 0.5. L5. 0. −0.5. −1.0 −1.0. −0.5. 0. 0.5. 1.0. x Figure 2.7: Legendre polynomials from degree two to five.. 2.3.1. Polynomial Series. Since the Jacobi polynomials form a basis for L2w (−1, 1), any square integrable function, f (x), can be represented as an infinite series in them f (x) =. ∞ X. (α,β) fˆk Pk (x).. (2.39). k=0. Moreover, because the basis functions are orthogonal, the coefficients can be found as the projection (α,β) (f (x), Pk (x))w ˆ fk = . (2.40) (α,β) 2 ||Pk ||w (α,β). From now on, φk (x) = Pk. (x) is used to alleviate the notation.. As it was done for Fourier, the series can be truncated f (x) =. N X k=0. ∞ X. fˆk φk (x) +. fˆk φk (x) =. k=N +1. N X. fˆk φk (x) + τ,. (2.41). k=0. resulting in a truncation error. Due to the orthogonality of the basis functions, the norm of the truncation error follows ||τ ||2w =. ∞ X. |fˆk |2 ||φk ||2w .. (2.42). k=N +1. It should be noticed that ||φk ||2w , from (2.36) and (2.38), is constant or algebraically decreasing. Therefore, as for the Fourier series, the rate of convergence of the approximation depends only on the decay rate of the coefficients (2.40)..

(43) 2.3. Polynomial Basis Functions. 2.3.2. 21. Convergence of Polynomial Series. In the previous section it was shown that the error made in the truncated series only depends on the decay rate of the series coefficients. In this section the decay rate of these coefficients is analyzed. First the Chebyshev and Fourier series are linked. Then the strip of convergence theorem for Fourier series is extended to Chebyshev. Finally, some results to compare Chebyshev and Legendre convergence are presented. From Fourier to Chebyshev series The Chebyshev polynomials can be seen as a special case of the Fourier series. To see this, assume f (z) is a non periodic function on [−1, 1]. Then the change of variable z = cos (θ) is made, so that function is f (cos (θ)). This means that although θ ∈ [−∞, ∞], z ∈ [−1, 1]. Moreover, as the transformation z is periodic, the new function is also periodic. And furthermore, as it is a symmetric transformation, the new function f (θ) is also symmetric. The Fourier cosine basis, (2.6), is complete for symmetric functions, so a cosine expansion is sufficient f (cos (θ)) =. ∞ X. an cos (nθ). (2.43). n=0. or f (z) =. ∞ X. an cos (n arccos (z)) =. n=0. ∞ X. an Tn (z). (2.44). n=0. The set of functions Tn (z) ≡ cos (n arccos (z)) is called Chebyshev polynomials and preserves all the features of the Fourier basis set. As far as the coefficients is concerned, the Chebyshev coefficients, an , are identical with the Fourier coefficients of f (cos (θ)). It should be noticed that this representation is equivalent to (2.35). However it is useful as this result allows a link between the properties of Fourier polynomials and Chebyshev polynomials. It is important to mention that, as any function is periodic under the transformation, and Chebyshev series is a special case of Fourier series, Chebyshev series will exhibit spectral convergence as long as f (z) is smooth in the real interval [−1, 1]. In the next section a quantitative result regarding the convergence of the Chebyshev series is presented by adapting the strip of convergence from Fourier series to Chebyshev series. Convergence Ellipse: Chebyshev series. Let z = x + iy and let. x = cosh (η) cos (µ),. η ∈ [0, ∞]. y = − sinh (η) sin (µ),. µ ∈ [0, 2π]. (2.45). be the transformation to elliptical coordinates (η, µ). First it is assumed that f (z) has poles, branch points or other singularities at the points (ηj , µj ), j = 1, 2, ... in the complex z-plane. Under the definition η0 = minj |ηj | the Chebyshev series f (z) =. ∞ X. an Tn (z). (2.46). n=0. converges within the region bounded by the ellipse η = η0 , and diverges for all (x, y) outside this ellipse..

Referencias

Documento similar

MD simulations in this and previous work has allowed us to propose a relation between the nature of the interactions at the interface and the observed properties of nanofluids:

In this work, we present a new upwind discontinuous Galerkin scheme for the convective Cahn-Hilliard model with degenerate mobility which preserves the maximum principle and

In addition to traffic and noise exposure data, the calculation method requires the following inputs: noise costs per day per person exposed to road traffic

In the previous sections we have shown how astronomical alignments and solar hierophanies – with a common interest in the solstices − were substantiated in the

This issue causes the failure of standard discretizations, like the Galerkin finite element method or the central finite difference scheme, for convection-dominated

Clustering error and estimation of an upper bound for the documents complexity obtained for all the word selection methods when the asterisk substitution method is used.. The

(hundreds of kHz). Resolution problems are directly related to the resulting accuracy of the computation, as it was seen in [18], so 32-bit floating point may not be appropriate

Even though the 1920s offered new employment opportunities in industries previously closed to women, often the women who took these jobs found themselves exploited.. No matter