Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Error estimation and mesh adaptation paradigm for unstructured mesh finite volume methods Sharbatdar, Mahkame 2017

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
24-ubc_2017_february_sharbatdar_mahkame.pdf [ 16.22MB ]
Metadata
JSON: 24-1.0340780.json
JSON-LD: 24-1.0340780-ld.json
RDF/XML (Pretty): 24-1.0340780-rdf.xml
RDF/JSON: 24-1.0340780-rdf.json
Turtle: 24-1.0340780-turtle.txt
N-Triples: 24-1.0340780-rdf-ntriples.txt
Original Record: 24-1.0340780-source.json
Full Text
24-1.0340780-fulltext.txt
Citation
24-1.0340780.ris

Full Text

Error Estimation and MeshAdaptation Paradigm forUnstructured Mesh FiniteVolume MethodsbyMahkame SharbatdarB.Sc., Mechanical Engineering, University of Tehran, 2010M.ASc., Mechanical Engineering, The University of British Columbia, 2012A THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFDOCTOR OF PHILOSOPHYinThe Faculty of Graduate and Postdoctoral Studies(Mechanical Engineering)THE UNIVERSITY OF BRITISH COLUMBIA(Vancouver)January 2017c© Mahkame Sharbatdar 2017AbstractError quantification for industrial CFD requires a new paradigm in which a robustflow solver with error quantification capabilities reliably produces solutions with knownerror bounds. Error quantification hinges on the ability to accurately estimate andefficiently exploit the local truncation error. The goal of this thesis is to develop areliable truncation error estimator for finite-volume schemes and to use this truncationerror estimate to improve flow solutions through defect correction, to correct the outputfunctional, and to adapt the mesh.We use a higher-order flux integral based on lower order solution as an estimation ofthe truncation error which includes the leading term in the truncation error. Our resultsshow that using this original truncation error estimate is dominated by rough modesand fails to provide the desired convergence for the applications of defect correction,output error estimation and mesh adaptation. So, we tried to obtain an estimate of thetruncation error based on the continuous interpolated solution to improve their per-formance. Two different methods for interpolating were proposed: CGM’s 3D surfacesand C1 interpolation of the solution.We compared the effectiveness of these two interpolating schemes for defect cor-rection and using C1 interpolation of the solution for interpolating is more helpfulcompared to CGM, so we continued using C1 interpolation for other purposes. Fordefect correction, although using the modified truncation error does not improve theorder of accuracy, significant quantitative improvements are obtained.Output functional correction is based on the truncation error and the adjoint so-lution. Both discrete and continuous adjoint solutions can be used for functional cor-rection. Our results for a variety of governing equations suggest that the interpolatingscheme can improve the correction process significantly and improve accuracy asymp-totically.Different adaptation indicators were considered for mesh adaptation and our resultsshow that the estimate of the truncation error based on the interpolated solution is amore accurate indicator compared to the original truncation error. Adjoint-based meshiiAbstractadaptation combined with modified truncation error provides even faster convergenceof the output functional.iiiPrefaceThe research ideas and methods explored in this thesis are the fruits of a close workingrelationship between Dr. Carl Ollivier-Gooch and Mahkame Sharbatdar. The imple-mentation of the methods, the data analysis, and the manuscript preparation were doneby Mahkame Sharbatdar with invaluable guidance from Carl Ollivier-Gooch through-out the process. The following papers, directly related to this PhD thesis, have beenpublished or are in the submission process.• M. Sharbatdar, A. Jalali, C. Ollivier-Gooch, “Smoothed Truncation Error inFunctional Error Estimation and Correction using Adjoint Methods in an Un-structured Finite Volume Solver”. Computers & Fluids, 140:406-421, 2016. Someof the results from this paper are included in Chapter 5.A. Jalali is a PhD student in our research group who developed the discrete ad-joint solver for his PhD thesis. I developed the continuous adjoint solver, andtruncation error estimate used in this work, run all the cases, and wrote thepaper.• M. Sharbatdar, C. Ollivier-Gooch, “Adjoint-based Functional Correction for Un-structured Mesh Finite Volume Methods”. submitted, 2016. Some of the resultsfrom this paper are included in Chapters 5 and 6.• M. Sharbatdar, C. Ollivier-Gooch, “Mesh Adaptation Using Smoothed Trunca-tion Error for Unstructured Mesh Finite Volume Methods”. In preparation forsubmission. Some of the results from this paper are included in Chapter 6.The following paper uses the eigenanalysis of the Jacobian, described in Chapter 2, asa tool to relate the two forms of the numerical error. This paper is the outcome of A.Jalali’s PhD thesis.• A, Jalali, M. Sharbatdar, C. Ollivier-Gooch, “Accuracy Analysis of UnstructuredFinite Volume Discretization Schemes for Diffusive Fluxes”, Computers & Fluids,101:220-232, 2014.ivTable of ContentsAbstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vList of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiList of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixNomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiiAcknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Structured and Unstructured Meshes . . . . . . . . . . . . . . . . . . . 21.2 The Finite Volume Method . . . . . . . . . . . . . . . . . . . . . . . . 41.2.1 Spatial Discretization . . . . . . . . . . . . . . . . . . . . . . . 71.2.2 Solution Reconstruction . . . . . . . . . . . . . . . . . . . . . . 81.2.3 Flux Integration . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2.4 Solution Method . . . . . . . . . . . . . . . . . . . . . . . . . . 121.3 Truncation and Discretization Error . . . . . . . . . . . . . . . . . . . 131.4 Truncation Error Estimation Methods . . . . . . . . . . . . . . . . . . 161.4.1 Exact Truncation Error . . . . . . . . . . . . . . . . . . . . . . 171.4.2 Estimating Truncation Error using a Finer Mesh . . . . . . . . 181.4.3 Estimating Truncation Error using a Higher-Order Scheme . . 181.5 Application of Truncation Error Estimation . . . . . . . . . . . . . . . 181.5.1 Defect Correction . . . . . . . . . . . . . . . . . . . . . . . . . 191.5.2 Output Error Estimation . . . . . . . . . . . . . . . . . . . . . 201.5.3 Mesh Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . 23vTable of Contents1.6 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261.7 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Eigenanalysis of the Truncation Error . . . . . . . . . . . . . . . . . . 282.1 Truncation and Discretization Error on Structured and UnstructuredMeshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.1.1 Error Distribution on Meshes . . . . . . . . . . . . . . . . . . . 292.1.2 p-TE Method on Unstructured Meshes . . . . . . . . . . . . . . 312.2 Eigendecomposition of the Truncation Error . . . . . . . . . . . . . . . 362.3 Rough Mode Dominance in Truncation Error . . . . . . . . . . . . . . 372.3.1 Poisson Equation . . . . . . . . . . . . . . . . . . . . . . . . . . 372.3.2 Euler Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . 412.3.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 Truncation Error based on Interpolated Solution . . . . . . . . . . . 483.1 Truncation Error Computation Using the Continuous Solution . . . . . 503.2 Spline Interpolation using the Common Geometry Module (CGM) . . 513.3 C1 Interpolation of the Solution . . . . . . . . . . . . . . . . . . . . . 554 Defect Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664.1 General Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664.2 Defect Correction Based on Exact Truncation Error . . . . . . . . . . 684.3 Defect Correction for a Perfect Mesh . . . . . . . . . . . . . . . . . . . 704.4 Defect Correction for an Unstructured Mesh . . . . . . . . . . . . . . 734.5 Defect Correction Based on Continuous p-Truncation Error . . . . . . 754.5.1 Poisson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754.5.2 Advection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764.5.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 Output Error Estimation and Correction . . . . . . . . . . . . . . . . 805.1 Discrete Adjoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815.2 Continuous Adjoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825.2.1 Advection Equation . . . . . . . . . . . . . . . . . . . . . . . . 835.2.2 Poisson Equation . . . . . . . . . . . . . . . . . . . . . . . . . . 845.2.3 Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 855.2.4 Navier-Stokes Equations . . . . . . . . . . . . . . . . . . . . . . 90viTable of Contents5.3 Output Functional Correction . . . . . . . . . . . . . . . . . . . . . . . 925.4 Advection Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945.5 Poisson Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965.6 Euler Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005.6.1 Supersonic Flow . . . . . . . . . . . . . . . . . . . . . . . . . . 1005.6.2 Subsonic Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . 1045.7 Navier-Stokes Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 1075.7.1 Supersonic Flow . . . . . . . . . . . . . . . . . . . . . . . . . . 1075.7.2 Subsonic Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . 1115.8 Remarks on Computational Costs and Discussion on Results . . . . . . 1136 Mesh Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1166.1 Residual-based Mesh Adaptation . . . . . . . . . . . . . . . . . . . . . 1176.2 Adjoint-based Mesh Adaptation by Correction Term . . . . . . . . . . 1176.3 Adjoint-based Mesh Adaptation by Error in the Correction Term . . . 1196.4 Poisson Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1206.5 Subsonic Inviscid Flow on NACA 0012 . . . . . . . . . . . . . . . . . . 1246.6 Subsonic Inviscid Flow on Multi-Element Airfoil . . . . . . . . . . . . 1276.7 Subsonic Viscous Flow on NACA 0012 . . . . . . . . . . . . . . . . . . 1306.8 Transonic Inviscid Flow on NACA 0012 . . . . . . . . . . . . . . . . . 1336.9 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1367 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1397.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1397.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1417.3 Recommendations for Future Work . . . . . . . . . . . . . . . . . . . . 145Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147AppendicesAppendix A: Constraints Equations for Obtaining C1 Interpolation of theSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Appendix B: Transforming the Non-conserved Adjoint Euler Equationto Conserved Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191viiList of Tables1.1 Comparison of features of structured and unstructured meshes . . . . . 42.1 Extremal eigenvalues for the Poisson test case . . . . . . . . . . . . . . 382.2 Extremal eigenvalues for the Euler test case . . . . . . . . . . . . . . . 443.1 Non-zero coefficients in Eq. 3.3 for the Argyris reference element . . . . 633.2 CPU time (sec) comparison for solution and C1 interpolation of the solution 645.1 Number of required boundary conditions . . . . . . . . . . . . . . . . . 895.2 Coefficients for manufactured primal and adjoint solution used in Eq.5.40 and 5.41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108viiiList of Figures1.1 Mesh topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Discretization methods . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 Control Volume illustration . . . . . . . . . . . . . . . . . . . . . . . . 61.4 Cell-centered flux calculation . . . . . . . . . . . . . . . . . . . . . . . . 91.5 Upwind flux illustration . . . . . . . . . . . . . . . . . . . . . . . . . . 111.6 Discretization stencil for Laplace equation . . . . . . . . . . . . . . . . 141.7 Mesh adaptation strategies . . . . . . . . . . . . . . . . . . . . . . . . . 242.1 Coefficient of error term in the leas-squares gradient on a general un-structured mesh for Poisson, λxx coefficients . . . . . . . . . . . . . . . 292.2 Comparison of truncation and discretization error for structured andunstructured meshes for Poisson in 2D . . . . . . . . . . . . . . . . . . 302.3 The Poisson solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322.4 LpUp+1 +Lp+1Up for an unstructured mesh for Poisson problem of Figure2.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332.5 Comparison of truncation error measures based on second order solution 342.6 Comparison of truncation error measures based on third order solution 352.7 Truncation error behavior with mesh refinement for Poisson . . . . . . 362.8 Eigenvalue spectra of the Poisson problem . . . . . . . . . . . . . . . . 382.9 Largest eigenvalue versus mesh size for the Poisson problem . . . . . . 392.10 Eigendecomposition of truncation and discretization error for Poisson . 402.11 Eigendecomposition of truncation and discretization error for a perfectquadrilateral mesh for Poisson . . . . . . . . . . . . . . . . . . . . . . . 422.12 Exact solution of supersonic vortex . . . . . . . . . . . . . . . . . . . . 432.13 Eigenvalue spectra, supersonic vortex . . . . . . . . . . . . . . . . . . . 442.14 Largest eigenvalue versus mesh size for the Euler problem . . . . . . . . 462.15 Eigendecomposition of truncation and discretization error for Euler . . 47ixList of Figures3.1 Two different fluxes at quadrature points . . . . . . . . . . . . . . . . 493.2 Conversion of the solution from cell-centered finite-volume based to vertex-centered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493.3 CGM’s input surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513.4 Finding the solution on quadrature points by projection on the 3D splineinterpolation using CGM . . . . . . . . . . . . . . . . . . . . . . . . . 523.5 The normal and solution calculation using CGM . . . . . . . . . . . . . 533.6 Inaccurate normal calculation using CGM . . . . . . . . . . . . . . . . 543.7 Comparison of truncation error based on interpolated solution by CGM 543.8 Error in calculating the truncation error using the discrete solution andinterpolated solution by CGM . . . . . . . . . . . . . . . . . . . . . . . 553.9 Argyris reference element . . . . . . . . . . . . . . . . . . . . . . . . . . 563.10 Linear mapping from physical to Argyris reference element . . . . . . . 593.11 Normal derivative directions for C1 interpolation of the solution . . . . 613.12 Comparison of truncation error based on C1 interpolation of the solution 653.13 Error in calculating the truncation error using the discrete solution andC1 interpolation of the solution . . . . . . . . . . . . . . . . . . . . . . 654.1 Defect correction based on exact truncation error for Poisson . . . . . . 684.2 Exact solution of the advection problem . . . . . . . . . . . . . . . . . 694.3 Defect correction based on exact truncation error for advection . . . . . 704.4 Poisson solution for the perfect mesh . . . . . . . . . . . . . . . . . . . 714.5 Discretization error of the original and corrected solutions for perfecttriangular mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724.6 Defect correction based on p-TE method for perfect mesh . . . . . . . . 734.7 Defect correction based on p-TE method for Poisson on general unstruc-tured mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744.8 Defect correction based on p-TE method for advection on general un-structured mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754.9 Defect correction results using continuous p-truncation error for Poisson 774.10 Defect correction results using continuous p-truncation error for advection 785.1 Adjoint solutions for advection problem . . . . . . . . . . . . . . . . . . 955.2 Convergence history for the advection problem . . . . . . . . . . . . . . 965.3 Exact solution of the Poisson problem . . . . . . . . . . . . . . . . . . . 97xList of Figures5.4 Adjoint solutions for Poisson problem . . . . . . . . . . . . . . . . . . . 975.5 The L2-norm of the difference between the discrete and continuous ad-joint solutions for Poisson . . . . . . . . . . . . . . . . . . . . . . . . . 985.6 Convergence history for Poisson . . . . . . . . . . . . . . . . . . . . . . 995.7 Convergence results for the truncation error estimates, supersonic vortex 1005.8 x−momentum adjoint solutions for supersonic vortex . . . . . . . . . . 1015.9 Convergence history for the functional values for the supersonic vortex 1035.10 Solution distribution for Euler, NACA-0012, Ma∞ = 0.5, α = 2◦ . . . 1045.11 x-velocity adjoint solutions for Euler, NACA-0012, Ma∞ = 0.5, α = 2◦ 1055.12 Convergence history for the functional values for Euler, NACA-0012,Ma = 0.5, α = 2◦ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065.13 Exact solution of Navier-Stokes problem with manufactured solution . 1085.14 Adjoint solutions for Navier-Stokes problem with manufactured solution,y−momentum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095.15 Convergence history for the functional values for Navier-Stokes problemwith manufactured solution . . . . . . . . . . . . . . . . . . . . . . . . 1105.16 Adjoint consistency for Navier-Stokes . . . . . . . . . . . . . . . . . . . 1105.17 Solution distribution for Navier-Stokes, NACA-0012, Ma∞ = 0.5, α =1◦, Re = 5000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1115.18 x-momentum component of the adjoint solutions for drag functional,Navier-Stokes NACA-0012, Ma∞ = 0.5, α = 1◦, Re = 5000 . . . . . . . 1125.19 Convergence history for Navier-Stokes, NACA 0012 for drag functional,Ma∞ = 0.5, α = 1◦, Re = 5000 . . . . . . . . . . . . . . . . . . . . . . 1125.20 The error ratio for different correction terms for all test cases based onsecond-order functional . . . . . . . . . . . . . . . . . . . . . . . . . . . 1156.1 Exact solution of the Poisson problem . . . . . . . . . . . . . . . . . . . 1206.2 Convergence history for Poisson on the adapted meshes . . . . . . . . . 1226.3 Adapted meshes by different adaptation indicators for Poisson . . . . . 1236.4 Discretization error of the primal problem on the adapted meshes forPoisson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1246.5 Convergence history for subsonic inviscid flow around NACA 0012 onthe adapted meshes, Ma∞ = 0.5, α = 2◦ . . . . . . . . . . . . . . . . . 1256.6 Adapted meshes by different adaptation indicators for subsonic inviscidflow around NACA 0012 for the drag functional, Ma∞ = 0.5, α = 2◦ . . 126xiList of Figures6.7 Adapted meshes by different adaptation indicators for subsonic inviscidflow around NACA 0012 for the lift functional, Ma∞ = 0.5, α = 2◦ . . . 1266.8 Initial mesh and the primal solution distribution for subsonic inviscidflow on the multi-element airfoil, Ma = 0.2, α = 3◦ . . . . . . . . . . . 1276.9 Normalized energy component of the adjoint solution for subsonic invis-cid flow on the multi-element airfoil, Ma = 0.2, α = 3◦ . . . . . . . . . 1286.10 CPU time comparison for primal and adjoint solutions and C1 interpola-tion of the solution for subsonic inviscid flow on the multi-element airfoil,Ma = 0.2, α = 3◦ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1296.11 Convergence history for subsonic inviscid flow around multi-element air-foil on the adapted meshes for the lift functional, Ma∞ = 0.2, α = 3◦ . 1306.12 Adapted meshes by different adaptation indicators for subsonic inviscidflow around multi-element airfoil for the lift functional, Ma∞ = 0.2, α = 3◦1316.13 CPU time comparison for primal and adjoint solutions and C1 inter-polation of the solution for subsonic viscous flow around NACA 0012,Ma∞ = 0.5, α = 1◦, Re = 5000 . . . . . . . . . . . . . . . . . . . . . . . 1326.14 Convergence history for subsonic viscous flow around NACA 0012 on theadapted meshes for the drag functional, Ma∞ = 0.5, α = 1◦, Re = 5000 1326.15 Adapted meshes by different adaptation indicators for subsonic viscousflow around NACA 0012 for the drag functional, Ma∞ = 0.5, α = 1◦,Re = 5000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1336.16 Initial mesh and the primal solution distribution for transonic inviscidflow on NACA 0012 airfoil, Ma = 0.8, α = 1.25◦ . . . . . . . . . . . . . 1346.17 x-momentum adjoint solution for the lift functional, transonic inviscidflow on NACA 0012 airfoil, Ma = 0.8, α = 1.25◦ . . . . . . . . . . . . 1346.18 Convergence history for transonic inviscid flow around NACA 0012 onthe adapted meshes for lift functional, Ma∞ = 0.8, α = 1.25◦ . . . . . . 1356.19 Adapted meshes using different adaptation indicators for transonic in-viscid flow around the NACA 0012 for the lift functional, Ma∞ = 0.8,α = 1.25◦ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356.20 The error ratio for different adaptation indicators for all test cases basedon second-order functional . . . . . . . . . . . . . . . . . . . . . . . . . 138xiiNomenclatureRoman Symbolsx Right eigenvectory Left eigenvectorA Convective flux Jacobian matrixA areaa Weights in eigendecomposition of truncation errorB Boundary operatorb Weights in eigendecomposition of discretization errorC Boundary weight operatorc Argyris element coeefficientsD Viscous flux Jacobian matrixf Primal source termg Adjoint source termh EnthalpyI Identity matrixJ Output functionalL Linear operatorl Length scaleMa Mach numberxiiiNomenclatureP PressurePr Prandtl numberR Reconstruction matrixr position vectorRe Reynolds numbers length of control volume edgesT Temperaturet timeu, v velocity componentsx, y Cartesian coordinatesZ Adjoint solution~F flux vectornˆ unit normal vector~U solution vectorGreek Symbolsα Angle of attackγ Specific heat ratioλ Eigenvalues, Taylor series expansion coefficientµ viscosityρ Densityτ Truncation errorε Discretization errorϕ Basis functionsxivNomenclatureξ, η Coordinates in the reference elementSuperscriptsL Left siden non-smoothed truncation errorR Right side, reconstructed functions smoothed truncation errorSubscriptsc Correction based on continuous adjoint solutionCS control surfaceCV control volumed Correction based on discrte adjoint solutionh Mesh characteristic sizep Order of accuracy, error correspondong to the primal problemxvAcknowledgmentsFirst I would like to thank my supervisor, Dr. Carl Ollivier-Gooch for his constantavailability for discussion and for his invaluable help throughout the course of thisresearch.I would also like to thank my lovely family for their endless encouragement and love:the kindest person I have ever known, my mother, Mahtab; the most reliable person Ihave ever talked to, my father, Amir; and the dearest brother in all the world, Kamran.Finally, my deepest appreciation is for my husband, Alireza, for his limitless pa-tience, support, encouragement and love in my life.xviChapter 1IntroductionFluid dynamics is described by a set of Partial Differential Equations (PDEs) andas a result of their complexity, there is not any general analytical solution for them.Therefore, the flow properties need to be predicted by physical experiment or numericalsolution of the flow equations. Since for most real applied cases, the solution has amulti-scale nature, the cost of experimental analysis is too much. Considering theselimitations, numerical solutions are now commonly used as an important analysis toolin the solution of scientific and engineering problems. While the efficiency of suchmethods has been dramatically improved, there is still a strong industrial desire toproduce more accurate numerical solutions.Computational Fluid Dynamics (CFD) has shown remarkable capability for fluidanalysis and also produces accurate and efficient results, both in terms of memory usageand time. Nowadays, CFD is used extensively and successfully in industry throughoutthe design process, from preliminary design to shape optimization. Increasing com-puting power has resulted in the development of new computational techniques andalgorithms, enhancing the versatility of CFD applications.Modeling, mesh generation and numerical solution are the three essential compo-nents involved in numerical simulations:• Modeling: The partial differential equations describing the physics of the prob-lem must be defined. Modeling includes these governing equations, the problemgeometry, the initial condition and the boundary conditions.• Mesh Generation: To solve the PDEs numerically, the continuous domain beingstudied should be tessellated into shapes recognized by the solver. This process,referred to as mesh generation, is one of the most time consuming parts of CFDsolution. Since the discretization of the fluid flow equations is carried out on themesh, the CFD solution will be inaccurate without a proper domain discretization.• Numerical Solution: Once the PDEs describing the problem are defined and dis-cretized over the domain in the form of a large system of algebraic equations, the11.1. Structured and Unstructured Meshessystem of equations is solved and the numerical solution for the flow of interestis obtained.Greater emphasis is being placed on quantifying the accuracy of numerical solutionsas the complexity of problems simulated using CFD has grown. The two error termsdescribing the accuracy of the scheme are discretization error and truncation errorand these error terms are the main focus of this thesis. Historically, the main toolfor quantifying solution accuracy has been grid refinement studies. However, for real-world application problems, the baseline simulation often pushes the limits of availablecomputing resources, so the cost of finer mesh simulation for a grid refinement studyis prohibitive. Such studies are also complicated by modeling issues, notably in thenear wall behavior of turbulence models. Meeting this need for error quantificationfor industrial scale CFD requires a new paradigm in which a robust flow solver withadaptive and error quantification capabilities reliably produces solutions with knownerror bounds with minimal human intervention.The goal of this thesis is to prototype methods for error quantification in a frameworkconsistent with numerics employed in modern commercial CFD solvers. CommercialCFD software typically handles complex geometry using unstructured meshes (Section1.1), for which accuracy issues are not as well understood as for structured meshes.Furthermore, commercial CFD software currently uses finite volume method almostexclusively; the essential parts of the finite volume method is described in Section 1.2.The error quantification paradigm discussed in this thesis is based on the truncationerror. The definition of the truncation error and how it is different form the discretiza-tion error is described in Section 1.3. Section 1.4 is devoted to different techniquesfor estimating the truncation error for use in improving flow solutions through defectcorrection, estimating the solution functional error and driving the mesh adaptation asdiscussed in Section 1.5. Finally, this chapter concludes by describing the objective ofthe thesis in details, Section 1.6, and providing an overview of the thesis, Section 1.7.1.1 Structured and Unstructured MeshesIn a structured mesh, all cells and vertices have the same fixed and predictable topology.As a result, each cell and vertex can be identified by indices. As an example, in astructured mesh, Figure 1.1a, cell (i, j) is always topologically between cell (i+ 1, j)and cell (i− 1, j) which are located on the topological right and left of the reference21.1. Structured and Unstructured Meshescell, respectively.(a) Structured mesh (b) Unstructured meshFigure 1.1: Mesh topologyUnstructured meshes on the other hand have elements with irregular and variabletopologies in the sense that the connectivity is not predictable and must be explicitlystored. For an unstructured mesh, Figure 1.1b, there is no particular topology whichindicates the neighbors of control volume 1, for instance. The mesh adjacency datamust therefore be stored to know the neighbors of a given cell.From the numerical point of view, structured meshes are attractive as a result oftheir predictable topology, implying that storing the neighboring cells is not necessary.Besides, as a result of the regular topology, the linear system arising from implicit timediscretization have a simple matrix structure and can be solved faster. Furthermore,a fixed interpolation, or extrapolation, can be used for flux integration. For moreclarification, flux computation in finite volume method is considered: a fixed templateis sufficient for flux computation in structured meshes; accordingly, faster solution withreduced memory usage can be developed by capitalizing on their predictable topology[27]. However, the task of generating structured meshes around complex configurationshas proved to be a considerable challenge. Obtaining a structured mesh of a complexdomain often involves time-consuming human intervention that can easily offset thesaving realized by the solver itself. Furthermore, generalizing mesh adaptation in thisapproach is still not an easy task and needs significant effort.31.2. The Finite Volume MethodOn the other hand, for unstructured meshes evaluating the same flux as discussedabove for finite volume method requires performing a polynomial reconstruction of thesolution over each control volume. In spite of the higher cost for the solver, unstructuredmeshes are generally much easier to generate automatically around arbitrary complexgeometries. Moreover, unstructured meshes are more flexible than structured meshesin refinement based on the geometry and adaptation based on the solution featuresand gradients. Accordingly, the time and effort required by the user to produce anacceptable mesh can be reduced significantly [51]. These features of structured andunstructured meshes are summarized in Table 1.1.Structured mesh Unstructured meshMemory usage less memory more memoryStencil fixed variableTopology regular irregularSolution time shorter longerMesh generation significant effort less effortAdaptability significant effort less effortIndustrial usage trend less common more commonTable 1.1: Comparison of features of structured and unstructured meshesConsidering all these differences, unstructured meshes are the most common choicefor complex geometries; associated solvers are becoming more common in modern CFDapplications and promise to be more capable and successful for complex aerodynamicproblems.1.2 The Finite Volume MethodOnce the flow field is discretized and the mesh, either structured or unstructured, isgenerated, the fluid flow equations should be solved over the discretized domain. Thefluid flow equations are generally discretized by finite difference, finite element or finitevolume methods.The finite difference method uses a point-wise representation of the flow field. Theflow equations are solved only for variables defined at mesh vertices and the point-wise solution derivatives are approximated using a difference relation obtained by theTaylor series expansion of the solution. Figure 1.2a depicts a five-point stencil thatmight be used in a 2D centered finite difference method. The finite difference scheme41.2. The Finite Volume Methodwas the original approach to the CFD problems and is well suited for structured grids.However, it is difficult to be implemented on unstructured meshes and moreover, itdoes not necessarily conserve mass, momentum, and energy of the flow, implying thatit is not a proper choice for some practical applications such as flows with shocks. (a) Finite difference method 𝑝 −2 reference element 𝑝 −3 reference element (b) Finite element method 𝐶𝑉𝑖 First layer of neighbors (second-order) Second layer of neighbors (third-order) (c) Finite volume methodFigure 1.2: Discretization methodsThe finite element method is a well established mathematical approach for numericalsolution of PDEs. In this method, equations are multiplied by a test function and thenintegrated over the discretized domain. The finite element solution is represented bylocal basis functions over the elements of the mesh. The extension of the method tohigher-order solutions is as easy as using higher-order degree test and basis functions,Figure 1.2b. As implementing the approach to arbitrary shapes is not an issue, it canbe extended to unstructured meshes as well. Similar to the finite difference method,the challenge with using continuous Galerkin methods for the finite element approachis conservation of mass, momentum and energy; although conservation is achievable, it51.2. The Finite Volume Methodis not an easy task particularly in flows with discontinuities.The finite volume approach is based on control volume analysis and discretizes thegoverning equations in integral form. Consequently, it conserves mass, momentumand energy. As a result of the conservation property, the capability of the finite volumemethod in capturing discontinuities in the flow is enhanced. The solution is representedby reconstructed piecewise polynomials based on the control volume averages and thegoverning equations are discretized the by computing a discrete flux integral. Similar tothe finite element method, it is very flexible for complex geometries and unstructuredmeshes. Higher-order application of finite volume methods is possible by using a higher-order polynomial inside each control volume [57], Figure 1.2c. However, high-orderfinite volume methods are more complicated compared to finite element method; wewill discuss this in more detail later.Finite volume solvers can support two common types of control volumes that arewidely used to tessellate an unstructured mesh. Cell-centered control volumes arethe same as geometric cells of the mesh and the geometric cell centroid is typicallychosen as the reference location of the control volume, Figure 1.3a. In vertex-centeredcontrol volumes, the mesh vertices are chosen as the control volume reference point andthe control volume is defined by connecting cell centroids with face centroids of theneighboring cells in the primal mesh, Figure 1.3b.(a) Cell-centered control volume (b) Vertex-centered control vol-umeFigure 1.3: Control Volume illustrationAmong the three methods described above for discretizing the governing equation,we are using the finite volume approach as a result of its capability in simulatingcomplex flows and the fact that most commercial CFD software currently uses thismethod, particularly for compressible flows.61.2. The Finite Volume Method1.2.1 Spatial DiscretizationTo discretize the flow equations using the finite volume method, the governing equationsshould be recast in fully conservative form as:∂~U∂t+∇ · ~F = 0 (1.1)where −→U denotes the solution vector and −→F is the flux vector which is a combinationof both convective, ~Fc, and diffusive flux, ~Fv vectors.~F = ~Fc − ~Fv (1.2)Integrating Eq. 1.1 over an arbitrary control volume and using the divergence theoremgives the 2D finite volume formulation of the governing equations in the form of avolume integral and a surface integral¨CV∂~U∂tdA+˛CS~F · nˆ ds = 0 (1.3)where nˆ represents the outward unit normal vector, CV and CS are the control volumeand control surface (the boundary of the control volume), respectively and ds is theinfinitesimal. Assuming that the discretized physical domain does not change in time,U can be brought out from the integral in Eq. 1.3, as the average solution vector ofthe control volumedU idt= − 1ACVi˛CSi~F · nˆ ds (1.4)The left hand side is the time derivative of the average solution vector in the ith controlvolume. The right hand side is called the flux integral or residual of the control volumeand represents the spatial discretization of the same control volume. The flux integralis a function of the solution vector and can be re-written asdU idt= −Ri(U i)(1.5)71.2. The Finite Volume Method1.2.2 Solution ReconstructionTo obtain an accurate numerical approximation to the residual, we reconstruct a poly-nomial representation of the solution within each control volume. The solution withineach control volume is represented by the Taylor series expansion:URi (x− xi, y − yi) = U |i +∂U∂x∣∣∣∣∣i(x− xi) + ∂U∂y∣∣∣∣∣i(y − yi) + ∂2U∂x2∣∣∣∣∣i(x− xi)22+ ∂2U∂x∂y∣∣∣∣∣i(x− xi) (y − yi) + ∂2U∂y2∣∣∣∣∣i(y − yi)22 + ... (1.6)where URi is the value of the reconstructed solution and ∂k+1Ui∂xkylare its derivatives atthe reference point (xi, yi) of control volume i. These values are the coefficients of theTaylor polynomials and the degree of the polynomial determines the order of accuracyof the solution. To obtain conservation of the mean within a control volume, we needto satisfyU i =1AiˆViURi dA = U |i +∂U∂x∣∣∣∣∣ixi +∂U∂y∣∣∣∣∣iyi +∂2U∂x2∣∣∣∣∣ix2i2+ ∂2U∂x∂y∣∣∣∣∣ixyi +∂2U∂y2∣∣∣∣∣iy2i2 + ... (1.7)where xpyqi are the moments of area:xpyqi =1AiˆVi(x− xi)p (y − yi)qdA. (1.8)The error magnitude or the difference between the actual control volume average U jand the average of URi for control volumes in the stencil {Vj}i should be minimized[66]. Eq. 1.7 is written for every control volume within the stencil of control volume i.The number of these control volumes must be more than the number of reconstructedsolution coefficients to yield a least-squares system. Once the polynomial coefficientsare known, the reconstructed flow properties at any point in the control volume caneasily be found using Eq. 1.6. This is a general overview of the solution reconstructionand more details are available in literature [9, 52].81.2. The Finite Volume Method1.2.3 Flux IntegrationTo compute the flux integral for each control volume, Eq. 1.5, numerical fluxes shouldbe integrated over control volume edges. The accuracy of flux integration should beequal or higher than the accuracy of solution reconstruction. This integration is doneby the Gauss quadrature integration rule. Gauss quadrature gives the capability ofaccurately evaluating a definite integral with the integrand evaluated at only a fewpoints [88].Consider the two interior control volumes shown in Figure 1.4. The flux vector iscalculated by solution reconstruction described in previous section and the numericalflux formula. The conservation property of the finite volume method requires that theflux leaving a control volume must enter its neighbor, so along edge ab, the flux leavingcontrol volume i should enter control volume j. However, the solutions and gradientsreconstructed at the two sides of a Gauss point are not necessarily equal. Therefore, aflux function is essential to yield a unique flux vector. By knowing the solutions andgradients by solution reconstruction and the unit normal by the geometry of the mesh,the flux integral can be evaluated by the numerical flux formula. 𝑖 𝑗 𝑏 𝑎 𝑥𝑔 (a) Second-order 𝑖 𝑗 𝑏 𝑎 𝑥𝑔1 𝑥𝑔2 (b) Third and fourth orderFigure 1.4: Cell-centered flux calculationFor the second order solution or linear reconstruction case, one quadrature pointper edge is used which is at the middle of the corresponding edge. The flux integral foreach edge can be approximated by knowing the numerical flux at the edge midpointand the length of the edge. For higher order cases, more quadrature points per edgeare required which are used with the proper weightings. Comprehensive informationregarding the locations and weights of the Gauss quadrature integration points has been91.2. The Finite Volume Methodgiven by Van Altena [92]. The control volume flux integral in Eq. 1.4 is approximatedas the summation of flux integrals over the edges and the flux is the subtracted fromthe flux integral for control volume i and added to the flux integral for control volumej, following the direction of the normal.Convective FluxesConsider the advective equation that describes the two-dimensional transport of a con-served scalar φ in a constant velocity field ~V = (u, v).∂φ∂t+ u∂φ∂x+ v∂φ∂y= 0 (1.9)The solution and flux vector areU = φ , ~F =uφvφ (1.10)and the flux vector is only dependent on the solution and not the solution gradient.There are two major schemes that are used for numerical convective flux computation:central and upwind schemes.For the central flux formulation, the flux function is simply the arithmetic averageof the two flux vectors computed from each side, ~F(UL)and ~F(UR), :~Fc =~F(UL)+ ~F(UR)2 (1.11)Considering that information in the flow field is propagating at the wave speed, thesolution at each point is influenced by the solution upstream and the solution down-stream does not physically affect it. The upwind scheme gives the numerical flux atthe face quadrature points based on the direction of the velocity vector at those points.For instance, in Figure 1.5, the numerical flux at the common edge is given as:~Fab =~FL ~V · nˆ ≥ 0~FR ~V · nˆ < 0(1.12)101.2. The Finite Volume Method 𝑖 𝑗 𝑉   𝑛  𝑈𝐿 𝑈𝑅 (a) ~V · nˆ > 0⇒ ~F = ~FL 𝑖 𝑗 𝑉   𝑛  𝑈𝐿 𝑈𝑅 (b) ~V · nˆ < 0⇒ ~F = ~FRFigure 1.5: Upwind flux illustrationDiffusive FluxesConsider the general form of unsteady two-dimensional diffusion∂φ∂t−(∂2φ∂x2+ ∂2φ∂y2)= 0. (1.13)Recasting this equation in the form of Eq. 1.1 yields the unknown solution and fluxvector as:U = φ , ~F =−∂φ∂x−∂φ∂y = −∇φ (1.14)and the flux vector is only dependent on gradients. For diffusive fluxes, the face gradientis obtained by arithmetic averaging of the gradients of two neighboring cell plus asolution jump term that enhances the stability of the scheme and does not change theconsistency of the discretization [37, 61].~Fv =~F(UL)+ ~F(UR)2 +α−→rij · nˆ(UL − UR)nˆ (1.15)where ~F(UL)and ~F(UR)are the viscous flux vectors computed at each side and thesecond term on right hand side is the jump term in which −→rij is the vector from thereference point of cell i to its immediate neighbor, cell j and α is a constant.111.2. The Finite Volume Method1.2.4 Solution MethodIn this thesis, we look for steady-state solutions for which integration in time of thespatially discretized equation, Eq. 1.5, can be implemented explicitly or implicitly. Inexplicit time integration, the space discretization is performed at the previous time levelusing the known flow quantities found at the previous time iteration.Un+1i − Uni∆t = −R(Uni)(1.16)where Uni is the solution average vector at the current time level and Un+1i is thesolution at the next time level. In implicit time integration, both the space and thetime discretizations are performed at the current time level where the flow quantitiesare needed as unknowns.Un+1i − Uni∆t = −R(Un+1i)(1.17)Implicit methods do not suffer from the stability restrictions of explicit methods andlarge time steps can be taken. As a result, faster convergence to the steady-statesolution is possible when implicit time-stepping techniques are used. To solve Eq.1.17 numerically, both sides of the equation should be evaluated at time level n + 1.This is implemented by backward time differencing of the left hand side and residuallinearization in time for the right hand side about the state Uni :Un+1i − Uni∆t = −R(Un+1i)= −[R(Uni)+ ∂R∂U(Un+1i − Uni)+O(Un+1i − Uni)2]⇒(I∆t +∂R∂U)δU i = −R(Uni)(1.18)where δU i = Un+1i −Uni and ∂R∂U is the global Jacobian matrix resulting from flux integralor residual linearization. Eq. 1.18 is a large linear system of equations which needs tobe solved at each time step to obtain an update for the vector of unknowns.The global Jacobian matrix can be represented explicitly as:∂R∂U= ∂FluxInt∂Flux∂Flux∂RecSol∂RecSol∂RecCoef∂RecCoef∂U(1.19)121.3. Truncation and Discretization ErrorThe last term ∂RecCoef∂Uis found by using the pseudoinverse of the reconstruction matrix,∂RecSol∂RecCoef is a geometric term dependent on the location of the Gauss points,∂Flux∂RecSolis based on the flux function and ∂FluxInt∂Flux is computed using the appropriate Gaussintegration weight and the length of edges [52].The computational cost, both in terms of memory usage and time, of flux com-putation, flux integration, Jacobian matrix calculation and other associated numericalcalculations per cell increase when higher-order methods are implemented; however, asa result of using a coarser mesh, the overall computational cost to obtain a determinedaccuracy is less if higher-order methods are used [53, 56, 58, 64].1.3 Truncation and Discretization ErrorThere are two error terms describing the accuracy of the scheme: discretization er-ror and truncation error1. Discretization error is defined as the difference betweenthe discrete solution obtained by the CFD simulation of the governing equation andthe exact solution of the problem. The initial source of these numerical errors is thetruncation error, the amount by which the discrete solution fails to satisfy the PDElocally. Assume an exact solution U˜ to a linear differential linear equation L(U˜)= 0and its discrete analog Lh(U˜h)= 0. We can project the continuous solution onto amesh with characteristic size h to get IhU˜ which does not satisfy the discrete equationLh(IhU˜)6= 0:Lh(IhU˜)= Lh(U˜h)+ ∂Lh∂Uh(IhU˜ − U˜h)+O(IhU˜ − U˜h)2(1.20)where the left-hand side is the truncation error, τ , the first term on the right-hand sideis zero; ∂Lh∂Uhis the flux Jacobian described above and IhU˜ − U˜h is the discretizationerror, . This is called the error transport equation which relates the truncation anddiscretization error. Error transport equation has been used for error estimation [80].As an example, consider the finite volume discretization of Laplace equation on theone-dimensional grid shown on Figure 1.6:d2Tdx2= 0. (1.21)This finite volume discretization of this equation is considered. The averages over1We are not considering the roundoff error and iterative error.131.3. Truncation and Discretization Error𝑥𝑖−32 𝑥𝑖−12 𝑥𝑖+12 𝑥𝑖+32 𝑖 𝑖 − 1 𝑖 + 1 Δ𝑥 Δ𝑥 Δ𝑥   Figure 1.6: Discretization stencil for Laplace equationcontrol volume i is taken:d2Tdx2= 14xxi+12ˆxi− 12(d2Tdx2)dx =dTdx∣∣∣i+ 12− dTdx∣∣∣i− 124x ≈dTdx∣∣∣i+1− dTdx∣∣∣i−124x (1.22)Using the Taylor series expansion, the control volume averages are obtained in termsof derivatives at point i:dTdx∣∣∣∣∣i+1= 1∆xˆ xi+32xi+12(dTdx∣∣∣∣∣i+ d2Tdx2∣∣∣∣∣i(x− xi) + 12d3Tdx3∣∣∣∣∣i(x− xi)2 + 16d4Tdx4∣∣∣∣∣i(x− xi)3 ...)dx= dTdx∣∣∣∣∣i+ d2Tdx2∣∣∣∣∣i(∆x) + 1324d3Tdx3∣∣∣∣∣i(∆x)2 + 524d4Tdx4∣∣∣∣∣i(∆x)3 +O (∆x)4dTdx∣∣∣∣∣i−1= 1∆xˆ xi− 12xi− 32(dTdx∣∣∣∣∣i+ d2Tdx2∣∣∣∣∣i(x− xi) + 12d3Tdx3∣∣∣∣∣i(x− xi)2 + 16d4Tdx4∣∣∣∣∣i(x− xi)3 ...)dx= dTdx∣∣∣∣∣i− d2Tdx2∣∣∣∣∣i(∆x) + 1324d3Tdx3∣∣∣∣∣i(∆x)2 − 524d4Tdx4∣∣∣∣∣i(∆x)3 +O (∆x)4Substituting these control volume averages into Eq. 1.22 gives the finite volume ap-141.3. Truncation and Discretization Errorproximation of the second derivative as:d2Tdx2= d2Tdx2∣∣∣∣∣i+ 524d4Tdx4∣∣∣∣∣i(∆x)2 +O (∆x)4 (1.23)in which 5∆x224∂4T∂x4∣∣∣iis the leading order term in the truncation error.Historically, truncation error analysis for structured mesh schemes is a routine appli-cation of Taylor series analysis, while analysis of unstructured mesh schemes has laggedbehind. Recent work on analysis of unstructured mesh schemes includes verification ofunstructured mesh solvers [91], accurately predicting flow properties on unstructuredmeshes [14], numerical studies of error for mixed element finite-volume schemes [17],accuracy of discretization schemes on irregular grids [18], error comparisons for cell-centered or vertex-centered discretizations [20], and Taylor-based accuracy assessmentof cell-centered discretizations [36].Local analysis of truncation error is needed as some local mesh configurations mayresult in asymptotically larger errors than others. Mesh features, including cell size,anisotropy, shape and connectivity, can have an adverse interaction with discretizationschemes that affects the solution accuracy. Error quantification hinges on the abilityto accurately estimate and efficiently exploit the local truncation error.Ultimately, we need information about configurations in a mesh producing largeerror locally, which implies a need for local analysis of truncation error for arbitrary cells.Most truncation error estimation schemes produce estimates of the overall truncationerror on a cell-by-cell basis. Ollivier-Gooch and Van-Altena [66] performed Taylorseries truncation error analysis for the Laplacian on regular triangular meshes, andthis was extended to general stencils by Jalali and Ollivier-Gooch [36]. The outputof this analysis is a set of Taylor series coefficients for the truncation error for eachcontrol volume which can be combined with local solution derivatives to compute thetruncation error.Several researchers, including Diskin and Thomas [17, 19], and Jalali and Ollivier-Gooch [36], have demonstrated that the truncation error for unstructured finite volumeschemes is asymptotically larger than the discretization error which in turn is typicallyof the same order as the solution approximation error in the scheme. This behavior isin contrast with the structured mesh case for which the truncation error has the sameasymptotic order of accuracy as the discretization error.Another feature of the truncation error for unstructured mesh schemes is its noisy151.4. Truncation Error Estimation Methodsappearance, caused by the discontinuous jump of the coefficients of the terms in theTaylor series expansion of the error from one control volume to another. This is incontrast with structured mesh schemes where the truncation error is smooth. Thesetwo features of the truncation error for unstructured mesh finite volume schemes, non-smoothness and large magnitude, are related to each other by the eigensystem of thediscrete problem as shown by Ollivier-Gooch and Roy [65]. Sharbatdar and Ollivier-Gooch [84] have shown by eigenanalysis of the truncation error that the rough modesdominate the unstructured mesh truncation error. Details of eigenanalysis of the trun-cation and discretization error will be described in Chapter 2.1.4 Truncation Error Estimation MethodsConsider a steady partial differential equation with exact solution of U˜ :L(U˜)= 0 (1.24)where L is a partial differential operator. Let Lh be a discrete approximation to Lon a mesh with characteristic size h and U˜h denote the exact solution to the discreteproblem. The discrete form of Eq. 1.24 is written as:Lh,p(U˜h,p)= 0 (1.25)where the original discrete problem is solved to order p. The exact solution, U˜ , whenprojected onto the mesh, does not satisfy the discrete equation:Lh,p(IhU˜p)6= 0 (1.26)where Ih denotes a restriction operator that projects a continuous function onto thediscrete space. Roy [80] showed that the truncation error, τh,p (U), can be defined as:Lh,p(IhU)= IhL (U) + τh,p (U) (1.27)in which U is any continuous function.Quantifying the truncation error in the sense of finding corresponding coefficients toeach spatial derivative is well understood for one-dimensional discretization using eitherfinite difference, finite element or finite volume methods. Extending the analysis to the161.4. Truncation Error Estimation Methodsmulti-dimensional Cartesian discretization is straightforward as well. However, thetruncation error analysis of discretization schemes being used for unstructured meshesis more difficult because the local shape and connectivity of the mesh is more varied.Besides, for non-linear equations, finding the coefficients in the Taylor series expansionis very complicated. As a result, other methods are required for obtaining an estimationof the truncation error. In this section, a number of common methods for estimatingthe truncation error are considered.Truncation error estimation in the finite element context has been throughly studied;see [3] for the seminal discussion. These methods have been extended to the Discontinu-ous Galerkin framework [2, 41]. Most of these methods work better for elliptic problemsthan for hyperbolic problems. Moreover, discontinuities, singularities, and geometricalcomplexities can significantly reduce the reliability of these error estimation methods.In finite elements, using the same mesh with different orders of accuracy is an alter-native for estimating the truncation error. Mavriplis [50] estimated the local error bymeasuring the energy norm associated with the different method. Finite element resid-ual methods make use of the continuous representation provided by the approximatefinite element solution to evaluate a continuous representation of the residual [3].In the finite volume context, there are several options for estimating the truncationerror including using the exact solution, using the solution on a finer mesh, and usinga higher order discretization scheme.1.4.1 Exact Truncation ErrorWhen U˜ , the exact solution of the PDE, is available, then the the first term on theright-hand side in Eq. 1.27 is zero and the p-order truncation error is simply:Lh,p(IhU˜)= τh,p(U˜)(1.28)For finite-volume methods, this implies taking control volume averages of the exactsolution and computing a flux integral based on that. Even though calculating thetruncation error by this approach provides us with the exact truncation error, applyingthe method to general problems with unknown exact solution is not possible. However,this approach may be utilized as a reference value to compare other estimations with.171.5. Application of Truncation Error Estimation1.4.2 Estimating Truncation Error using a Finer MeshInstead of the exact solution of the PDE, the discrete solution on a finer mesh withcharacteristic size h2 may approximate the exact solution. When the solution is inthe asymptotic range and the scheme is p−order accurate, the residual on a finer meshLh2(Ih/2h Uh)will be a factor of 2p smaller than the truncation error. This method, calledthe h-truncation error estimate, or h-TE, is used locally in finite element adjoint-basedadaptation schemes by Darmofal et al. [94, 95] for both viscous and inviscid flows, Ne-mec and Aftosmis [59, 60] and Hartmann [48]. However, for a global truncation errorestimate, the requirement that the solution be in the asymptotic range for truncationerror to be correct is undesirable. Furthermore, the requirement of the residual compu-tation on the fine mesh implies more computational cost in terms of time and memorycompared to a single mesh method.1.4.3 Estimating Truncation Error using a Higher-OrderSchemeAnother approach for estimating the truncation error which is not limited to problemswith exact solution uses a higher order discretization to find the leading order termsin the truncation error estimate, producing the p-truncation error estimate, or p-TE.The residual computed to p-order in Eq. 1.25 is necessarily zero. If we used the p-order solution in a p+ 1 order discretization, we will get the leading order terms in thetruncation error of the p-order scheme:Lh,p+1(Uh,p) = τh;p→p+1 (Uh,p) (1.29)The accuracy of this estimate could be improved by using even higher order discretiza-tions, p+ 2 instead of p+ 1, and adding the next higher order terms to the truncationerror estimates. This scheme was used for optimizing an unstructured mesh to reducethe truncation error [65].1.5 Application of Truncation Error EstimationError quantification hinges on the ability to accurately estimate and efficiently exploitthe local truncation error. The truncation error estimate can be used directly to improvethe solution through defect correction. Furthermore, it can be combined with the181.5. Application of Truncation Error Estimationsolution to an auxiliary partial differential equation, the adjoint problem, to estimate theerror in an output quantity of engineering interest [26]. Another important applicationof the estimation of the truncation error is to drive mesh adaptation to improve theefficiency of the simulation.1.5.1 Defect CorrectionOver the years, there have been numerous attempts to estimate the error in discretesolutions or, equivalently, to improve the accuracy of the solution. Two widely appli-cable approaches are Richardson extrapolation and defect correction. Although bothapproaches are used in an iterative fashion, defect correction proceeds on the originalgrid of the discretization while Richardson extrapolation needs repeated grid refinementand yet produces answers on the original grid only.Defect correction methods are based on a particular way to estimate local or globalerrors. The use of simple integration schemes in combination with defect (residual) eval-uation leads to computable error estimates and, in an iterative fashion, yields improvednumerical solutions. Approximating the residual by discretization is the standard ap-proach for more traditional uses of defect correction [73, 87] and requires the use ofhigher-order discretization than used in the primal equation.Consider the a steady partial differential equation with source term f as:L (U) = f (1.30)The discrete form can be written as:Lh (Uh) = 0and the amount by which the discrete solution fails to satisfy the PDE is the exacttruncation error asIhf − Lh(IhU)= τSo the original discrete equation isLh(IhU)= Ihf − τ (1.31)which implies that if the truncation error is added to the source term of the problem,191.5. Application of Truncation Error EstimationEq. 1.30,L (U) = f + τ (1.32)the exact solution is obtained, referring back to Eq. 1.31.Lh (Uh) = Ihf + τ − τ = Ihf.Lh (Uh) = Ihf (1.33)In the defect correction procedure, the higher order discrete operator is applied to thelower order solution [12, 24, 29, 49, 69, 70, 86, 87] instead of the exact truncation error.This defect correction method provides local discretization error estimates driven bythe p-TE estimate based on higher order discretization and treats the truncation errorestimate as a source term to drive the original problem toward a higher-order solution.Theoretically, adding the exact truncation error to the source term of the problem givesus the exact solution, and adding the p-TE estimate to the source term gives us thesolution which converges to the exact solution at p-order.1.5.2 Output Error EstimationIn the field of computational aerodynamics and fluid dynamics, lift and drag are out-put functionals of interest and the desire for efficient computational methods producingreliable and accurate lift and drag values drives algorithm research in the field. The ad-joint method has played an important role in this context because of the great flexibilityit offers with regard to the physics model and to the definition of output functionals.The history of the use of adjoint equations in fluid dynamics design goes back to thework by Pironneau [74] and particularly in the field of computational aerodynamicsdesign to the work by Jameson [39]. Since then, adjoint methods have been used fordesign applications for both internal and external flows [38, 39, 43, 44, 54, 75]. Theadjoint theory was first presented in the context of linear algebra by using the algebraicequations obtained from the discretization of the original problem. This is the basisfor the discrete adjoint approach. The continuous adjoint approach, on the other hand,is formulated based on the adjoint PDE which is discretized and solved independently[26].Consider a partial differential equation arising from a finite volume discretization201.5. Application of Truncation Error Estimationof the original fluid dynamic equations which is discretized and written as an algebraicequation:Rh(Uh)= 0. (1.34)For a scalar output, Jh(Uh)such as lift or drag, the associated discrete adjoint vector,Zh, must satisfy the discrete adjoint equation:(∂Rh∂Uh)TZh +(∂Jh∂Uh)T= 0. (1.35)As discussed in Section 1.2, the implicit Jacobian matrix can be computed in our solverand hence the transpose of the Jacobian matrix,(∂Rh∂Uh)T, can be calculated easily.The continuous primal problem can be posed asDetermine J = (U, g)D + (CU, h)∂Dgiven that LU = f inDBU = e in ∂D(1.36)where (U, V )D =´DUTV dv is an integral over the domain and (U, V )∂D =´∂DUTV dAis an integral over the boundary of the domain. The objective in the analytic approachis to convert the primal problem using integration by parts into an equivalent adjointproblemDetermine J = (Z, f)D + (C∗Z, e)∂Dgiven that L∗Z = g inDB∗Z = h on ∂D(1.37)where L∗ is the linear PDE which is adjoint to L. B and B∗ are boundary conditionoperators for the primal and adjoint problems, respectively, and C and C∗ are possibledifferential weight boundary operators used in the functionals; these four operatorsmay have different dimensions on different parts of the boundary. The two forms of theproblem are equivalent provided thatJ = (Z,LU)D + (C∗Z,BU)∂D = (L∗Z,U)D + (B∗Z,CU)∂D (1.38)which is the adjoint consistency condition. The left hand side is the output functionalbased on the adjoint solution and the right hand side is the output functional based onthe primal problem.The adjoint problem plays a key role in estimating and reducing the error in output211.5. Application of Truncation Error Estimationfunctional. Within the context of finite element methods, output functional correctionhas been outlined by Becker and Rannacher [10] and Larson and Barth [47] based onstructural finite element methods [3]. The adjoint-based error correction techniquedeveloped by Pierce and Giles [72] extends the inherent super-convergence propertiesof finite element methods to cover numerical results obtained from finite difference andfinite volume without natural super-convergence properties. Moreover, the techniquecan be used to improve the accuracy of super-convergent functionals obtained from finiteelement methods by constructing smoother, higher-order interpolants of the primal andadjoint solutions [72].It is easy to show that the exact error in the output functional can be written as:J = (U, g) = (Uh, gh)− (Zh, τh) + H .O.T (1.39)where U − Uh is the discretization error and the higher order terms (H.O.T ) involvesthe unknown discretization error in the PDE and the truncation error for the adjointproblem.For numerical efficiency, computing the functional value to a higher order of accuracythan the primal solution is advantageous. A super-convergent estimate of the functionalmay be obtained by computing the leading error term in the original functional estimateand using this as a correction. Pierce and Giles [73] showed that the error in the func-tional value based on the reconstructed primal solution can be expressed as a functionof the truncation error, implying that truncation error estimation is required for outputerror estimation. This error estimation technique has been exploited for large-scale CFDsimulations in the discontinuous Galerkin community [23, 31, 32, 33, 59, 68, 94, 95],where higher asymptotic convergence rates are routinely obtained. Venditti and Darmo-fal presented an error estimation strategy based on adjoint formulation for estimatingerrors in functional outputs for one and two-dimensional problems and their error esti-mation procedure was applied to a standard, second-order finite volume discretization[93]. The h-TE method is used for estimating the truncation error, the solution on afiner mesh, and the discrete adjoint solution.More details of obtaining the adjoint solution and correcting the output functionalwill be described in Chapter 5.221.5. Application of Truncation Error Estimation1.5.3 Mesh AdaptationThe accuracy of the final solution is highly dependent on the mesh spacing. Accordingly,one approach for achieving a more accurate solution is to repeat the problem withincreasingly finer meshes until an acceptable variation, i.e. within some tolerance fromone solution to another is obtained; however, this approach is inefficient and timeconsuming. Assessing and minimizing discretization error by this method requires timeconsuming mesh dependence analysis or computation of solutions on meshes that arefiner than the required solution accuracy dictates. Furthermore, a local difference inelement shape, orientation and size can influence the solution. Hence, mesh refinement,especially for unstructured meshes, is only asymptotically guaranteed to produce a moreaccurate solution.One method employed to overcome this problem is mesh adaptation, in which themesh is locally fit to the particular features of the flow. Mesh adaptation strategies canusually be classified as one of the three general types: r−refinement, p−refinement, andh−refinement. r−refinement is modification of the mesh resolution, without chang-ing mesh connectivity or the number of vertices in the mesh. The mesh vertices inr−refinement are moved such that the density of points in particular regions of themesh with more interesting flow features such as boundary layers increases while thenumber of mesh points in other regions decreases, Figure 1.7a. Increased resolutionis achieved by increasing the order of accuracy of the polynomials in each element ifp−refinement is implemented. This is depicted in Figure 1.7b for a nodal finite elementscheme, increasing order of accuracy from second to third for a triangular element.h−adaptation decreases the mesh spacing directly by splitting the cell into cells withsmaller size, Figure 1.7c. I will use h−refinement in this thesis, so adaptation impliesh−refinement throughout this thesis.Mesh adaptation seeks to automate the process of minimizing discretization errorby first computing the solution on a coarse mesh and then successively refining themesh so that the optimal mesh for the solution being computed is produced [81, 83].A mesh generator should aim at achieving the best possible mesh using as few meshpoints as possible since the computational costs (both in terms of memory usage andtime) increases with the number of elements in the mesh. It is useful to make the meshfiner in certain regions where the solution details must be captured, near boundaries forinstance, while keeping it coarse everywhere else (such as far fields). One of the mostimportant properties of a proper mesh for numerical simulations is that the density231.5. Application of Truncation Error Estimation (a) r-refinement (b) p-refinement (c) h-refinementFigure 1.7: Mesh adaptation strategiesof mesh points should be easily controllable and allowed to vary quickly over a shortdistance [27]. This property, which is easily available in adaptive schemes, saves sim-ulation time since it prevents time from being wasted in regions that would otherwisebe over-resolved.Several different adaptation indicators may be exploited to drive mesh adaptation.Feature-based grid adaptation uses solution gradient, solution curvature, or even iden-tified solution features to drive the adaptation process. This commonly-used approachrelies on a priori knowledge of the flow, including whether the solution contains shockwaves, boundary layers, etc., as well as a reliable feature-detection system. The mainadvantage of explicitly detecting features is that more specific refinement is possible. Onthe other hand, feature-based adaptation may result in over-refined features while someother features are not refined enough [79]. In some cases, feature-based refinement canactually increase the solution error [3, 79]. Dwight [22] has shown the failure of feature-based adaptation for the inviscid transonic flow over an airfoil using an unstructuredfinite-volume discretization. Adaptation based on solution gradients initially shows areduction in the discretization error, but then subsequent adaptation steps show anincrease in the discretization error.241.5. Application of Truncation Error EstimationUsing local solution approximation error as an error indicator has had some success.These error estimators identify locations where the solution is not well represented onthe mesh. This typically implies estimating the lowest-order solution derivatives thatare not directly computed during the solution process and using these to create a metricdefinition for the solution [4, 13, 21, 28, 67]. The mesh is then adapted to match themetric. This approach has recently been extended for use with high-order methods [67].Because truncation error, the amount by which the discrete solution fails to satisfythe PDE locally, is the source term in the error transport equation for discretization er-ror, using truncation error to drive adaptations adds degrees of freedom to a simulationprecisely where additional accuracy will reduce discretization error directly [79]. Smallerrors from one location of the mesh can be convected to regions which are relativelyfar away since the error in values used in the Taylor approximation are passed on to theinterpolated value which will affect other Taylor expansion terms and so on [67]. ThosePDEs containing strong convective terms, such as the Euler equations, suffer from thisdrawback of the residual-based error estimation. Accordingly, the disadvantage of usingthis method is that features may be detected in the wrong location as a consequenceof convected errors.Adjoint-based mesh adaptation is another common adaptation indicator [8, 31, 73,93, 95]. It was shown in the previous section that the error in an output functional canbe expressed as an inner product of the local residual errors and the adjoint solution.By estimating the local contribution of each cell to the error in any solution functionalof interest, this approach localizes mesh refinement to those parts of the computationaldomain that most influence the accuracy of the selected outputs [60] and so optimallyreduces error in an output functional. Becker and Rannacher [11] have developed thisoutput-based adaptive procedure by exploiting finite element orthogonality properties.This approach has been extended to the finite volume method; for example, Vendittiand Darmofal [94] successfully applied this approach for inviscid and viscous flow overairfoils solved to second-order accurate. For situations where the only desired output isa function of the solution, adjoint-based methods are ideal because they do not refineareas of the mesh where the solution has no effect on that function. Analyzing the dragforce on an airfoil is an example; the mesh created by adjoint-based refinement providesmore accurate drag prediction than other meshes of similar size as will be shown inChapter 6. Adjoint-based mesh adaptation is widely used for all finite difference [45],finite element [23, 30, 85, 97, 98] and finite volume [16, 25] methods.251.6. Objectives1.6 ObjectivesThe goal of this thesis is to develop and benchmark a reliable truncation error estimatefor finite-volume schemes on unstructured meshes and to use this truncation error esti-mate to improve the solution through defect correction, to estimate solution functionalerror, and to drive mesh adaptation.The commonly-used method for estimating the truncation error on structured meshesis using a higher-order discretization to find the leading order term in the truncationerror, p-TE method. However, there is no guarantee that the performance of the p-TEmethod is the same for unstructured meshes. Eigenanalysis is used as a tool to studythe behavior of the truncation error on unstructured meshes. If using the original p-TEbased on the discrete solution is not sufficient for our purposes when unstructured meshis used, we need to develop a modified estimation of the truncation error that can becomputed using quantities available in a typical second-order finite volume solver.We will investigate the effectiveness of the developed estimation of the truncationerror for application to defect correction, output functional error estimation, and meshadaptation. In all cases, the success of our truncation error estimate will be its effec-tiveness in reducing error is the solution and output functional.As test cases, we will focus initially on two-dimensional problems with known, man-ufactured solutions. In this context, we use the exact solution for computing discretiza-tion error and functional output error and to produce a reference value of truncationerror by computing the flux integral from control volume averages of the exact solution.We will be applying this technique to two-dimensional compressible flow problems. Be-cause these techniques are mathematical in origin rather than physical, subsequentlyapplying them to other physical problems will not be difficult.1.7 OutlineAn overview of the eigenanalysis of truncation error is described in Chapter 2 and thesmoothness of the truncation error on unstructured meshes is compared to the struc-tured meshes. As rough modes of the truncation error are dominant for unstructuredmeshes, a smooth estimation of truncation error is required.Chapter 3 is devoted to the solution interpolation techniques. We originally hopeto get a smooth estimation of truncation error. For this purpose, we developed anestimation of the truncation error based on the interpolation of the solution. Two261.7. Outlinedifferent interpolation schemes are described in this chapter, CGM and C1 interpolation.CGM is a code library providing geometry functionality for mesh generation, and C1interpolation approximates the reconstructed finite volume solution with continuityalong the edges between elements of a triangulation. Although the estimate of thetruncation error based on either one does not have a smooth distribution, it will beshown that the truncation error estimate based on C1 interpolated solution leads tosimilar behavior obtained by smooth truncation error on structured meshes.The general algorithm of defect correction is described in Chapter 4 and the per-formance of defect correction with discrete p-TE and continuous p-TE is compared forscalar problems of Poisson and advection with manufactured solution.Chapter 5 is devoted to output error estimation and correction and the differentfunctionals are corrected based on the continuous p-truncation error multiplied by bothcontinuous and discrete adjoint solutions. Scalar model problems and inviscid andviscous compressible flow problems are considered.In Chapter 6, the performance of the continuous p-truncation error as adaptationindicator is compared to the discrete p-TE estimate. As described, using truncationerror to drive adaptation adds degrees of freedom to a simulation precisely where addi-tional accuracy will reduce discretization error directly and a variation on this approachis to weight the truncation error with the adjoint solution, either continuous or discreteadjoint solution. Adaptation based on the weighted truncation error reduces error inan output functional by refining the mesh in places where the PDE is poorly solvedand that error has a large impact on the output of interest. The performance of theseweighted truncation error indicators are also compared to the truncation error itself asan error indicator.The thesis concludes in Chapter 7 with a summary of the research, contributions,conclusions based on the results and recommendations for future work.27Chapter 2Eigenanalysis of the TruncationErrorThe behavior of truncation error for unstructured mesh solvers is qualitatively differentfrom structured meshes. Roe studied the behavior of the local truncation error forsecond-order accurate scheme on a general unstructured meshes and he showed thatthe local truncation error is not necessarily second-order accurate [78]. Consider anunstructured discretization of the Laplacian, for instance. A typical second-order accu-rate scheme will compute a first order accurate gradient for which the flux integrationresults in a zero-order residual. Second-order accurate solutions are obtained as a resultof cancellation of the contribution of these large local errors to the overall solution. Ona structured mesh, on the other hand, as a consequence of smoothness and symmetry inthe mesh, cancellation of errors leads to second order flux integrals. Hence, the behaviorof truncation error on structured and unstructured mesh are completely different.In this chapter, we will use eigenanalysis of the Jacobian matrix as a tool to inves-tigate the truncation error distribution on unstructured meshes. As truncation error isthe source of discretization error, the discretization error distribution is also differentfrom structured meshes. Eigenanalysis of truncation error is done for two test cases:one model problem, the Poisson equation with a manufactured solution, and an inviscidcompressible flow problem.2.1 Truncation and Discretization Error onStructured and Unstructured MeshesThe solution and both the discretization and truncation errors have smooth distribu-tions when computed using structured meshes because symmetry and smoothness inthe mesh leads to cancellation in the error. The truncation error can easily be derivedusing Taylor series analysis [6, 99]. On the other hand, the truncation error, and conse-282.1. Truncation and Discretization Error on Structured and Unstructured MeshesFigure 2.1: Coefficient of error term in the leas-squares gradient on a general unstruc-tured mesh for Poisson, λxx coefficientsquently the discretization error, for unstructured mesh schemes has a noisy appearance,caused by the discontinuous jump of the coefficients of the terms in the Taylor seriesexpansion of the error from one control volume to another. Taylor series truncationerror analysis can be extended to any arbitrary stencil in an unstructured mesh [35].The truncation error for the Poisson equation can be written asτ = h0(λxx∂2T∂x2+ λxy∂2T∂x∂y+ λyy∂2T∂y2)+O (h) (2.1)as described in Jalali’s thesis [35]. Figure 2.1 depicts one of the coefficients, λxx, inthe Taylor series expansion for each cell. As shown in this figure, the coefficients aredifferent for neighboring cells. In this section, the different truncation error distributionsare illustrated for structured and unstructured meshes.2.1.1 Error Distribution on MeshesConsider the Poisson problem in a (1× 1) square domain with Dirichlet boundaryconditions. The manufactured solution [62] is set asU = pi8 sin (pix) sin (piy) +1sinh (pi) sin (pix) sinh (piy)for which the source term is obtained:∂2U∂x2+ ∂2U∂y2= −pi34 sin (pix) sin (piy) (2.2)292.1. Truncation and Discretization Error on Structured and Unstructured Meshes24681.00.90.80.70.60.50.40.30.20.10.0(a) Structured mesh solution2468 -1.0E-04-1.5E-04-2.0E-04-2.5E-04-3.0E-04-3.5E-04-4.0E-04-4.5E-04-5.0E-04-5.5E-04-6.0E-04-6.5E-04-7.0E-04(b) Structured mesh DE2468 9.0E-038.0E-037.0E-036.0E-035.0E-034.0E-033.0E-032.0E-031.0E-03(c) Structured mesh TE02468 10.90.80.70.60.50.40.30.20.10(d) Unstructured mesh solution02468 6.0E-044.0E-042.0E-040.0E+00-2.0E-04-4.0E-04-6.0E-04-8.0E-04-1.0E-03-1.2E-03-1.4E-03(e) Unstructured mesh DE02468 1.6E+011.4E+011.2E+011.0E+018.0E+006.0E+004.0E+002.0E+000.0E+00-2.0E+00-4.0E+00-6.0E+00-8.0E+00-1.0E+01(f) Unstructured mesh TEFigure 2.2: Comparison of truncation and discretization error for structured and un-structured meshes for Poisson in 2DThe problem is solved to second order accuracy for both structured and unstructuredmesh with about the same number of degrees of freedom, for which the solutions areshown in Figure 2.2a and 2.2d, respectively. As a manufactured solution is used, theexact solution is known and the discretization error, the difference between the discretesolution and the exact solution, can be calculated easily. Similarly, the second-ordercontrol volume averages may be computed based on the exact solution and used tocompute the exact second-order truncation error.The discretization error is rough for the unstructured mesh, Figure 2.2e, but themaximum error magnitude is reasonable in comparison with the discretization error onstructured mesh as depicted in Figure 2.2b.The truncation error on the structured mesh, Figure 2.2c, is smooth and althoughit is larger than the discretization error, is still small, whereas on the unstructuredmesh, Figure 2.2f, the truncation error is quite noisy, with a peak value three orders ofmagnitude larger than on the structured mesh. This is the expected behavior for thesecond-order finite-volume discretization of the Laplacian on unstructured meshes asshown by Jalali and Ollivier-Gooch [36]. To illustrate this difference, consider the flux302.1. Truncation and Discretization Error on Structured and Unstructured Meshesintegral for the Laplacian:FI = 1A˛∇Uds. (2.3)where the order of ds is the mesh size, ds ∼ h, and 1A∼ 1h2 . For a structured mesh, thegradient can be evaluated using central differences, yielding a second order accurategradient for which the error varies smoothly. Therefore, in finding the second orderaccurate flux integral, additional cancellation is obtained. For an unstructured mesh,however, the gradient is evaluated by least-square reconstruction, which yields a first-order gradient with non-smooth error. So, with no cancellation, a zero order fluxintegral is obtained.2.1.2 p-TE Method on Unstructured MeshesAmong the different methods for estimating the truncation error, the p-TE methodwhich uses higher order flux integral is one of easiest to apply. We can solve theoriginal discrete problem to order p, where the residual computed to this accuracy isnecessarily zero:Lh,p (Uh,p) = 0. (2.4)Lh,p is a discrete approximation to a linear partial differential operator L with order ofaccuracy p on a mesh with characteristic size of h. For estimating the truncation error,a higher order discretization is used to find the leading order terms in the truncationerror estimate:Lh,p+1(Uh,p) = τh;p→p+1 (Uh,p) . (2.5)If accuracy order is very large, p → ∞, the continuous estimation of the truncationerror is obtained. Conversely, consider that the p-order operator is applied to thehigher-order solution which is a proxy for the continuous solution.Lh;p (Uh;p+1) = Lh;p (Uh;p + δU) (2.6)312.1. Truncation and Discretization Error on Structured and Unstructured Meshes-1 -0.8 -0.6 -0.4 -0.2 0Figure 2.3: The Poisson solutionwhere δU is the difference between the two solutions, δU = Uh,p+1 − Uh,p. Eq. 2.6 canbe expanded by using the linearity of the operator as:Lh;p (Uh;p+1) = (Lh;p+1 − (Lh;p+1 − Lh;p)) (Uh;p + δU)= Lh;p+1 (Uh;p+1)− (Lh;p+1 − Lh;p) (Uh;p + δU)= 0− (Lh;p+1 − Lh;p) (Uh;p)− (Lh;p+1 − Lh;p) (δU)= −Lh;p+1 (Uh;p) + Lh;p (Uh;p)− Lh;p+1 (δU) + Lh;p (δU)= −Lh;p+1 (Uh;p) + 0− Lh;p+1 (δU) + Lh;p (δU) . (2.7)For a structured mesh, as a result of symmetry and smoothness in the mesh, the problemis well-behaved and the last two terms in the above equation are of order of p+ 1 andp, respectively. Hence, for a structured mesh,Lh;p (Uh;p+1) = −Lh;p+1 (Uh;p)−O(hp+1)+O (hp)⇒Lh;p (Uh;p+1) = −Lh;p+1 (Uh;p) +H.O.T. (2.8)where the left hand side is the leading-order term in the exact truncation error inthe sense of being the truncation error associated with the leading-order term in thediscretization error, and the right-hand side is a higher-order flux integral based onthe pth-order solution. However, for the unstructured mesh with no smoothness in the322.1. Truncation and Discretization Error on Structured and Unstructured Meshes-27 -21 -15 -9 -3 3 9 15(a) L3U2-27 -21 -15 -9 -3 3 9 15(b) L2U3-16 -12 -8 -4 0 4 8(c) L3U2+L2U3Figure 2.4: LpUp+1 + Lp+1Up for an unstructured mesh for Poisson problem of Figure2.3truncation error, the orders of the last two terms in Eq. 2.7 are not the same as fora structured mesh. Numerical experiments show that by applying the linear operatoron δU , we lose orders in computing these terms. For the Laplacian, for instance, twoorders are lost and consequently:Lh;p (Uh;p+1) = −Lh;p+1 (Uh;p) + Lh;p (Uh;p)− Lh;p+1 (δU) + Lh;p (δU)= −Lh;p+1 (Uh;p) + 0−O(hp−1)+O(hp−2)= −Lh;p+1 (Uh;p) +O(hp−2)(2.9)Although the sum of the last two terms in Eq. 2.8 are close to zero for a structuredmesh, LpUp+1 + Lp+1Up 6= 0 for unstructured mesh according to Eq. 2.9 as illustratedin Figure 2.4. Consider the Poisson problem in a (1× 1) square, with homogeneousDirichlet boundary condition with the manufactured solutionU = − sin (pix) sin (piy)for which the source term is obtained as:f = 2pi2 sin (pix) sin (piy)Figure 2.3 shows the solution inside the domain.Knowing this difference for the unstructured mesh, the accuracy of p-TE methodis investigated here. Since the exact solution to this Poisson problem is known, the332.1. Truncation and Discretization Error on Structured and Unstructured Meshes-12 -3 6 15 24(a) L2Uexact-30 -21 -12 -3 6 15 24(b) L3U2-30 -21 -12 -3 6 15 24(c) L4U2-27 -21 -15 -9 -3 3 9 15(d) L3U2 − L2UexactY-27 -21 -15 -9 -3 3 9 15(e) L4U2 − L2UexactFigure 2.5: Comparison of truncation error measures based on second order solutionexact truncation error can be calculated and used to compare the truncation errorestimate. Figure 2.5 shows the results based on the second order solution. The toprow is the second-order flux integral based on the exact solution, 2.5a, third-orderflux integral based on second-order solution, 2.5b, and fourth-order flux integral basedon second-order solution, 2.5c, respectively. The differences between the estimates ofthe truncation error and the exact truncation error are shown at the bottom row.Careful investigation of these two figures reveals that the differences are higher nearthe boundaries.The same experiment has been done for third order solution and shown in Fig-ure 2.6. The top row is the exact third order truncation error and an estimation of thetruncation error calculated by the fourth order flux integral based on third order solu-tion. Not surprisingly, the truncation error is less for this case; O (1) for the third-orderin comparison with O (20) for the second order solution, and the difference between theerror estimates, Figure 2.6c, is significantly smaller. However, similar to the previous342.1. Truncation and Discretization Error on Structured and Unstructured Meshes-0.7 -0.3 0.1 0.5 0.9(a) L3Uexact-1.5 -1.1 -0.7 -0.3 0.1 0.5 0.9(b) L4U3-0.6 -0.4 -0.2 0.0 0.2 0.4(c) L4U3 − L3UexactFigure 2.6: Comparison of truncation error measures based on third order solutioncase, the difference is larger near the boundaries.Figure 2.7 illustrates the convergence of the L2−norm of the truncation error withmesh refinement for different orders of exact truncation error and estimates of thetruncation error obtained by p-TE approach for this Poisson problem. In calculating theflux integral for the Poisson problem, one order of accuracy is lost in calculating the flux(the gradients) and another order is lost in calculating the flux integral. Consequently,the exact second order truncation error shown by the solid black line is zero order andsimilarly for the exact third and fourth order truncation error which are first and secondorder, respectively. Not surprisingly, by increasing the order of accuracy, the magnitudeof the truncation error decreases. Similarly, if the truncation error is estimated by ahigher-order flux integral based on the second order solution, zero order convergenceis obtained, as plotted by the dashed lines with squares, and first order convergenceresults from a fourth order flux integral based on the third order solution, as plottedby the dashed line with triangles.352.2. Eigendecomposition of the Truncation Error(#CV)1/2L 2()20 30 40 50 60 7010-410-310-210-1100L2Uexact:0.05L3Uexact:0.84L4Uexact:2.08L3U2:0.26L4U2:0.25L4U3:0.87Figure 2.7: Truncation error behavior with mesh refinement for Poisson2.2 Eigendecomposition of the Truncation ErrorThe discretization error, ε, can be directly related to the truncation error, τ , by theerror transport equation [80]:∂Rh∂Uhε = τ (2.10)in which the truncation error estimated based on the numerically approximated solutionserves as a source term and ∂Rh∂Uhis the discrete Jacobian matrix. Both truncation anddiscretization errors can be expanded as a combination of right eigenvectors of theJacobian, giving∂Rh∂Uh∑ibixi =∑iaixi (2.11)where ai and bi are the weights in the eigendecomposition of the truncation and dis-cretization error, respectively. Arranging the left hand side, we get:∑ibi∂Rh∂Uhxi =∑iaixi (2.12)and using the definition of eigenvalues, λi∑ibiλixi =∑iaixi (2.13)362.3. Rough Mode Dominance in Truncation ErrorBecause the xi are linearly independent, we must haveai = biλi (2.14)which links the eigendecomposition of the two forms of error. Since the discrete Jacobianis not symmetric, the right xj and left eigenvectors yi2 are different and with propernormalization, the two sets of eigenvectors are orthonormal:yi · xj = δij (2.15)This property can be used to evaluate the coefficients in the eigendecomposition of thetruncation error:yi · τ = yi ·∑iaixi =∑iaiyi · xi =∑iaiδij = aj (2.16)and consequently the discretization error coefficients by Equation 2.14. We have usedeigenanalysis as a novel tool to relate the discretization and truncation error to eachother and to compare the behavior of a wide range of different discretization schemescommonly used for diffusive flux approximation in a cell-centered unstructured finitevolume solver [37]. Here, we focus on what eigenanalysis can tell us about truncationerror estimation.2.3 Rough Mode Dominance in Truncation ErrorIn this section, we will show that the rough modes dominate the truncation errorfor unstructured meshes and therefore, the p-TE estimation method is not capable ofestimating the truncation error on unstructured mesh as accurately as on a structuredmesh.2.3.1 Poisson EquationThe complex eigenvalues for a second-order cell-centered discretization of the problemdescribed above is depicted for four meshes in Figure 2.8. As the Jacobian matrix isasymmetric, the eigenvalues are complex, though the magnitude of the imaginary part2yi, the ith left eigenvector, is a row vector.372.3. Rough Mode Dominance in Truncation ErrorRe( )Img()-10000 -8000 -6000 -4000 -2000 0-20-1001020(a) 456 CVsRe( )Img()-30000 -25000 -20000 -15000 -10000 -5000-60-40-200204060(b) 1252 CVsRe( )Img()-50000 -40000 -30000 -20000 -10000 0-150-100-50050100150(c) 2436 CVsRe( )Img()-100000 -80000 -60000 -40000 -20000 0-300-200-1000100200300(d) 4040 CVsFigure 2.8: Eigenvalue spectra of the Poisson problemMeshsizeMax EV(rightmostEV)Min EV(leftmost EV)456 -19.728 -10275.741252 -19.730 -30352.412436 -19.739 -55207.654040 -19.738 -99286.94Table 2.1: Extremal eigenvalues for the Poisson test case382.3. Rough Mode Dominance in Truncation Error(#CV)1/2max|(Re()|20 30 40 50 60 7040000800001200002.05Figure 2.9: Largest eigenvalue versus mesh size for the Poisson problemnever exceeds about one percent of the magnitude of the real part. In all cases, thereare a handful of eigenvalues scattered to the left of the rest of the distribution; becausethe eigenvectors associated with these eigenvalues are non-zero only in a handful ofcells adjacent to the boundary, we expect these eigenvectors to be very sensitive toboundary condition implementation. The leftmost (largest) and the rightmost (small-est) eigenvalues for these meshes are shown in Table 2.1; by increasing the numberof mesh points and consequently decreasing the cell size, the magnitude of leftmosteigenvalues increases while the rightmost eigenvalue is effectively zero regardless of themesh size. Therefore, the leftmost eigenvalue scales linearly with the mesh size and isproportional to h−2 as shown in Figure 2.9 where the square root of the number of cellsis considered as the mesh size.A full eigendecomposition of both truncation and discretization error is performedon the 1252 cell mesh and depicted in Figure 2.10. The magnitude of the weights in itsdecomposition is plotted against the real part of the eigenvalue, Re (λ), and as indicatedthe rough modes dominate the unstructured mesh truncation error. To visualize theerror weights more effectively, a logarithmic scale is used for both weights and real partof the eigenvalue. The scheme is stable and consequently Re (λ) is negative and so thenegative of the real part of the eigenvalue, −Re (λ), is plotted instead. The truncationerror is visually rough and this is supported by the magnitude of the the weights inits decomposition. The eigenvalues vary in magnitude from O (1) to O (h−2), with the392.3. Rough Mode Dominance in Truncation Error-8 -5 -2 1 4 7 10(a) Truncation error (b) Weights in decomposition of truncation er-ror-0.013 -0.008 -0.003 0.002 0.007(c) Discretization error (d) Weights in decomposition of discretizationerrorMode 784Mode 13 Mode 439Mode 1(e) Mode shapesFigure 2.10: Eigendecomposition of truncation and discretization error for Poisson402.3. Rough Mode Dominance in Truncation Errorlatter corresponding to rough modes. This implies that rough modes in the truncationerror will be de-amplified by a factor of O (h2) as we solve the linear system, restoringthe design order of accuracy for the discretization error and simultaneously makingthe discretization error much smaller than the truncation error. Investigation of thisfigure also reveals that the weight of the rough modes in the decomposition of thediscretization error are much reduced. The largest weight in the eigendecomposition ofthe truncation error is 2× 10−1, while the corresponding weight for discretization erroris much smaller and is close to 6× 10−4 .Four mode shapes are shown in Figure 2.10e. The smoothest mode correspondsto the sin (pix) sin (piy) mode expected for homogeneous Dirichlet boundary conditions.The next mode shown is still a reasonable facsimile of a single Fourier mode. However,the next modes appear progressively more local and noisy.These rough modes in the truncation error are the consequences of using an un-structured mesh. If a perfect quadrilateral mesh is used instead, the Jacobian matrix issymmetric and consequently the imaginary part of the eigenvalue is zero for all modesas shown in Figure 2.11a. The number of cells for this perfect quadrilateral mesh is thesame as the unstructured mesh shown in Figure 2.10. The weights in the eigendecom-position of truncation and discretization error are depicted in Figure 2.11b and 2.11c,respectively. The weights of the error terms for this perfect mesh are much smallerthan the corresponding weights shown in Figure 2.10. This is expected since the per-fect mesh provides more symmetry and smoothness. More smoothness is also provedby investigation of Figure 2.11d for which all highlighted modes in Figure 2.11b and2.11c including the leftmost mode and the mode with largest weight have a smoothdistribution. It should be noted that although the perfect mesh is used, the spatialdiscretization is for the unstructured mesh. Consequently, despite the fact that thereis symmetry in the mesh, the full cancellation, similar to the structured mesh, is notobtained.2.3.2 Euler EquationThe supersonic vortex is an inviscid compressible (Euler) flow problem with an exactsolution. Therefore, the exact truncation error can be calculated easily. The exactsolution is:412.3. Rough Mode Dominance in Truncation ErrorRe( )Img()-8000 -6000 -4000 -2000 0-0.1-0.0500.050.1(a) Eigenvalue spectra-Re( )a i10210310-1210-6439113784(b) Weights of truncation error-Re( )b i10210310-2510-2010-1510-1010-5 439137841(c) Weights of discretization errorMode 13Mode 1 Mode 439 Mode 784(d) Mode shapesFigure 2.11: Eigendecomposition of truncation and discretization error for a perfectquadrilateral mesh for Poisson422.3. Rough Mode Dominance in Truncation Error0 0.5 1 1.5 2 2.5 300.511.522.532.42.221.81.61.41.21(a) Density0 0.5 1 1.5 2 2.5 300.511.522.5321.81.61.41.210.80.60.40.20(b) x−velocity0 0.5 1 1.5 2 2.5 300.511.522.530-0.2-0.4-0.6-0.8-1-1.2-1.4-1.6-1.8-2(c) y−velocity0 0.5 1 1.5 2 2.5 300.511.522.532.52.32.11.91.71.51.31.10.90.7(d) PressureFigure 2.12: Exact solution of supersonic vortex432.3. Rough Mode Dominance in Truncation ErrorRe( )Img()-20 -15 -10 -5 0-15-10-5051015(a) 64 CVsRe( )Img()-45 -40 -35 -30 -25 -20 -15 -10 -5 0-30-20-100102030(b) 172 CVsRe( )Img()-60 -50 -40 -30 -20 -10 0-60-40-200204060(c) 452 CVsRe( )Img()-120 -100 -80 -60 -40 -20 0-80-60-40-20020406080(d) 1044 CVsFigure 2.13: Eigenvalue spectra, supersonic vortexMeshsizeMax EV(rightmostEV)Min EV(leftmost EV)64 -0.431 -20.154172 -0.502 -42.503452 -0.391 -64.7061044 -2.102 -98.787Table 2.2: Extremal eigenvalues for the Euler test case442.3. Rough Mode Dominance in Truncation Errorρ =(1 + γ − 12(1− R2iR2)M2i) 1γ−1ux =yRiMiR2uy =−xRiMiR2p = ργγwhere we take Ri = 2.0 as the inner radius and Mi = 2.0 is the inlet Mach number.The four components of the solution for the supersonic vortex are depicted in Figure2.12. The eigenvalue decomposition is shown in Figure 2.13 for four different meshes.By increasing the number of mesh points and consequently decreasing the cell size,the magnitude of the leftmost eigenvalues increases while the rightmost eigenvalue iseffectively zero regardless of mesh size. Table 2.2 summarizes the maximum and mini-mum eigenvalues for these four meshes and the last column of the table illustrates thatthe leftmost eigenvalue scales with the square root of the mesh size, and therefore isproportional to h−1 as depicted in Figure 2.14. For the Poisson problem, Figure 2.8,the order of magnitude of the imaginary part of the eigenvalue is much smaller thanthe order of magnitude of the real part. Nevertheless, the magnitude of the imaginarypart of the eigenvalue is comprable to the real part as shown Figure 2.13 and for severalmodes, the imaginary part of the eigenvalue is nonzero.For the second finest mesh, eigendecomposition of truncation error and discretizationerror has been done and the results are shown in Figure 2.15 for the weights of theseerror terms in eigendecomposition. Similar to the Poisson test case, the weight of thetruncation error is plotted versus the negative of the real part of the eigenvalue and theweights of the truncation error are larger than for the discretization error. The densitycomponent of the three highlighted modes are also depicted in Figure 2.15e. The leftmost mode is completely rough although a smooth distribution exists for the rightmostmode.2.3.3 DiscussionAs mentioned earlier, the truncation error is rough as a result of discontinuous jumpsbetween control volumes in the coefficients of the terms in the Taylor series expansionof the error. Eigenanalysis and numerical experiments provide valuable insight into thebehavior of truncation and discretization error for unstructured mesh discretization.452.3. Rough Mode Dominance in Truncation Error(#CV)1/2max|Re()|10 15 20 25 30 35 40204060801001201.11Figure 2.14: Largest eigenvalue versus mesh size for the Euler problemWe have demonstrated that the differences in asymptotic behavior of the truncationand discretization error for unstructured meshes and the features of the truncation errorcan be predicted by the eigendecomposition of the discrete problem. The dominanceof rough modes makes truncation error estimation more challenging when arbitraryunstructured meshes are used. If a perfectly symmetric mesh is used, the truncationerror is much smoother and easier to estimate accurately even in high frequency modes.Nevertheless, it is not possible to generate perfect symmetric meshes for real applicationcases. Therefore, the dominance of rough error modes in the unstructured mesh trun-cation error suggests the need to develop a smooth truncation error estimate that canbe computed using quantities already available in a typical finite volume flow solver.462.3. Rough Mode Dominance in Truncation Error0 0.5 1 1.5 2 2.5 30.020.0170.0140.0110.0080.0050.002-0.001-0.004-0.007-0.01(a) Density component of truncation error-Re( )a i20406010-810-610-410-210011808819(b) Weights in decomposition of truncationerror0 0.5 1 1.5 2 2.5 300.511.522.530.00120.0010.00080.00060.00040.00020-0.0002-0.0004-0.0006-0.0008-0.001(c) Density component of discretization er-ror-Re( )b i20406010-1210-1010-810-610-410-218191808(d) Weights in decomposition of discretiza-tion errorMode 1 Mode 819 Mode 1808(e) Mode ShapesFigure 2.15: Eigendecomposition of truncation and discretization error for Euler47Chapter 3Truncation Error based onInterpolated SolutionIn the previous chapter, we have shown that the rough modes are dominant in unstruc-tured mesh truncation error. As a consequence , the simple p-truncation error estimateis not accurate. We do not expect to be able to use this p-truncation error estimate toimprove the solution through defect correction or to estimate output functional error.In fact, we will show in the next chapters that the lack of smoothness of the truncationerror is responsible for the poor performance of defect correction, output error estima-tion and mesh adaptation. Therefore, developing a smooth truncation error estimateis essential.It has been discussed that the non-smooth distribution of the truncation error is theresult of discontinuous jumps between control volumes. Using p-TE for estimating thetruncation error, the higher-order flux integral is calculated based on the lower ordersolution for which the numerical fluxes are integrated over each control volume edges.The flux vector is calculated by solution reconstruction for each control volume at twosides of each edge separately, as shown in Figure 3.1, and therefore two different valuesare obtained for each quadrature point. By using an interpolation to approximate thesolution data, we can find a single solution at each quadrature point and consequently,a smoother distribution of the truncation error may be obtained. Computing the trun-cation error using this continuous data is explained in Section 3.1. We have exploredtwo approaches for solution interpolation: a simple spline interpolation (discussed inSection 3.2) and a more accurate C1 interpolation of the solution (described in Section3.3). Both of these interpolating schemes require vertex based data, but the solutionwe have is a cell-centered finite volume-based solution for which control volume aver-ages are known. Accordingly, we need to convert the control-volume averaged data topoint-wise data at vertices as shown schematically in Figure 3.2. We will reconstructthe control-volume data to the vertices of each cell and by averaging the solution fromall cells incident on a vertex, we can find a single solution, or first and second deriva-48Chapter 3. Truncation Error based on Interpolated Solution 𝑖 𝑗 𝑔1 𝑔2 Reconstruction from cell i Reconstruction from cell j 𝑎 𝑏 Figure 3.1: Two different fluxes at quadrature pointstives, at each vertex. We can then use the point-wise date to produce a continuousapproximation of the solution. For the spline interpolation method, knowing the so-lution at vertices is enough. However, for C1 interpolation, the solution and first andsecond derivatives are required. The pseudo-code for doing this conversion is shown inAlgorithm 3.1 in which sol[vert] is the solution or derivatives at each vertex. Cell-centered Data Vertex-based Data Figure 3.2: Conversion of the solution from cell-centered finite-volume based to vertex-centered493.1. Truncation Error Computation Using the Continuous SolutionAlgorithm 3.1 Conversion algorithm from cell-centered finite-volumebased to vertex-basedfor all cells  for all three vertices   sol[Vert]+=reconstructed solution at the vertex  for all vertices  sol[Vert]/=number of cells incident on the vertex 3.1 Truncation Error Computation Using theContinuous SolutionOnce a single value is obtained for the solution at each quadrature point, the corre-sponding flux vector can be calculated using this continuous solution. Instead of usinga combination of the solution obtained from two neighboring cells, such as averaging,adding a jump term or the Roe’s scheme, a single value for each quadrature point isobtained. To compute the flux integral for each control volume, numerical fluxes calcu-lated based on the continuous data should be integrated over the control volume edges.The integration is done by the Gauss quadrature integration rule described in Chapter1. As described, the truncation error estimate is the higher order flux integral basedon the lower-order solution. As an example, consider using third-order flux integra-tion based on the second-order solution to estimate the truncation error. To find thetruncation error estimate based in the continuous data, we need to follow these steps.1. The spline interpolation or the C1 interpolation of the second-order convergedsolution should be obtained from the reconstructed data.2. The continuous data is used to find the solution at two quadrature points on eachedge.3. The analytic flux vector is calculated based on the solution data on the quadraturepoints.503.2. Spline Interpolation using the Common Geometry Module (CGM)4. The higher order flux integral is calculated by integrating the flux over the controlvolume edges with the proper weight for each quadrature point as− 1ACVi˛CSi~F · nˆ ds = − 1ACVi˛CSi((~Fg1 · nˆ)Wg1 +(~Fg2 · nˆ)Wg2)ds (3.1)where the coordinates of the quadrature points areg1 =xb + xa2 +xb − xa2√3g2 =xb + xa2 −xb − xa2√3nˆ = (ya − yb, xb − xa)|xa − xb| (3.2)3.2 Spline Interpolation using the CommonGeometry Module (CGM)The Common Geometry Module (CGM) is a code library providing geometry func-tionality for mesh generation. CGM includes a facet-based modeler which constructs aspline approximation to a three-dimensional surface triangulation [89, 90]. To generatethis 3D surface, we provide a surface for which the x and y coordinates are the same asthe coordinates of the original 2D mesh, and the z component is the numerical solutionat that vertex. CGM produces a smooth cubic 3D surface spline from this data. Us-(a) solution (left) and the CGM input surface (right)colored by the z−normal(b) 3D view of the CGM surface colored by thex−normalFigure 3.3: CGM’s input surface513.2. Spline Interpolation using the Common Geometry Module (CGM)ing this smooth surface, a unique solution value is obtained at each quadrature pointbecause there is a surface fitted to the solution as depicted in Figure 3.3. It should benoted that the splines are generated based on the coordinates of the mesh and the solu-tion at vertices. Accordingly, there is no guarantee that a point with exactly the samex and y components of the quadrature points exists on the 3D surface. This impliesthat it is not possible to find the continuous solution of a quadrature points just byspecifying its coordinates and there is not a specific value for any arbitrary z (x, y). Wefind the projection of the point with the x and y coordinates of the quadrature point onthe 3D surface and use the x and y coordinates of the projected point and continue theprocess until the coordinates of the projected point are close to the quadrature pointwithin a specified tolerance as shown in Figure 3.4. The blue line represents the 3Dsurface, the black point shows the coordinates of the quadrature point and the red pointis the projected point on the 3D surface. The z coordinate of the projected point is thesingle value solution at the quadrature point calculated from two neighboring cells. Asfinding the diffusive flux requires the gradients, we use the functions available in thiscode library to find the normal on each facet as shown on Figure 3.3b and the x and ycomponents of the normal vector is proportional to the derivative of the solution withrespect to x and y, respectively or the gradients in these directions. (x,y,0) (x`,y`, z) Figure 3.4: Finding the solution on quadrature points by projection on the 3D splineinterpolation using CGM523.2. Spline Interpolation using the Common Geometry Module (CGM)We have generated a fourth order spline based on exact solutions at vertices for whichthe expected accuracy of the solution and gradients are fourth order and third order,respectively. Figure 3.5 illustrates the order of accuracy of the solution and gradient forthe Poisson test case described in the previous chapter. As a manufactured solution isset, the solution and gradients at any arbitrary point including quadrature points canbe calculated easily and in this figure, the L2-norm of the error is plotted versus themesh size. The solution at quadrature points is fourth order accurate as expected, butthe gradient calculation is only second-order. Inaccurate normal computation is theconsequence of assigning a single normal per facet as shown in Figure 3.6 where twoneighboring cells sharing the quadrature point have different normal vectors. Therefore,computing gradients based on this normal calculation is inaccurate.(# CV) 1/2Error40 60 8010-1010-810-610-4SolutionGradientpp984.412.36Figure 3.5: The normal and solution calculation using CGMThe interpolated values of the solution are used to calculate the flux integral for eachcontrol volume as an estimate of the truncation error. The comparison between theexact second-order truncation error, the original estimate of the truncation error (basedon the non-smoothed discrete solution) and the modified estimate of the truncation error(based on the smoothed interpolated solution) is shown on the top row of Figure 3.7.Detailed investigation of the differences between the exact and estimated truncationerror on the bottom row shows that the modified estimation of the truncation error issmoother than the original one and is closer to the exact value. It should be noted thatwe do not expect to obtain a smooth distribution of the truncation error, similar to533.2. Spline Interpolation using the Common Geometry Module (CGM)Figure 3.6: Inaccurate normal calculation using CGM-5 -3 -1 1 3 5 7 9(a) L2UexactY-9 -7 -5 -3 -1 1 3 5 7 9(b) Lnon−smooth3 U2Y-9 -7 -5 -3 -1 1 3 5 7 9(c) Lsmooth,CGM3 U2 (d) L2Uexact-Lnon−smooth3 U2 (e) L2Uexact−Lsmooth,CGM3 U2Figure 3.7: Comparison of truncation error based on interpolated solution by CGM543.3. C1 Interpolation of the Solutionthe truncation error on structured meshes, and the only goal of interpolating is to finda single value for solutions and gradients at quadrature points. As the exact solutionis known, the exact truncation error can be calculated easily. The error in calculatingthe truncation error is shown for three different meshes in Figure 3.8 for the originalestimate of the truncation error using the discrete solution and the interpolated solutionby CGM. The error using the interpolated solution is less than the discrete solution.  Figure 3.8: Error in calculating the truncation error using the discrete solution andinterpolated solution by CGMGenerally, inspite of having a unique solution value, a single value for gradientsis not obtained if CGM is used as the interpolating technique. Accordingly, a moreaccurate interpolated scheme which gives smoothed solution and gradients is needed.3.3 C1 Interpolation of the SolutionTo overcome the gradient problem with CGM’s spline interpolation, we have chosen tocompute a C1 interpolation that approximates the reconstructed finite volume solutionand then we use this interpolation to evaluate the analytic fluxes and integrate themto compute a truncation error estimate.To compute the C1 interpolation, we use the Argyris element because of its high rateof spatial convergence and simplicity of implementation compared to other elements.The Argyris triangle [7, 15], which is a form of Hermite interpolation, is based on thefifth order space of quintic polynomials over a triangle. This element produces C2continuity at the vertices and full C1 continuity along the edges between elements of a553.3. C1 Interpolation of the Solution Point evaluation Point evaluation of all first derivatives Point evaluation of all second derivatives Point evaluation of directional derivatives (0,0) (1,0) (0,1) (12,12) (12, 0) (0,12) ξ η Figure 3.9: Argyris reference elementtriangulation, which suffices for our case as it is able to provide us the same flux vectorbased on the solution and gradients in two neighboring cells.Quintic polynomials in R2 are a 21-dimensional space; the Argyris triangle specifiesthese 21 degrees of freedom by using six pieces of data per vertex and one per edge. Thevertex degrees of freedom are the solution, two first derivatives to specify the gradient,and three second derivatives to specify the unique components of the (symmetric) Hes-sian matrix; the edge degree of freedom is the normal derivative as shown in Figure 3.9.To compute these values, we first reconstruct the finite volume solution to higher (thirdor fourth) order. For each edge or vertex, the reconstruction gives multiple values forthe solution and its derivatives, one per cell. For a pth order reconstruction, these solu-tion values will differ only by O (hp) for smooth data, with derivatives losing one ordereach. We take an arithmetic average of these values as our input to the interpolation563.3. C1 Interpolation of the Solutionas described at the beginning of this chapter. The solution is then represented asu = u(0,0)ϕ0 +∂u∂ξ∣∣∣∣∣(0,0)ϕ1 +∂u∂η∣∣∣∣∣(0,0)ϕ2 +∂2u∂ξ2∣∣∣∣∣(0,0)ϕ3 +∂2u∂ξ∂η∣∣∣∣∣(0,0)ϕ4 +∂2u∂η2∣∣∣∣∣(0,0)ϕ5+u(1,0)ϕ6 +∂u∂ξ∣∣∣∣∣(1,0)ϕ7 +∂u∂η∣∣∣∣∣(1,0)ϕ8 +∂2u∂ξ2∣∣∣∣∣(1,0)ϕ9 +∂2u∂ξ∂η∣∣∣∣∣(1,0)ϕ10 +∂2u∂η2∣∣∣∣∣(1,0)ϕ11+u(0,1)ϕ12 +∂u∂ξ∣∣∣∣∣(0,1)ϕ13 +∂u∂η∣∣∣∣∣(0,1)ϕ14 +∂2u∂ξ2∣∣∣∣∣(0,1)ϕ15 +∂2u∂ξ∂η∣∣∣∣∣(0,1)ϕ16 +∂2u∂η2∣∣∣∣∣(0,1)ϕ17+(∂u∂ξnξ +∂u∂ηnη)∣∣∣∣∣( 12 ,0) ϕ18+(∂u∂ξnξ +∂u∂ηnη)∣∣∣∣∣( 12 , 12) ϕ19+(∂u∂ξnξ +∂u∂ηnη)∣∣∣∣∣(0, 12) ϕ20 (3.3)where the ϕi are the 21 basis functions for the Argyris element. Each of these has avalue of one for its own variable and zero for all others. For instance, the derivative ofϕ7 with respect to ξ is nonzero at point (1, 0), ∂ϕ1∂ξ∣∣∣(1,0)= 1, and all other derivativesare zero at that point. The magnitude and all derivatives of ϕ1 are zero at the otherpoints. Each basis function is a quintic polynomial:ϕi (ξ, η) = c0,0+ c1,0ξ + c0,1η+ c2,0ξ2 + c1,1ξη + c0,2η2+ c3,0ξ3 + c2,1ξ2η + c1,2ξη2 + c0,3η3+ c4,0ξ4 + c3,1ξ3η + c2,2ξ2η2 + c1,2ξη3 + c0,4η4+ c5,0ξ5 + c4,1ξ4η + c3,2ξ3η2 + c2,3ξ2η3 + c1,4ξη4 + c0,5η5 (3.4)each of which has exactly 21 degrees of freedom. To determine these basis functions,these 21 constants should be evaluated based on non-zero constraints. The non-zeroconstraint on the basis functions are:573.3. C1 Interpolation of the Solutionϕ0|(0,0) = 1 , ϕ6|(1,0) = 1 , ϕ12|(0,1) = 1∂ϕ1∂ξ∣∣∣(0,0)= 1 , ∂ϕ7∂ξ∣∣∣(1,0)= 1 , ∂ϕ13∂ξ∣∣∣(0,1)= 1∂ϕ2∂η∣∣∣(0,0)= 1 , ∂ϕ8∂η∣∣∣(1,0)= 1 , ∂ϕ14∂η∣∣∣(0,1)= 1∂2ϕ3∂ξ2∣∣∣(0,0)= 1 , ∂2ϕ9∂ξ2∣∣∣(1,0)= 1 , ∂2ϕ15∂ξ2∣∣∣(0,1)= 1∂2ϕ4∂ξ∂η∣∣∣(0,0)= 1 , ∂2ϕ10∂ξ∂η∣∣∣(1,0)= 1 , ∂2ϕ16∂ξ∂η∣∣∣(0,1)= 1∂2ϕ5∂η2∣∣∣(0,0)= 1 , ∂2ϕ11∂η2∣∣∣(1,0)= 1 , ∂2ϕ17∂η2∣∣∣(0,1)= 1(∂ϕ18∂ξnξ + ∂ϕ18∂η nη)∣∣∣( 12 ,0) = ∂ϕ18∂η∣∣∣( 12 ,0) = 1(∂ϕ19∂ξnξ + ∂ϕ19∂η nη)∣∣∣( 12 , 12) = −√22(∂ϕ19∂ξ+ ∂ϕ19∂η)∣∣∣( 12 , 12) = 1(∂ϕ20∂ξnξ + ∂ϕ20∂η nη)∣∣∣(0, 12) = −∂ϕ20∂ξ∣∣∣(0, 12) = 1All elements are mapped into a unique Argyris element and the solution and derivativesare computed in the reference element and mapped back to the physical element. Figure3.10 shows the linear transformation from the original element to the reference element.The linear transformation is of the form:x = a0 + a1ξ + a2ηy = b0 + b1ξ + b2η (3.5)where according to the coordinates of the reference element: x1 = a0y1 = b0 , x2 = a0 + a1y2 = b0 + b1 , x3 = a0 + a2y3 = b0 + b2 (3.6)Substituting in Eq. 3.5, the linear transformation constant is obtained as:x = x1 + (x2 − x1) ξ + (x3 − x1) ηy = y1 + (y2 − y1) ξ + (y3 − y1) η (3.7)Or ξ and η in terms of x and y as:ξ = x (y3 − y1) + y (x1 − x3) + y1x3 − x1y3(y3 − y1) (x2 − x1)− (x3 − x1) (y2 − y1)η = x (y2 − y1) + y (x1 − x2) + y1x2 − x1y2(y2 − y1) (x3 − x1)− (x2 − x1) (y3 − y1) (3.8)583.3. C1 Interpolation of the Solution (𝑥1,𝑦1) (𝑥2,𝑦2) (𝑥3,𝑦3) (𝜉1,𝜂1) = (0,0) (𝜉2,𝜂2) = (1,0) (𝜉3, 𝜂3) = (0,1) Linear transformation Figure 3.10: Linear mapping from physical to Argyris reference elementAccording to Eq. 3.3, the solution is a function of the derivatives of the solution withrespect to the coordinates of the reference element. To be able to calculate everythingin the reference space, we must write these derivatives in terms of the derivatives inthe physical space, which are easy to calculate by reconstruction, and the geometrictransformation:∂u∂ξ= ∂u∂x∂x∂ξ+ ∂u∂y∂y∂ξ= ∂u∂x(x2 − x1) + ∂u∂y(y2 − y1)∂u∂η= ∂u∂x∂x∂η+ ∂u∂y∂y∂η= ∂u∂x(x3 − x1) + ∂u∂y(y3 − y1) (3.9)In addition to the first derivatives, the second derivatives are required to obtain the C1593.3. C1 Interpolation of the Solutioninterpolation of the solution according to Eq. 3.3. Second derivatives are calculated as:∂2u∂ξ2= ∂∂ξ(∂u∂x∂x∂ξ+ ∂u∂y∂y∂ξ)= ∂2x∂ξ2∂u∂x+ ∂2y∂ξ2∂u∂y+(∂x∂ξ)2∂2u∂x2+ 2∂x∂ξ∂y∂ξ∂2u∂x∂y+(∂y∂ξ)2∂2u∂y2∂2u∂ξ∂η= ∂∂ξ(∂u∂x∂x∂η+ ∂u∂y∂y∂η)= ∂2x∂ξ∂η∂u∂x+ ∂2y∂ξ∂η∂u∂y+ ∂x∂ξ∂x∂η∂2u∂x2+(∂x∂ξ∂y∂η+ ∂y∂ξ∂x∂η)∂2u∂x∂y+ ∂y∂ξ∂y∂η∂2u∂y2∂2u∂η2= ∂∂η(∂u∂x∂x∂η+ ∂u∂y∂y∂η)= ∂2x∂η2∂u∂x+ ∂2y∂η2∂u∂y+(∂x∂η)2∂2u∂x2+ 2∂x∂η∂y∂η∂2u∂x∂y+(∂y∂η)2∂2u∂y2(3.10)which are summarized as:∂2u∂ξ2= (x2 − x1)2 ∂2u∂x2+ 2 (x2 − x1) (y2 − y1) ∂2u∂x∂y+ (y2 − y1)2 ∂2u∂y2∂2u∂ξ∂η= (x2 − x1) (x3 − x1) ∂2u∂x2+ (y2 − y1) (y3 − y1) ∂2u∂y2+ ((x3 − x1) (y2 − y1) + (x2 − x1) (y3 − y1)) ∂2u∂x∂y∂2u∂η2= (x3 − x1)2 ∂2u∂x2+ 2 (x3 − x1) (y3 − y1) ∂2u∂x∂y+ (y3 − y1)2 ∂2u∂y2. (3.11)Accordingly, all terms in Eq. 3.3 are known and the interpolated solution and derivativescan be calculated easily. The final point that needs to be considered here is the normalderivative directions. It was mentioned that there are six piece of data for each vertexand the other three are from the normal derivatives at the center of each edge. Thenormal derivative directions are shown in Figure 3.11. The constants that we obtainedfor the basis functions using Eq. 3.3 are based on these normal directions.603.3. C1 Interpolation of the Solution (− 𝟐𝟐, − 𝟐𝟐) ξ η (-1,0) (0,1) Figure 3.11: Normal derivative directions for C1 interpolation of the solutionAs an example, consider the nonzero equation corresponding to ϕ6 :ϕ6|(1,0) = c0,0 + c1,0ξ + c0,1η + c2,0ξ2 + c1,1ξη + c0,2η2 + c3,0ξ3 + c2,1ξ2η+ c1,2ξη2 + c0,3η3 + c4,0ξ4 + c3,1ξ3η + c2,2ξ2η2 + c1,2ξη3 + c0,4η4+ c5,0ξ5 + c4,1ξ4η + c3,2ξ3η2 + c2,3ξ2η3 + c1,4ξη4 + c0,5η5= c0,0 + c1,0 + c2,0 + c3,0 + c4,0 + c5,0 = 1and all other equations corresponding to ϕ6 are zero, including the the basis functionat other two vertices:ϕ6|(0,0) = ϕ6|(1,1) = 0or all derivatives of ϕ6 at all three vertices:∂ϕ6∂ξ∣∣∣∣∣(1,0)= c1,0 + 2c2,0ξ + c1,1η + 3c3,0ξ2 + 2c2,1ξη + c1,2η2 + 4c4,0ξ3 + 3c3,1ξ2η+ 3c2,2ξη2 + c1,2η3 + 5c5,0ξ4 + 4c4,1ξ3η + 3c3,2ξ2η2 + 2c2,3ξη3 + c1,4η4= c1,0 + 2c2,0ξ + 3c3,0 + 4c4,0 + 5c5,0 = 0613.3. C1 Interpolation of the Solutionand the normal derivatives at all three edge centers:(∂ϕ6∂ξnξ +∂ϕ6∂ηnη)∣∣∣∣∣( 12 , 12) = −√22(∂ϕ6∂ξ+ ∂ϕ6∂η)= 0As a result, there are 21 equations corresponding to each basis function from each oneis nonzero and the other 20 equations are zero. The full list of constraint equations isshown in Appendix A. These 21 equations are set for 21 basis functions and a (21× 21)system should be solved to obtain the ci,j coefficients. This system of (21× 21) equa-tions is independent of the solution data and the corresponding coefficients for the basisfunctions are as listed in Table 3.1. It should be noted that this system of equations issolved only once and all elements are mapped into a single Argyris reference elementand accordingly this post-processing step is cheap in terms of time and memory. Acomparison between the CPU time required for second, third and fourth-order solu-tions and finding the C1 interpolation of the solution is shown in Table 3.2 for twoproblems described in the previous chapter. Investigation of Table 3.2 shows that thepost processing time required for C1 interpolation of the solution is small comparedto the solution time, and scales linearly with problem size, whereas the solution timegrows faster than linearly. The CPU time required for C1 interpolation increases withincreasing reconstruction order, because the cost of reconstructing the solution and firstand second derivatives of the solution increases.623.3.C1InterpolationoftheSolutionc0,0 c1,0 c0,1 c2,0 c1,1 c0,2 c3,0 c2,1 c1,2 c0,3 c4,0 c3,1 c2,2 c1,3 c0,4 c5,0 c4,1 c3,2 c2,3 c1,4 c5,0ϕ0 1 −10 −10 15 −30 15 −6 30 30 −6ϕ1 1 −6 −11 8 10 18 −3 1 −10 −8ϕ2 1 −11 −6 18 10 8 −8 −10 1 −3ϕ3 0.5 −1.5 1.5 −1.5 −0.5 1.5 1ϕ4 1 −4 −4 5 10 5 −2 −6 −6 −2ϕ5 0.5 −1.5 −1.5 1.5 1 1.5 −0.5ϕ6 10 −15 15 6 −15 −15ϕ7 −4 7 −3.5 −3 3.5 3.5ϕ8 −5 14 18.5 −8 −18.5 −13.5ϕ9 0.5 −1 0.25 0.5 −0.25 −0.25ϕ10 1 −3 −3.5 2 3.5 2.5ϕ11 1.25 −0.75 −1.25ϕ12 10 15 −15 −15 −15 6ϕ13 −5 18.5 14 −13.5 −18.5 −8ϕ14 −4 −3.5 7 3.5 3.5 −3ϕ15 1.25 −1.25 −0.75ϕ16 1 −3.5 −3 2.5 3.5 2ϕ17 0.5 0.25 −1 −0.25 −0.25 0.5ϕ18 16 −32 −32 16 32 16ϕ19 8√2 −8√2 −8√2ϕ20 −16 32 32 −16 −32 −16Table 3.1: Non-zero coefficients in Eq. 3.3 for the Argyris reference element633.3. C1 Interpolation of the Solution2ndorder 3rdorder 4thorder#CV s solution solution C1 interp solution C1 interpPoisson1260 0.143 0.353 0.069 0.615 0.2015004 0.795 1.635 0.306 2.635 0.85219862 9.305 14.418 1.257 18.495 3.25180430 76.875 130.210 5.092 158.069 13.192Euler1044 0.197 0.448 0.063 0.843 0.1714408 0.959 2.072 0.291 3.915 0.72316256 7.787 10.993 1.111 18.658 2.71865502 94.411 202.422 4.446 264.728 11.626Table 3.2: CPU time (sec) comparison for solution and C1 interpolation of the solutionThe interpolated values of the solution are used to calculate the flux integral for eachcontrol volume as an estimate of the truncation error. The comparison between theoriginal estimate of the truncation error (based on the non-smoothed discrete solution)and the modified estimate of the truncation error (based on the smoothed solution byC1 interpolation of the solution) is shown on the top row of Figure 3.12. The comparisonof the difference between the exact truncation error and the estimate of the truncationerror is shown on the bottom row and careful investigation shows that the smoothedestimation of the truncation error is smoother than the non-smoothed one and is closerto the exact value.The same error plot is shown in Figure 3.13 for the original estimate of the truncationerror using the discrete solution and the C1 interpolation of the solution. The errorusing the interpolated solution is less than the discrete solution.643.3. C1 Interpolation of the Solution-5 -3 -1 1 3 5 7 9(a) L2UexactY-9 -7 -5 -3 -1 1 3 5 7 9(b) Lnon−smooth3 U2Y-9 -7 -5 -3 -1 1 3 5 7 9(c) Lsmooth,C13 U2 (d) L2Uexact-Lnon−smooth3 U2 (e) L2Uexact − Lsmooth,C13 U2Figure 3.12: Comparison of truncation error based on C1 interpolation of the solution࡯૚    Figure 3.13: Error in calculating the truncation error using the discrete solution andC1 interpolation of the solution65Chapter 4Defect CorrectionThe history of defect correction in CFD goes back to the work by Pereyra [69]. The goalis to iteratively correct the original numerical solution so that it converges to the exactsolution, Stetter [87] generalized this work. Kurzen et al. [46] used a global splinefit to generate one-dimensional and two-dimensional functions based on a numericalsolution. The global spline fit was treated as a known exact solution and a seconddiscrete solution was computed with appropriate source terms (similar to the methodof manufactured solutions) to compute the error in the nearby problem. A slightlydifferent method of defect correction was used by Naumovich et al. [55] which wasa discrete approach. Instead of finding or creating a nearby solution to estimate thediscretization error, the numerical solution is passed into a higher order discretizationscheme to compute a residual. A first-order numerical solution is computed and defectcorrection is used to correct the solution to second-order accuracy. The motivation isthat first-order problems are more robust and have better conditioned linear systems.The result is a quicker, more robust second-order accurate solution compared withsolving the second-order problem directly.4.1 General AlgorithmThe basis of defect correction discretization error estimation relies on adding the trun-cation error as a source term which removes the local source of error related to thediscretization of the domain and governing equations.To perform defect correction, we should first solve the continuous problem with thesource term f :L (U) = f (4.1)discretely at order p to get Uh,p . The discretization error of the discrete solutionconverges at order p with mesh refinement. If the exact truncation error is added to664.1. General Algorithmthe source term of the problem:L (U) = f︸ ︷︷ ︸Continuous+Lp (Uh,exact)︸ ︷︷ ︸Discrete(4.2)we can solve the modified discrete problem at p order to obtain a defect correctedsolution. In theory, this defect corrected solution is the exact solution and therefore,the exact solution is obtained by solving the problem at p order which can be as cheapas solving the problem at second order. Note that this requires the exact truncationerror.Instead of using the exact pth order truncation error, an estimation of the truncationerror may be used. As mentioned earlier, the higher order flux integral based on lowerorder solution is an estimation of the truncation error which can be added to the sourceterm of the original problem:L (U) = f︸ ︷︷ ︸Continuous+Lp+j (Uh,p)︸ ︷︷ ︸Discrete(4.3)We can solve the modified discrete problem at lower order and the discretization errorof this new defect corrected problem is reduced at order p + j with mesh refinementinstead of pth order which means that higher order convergence is obtained by solvingthe problem at lower order. This is the behavior of defect correction on structuredmeshes. On unstructured meshes, on the other hand, the accuracy of the truncationerror estimate may be an issue as described in Chapter 2.Defect correction methods are extremely simple to implement as they only requirethe formulation of the truncation error estimate and the ability to include a sourceterm in the discrete solver. In addition, defect correction methods are generally muchless costly to solve than the original discrete system as they can be initialized using thealready available discrete solution.674.2. Defect Correction Based on Exact Truncation Error4.2 Defect Correction Based on Exact TruncationErrorConsider the Poisson problem in a (1× 1) square∂2U∂x2+ ∂2U∂y2= 2pi2 sin (pix) sin (piy)with homogeneous Dirichlet boundary condition for which the exact solution is:Uexact = − sin (pix) sin (piy)Since the exact solution is known, the exact truncation error can be computed andadded to the source term to correct the solution as depicted in Figure 4.1. The dashedlines are the original second, third and fourth order solution which are shown in black,blue and red, respectively. The second order solution converges quadratically and, thefourth order solution converges quartically as expected, but the third order solution(#CV)1/2Discretization Error50 100 150 200 25010-1710-1510-1310-1110-910-710-510-32.004.00Figure 4.1: Defect correction based on exact truncation error for Poisson684.2. Defect Correction Based on Exact Truncation Errorconverges quadratically and not cubically. This is the typical behavior of diffusivefluxes for third-order finite volume unstructured schemes. The solid lines are the defectcorrected solutions based on adding the exact truncation error of the same order to thesource term. The discretization error of all three corrected solutions are at the orderof machine zero, implying that the exact solution is obtained. Therefore, the theory ofdefect correction works properly for the Poisson problem if the exact truncation erroris added to the source term.Having studied the diffusive fluxes using the Poisson equation, the performance ofdefect correction based on the exact solution is examined for convective fluxes. Forthis purpose, the advection equation with zero source term is considered. The velocityvector is set in x direction as (1, 0), and the inlet velocity is set as sin (piy), so theproblem and its exact solution are∂u∂x= 0⇒ uexact = sin (piy)The problem domain considered is a (5× 1) rectangular channel and the exact solutionis shown in Figure 4.2. Similar to the Poisson problem, the convergence results areshown in Figure 4.3. The dashed lines are the original solutions and the solid lines aredefect corrected solution based on exact solution. In contrast to the Poisson case, thethird order solution converges cubically with mesh refinement. The discretization errorof the corrected solutions are again at the order of machine zero, implying that theexact solution is obtained. Accordingly, the theory of defect correction works properlyfor the advection problem if the exact truncation error is added to the source term. Y0 1 2 3 4 5010 0.15 0.3 0.45 0.6 0.75 0.9Figure 4.2: Exact solution of the advection problem694.3. Defect Correction for a Perfect Mesh(#CV)1/2Discretization Error50 100 150 20010-1610-1410-1210-1010-810-610-410-22.092.724.10Figure 4.3: Defect correction based on exact truncation error for advection4.3 Defect Correction for a Perfect MeshInstead of adding the exact truncation error to the source term for defect correction,an estimation of truncation error based on a higher order flux integral may be used.For this purpose, a perfect mesh with equilateral triangle elements is considered. Theexact solution is set such that a zero boundary condition is obtained:Uexact = − sin (piy) sin(pi(y −√3x))sin(pi(y +√3x−√3))(4.4)Figure 4.4 shows the solution distribution in this equilateral triangular domain. Calcu-lating the corresponding source term for this problem is easy.The discretization error of the original second order problem and the defect correctedsolution calculated by third and fourth order flux integrals based on the second ordersolution is depicted in Figure 4.5. The discretization error of the corrected solution bythe exact truncation error is approximately zero as expected, but the correspondingerror of the corrected solution by p-TE method is larger and comparable to the originalproblem. Not surprisingly, if L4 (U2) is added to the source term, the discretization704.3. Defect Correction for a Perfect Meshxy0 0.2 0.4 0.6 0.8 100.20.40.60.8 0.05-0.2-0.45-0.7-0.95Figure 4.4: Poisson solution for the perfect mesherror is less compared to adding L3 (U2) as higher order terms are approximated.The convergence of discretization error with mesh refinement is shown in Figure 4.6.Dashed lines are the discretization error of the original second, third and fourth ordersolution and the green line depicts the error for interior points of third order solution.As mentioned earlier, the third order discretization is second order accurate, howeverif just the interior cells are considered, the convergence is better than quadratic for theperfect mesh. Solid lines with square symbols are the defect corrected solutions basedon second order solutions adding third and fourth order flux integrals as truncationerror estimates. Despite the fact that the nominal expected convergence rate is thirdand fourth, both of them are quadratic. Although the magnitude of the error of thecorrected solution by L4 (U2) is less than L3 (U2), supported by comparing Figures4.5c and 4.5d, both of them are larger than the original non-corrected second ordersolution. On the other hand, correcting the third order solution by using fourth orderflux integral, solid line with triangles, has a different behavior. The magnitude of theerror is much smaller than the original third order solution and is approximately thesame as the fourth order solution. Furthermore, it converges quartically which is theexpected order. Therefore, for a perfect mesh, defect correction based on the thirdorder solution is as good as expected; however, the performance of defect correctionbased on the second order solution is not good.714.3. Defect Correction for a Perfect Meshxy0 0.2 0.4 0.6 0.8 100.20.40.60.8 0.0070.0040.001-0.002(a) Original problemxy0 0.2 0.4 0.6 0.8 100.20.40.60.85E-162E-16-1E-16-4E-16-7E-16(b) Corrected by exact TExy0 0.2 0.4 0.6 0.8 100.20.40.60.80.0070.0040.001-0.002(c) Corrected by L3 (U2)xy0 0.2 0.4 0.6 0.8 100.20.40.60.80.0070.0040.001-0.002(d) Corrected by L4 (U2)Figure 4.5: Discretization error of the original and corrected solutions for perfect tri-angular mesh724.4. Defect Correction for an Unstructured Mesh(#CV)1/2Discretization Error50 100 150 200 25010-810-710-610-510-410-33.872.002.433.71Figure 4.6: Defect correction based on p-TE method for perfect mesh4.4 Defect Correction for an Unstructured MeshHaving investigated the performance of defect correction on a perfect mesh, we studydefect correction using the p-TE method on a general unstructured mesh for the sametwo model problems.Figure 4.7 shows defect correction results for the Poisson problem; similar to theperfect mesh, defect correction based on the second order solution is not helpful andthe magnitude of the error for the corrected solution is even more than the originalsecond order problem. In contrast to the perfect mesh, defect correction based on thethird order solution is not able to provide the nominal convergence rate. Although themagnitude of the error of the corrected solution is less than the third order solution, itis much larger than the error of the fourth order solution. Therefore, the performanceof defect correction for a general unstructured mesh for diffusive fluxes are not as goodas expected in terms of the convergence rate and magnitude of the error for the secondorder solution and in terms of convergence rate for the third order solution.The same experiment is done for the advection problem and the results are shown734.4. Defect Correction for an Unstructured Mesh(#CV)1/2Discretization Error50 100 150 20010-910-810-710-610-510-410-32.004.082.45Figure 4.7: Defect correction based on p-TE method for Poisson on general unstructuredmeshin Figure 4.8. For convective fluxes, the error of the defect corrected solution basedon the second order solution is less than the original second order one. The differenceis more noticeable when the fourth order flux integral is added to the source term;however both converge quadratically and hence, the nominal order is not achieved.The same behavior exists for the corrected solution based on the third order solution.It converges cubically rather than quartically. Therefore, the performance of defectcorrection for convective fluxes is good in terms of error magnitude but not in terms ofthe convergence rate.In conclusion, the expected convergence rate is not achievable by correcting thesolutions based on the p-TE method either for diffusive fluxes or for convective fluxes.It should be noted that the same convergence results are obtained even on finer meshesas the solutions on the meshes we have shown here are in asymptotic range.744.5. Defect Correction Based on Continuous p-Truncation Error(#CV)1/2Discretization Error50 100 150 20010-810-710-610-510-410-310-22.092.634.102.721.75Figure 4.8: Defect correction based on p-TE method for advection on general unstruc-tured mesh4.5 Defect Correction Based on Continuousp-Truncation ErrorConsidering the fact that defect correction based on original p-TE method is not helpfulfor diffusive and convective fluxes, we try to use the continuous p-estimate of the trun-cation error to perform defect correction. Both CGM and C1 interpolation are used forinterpolating the solution and the results are shown for diffusive and convective fluxes.4.5.1 PoissonOur results based on the discrete p-TE method shows that the performance of defectcorrection is not as good as expected. Figure 4.9 depicts the results for the Poissonproblem using continuous p-truncation error by both schemes discussed in the previouschapter where the dash-dotted lines show the original non-corrected solution, solidlines represent defect corrected solution based on discrete p-truncation error and thedashed lines are the corrected solution by the continuous p-truncation error, so LspUqrepresenting the continuous p-truncation error calculated by p order flux integration754.5. Defect Correction Based on Continuous p-Truncation Errorbased on q order converged solution.Using CGM for interpolating the second order solution corrects the solution suchthat the discretization error is less than the corrected solution by the discrete p-TEmethod; however, the corresponding discretization error is larger than the second-ordernon-corrected solution. Furthermore, both discretization errors of the corrected solu-tions by third and fourth order flux integrals based on the interpolated second ordersolution converge quadratically with mesh refinement which is not the expected order.Defect correction based on the third order interpolated solution by CGM is not help-ful in terms of the magnitude of the error or the convergence rate, compared to thecorrected solution based on the discrete p-truncation error.Using C1 interpolation of the solution based on second order solution, on the otherhand, provides a corrected solution with smaller discretization error compared to thediscrete solution. Moreover, the convergence rate is faster compared to the correctedsolution based on discrete p-truncation error. Correction based on the third ordersolution is not helpful even with the continuous p-truncation error using C1 interpolationof the solution.In conclusion, for the Poisson problem, defect correction based on continuous p-truncation error based on interpolated solution by CGM is not helpful neither for secondorder nor for third order solution. C1 interpolation of the solution is able to providecorrected solutions with smaller discretization error when the second order solution isused and produces a convergence rate that is faster than quadratic.4.5.2 AdvectionThe same experiment has been done for the advection problem and the results areshown in Figure 4.10. Interpolating by CGM for either the second order or the thirdorder solution is not helpful in terms of convergence rate. Even though the conver-gence rate of the corrected solution by using the fourth order flux integral based onthe interpolated second order solution is faster than quadratic, it is still significantlydifferent from the nominal order. However, by using C1 interpolation to obtain thecontinuous p-truncation error, the discretization error of the corrected solution is lessthan the discretization error of the corrected solution by discrete p-truncation error,even though the convergence rate is not as good as expected. The same behavior interms of convergence rate exists for the third order solution.764.5. Defect Correction Based on Continuous p-Truncation Error(#CV)1/2Discretization Error50 100 150 20010-910-810-710-610-510-410-3(a) Solution interpolation by CGM(#CV)1/2Discretization Error50 100 150 20010-910-810-710-610-510-410-3(b) C1 interpolation of the solutionFigure 4.9: Defect correction results using continuous p-truncation error for Poisson774.5. Defect Correction Based on Continuous p-Truncation Error(#CV)1/2Discretization Error50 100 150 20010-510-410-310-210-1(a) Solution interpolation by CGM(#CV)1/2Discretization Error50 100 150 20010-510-410-310-210-1(b) C1 interpolation of the solutionFigure 4.10: Defect correction results using continuous p-truncation error for advection784.5. Defect Correction Based on Continuous p-Truncation Error4.5.3 DiscussionIn summary, the performance of defect correction based on discrete p-truncation erroris not helpful in terms of the convergence rate and the magnitude of the discretizationerror for diffusive and convective fluxes. Using CGM for interpolating the solution isnot able to improve the performance of defect correction significantly either. For bothdiffusive and convective fluxes, using C1 interpolation provides a corrected solution withsmaller discretization error, but the converge rate is still not as good as expected. Inparticular, the performance is significantly better for correction based on the second-order solution than on the third-order solution.As a consequence of poor performance of CGM for defect correction, we will continuewith C1 interpolation of the solution. CGM will not be used for interpolating in outputerror estimation and mesh adaptation discussed in the following chapters.Although C1 interpolation of the solution is not able to improve the performanceof defect correction significantly, particularly in terms of convergence rate, this doesnot necessarily mean that it is not able to improve an output functional or effectivelyadapt the mesh. In the next two chapters, we will show the performance of outputerror estimation and mesh adaptation using the continuous p-truncation error by C1interpolation of the solution.79Chapter 5Output Error Estimation andCorrectionThe adjoint theory was first presented in the context of linear algebra by using thealgebraic equations obtained from the discretization of the original problem. This isthe basis for the discrete adjoint approach. The continuous adjoint approach, on theother hand, is formulated based on the adjoint PDE which is discretized and solvedindependently [26]. In this chapter, we will start by the derivation of both discreteand continuous adjoint solutions. The continuous adjoint formulation is derived fordifferent governing equations; scalar equations containing both convective and diffusiveterms and system of equations for both Euler and Navier-Stokes.The adjoint solution, either the discrete adjoint or continuous adjoint, can be mul-tiplied by the truncation error to obtain the correction term used to correct the outputfunctional of interest. Popular output functionals in aerodynamics are lift and drag.Both discrete and continuous p-truncation error may be weighted by the adjoint solu-tion to obtain the correction term. If the higher-order flux integral is calculated basedon the lower-order solution as an estimation of the truncation error and this estimate ofthe truncation error is weighted by the adjoint solution, the corrected output functionalconverges to the exact value as fast as using the higher-order solution directly.The effect of using the discrete and continuous adjoint solution multiplied by bothdiscrete and continuous p-truncation error in correcting the output functional is dis-cussed in this chapter. The test cases include scalar equations, the advection and Pois-son problem with exact solutions, and system of equations, Euler and Navier-Stokesusing both manufactured solution and real-flows.805.1. Discrete Adjoint5.1 Discrete AdjointConsider a partial differential equation R(U)= 0. This can be discretized — in ourcase using a finite volume discretization — and written as an algebraic equation:Rh(Uh)= 0 (5.1)Given a scalar output, Jh(Uh)such as lift or drag, the associated adjoint vector, Zh,is the sensitivity of Jh to an infinitesimal residual perturbation, added to the nonlinearsystem:δJh ≡ Jh(Uh + δUh)− Jh(Uh)≡ ZTh δRh (5.2)where δUh is the infinitesimal solution perturbation satisfying∂Rh∂UhδUh = δRh (5.3)which is obtained by linearizing Eq. 5.1. The linearization assumes the discrete equa-tions are differentiable. Furthermore, assuming that the output is also differentiableδJh =∂Jh∂UhδUh = ZTh δRh = −ZTh∂Rh∂UhδUh (5.4)For this equation to hold for all perturbations requires that∂Jh∂Uh= −ZTh∂Rh∂Uhfrom which Zh must satisfy the discrete adjoint equation:(∂Rh∂Uh)TZh +(∂Jh∂Uh)T= 0 (5.5)As discussed in Chapter 1, the implicit Jacobian matrix can be computed in our solverand hence the transpose of the Jacobian matrix,(∂Rh∂Uh)T, can be calculated easily. Thediscrete adjoint solution is used for mesh adaptation and optimization [59, 60].If we assume that both the equations and the functional J have been linearized, thediscrete approach can be described as a mapping from the original problem Jh = (Uh, g)given that AUh = f into an equivalent adjoint problem Jh = (Zh, f) given that ATZh =g. The inner product is a vector dot product (V, U) = V TU and the equivalence of the815.2. Continuous Adjointtwo problems is easily proved to be(Zh, f) = (Zh, AUh) ≡(ATZh, Uh)= (g, Uh) (5.6)Note that the inhomogeneous term f in the discrete equations in the primal problem,enters the functional in the adjoint problem, and correspondingly the inhomogeneousterm g in the adjoint problem comes from the functional of the primal problem.5.2 Continuous AdjointThe continuous primal problem can be posed asDetermine J = (U, g)D + (CU, h)∂Dgiven that LU = f inDBU = e in ∂D(5.7)where (U, V )D =´DUTV dv is an integral over the domain and (U, V )∂D =´∂DUTV dAis an integral over the boundary of the domain. The objective in the analytic approachis to convert the primal problem using integration by parts into an equivalent adjointproblemDetermine J = (Z, f)D + (C∗Z, e)∂Dgiven that L∗Z = g inDB∗Z = h on ∂D(5.8)where L∗ is the linear PDE which is adjoint to L. B and B∗ are boundary conditionoperators for the primal and adjoint problems, respectively, and C and C∗ are (possiblydifferential) weight boundary operators used in the functionals; these four operatorsmay have different dimensions on different parts of the boundary.The two forms of the problem are equivalent provided thatJ = (Z,LU)D + (C∗Z,BU)∂D = (L∗Z,U)D + (B∗Z,CU)∂D (5.9)which is the adjoint consistency condition. The left hand side is the output functionalbased on the adjoint solution and the right hand side is the output functional based onthe primal problem. The continuous adjoint has been used for optimizing wing shape[40] and correcting the output functional [5, 82].825.2. Continuous AdjointComparing the discrete adjoint to the continuous adjoint reveals that although thediscrete adjoint solves a system of equations based on the transpose of the Jacobianmatrix and the derivative of the functional with respect to the solution, the continuousadjoint is an independent PDE which needs to be discretized and solved by itself. Thisimplies that boundary conditions should be set for the continuous adjoint problem andthose boundary conditions are dependent on the functional. In this section, the adjointPDE, L∗, and the boundary conditions for different problems based on correspond-ing functionals are discussed. We start by examining convective and diffusive fluxesseparately using the advection and Poisson problems, respectively. Hence, two modelproblems are defined by the method of manufactured solutions [76]. For systems ofequations, both inviscid and viscous flows are considered.5.2.1 Advection EquationConsider the 2D steady linear advection equation with zero source term:∇ · (bU) = 0 inDU = uin on ∂Di (5.10)where b is the velocity vector and uin is the solution at the inlet ∂Di. The left handside of Eq. 5.10 is multiplied by Z, integrated over the domain D and integrated byparts to obtain the continuous adjoint equation:(∇ · (bU) , Z)D + (U,−b · nˆZ)∂Di = (U,−b · ∇Z)D + (U,b · nˆZ)∂Do (5.11)where nˆ is the outward normal vector. Comparing to Eq. 5.9, we see that LU = ∇·(bU)in D andBU = U, CU = 0 on ∂DiBU = 0, CU = U on ∂Dofor the primal problem and L∗Z = −b · ∇Z in D andB∗Z = 0, C∗Z = −b · nˆZ on ∂DiB∗Z = b · nˆz, C∗Z = 0 on ∂Do835.2. Continuous Adjointfor the continuous adjoint problem. The output functional is defined asJ =ˆD(∇ · (bU))ZdA+ˆ∂Diuin (−b · nˆZ) ds=ˆD(−b · ∇Z)UdA+ˆ∂Do(b · nˆZ)uds (5.12)For a constant velocity vector, the adjoint equation to the advection problem is anadvection equation in the reverse direction.5.2.2 Poisson EquationConsider the 2D Poisson equation:4U = f inDU = bD on ∂DDnˆ · ∇U = bN on ∂DN (5.13)where bD is the Dirichlet boundary condition on ∂DD and bN is the Neumann boundarycondition on ∂DN , with ∂DD∪∂DN = ∂D and ∂DD∩∂DN = 0. Similar to the advectionproblem, the left hand side of Eq. 5.13 is multiplied by Z, integrated over the domainD and integrated by parts to obtain the continuous adjoint equation:(4U,Z)D = − (∇U,∇Z)D + (nˆ · ∇U,Z)∂D= (U,4Z)D − (U, nˆ · ∇Z)∂D + (nˆ · ∇U,Z)∂D (5.14)splitting the boundary terms according to ∂DD ∪ ∂DN = ∂D , and shuffling terms:(4U,Z)D + (U, nˆ · ∇Z)∂DD + (nˆ · ∇U,−Z)∂DN =(U,4Z)D + (nˆ · ∇U,Z)∂DD + (U,−nˆ · ∇Z)∂DNComparing to Eq. 5.9, we end up with LU = 4U in D andBU = U, CU = nˆ · ∇U on ∂DDBU = nˆ · ∇U, CU = U on ∂DNfor the primal problem and L∗Z = 4Z in D and845.2. Continuous AdjointB∗Z = Z, C∗Z = nˆ · ∇Z on ∂DDB∗Z = −nˆ · ∇Z, C∗Z = −Z on ∂DNfor the continuous adjoint problem. Comparing L and L∗ shows that the primal andadjoint operators are the same and as a result, Poisson is self adjoint implying thatthe Poisson adjoint problem is a Poisson problem itself for which the source termand boundary conditions are defined based on the functional of interest. The outputfunctional is defined as:J =ˆD4UZdA+ˆ∂DDU (nˆ · ∇Z) ds+ˆ∂DN(nˆ · ∇U) (−Z) ds=ˆD4ZUdA+ˆ∂DD(nˆ · ∇U)Zds+ˆ∂DN(−nˆ · ∇Z)Uds (5.15)5.2.3 Euler EquationsConsider the linearized steady-state Euler equations:LU = ∂∂x(AxU) +∂∂y(AyU) = f (5.16)where U =(ρ ρu ρv ρe)Tis the conserved solution vector and Ax = ∂Fcx∂UandAy =∂F cy∂Uare the flux Jacobian in which Fx and Fy are the convective flux functions:F cx =ρuρu2 + pρuvρuh , Fcy =ρvρuvρv2 + pρvh . (5.17)where h = e+ pρ= Pγρ(γ−1) +12 (u2 + v2) is the enthalpy and γ = CpCvis the ratio of specificheats. Consequently, the flux Jacobians are:Ax =∂Fx∂U=0 1 0 0γ−12 (u2 + v2)− u2 (3− γ)u (1− γ) v γ − 1−uv v u 0u(γ−12 (u2 + v2)− h)h− (γ − 1)u2 (1− γ)uv γu855.2. Continuous AdjointAy =∂Fy∂U=0 0 1 0−uv v u 0γ−12 (u2 + v2)− v2 (1− γ)u (3− γ) v γ − 1v(γ−12 (u2 + v2)− h)(1− γ)uv h− (γ − 1) v2 γvNote that we are using Roe’s scheme [77] for evaluating the flux function. Using thisscheme, the flux function at the face between cell i and j is evaluated as:F (Ui, Uj) =12[(F (Ui) + F (Uj))−∣∣∣A˜∣∣∣ (Uj − Ui)] . (5.18)A˜ is the Jacobian matrix evaluated based on the Roe’s average properties defined as:ρ˜ = √ρiρju˜ =√ρiui +√ρjuj√ρi +√ρjv˜ =√ρivi +√ρjvj√ρi +√ρjh˜ =√ρihi +√ρjhj√ρi +√ρj(5.19)and∣∣∣A˜∣∣∣ can be written in diagonalized form as:∣∣∣A˜∣∣∣ = X˜−1 ∣∣∣Λ˜∣∣∣ X˜. (5.20)X˜ is a matrix whose columns are the right eigenvectors and the components of Λ˜ arethe eigenvalues of the Jacobian matrix:∣∣∣Λ˜∣∣∣ =|u˜n| 0 0 00 |u˜n| 0 00 0∣∣∣u˜n + C˜∣∣∣ 00 0 0∣∣∣u˜n − C˜∣∣∣ (5.21)865.2. Continuous Adjointwhere u˜n = nxu˜+nyv˜ is the normal velocity and C˜ =√(γ − 1)(h˜− 12 (u˜2 + v˜2))is thesound velocity.To obtain the continuous adjoint equation, Eq. 5.16 is multiplied by Z, integratedover the domain D and integrated by parts:(∂∂x(AxU) +∂∂y(AyU) , Z)D=(U,−ATx∂Z∂x− ATy∂Z∂y)D(5.22)+ ((nxAx + nyAy)U,Z)∂D .Comparing to Eq. 5.9, we find thatL∗Z = −ATx∂Z∂x− ATy∂Z∂y(5.23)for the continuous adjoint problem. Note that the primal PDE, Eq. 5.16, is written inthe conservative form; however, the adjoint PDE, Eq. 5.23 is not in conserved form andwe need to transform that to the conserved form; this transformation is described indetail in Appendix B. The continuous adjoint fluxes are calculated by the Lax-Friedrichmethod based on the maximum eigenvalue of the Euler Jacobian:F (Ui, Uj) =12 [(F (Ui) + F (Uj))− λmax (Uj − Ui)] (5.24)To be able to solve the continuous adjoint equation, we need to define the boundaryoperators for the solid wall where the output functional is defined, as well as supersonicand subsonic inflow and outflow.Solid WallThe output functional corresponding to drag or lift is:J =ˆ∂Dwallpnˆ · ψds (5.25)where ψ = (cosα, sinα)T for drag and ψ = (−sinα, cosα)T for lift, and α is the angle ofattack. Using the primal boundary operator in the right hand side of Eq. 5.22 for theslip wall boundary condition, ~u · nˆ = unx + vny = 0, and multiplying by the adjoint875.2. Continuous Adjointsolution, we obtain:((nxAx + nyAy)U,Z)∂D =([0 pnx pny 0]T,[Z1 Z2 Z3 Z4]T)= pnxZ2 + pnyZ3Comparing to the functional of interest, Eq. 5.25, we obtain the continuous adjointboundary condition asnxZ2 + nyZ3 = nˆ · ψ (5.26)Supersonic inflow/outflowThe solution components are set for supersonic inflow for the primal problem and forsupersonic outflow, they are obtained by reconstruction. Eq. 5.23 shows that the char-acteristic behavior of the adjoint problem is similar to that of the primal Euler equation,but with the sign of each characteristic velocity reversed so that the characteristic infor-mation travels in the opposite direction, similar to the advection problem as described.All characteristics are coming into the domain for supersonic inflow, and so for theadjoint state, the characteristics are coming out and hence no boundary condition isset at the supersonic inflow for the adjoint problem and it is obtained by reconstruc-tion directly. For the supersonic outflow, on the other hand, since for most appliedproblems, the output functional is defined as the lift or drag on the solid wall and theoutflow does not have any contribution in the functional, the boundary condition forthe adjoint problem is zero at the supersonic outflow [5]. A supersonic outflow has noinfluence on any quantity.Subsonic inflow/outflowAt a subsonic inflow boundary, there are three characteristics entering the domain forthe primal problem and therefore, there is only one adjoint characteristic that leaves thedomain. Accordingly, one boundary condition should be specified for adjoint subsonicinflow. It can be written in a simplified form as:C1Z1 + C2Z2 + C3Z3 + C4Z4 = 0 (5.27)885.2. Continuous Adjointwhere the coefficients are given by [34]:C1 =nxu+ nyv2(2− γ + γ2 − 2γe (γ − 1)u2 + v2)C2 =(2− γ + γ2)nxu2 + 2 (1− γ + γ2)nyuv2 −(γ − 1) γnxv22−γe (γ − 1) (2nyuv + nx (u2 − v2))(u2 + v2)C3 =−γ (γ − 1)nyu4 + 2nyu2v22 (u2 + v2) +(1− γ + γ2)nx (u3v + uv3)(u2 + v2)+(2− γ + γ2)nyv4 + 2γe (γ − 1) (ny (u2 − v2)− 2nxuv)2 (u2 + v2)C4 =(nxu+ nyv) ((γ − 1) (u2 + v2)− 2γe) ((2− γ + γ2) (u2 + v2)− 2γe (γ − 1))−4 (u2 + v2)In the case of a subsonic outflow boundary, the adjoint problem has three incomingcharacteristics entering the domain implying that three boundary conditions are needed.They can be written as:Z1 =12(2eγ − (γ − 1)(u2 + v2))Z4Z2 =(−2eγnx + (γ − 2)nxu2 − 2nyuv + γnxv22 (nxu+ nyv))Z4Z3 =(−2eγny + (γ − 2)nyv2 − 2nxuv + γnyu22 (nxu+ nyv))Z4Table 5.1 summarizes the number of boundary conditions required for different bound-aries according to the characteristics.Primal AdjointSupersonic Inflow 4 0Supersonic Outflow 0 4Subsonic Inflow 3 1Subsonic Outflow 1 3Table 5.1: Number of required boundary conditions895.2. Continuous Adjoint5.2.4 Navier-Stokes EquationsConsider the linearized steady-state Navier-Stokes equations for constant viscosity:LU = ∂∂x(AxU −Dxx∂U∂x−Dxy ∂U∂y)+ ∂∂y(AyU −Dyx∂U∂x−Dyy ∂U∂y)= f (5.28)where Ax and Ay are the derivatives of the convective flux function, Eq. 5.17, withrespect to the solution as defined before and the other Dij matrices are the derivativesof viscous flux with respect to the solution gradientsDxx = ∂Fvx∂( ∂U∂x ), Dyx =∂F vy∂( ∂U∂x )Dxy = ∂Fvx∂( ∂U∂y ), Dyy =∂F vy∂( ∂U∂y )where F v represents the viscous flux function:F vx =0MaReµ(43∂u∂x− 23 ∂v∂y)MaReµ(∂u∂y+ ∂v∂x)MaReµ(u(43∂u∂x− 23 ∂v∂y)+ v(∂u∂y+ ∂v∂x))+ µγMaRePr(γ−1)(ρ ∂P∂x−P ∂ρ∂xρ2)F vy =0MaReµ(∂u∂y+ ∂v∂x)MaReµ(43∂v∂y− 23 ∂u∂x)MaReµ(u(∂u∂y+ ∂v∂x)+ v(43∂v∂y− 23 ∂u∂x))+ µγMaRePr(γ−1)(ρ ∂P∂y−P ∂ρ∂yρ2)where Ma =√u2+v2Cis the Mach number, µ is the dynamic viscosity coefficient, Re isthe Reynolds number and Pr is the Prandtl number. Consequently, the Dij matrices,905.2. Continuous Adjointthe derivatives of viscous fluxes with respect to the solution gradients are:Dxx =µρ0 0 0 0−43u 43 0 0−v 0 1 0−(43u2 + v2 + γPr(e− u2 − v2)) (43 − γPr)u(1− γPr)v γPrDxy =µρ0 0 0 023v 0 −23 0−u 1 0 0−13uv v −23u 0 , Dyx =µρ0 0 0 0−v 0 1 023u −23 0 0−13uv −23v u 0Dyy =µρ0 0 0 0−u 1 0 0−43v 0 43 0−(u2 + 43v2 + γPr(e− u2 − v2)) (1− γPr)u(43 − γPr)v γPrEq. 5.28 is multiplied by Z, integrated over the domain D and integrated by partsto obtain the continuous adjoint equation:(∂∂x(AxU −Dxx∂U∂x−Dxy ∂U∂y)+ ∂∂y(AyU −Dyx∂U∂x−Dxy ∂U∂y), Z)D=(−Ax∂Z∂x− ∂∂x(DTxx∂Z∂x+DTyx∂Z∂y)− Ay ∂Z∂y− ∂∂y(DTxy∂Z∂x+DTyy∂Z∂y), U)D+(nx(AxU −Dxx∂U∂x−Dxy ∂U∂y)+ ny(AyU −Dyx∂U∂x−Dyy ∂U∂y), Z)∂D+(∂Z∂x, (nxDxx + nyDyx)U)∂D+(∂Z∂y, (nxDxy + nyDyy)U)∂D(5.29)Comparing to Eq. 5.9, we end up withL∗Z = −ATx∂Z∂x− ATy∂Z∂y− ∂∂x(DTxx∂Z∂x+DTyx∂Z∂y)− ∂∂y(DTxy∂Z∂x+DTyy∂Z∂y)(5.30)for the continuous adjoint problem where the first term on right-hand side is the sameas the adjoint PDE for the Euler equation and the second term is already in conserved915.3. Output Functional Correctionform.The most popular output functional of interest in viscous compressible flows are thetotal (i.e., pressure plus viscous) drag and lift. So, the output functional is defined as:J =ˆ∂Dwall(pnˆ− τ nˆ) · ~ψds =ˆ∂Dwall(pni − τijnj)ψids (5.31)where ψ is the same as defined above and the viscous stress term is defined byτ = 43 ∂u∂x − 23 ∂v∂y ∂u∂y + ∂v∂x∂u∂y+ ∂v∂x43∂v∂y− 23 ∂u∂x (5.32)Using the primal boundary operator in the right hand side of Eq. 5.29 for the adiabaticno-slip wall boundary conditionu = 0v = 0nˆ · ∇T = 0 (5.33)and multiplying by the adjoint solution, we obtain the continuous adjoint boundarycondition for the adiabatic no-slip wall:Z2 = ψ1Z3 = ψ2nˆ · ∇Z4 = 0 (5.34)The convective part of the boundary condition for the inflows and outflows are the sameas the continuous adjoint for the Euler problem.5.3 Output Functional CorrectionPierce and Giles have developed a method to estimate error in the functional [73] and anoverview of the method is discussed here. Considering Eq. 5.9 and for given continuous925.3. Output Functional Correctionapproximate solutions Uh and Zh of the discrete solution:J = (g, U)D + (h,CU)∂D= (g, Uh + (U − Uh))D + (h,C (Uh + (U − Uh)))∂D= (L∗Zh, Uh)D + (L∗Zh, U − Uh)D + (g − L∗Zh, U − Uh)D + (g − L∗Zh, Uh)D+ (B∗Zh, CUh)∂D + (B∗Zh, C (U − Uh))∂D+ (h−B∗Zh, C (U − Uh))∂D + (h−B∗Zh, CUh)∂D (5.35)By using integration by parts, we can re-write the above equation asJ = (L∗Zh, Uh)D + (B∗Zh, CUh)∂D +(Zh, L (U − Uh))D + (C∗Zh, B (U − Uh))∂D +(Z − Zh, L (U − Uh))D + (C∗ (Z − Zh) , B (U − Uh))∂D (5.36)The two terms in the first line are the influence of bulk and boundary integrals in thediscrete functional, the terms in the second line represent computable adjoint errorestimates and the terms in the third line are the higher order remaining errors whichare negligible compared to other terms. Accordingly, the estimated error in calculatingthe functional is:δJ ≈ (Zh, L (U − Uh))D + (C∗Zh, B (U − Uh))∂D= (Zh, f − LUh)D + (C∗Zh, e−BUh)∂D= (Zh, τ)D + (C∗Zh, e−BUh)∂D (5.37)where τ is the primal truncation error. Hence, an estimate of the truncation erroris needed to find the correction term for the output functional. The estimate of thetruncation error based on the interpolated solution is multiplied by the adjoint solutionto find the correction term added to the output functional to have a more accuratefunctional which converges to the exact value with a higher-order rate. It should benoted that the correction term of Eq. 5.37 is the summation over all control volumes ofthe truncation error estimated by computing the higher-order flux integral based on thelower-order solution multiplied by the adjoint solution of the same order as the primalproblemδJ = (Zh, τ)D =∑CV(˛~F p+1p · nˆds)Z¯p935.4. Advection EquationThe higher-order flux integration can be computed to order p+ 2 as well.We will compare the effectiveness of using the original discrete p-TE estimate andthe continuous p-TE estimate for different governing equations with different physicalbehavior, for both convective and diffusive fluxes. Both scalar and system problems areconsidered. For each case, the domain of the problem is introduced and then correctionsbased on the discrete and continuous p-truncation error are compared for both discreteand continuous adjoint problems.To verify our approach to improving the functional, we use problems with exactsolutions so that we can calculate the exact functional to compare the magnitude of theerror and also the convergence rate of the corrected functional with mesh refinement.Since this technique is mathematical in origin rather than physical, applying it to otherproblems, with or without exact solutions, follows exactly the same procedure. We arefocusing on the problems with exact solutions only to have an exact reference value forcomparison purposes.5.4 Advection EquationThe velocity vector in Eq. 5.10 is set as b = (1, 0) and the primal problem is the sameas the advection problem described in Chapter 4, Figure 4.3. The problem domainconsidered is a (5× 1) rectangular channel and the output functional is defined asJ = (U, g)D + (CU, h)∂D0 = 0 + (U, h)∂D0 =1ˆ0sin (piy) sin (piy) dy = 0.5implying that the adjoint problem boundary condition should be set as sin (piy). Thefunctional is defined intentionally such that the adjoint problem has exactly the samedistribution as the primal problem. Both continuous and discrete adjoint solutions aredepicted in Figure 5.1 and as their distributions should be the same as the the exactprimal problem, so comparing continuous and discrete adjoint is easier. Although bothsolutions are qualitatively similar to the desired solution, the continuous adjoint issmoother and more accurate, as expected, as a consequence of solving the continuousadjoint PDE instead of solving the transposed Jacobian system arising from the discretesolution. This increased accuracy is reflected in the correction process as well.Before showing the numerical results, the nomenclature we are using should bedescribed; J is the functional, CJ is the corrected functional and C’s superscript rep-945.4. Advection Equation Y0 1 2 3 4 5010 0.15 0.3 0.45 0.6 0.75 0.9(a) Continuous adjoint Y0 1 2 3 4 5010 0.15 0.3 0.45 0.6 0.75 0.9(b) Discrete adjointFigure 5.1: Adjoint solutions for advection problemresents whether the correction is based on truncation error using the discrete solution,Cn, or is based on the truncation error using the interpolated solution, Cs. J ’s sub-script shows the primal solution order of accuracy and the superscript shows the orderof reconstruction and flux integration used as an estimation of the truncation error.The error in calculating the functional is depicted in Figure 5.2 using both continu-ous and discrete adjoint solutions. Comparing the functional based on the second-ordersolution with the corrected functional based on the discrete solution shows poor perfor-mance of the correction in terms of error magnitude and also asymptotic convergencerate for both continuous and discrete adjoint solutions. On the other hand, correctingthe functional by using the truncation error based on the interpolated solution, CsJ32 ,has smaller error compared to the second-order functional and the rate of convergenceis 4.06 and 3.31 for continuous and discrete adjoint, respectively. In this case, we havesuper-convergence with the continuous adjoint and the convergence is quartic insteadof cubic. Using fourth order flux integration for estimating the truncation error basedon the interpolated second-order solution, CsJ42 , further reduces the error. Comparingthe error magnitudes of these corrected solutions based on second-order solution withthe error of the third-order solution reveals that this correction scheme based on theinterpolated solution is even more accurate than the higher-order functional. Instead955.5. Poisson Equation(#CV)1/2Error50 100 150 20010-810-710-610-510-410-3J2: 1.61CnJ23:2.52CsJ23: 4.06CsJ24:4.09J3: 2.76CsJ34:3.69(a) Continuous adjoint(#CV)1/2Error50 100 150 20010-810-710-610-510-410-3J2: 1.61CnJ23:2.06CsJ23:3.31CsJ24:3.76J3: 2.76CsJ34:3.67(b) Discrete adjointFigure 5.2: Convergence history for the advection problemof using the second-order functional, the third-order functional may be corrected basedon fourth-order flux integration, CsJ43 . Similarly, the convergence is quartic for thecorrected solution although the original functional is cubic.Since the same range is used for errors for both continuous and discrete adjoints, the magnitudes of the errors may be compared easily and it is obvious that for almost all cases, the magnitude of the error in the corrected functional based on the continuous adjoint is less than the corresponding value for the discrete adjoint. This is expected behavior as a result of solving the continuous adjoint PDE. Furthermore, the convergence rates are faster for all cases using the continuous adjoint. In conclusion, for advection, significant improvement is obtained by correcting the functional by the truncation error based on the interpolated solution, whether the continuous or discrete adjoint is used, although the continuous adjoint is more successful.5.5 Poisson EquationThe primal problem is defined on a (1× 1) square domain as∂2U∂x2+ ∂2U∂y2= −pi34 sin (pix) sin (piy) , U = sin (pix) on y = 1⇒ Uexact = pi8 sin (pix) sin (piy) +1sinh (pi) sin (pix) sinh (piy) (5.38)and the exact solution is shown in Figure 5.3.Setting the adjoint source term as g = pi52 x (1− x) y (1− y), the adjoint boundarycondition is obtained as h = x (1− x) on y = 0 and zero elsewhere by Eq. 5.9. The965.5. Poisson Equation  0 0.25 0.5 0.75 100.250.50.7510 0.2 0.4 0.6 0.8 1Figure 5.3: Exact solution of the Poisson problem  0 0.25 0.5 0.75 100.250.50.751-0.45 -0.25 -0.05 0.15(a) Continuous adjoint  0 0.25 0.5 0.75 100.250.50.751-0.45 -0.25 -0.05 0.15(b) Discrete adjointFigure 5.4: Adjoint solutions for Poisson problem975.5. Poisson Equation(#CV)1/2L 2(|DisSol-ContSol|)50 100 150 2000.0010.002Figure 5.5: The L2-norm of the difference between the discrete and continuous adjointsolutions for Poissonoutput functional is defined as:J = (U, g)D + (CU, h)∂DD = (U, g)D + (nˆ · ∇U, h)∂DD=ˆ 10ˆ 10Uexact × pi52 x (1− x) y (1− y) dxdy +ˆ 10−pi sin (pix)(pi8 +1sinh (pi))x (1− x) dx= 1.832245378− 0.19424836 = 1.637997017The continuous and discrete adjoint solutions are depicted in Figure 5.4 and as indicatedthe boundary condition is non-zero at the bottom wall and zero elsewhere. For thePoisson problem, the difference between the continuous and discrete adjoint solutiondistributions is less than the advection problem, at least qualitatively. Figure 5.5 showsthe L2-norm of the difference between the continuous and discrete adjoint solution forboth second order and third order solutions. By decreasing the mesh size, the differencebetween the discrete and continuous adjoint solutions become smaller.We correct the functional using these adjoint solutions; the results are shown inFigure 5.6. Similar to the advection problem, comparing the functional based on thesecond-order solution with the corrected functional based on the discrete solution, CnJ32 ,shows poor performance of the corrected functional for both continuous and discrete ad-985.5. Poisson Equation(#CV)1/2Error50 100 150 20010-710-610-510-410-3J2: 1.55CnJ23:1.20CsJ23: 2.73CsJ24:3.85J3: 1.95J4: 3.87(a) Continuous adjoint(#CV)1/2Error50 100 150 20010-710-610-510-410-3J2: 1.55CnJ23:1.78CsJ23:2.78CsJ24:3.17J3: 1.95J4: 3.87(b) Discrete adjointFigure 5.6: Convergence history for Poissonjoint solutions. On the other hand, CsJ32 has smaller error compared to the second-orderfunctional and it converges cubically. A significant improvement — fourth-order con-vergence — is obtained for CsJ42 based on continuous adjoint for which the magnitudeof the error is even smaller than the fourth-order solution. Using the discrete adjoint,cubic convergence is obtained with comparable error magnitude to the fourth-orderfunctional. For the Poisson problem, we are comparing the error to the fourth-orderfunctional instead of the third-order one since the convergence of the third-order func-tional is only quadratic. This is the behavior of diffusive fluxes for third-order finitevolume unstructured schemes and as the third-order functional is not third-order, asshown in Figure 5.6, correcting it with fourth-order flux integration is not helpful either.Summarizing, for Poisson, significant improvement is obtained by correcting thefunctional by the truncation error based on the interpolated solution, when either thecontinuous or discrete adjoint is used, particularly for CsJ42 , although the improvementis more significant when the continuous adjoint is used.995.6. Euler Equations5.6 Euler EquationsIn this part, two different test cases are considered; supersonic flow with an exactsolution and subsonic flow with the solution on a very fine mesh as the comparisonsolution.5.6.1 Supersonic FlowThe supersonic vortex is an Euler problem with an exact solution for which the exactfunctional value can be calculated. The exact solution is shown in Chapter 2, Figure2.11. For the x-momentum component, the convergence results are shown in Figure5.7 comparing the discretization error for second order accurate solution and the exacttruncation error. As mentioned earlier, the magnitude of the truncation error for theunstructured mesh is larger than the discretization error and the convergence rate isslower. The estimation of the truncation error using the discrete p-TE method is alsocompared to the continuous p-truncation error and the truncation error magnitude issmaller for the interpolated estimate.(#CV)1/2Error40 60 80 100 120 14010-410-310-2Discretization error Exact truncation errorp-TESmoothed TE2.001.00Figure 5.7: Convergence results for the truncation error estimates, supersonic vortexConsidering drag or lift on the inner wall of the supersonic vortex and using Eq.5.25 for calculating the functional based on the exact pressure distribution, the exact1005.6. Euler Equations  0 1 2 30123-8 -6.5 -5 -3.5 -2 -0.5(a) Continuous adjoint for drag functional  0 1 2 30123-8 -6.5 -5 -3.5 -2 -0.5(b) Discrete adjoint for drag functional 0 1 2 30123-8 -6.5 -5 -3.5 -2 -0.5(c) Continuous adjoint for lift functional  0 1 2 30123-8 -6.5 -5 -3.5 -2 -0.5(d) Discrete adjoint for lift functionalFigure 5.8: x−momentum adjoint solutions for supersonic vortex1015.6. Euler Equationsvalue for the functional is obtained as:J =ˆinner wallpnˆ · ~ψds= 1γpi2ˆ0Rinˆ · ~ψdθ = 1.42857 (5.39)It should be noted that the same magnitude is obtained for both drag and lift.The continuous and discrete adjoint solutions based on drag and lift functionalson the lower wall are depicted in Figure 5.8. Similar to the advection test case, thecontinuous adjoint solution distribution is smoother than the discrete adjoint. Whileboth functionals show high sensitivities near the wall, the drag functional adjoint showshigh sensitivities along a longer extent than the lift functional due to the need toaccurately convect information to the outflow region, where a large amount of the dragforce is produced.Functional correction based on these adjoint solutions is applied and the results areshown in Figure 5.9. If the discrete p-truncation error is used for functional correction,CnJ32 , the magnitude of the error in the functional is more than the second order func-tional and the convergence is approximately quadratic for both drag and lift functionalsusing both continuous and discrete adjoint solutions. The corrected functional based onthe interpolated solution, CsJ32 , has smaller error compared to the second-order func-tional and converges cubically. Fourth-order convergence is obtained for CsJ42 basedon the continuous adjoint for both functionals; however, using the discrete adjoint forCsJ42 , lift and drag have different behaviors. Although the convergence for drag is evenbetter than quartic, the convergence rate for lift is only 2.54. Generally, using the con-tinuous adjoint for functional corrections provides us with more consistent results, asit is less sensitive to the errors arising from discretization.If the third-order solution is used for calculating and correcting the functional,the same convergence behavior is obtained using the continuous and discrete adjointsolutions; investigation of convergence behavior for CsJ43 using the continuous adjointshows the significant improvement of correction by using the interpolated solution. Theconvergence rate is fourth-order and the magnitude of the error is less than the third-order solution. However, using the discrete adjoint for correction is not helpful forCsJ43 , either in terms of convergence rate, or in terms of the error magnitude.Consequently, as a general conclusion, correcting the functional based on the dis-1025.6. Euler Equations(#CV)1/2Error40 60 80 100 120 14010-610-510-410-3J2: 2.31CnJ23:2.09CsJ23: 3.19CsJ24:3.99J3: 2.79CsJ34:3.52(a) Continuous adjoint for drag functional(#CV)1/2Error40 60 80 100 120 14010-610-510-410-3J2: 2.31CnJ23:1.46CsJ23:2.93CsJ24:4.79J3: 2.79CsJ34:2.35(b) Discrete adjoint for drag functional(#CV)1/2Error40 60 80 100 120 14010-610-510-410-3J2: 2.18CnJ23:1.93CsJ23: 2.95CsJ24:4.10J3: 2.85CsJ34:4.20(c) Continuous adjoint for lift functional(#CV)1/2Error40 60 80 100 120 14010-610-510-410-3J2: 2.18CnJ23:1.79CsJ23:3.32CsJ24:2.54J3: 2.85CsJ34:1.95(d) Discrete adjoint for lift functionalFigure 5.9: Convergence history for the functional values for the supersonic vortex1035.6. Euler Equationscrete solution is not helpful at all and interpolating the solution and computing thecorrection term based on the interpolated solution is capable of improving the func-tional significantly. More accurate results with the expected convergence behavior isobtained if the continuous adjoint solution is used for correction.5.6.2 Subsonic FlowThe capability of our interpolating scheme in correcting the functional for an Eulerproblem with an exact solution was shown for the supersonic vortex. In this section,output functionals of drag and lift are calculated and corrected for the subsonic inviscidflow around NACA 0012 with Ma∞ = 0.5 and angle of attack α = 2◦. Since thisproblem does not have an exact solution, the solution on a very fine mesh is consideredas the exact solution. The capability of our solver in approximating the drag and lift  0 0.25 0.5 0.75 1-0.2500.250.88 0.98 1.02(a) Density  0 0.25 0.5 0.75 1-0.2500.250 0.2 0.4 0.6(b) x-velocity  0 0.25 0.5 0.75 1-0.2500.25-0.2 0 0.1 0.35(c) y-velocity  0 0.25 0.5 0.75 1-0.2500.250.6 0.705 0.8(d) pressureFigure 5.10: Solution distribution for Euler, NACA-0012, Ma∞ = 0.5, α = 2◦for inviscid flow around NACA 0012 with Ma∞ = 0.5 and α = 2◦ was shown in theFirst International Higher-Order Workshop [1]. The solution is depicted in Figure 5.101045.6. Euler Equationsand the farfield boundary is a circle of radius 500 chords centered at the leading edgeof the the airfoil and consequently, the errors arising from boundary placement can beneglected. Theoretically, the exact drag value for this case should be zero, howeverfarfield effects keep it from being zero numerically. The second-order solution on amesh with characteristic size nine times smaller in area than the finest mesh for whichcorrection is applied is considered as the exact solution to the problem. 0 0.25 0.5 0.75 10.2500.25-1.05 -0.6 -0.15 0.3(a) Continuous adjoint for drag functional 0 0.25 0.5 0.75 10.2500.25-1.05 -0.6 -0.15 0.3(b) Discrete adjoint for drag functionalFigure 5.11: x-velocity adjoint solutions for Euler, NACA-0012, Ma∞ = 0.5, α = 2◦The adjoint solution distributions based on drag functional are shown in Figure 5.11for both continuous and discrete adjoints and not surprisingly, the continuous adjointhas a smoother distribution.Functional correction based on these adjoint solutions is applied and the results aresummarized in Figure 5.12. Again, using the discrete p-truncation error for correctingthe functional is not helpful. For the drag functional, the error of the corrected func-tional based on discrete p-truncation error is more than the second order non-correctedsolution. For the lift functional using the discrete adjoint solution, the behavior is thesame; however, using the continuous adjoint solution, the magnitude of the error is lessbut the convergence rate is only 0.86.Similar to the other cases tested so far, comparing the functional based on thesecond-order solution with the corrected functional based on the interpolated solution,CsJ32 and CsJ42 , shows that the latter has smaller error and faster convergence rate.For the drag functional, although the non-corrected solution is first-order, the correctedsolution based on the continuous p-truncation error converges much faster for bothcontinuous and discrete adjoint solutions. For lift as the output functional, third-orderreconstruction of the solution seems to provide us with significant cancellation when1055.6. Euler Equations(#CV)1/2Error50 100 15010-610-510-410-3J2: 1.03CnJ23:1.39CsJ23: 2.62CsJ24:2.83J3: 1.41(a) Continuous adjoint for drag functional(#CV)1/2Error40 60 80 100 120 140 16010-610-510-410-3J2: 1.03CnJ23:1.31CsJ23:2.64CsJ24:3.09J3: 1.41(b) Discrete adjoint for drag functional(#CV)1/2Error50 100 15010-510-410-310-2J2: 1.97CnJ23:0.86CsJ23: 3.63CsJ24:3.61J3: 2.21(c) Continuous adjoint for lift functional(#CV)1/2Error40 60 80 100 120 140 16010-510-410-310-2J2: 1.97CnJ23:1.13CsJ23:5.09CsJ24:4.22J3: 2.21(d) Discrete adjoint for lift functionalFigure 5.12: Convergence history for the functional values for Euler, NACA-0012,Ma =0.5, α = 2◦1065.7. Navier-Stokes Equationscombined with either the continuous or discrete adjoints, but similar to the previoustest cases, more consistent results are obtained for CsJ42 when the continuous adjointsolution is used. The magnitude of the error is much smaller than the third-ordersolution for both drag and lift.5.7 Navier-Stokes EquationsIn this section, two different test cases are considered; supersonic flow with a manu-factured solution and subsonic flow with the solution on a very fine mesh as the exactsolution.5.7.1 Supersonic FlowSince there are not any commonly-used Navier-Stokes problems with exact solutionsin the literature, we use a manufactured solution [62] to verify the performance of ourinterpolating scheme for correcting the functional. We use a manufactured solution forboth primal [71] and adjoint problems. The general form of the manufactured primalsolution isU (x, y) = a0 + ax sin (bxpix+ cxpi) + ay sin (bypiy + cypi) + axy sin (bxypiy + cxypi) (5.40)and the general form of the manufactured adjoint solution isZ (x, y) = a0 [sin (pi (1− x)) sin (pi (1− y)) sin (bxpix+ cxpi)sin (bypiy + cypi) sin (bxypiy + cxypi) + (1− x) (1− y)] (5.41)where the coefficients for four components are as illustrated in Table 5.2 where c is thespeed of sound and SI units are used. The inlet Mach number is set as Mai = 2.5 andthe Reynolds number is defined asRe = ρiuiLµi= 800where the characteristic length is L = 1.0, ρi = 1.0 and µi = 1.0.The exact primal solution is shown in Figure 5.13. Since we are using a manufac-tured solution for both primal and adjoint problems, the functional is directly obtainedby the adjoint definition, Eq. 5.9. The source term and boundary conditions of the1075.7. Navier-Stokes Equationsρ u v Pa0 1.0 800/c 800/c 105/c2ax 0.15 50/c −75/c −2× 104/c2bx 2.0 0.66 1.66 0.5cx 0.33 0.5 −0.5 0.5ay −0.1 −30/c 40/c 5× 104/c2by 1.0 1.5 3.0 1.0cy −0.2 −0.125 0.0 −0.5axy −0.05 −60/c 60/c −1× 104/c2bxy 1.0 1.5 1.5 0.75cxy 0.25 0.125 0.125 −0.25Table 5.2: Coefficients for manufactured primal and adjoint solution used in Eq. 5.40and 5.41.manufactured primal and adjoint solutions are calculated easily and the correspondingweight boundary operators are found by integration by parts, similar to the Dirichletand Neumann boundary operators obtained for the Poisson problem.  0 0.25 0.5 0.75 100.250.50.7510.72 0.86 1 1.14(a) Density  0 0.25 0.5 0.75 100.250.50.7511.86 2 2.14 2.28(b) x-velocity  0 0.25 0.5 0.75 100.250.50.7511.9 2.08 2.26 2.44(c) y-velocity  0 0.25 0.5 0.75 100.250.50.7510.26 0.46 0.66 0.86(d) PressureFigure 5.13: Exact solution of Navier-Stokes problem with manufactured solutionThe y−momentum adjoint solution distribution is depicted in Figure 5.14 for bothcontinuous and discrete adjoints. Functional correction based on these adjoint solutionsis applied and the results are shown in Figure 5.15. Similar to the Euler problem, by in-terpolating the solution and computing the truncation error based on the interpolatedsolution, CsJ32 , the magnitude of the error compared to the second-order functionalbecomes smaller and it converges cubically using the continuous adjoint for correction.Correcting the functional by the same adjoint solution, fourth-order convergence is ob-tained for CsJ42 . However, using the discrete adjoint for both CsJ32 and CsJ42 gives a1085.7. Navier-Stokes Equationscorrected functional with smaller error but only quadratic convergence. Alternatively,functional correction may be based on the third-order solution; investigation of conver-gence behavior for CsJ43 shows improvement if correction is applied by the interpolatedsolution and the continuous adjoint. The convergence rate is almost fourth-order andthe error is smaller than the error for the third-order solution. However, by using thediscrete adjoint for correction, the magnitude of the error is less than the uncorrectedfunctional and convergence is cubic. Similar to the conclusion for the previous testcase, using continuous adjoint for correction is able to improve the functional more andprovide us a faster convergence as well.  0 0.25 0.5 0.75 100.250.50.751-1.5 -0.8 -0.1 0.6 1.3 2(a) Continuous adjoint  0 0.25 0.5 0.75 100.250.50.751-1.5 -0.8 -0.1 0.6 1.3 2(b) Discrete adjointFigure 5.14: Adjoint solutions for Navier-Stokes problem with manufactured solution,y−momentumAs the manufactured solution is set for the adjoint problem, the magnitude of theerror of the adjoint solution can be calculated. Figure 5.16a depicts the error for bothdiscrete and continuous solutions. Not surprisingly, the magnitude of the error in calcu-lating the continuous adjoint is less than the discrete adjoint and the difference becomessmaller by decreasing the mesh size; both converge quadratically. Adjoint consistency isverified for this test case, as it is a system of equations with both convective and diffusiveterms. Adjoint consistency for the discrete adjoint solution for this test case is depictedin Figure 5.16b which shows that almost the same functional value is obtained either1095.7. Navier-Stokes Equations(#CV)1/2Error50 100 150 20010-510-410-310-2J2: 2.06CnJ23:2.05CsJ23: 2.97CsJ24:3.56J3: 2.49CsJ34:3.46(a) Continuous adjoint(#CV)1/2Error50 100 150 20010-510-410-310-2J2: 2.06CnJ23:2.06CsJ23:1.94CsJ24:2.05J3: 2.49CsJ34:2.63(b) Discrete adjointFigure 5.15: Convergence history for the functional values for Navier-Stokes problemwith manufactured solution(#CV)1/2Error50 100 150 20010-310-210-1Continuous adjointDiscrete adjoint1.95(a) Continuous and discrete adjoint solutions(#CV)1/2Error50 100 150 20010-310-210-1J primalJadjoint 2.06(b) Adjoint ConsistencyFigure 5.16: Adjoint consistency for Navier-Stokes1105.7. Navier-Stokes Equationsbased on the primal solution or the adjoint solution and the difference decreases withmesh refinement, implying that the discretization is asymptotically adjoint consistent.5.7.2 Subsonic FlowIn this section, drag is calculated and corrected for the subsonic viscous flow aroundNACA 0012 withMa∞ = 0.5, angle of attack α = 1◦ and Reynolds number Re = 5000.The farfield boundary is a circle of radius 100 chords centered at the leading edge ofthe the airfoil. Since this problem does not have an exact solution, the drag calculatedusing the second-order solution on a mesh with characteristic size thirteen times smallerin area than the finest mesh is considered as the exact solution. 0 0.25 0.5 0.75 1 1.250.2500.25.85 0.9 0.95 1 1.05 1.1(a) Density 0 0.25 0.5 0.75 1 1.250.2500.25.02 0.12 0.26 0.4 0.54(b) x-velocity 0 0.25 0.5 0.75 1 1.250.2500.25-0.22 -0.1 0.02 0.14 0.26(c) y-velocity 0 0.25 0.5 0.75 1 1.250.2500.25.63 0.67 0.71 0.75 0.79 0.83(d) pressureFigure 5.17: Solution distribution for Navier-Stokes, NACA-0012, Ma∞ = 0.5, α = 1◦,Re = 5000Four components of the solution are depicted in Figure 5.17. The adjoint solutiondistributions based on the drag functional are shown in Figure 5.18 for both continuousand discrete adjoints.1115.7. Navier-Stokes Equations.5 -0.25 0 0.25 0.5 0.75 1 1.25-0.25 0.15 0.55 0.95(a) Continuous adjoint -0.5 -0.25 0 0.25 0.5 0.75 1 1.25.550-0.25 0.15 0.55 0.95(b) Discrete adjointFigure 5.18: x-momentum component of the adjoint solutions for drag functional,Navier-Stokes NACA-0012, Ma∞ = 0.5, α = 1◦, Re = 5000(#CV)1/2Error60 80 100 120 140 160 18010-510-410-3J2: 2.01CnJ23:2.16CsJ23: 2.93CsJ24:3.55(a) Continuous adjoint(#CV)1/2Error60 80 100 120 140 160 18010-510-410-3J2: 2.01CnJ23:2.02CsJ23:2.91CsJ24:3.47(b) Discrete adjointFigure 5.19: Convergence history for Navier-Stokes, NACA 0012 for drag functional,Ma∞ = 0.5, α = 1◦, Re = 50001125.8. Remarks on Computational Costs and Discussion on ResultsFunctional correction based on these adjoint solutions is applied and the results aresummarized in Figure 5.19. Correcting the drag based on the discrete p-truncationerror, CnJ32 , is not helpful compared to the original second order solution. Correctingthe functional by the continuous p-truncation error is able to improve the functional.In particular, cubic and approximately quartic convergence is obtained by correctingthe functional using the continuous p-truncation error calculated by third and fourthorder flux integration, respectively. Similar to other test cases, using the continuousadjoint solution provides more consistent results.5.8 Remarks on Computational Costs andDiscussion on ResultsThe point that needs to be considered about computational cost is the time comparisonbetween continuous and discrete adjoint solutions. For the discrete adjoint, the com-putational cost includes finding the transpose of the Jacobian and the derivative of thefunctional with respect to the solution and then solving the system of equations oncefor which the computational cost is of the order of one linear iteration of the solution.On the other hand, for the continuous adjoint, the computational time is at the sameorder of computational time required for the primal problem. Hence, the total time forcorrecting the second-order functional using our method with the continuous solutionadjoint is twice as large as solving the primal problem, while the computational timefor correction using the discrete adjoint is the equal to the time for solving the primalproblem plus one non-linear iteration.The significant improvement in functional correction is obtained just by interpo-lating the primal solution and finding the truncation error based on this interpolatedsolution and then multiplying the truncation error by the adjoint solution of the sameorder as the primal solution. It is not necessary to interpolate the adjoint solution toobtain significant improvement in convergence rates.A summary of the results for different test cases described is shown in this section.For each case, the error in calculating the functional based on the second-order solutionis considered as the reference value and the ratio of the error in the corrected functionalto the non-corrected second-order functional is compared for different test cases andshown in Figure 5.20. The nomenclature is the same as described earlier and thecomparison is depicted for correcting based on the discrete and continuous p-truncation1135.8. Remarks on Computational Costs and Discussion on Resultserror for both continuous and discrete adjoint solutions for all test cases described inthis chapter. Correcting based on the discrete p-truncation error is not helpful and inmany cases, the ratio of the error is even more than one. The same behavior exists forboth discrete and continuous adjoint solution.Using the continuous p-truncation error, on the other hand, the error of the cor-rected functional is smaller than the original non-corrected one and using the continu-ous adjoint solution, it becomes smaller with mesh refinement. As mentioned earlier,continuous adjoint solution provides more consistent results. Moreover, the ratio ofthe corrected functional using the fourth-order flux integral with respect to the non-corrected second-order functional is less than the corresponding ratio for the third-orderflux integration. Note that the same scale is used for the plots using the continuousp-truncation error.(#CV)1/2Error ratio50 100 150 2002468 AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(a) CnJ32 using the continuous adjoint solution(#CV)1/2Error ratio50 100 150 2002468AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(b) CnJ32 using the discrete adjoint solution1145.8. Remarks on Computational Costs and Discussion on Results(#CV)1/2Error ratio50 100 150 20010-210-1100101AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(c) CsJ32 using the continuous adjoint solution(#CV)1/2Error ratio50 100 150 20010-210-1100101AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(d) CsJ32 using the discrete adjoint solution(#CV)1/2Error ratio50 100 150 20010-210-1100101AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(e) CsJ42 using the continuous adjoint solution(#CV)1/2Error ratio50 100 150 20010-210-1100101AdvectionPoissonEuler, supersonic, dragEuler, supersonic, liftEuler, subsonic, dragEuler, subsonic, liftNS, supersonicNS, subsonic, drag(f) CsJ42 using the discrete adjoint solutionFigure 5.20: The error ratio for different correction terms for all test cases based onsecond-order functional115Chapter 6Mesh AdaptationThe equidistribution of error, or of weighted error, is the principle of all mesh adaptationstrategies [42]. The objective of equidistribution is defined as finding a mesh such thatthe integral of the weight function defined on a domain takes a given constant valueover each element or equivalently, such that the weight function is equidistributed overthe chosen mesh. For mesh adaptation, we need to set a length scale for each vertexand the length scale is calculated based on an adaptation indicator.Consider residual-based adaptation in which the truncation error, τ is chosen as theadaptation indicator. The average truncation error, τh is defined as:τh =N∑i=1AiτiN∑i=1Ai(6.1)where τi is the truncation error on each cell i, Ai is the area of the cell and the N isthe total number of cells. The target area for each cell is set as:A∗i =τh2τiAi (6.2)which reduces area by a factor of 2, on average. The length scale for regenerating theunstructured mesh using a Delaunay mesh algorithm is defined as:l∗i = Cl√A∗i (6.3)where Cl =√3. For isotropic meshes, the length scale assigned to each vertex canbe calculated simply by averaging the length scales associated with all cells sharingthat vertex. For generating the initial mesh and the adapted meshes, the GRUMMPmeshing library is used [63]. In Eq. 6.1 and 6.2, the truncation error may be replaced bythe truncation error weighted by the adjoint solution or any other adaptation indicator.As mentioned in Chapter 1, different adaptation indicators may be exploited. Three1166.1. Residual-based Mesh Adaptationdifferent adaptation indicators, residual-based, adjoint-based and adaptation based onhigher-order error in the correction term are described in this chapter.As test cases, we will start with a Poisson problem with exact solution, so the exacterror in calculating the functional of interest on the adapted mesh can be calculated.The flow test cases being investigated here are the subsonic inviscid flow around aNACA 0012 airfoil and a multi-element airfoil, and subsonic viscous flow and transonicinviscid flow around a NACA 0012 airfoil. Similar to the real flow test cases describedin the previous chapter, we will use the solution on a very fine mesh for test cases withunknown exact solution.6.1 Residual-based Mesh AdaptationA typical residual-based mesh adaptation uses an estimate of the truncation error asthe adaptation indicator. The higher-order flux integral based on the lower-order so-lution or the discrete p-TE estimate is a common indicator for residual-based meshadaptation. However, it may be replaced by the continuous p-TE estimate we havedeveloped using the C1 interpolation of the solution. We will compare the effectivenessof the original discrete p-TE estimate and the the continuous p-TE estimate as theadaptation indicator in this chapter.6.2 Adjoint-based Mesh Adaptation by CorrectionTermThe truncation error weighted by the adjoint solution, or adjoint-based adaptation, isbased on a method developed by Pierce and Giles for estimating error in the functional[73]. For a given smoothly interpolated primal, Uh, and adjoint, Zh, solutions, theoutput functional is obtained as:J = (g, U)D + (h,CU)∂D= (L∗Zh, Uh)D + (L∗Zh, U − Uh)D + (g − L∗Zh, U − Uh)D + (g − L∗Zh, Uh)D +(B∗Zh, CUh)∂D + (B∗Zh, C (U − Uh))∂D +(h−B∗Zh, C (U − Uh))∂D + (h−B∗Zh, CUh)∂D (6.4)1176.2. Adjoint-based Mesh Adaptation by Correction TermBy using integration by parts, we can re-write the above equation asJ = (L∗Zh, Uh)D + (B∗Zh, CUh)∂D +(Zh, L (U − Uh))D + (C∗Zh, B (U − Uh))∂D +(Z − Zh, L (U − Uh))D + (C∗ (Z − Zh) , B (U − Uh))∂D (6.5)The two terms in the first line are the influence of bulk and boundary integrals in thediscrete functional, the terms in the second line represent computable adjoint errorestimates and the last two terms in the third line are the higher order remaining errors.Neglecting the last two higher-order terms, the estimated error in calculating thefunctional is:δJ = (Zh, L (U − Uh))D + (C∗Zh, B (U − Uh))∂D= (Zh, f − LUh)D + (C∗Zh, e−BUh)∂D= (Zh, τ)D + (C∗Zh, e−BUh)∂D (6.6)Therefore, the dot product of the adjoint solution and the truncation error of theprimal problem is used as the adaptation indicator for adjoint-based adaptation. Forthis purpose, there are multiple options: using the original p-TE estimate by higherorder flux integration based on the lower order solution or the continuous p-TE estimateas described in previous chapter. Either of these estimates of the truncation error maybe weighted by the discrete or continuous adjoint solution.As described in Chapter 5, the correction term of Eq. 6.6 is the summation over allcontrol volumes of the truncation error calculated by higher-order flux integral based onlower-order solution multiplied by the adjoint solution of the same order as the primalproblemδJ = (Zh, τ)D =∑CV(˛~F p+1p · nˆds)Z¯p (6.7)in contrast to the finite-element method where the higher-order adjoint solution isrequired to find the correction term.1186.3. Adjoint-based Mesh Adaptation by Error in the Correction Term6.3 Adjoint-based Mesh Adaptation by Error inthe Correction TermAn adaptive strategy may be based on improving the accuracy of the computable errorestimates instead of improving the accuracy of the functional directly. The latter couldlead in some cases to refining or coarsening in regions where the adjoint solution is notsufficiently resolved and as a consequence, an adaptation indicator which is based onboth the primal and adjoint residual errors may result in improvement in the qualityof the error estimates. Furthermore, it leads to improvement in the base value of thefunctional even before correction.In Eq. 6.6, the higher order error terms have been ignored, but if all terms areconsidered, we will get:δJ = (Zh, f − LUh)D + (C∗Zh, e−BUh)∂D +(Z − Zh, L (U − Uh))D + (C∗ (Z − Zh) , e−B (Uh))∂D= (Zh, τ)D + (C∗Zh, e−BUh)∂D +(Z − Zh, L (U − Uh))D + (C∗ (Z − Zh) , e−B (Uh))∂D (6.8)The first term in the last line is the truncation error of the primal problem weightedby the discretization error of the adjoint solution which is used here as the adaptationindicator. Calculating the discretization error of the adjoint problem is not easy forgeneral problems where the exact adjoint solution is not known; however, this term canbe recast as a function of the Jacobian matrix [94]:(Z − Zh, L (U − Uh))D =L (Z − Zh) ,(∂R∂Uh)−1L (U − Uh)D(6.9)where the first term is the truncation error of the adjoint solution. This is evaluated byhigher-order flux integration based on the lower-order solution and is already available.Evaluating the second term is as easy as solving a linear system of:X =(∂R∂Uh)−1L (U − Uh)⇐⇒(∂R∂Uh)X = L (U − Uh) (6.10)Accordingly, this term can be used as the adaptation indicator capable of reducing the1196.4. Poisson Equationerror in corrected functional.In the following sections, the effectiveness of these adaptation indicators are studiedfor several test cases.6.4 Poisson EquationThe primal problem is defined on a (1× 1) square domain with zero boundary conditionssuch that the solution has a peak value and is almost zero elsewhere. This has beenchosen so that the adaptation effect is noticeable.  0 0.25 0.5 0.75 100.250.50.7510 1 2 3 4 5 6(a) Solution contour (b) 3D viewFigure 6.1: Exact solution of the Poisson problemThe exact primal solution is:uexact = 100xy (1− x) (1− y) e−81(x−0.4)2−25(y−0.6)2 (6.11)The exact solution is shown as a 3D surface in Figure 6.1 to emphasis the peak point.Setting the adjoint source term as g = pi52 x (1− x) y (1− y) with zero boundary condi-1206.4. Poisson Equationtion, the exact output functional is obtained as:J = (u, g)D=ˆ 10ˆ 10uexact × pi52 x (1− x) y (1− y) dxdy= 2.936927271We have shown in Chapter 5 that using the continuous p-truncation error weightedby the continuous adjoint solution as the correction term provides the best correc-tion in the output functional. Therefore, we are comparing the results with the bestcorrected functional on each mesh, using the continuous adjoint solution and the con-tinuous p-truncation error. As the exact functional is known, calculating the error inthe functional for each case is easy.Before showing the results, the nomenclature we are using should be described; UCJis the corrected functional on the uniformly refined mesh where C’s superscript repre-sents whether the correction is based on truncation error using the discrete solution, Cn,or is based on the truncation error using the interpolated solution, Cs. C’s subscriptrepresents whether continuous adjoint solution, Cc, or discrete adjoint solution, Cd, isused for obtaining the correction term. Similar to the Chapter 5, J ’s subscript showsthe primal solution order of accuracy and the superscript shows the order of reconstruc-tion and flux integration used as an estimation of the truncation error. The solid linesshown by A () are the adapted meshes and the adaptation indicator is defined insidethe parenthesis. (τn) is residual-based mesh adaptation using the discrete p-truncationerror, (τ s) is residual-based using the continuous p-truncation error based on interpo-lated solution, (τ s, D) is the adjoint-based adaptation using continuous p-truncationerror weighted by the discrete adjoint solution, (τ s, C) is the adjoint-based adaptationusing the continuous p-truncation error weighted by continuous adjoint solution, and(τ sp , εa)is the primal truncation error weighted by adjoint discretization error as theadaptation indicator representing adaptation based on higher-order error in correctionterm.The convergence results for the functional on the adapted meshes are shown inFigure 6.2. The dashed red line is the corrected functional based on the continuousadjoint and the continuous p-truncation error on uniformly refined meshes and the solidlines are the adapted meshes. The gradient symbol denotes using the truncation erroras the adaptation indicator, the square symbol represents adjoint-based adaptation1216.4. Poisson Equation(#CV)1/2Error50 100 150 200 25010-510-410-3Figure 6.2: Convergence history for Poisson on the adapted meshesindicator using the correction term based on the continuous p-truncation error, Eq. 6.7discussed in section 6.2, and the triangle symbol denotes the adjoint-based adaptationindicator using higher-order terms, Eq. 6.9, discussed in section 6.3. It should benoted that the uniformly refined meshes are set such that the number of cells areapproximately comparable to number of cells of the adapted meshes.The magenta line is the adapted mesh based on discrete p-truncation error andas shown, the magnitude of the error is more than the corresponding error on theuniformly refined meshes and the convergence rate is slower. Adaptation based on con-tinuous p-truncation error, however, gives results comparable to the uniformly refinedmeshes. Using the correction term as the adaptation indicator based on continuous p-truncation error and adjoint solution provides functionals with smaller error and fasterconvergence. The adjoint solution type does not matter: both the discrete adjoint (theblue line) and the continuous adjoint (the red line) have approximately the same be-havior. Furthermore, if the higher-order terms representing the error in calculating thecorrection term are used for mesh adaptation (the green line) the convergence rate im-proves significantly and the magnitude of the error is much smaller compared to otheradapted meshes. It should be noted that for this case, as the exact primal solution isknown, the discretization error of the primal solution is easily computable. Accordingly,instead of using Eq. 6.9, an alternative dual form of this equation is used which is afunction of the discretization error of the primal problem and the truncation error of1226.4. Poisson Equation(a) Uniform, 18016 cells (b) (τn), 18225 cells (c) (τs), 18059 cells(d) (τs, D), 18137 cells (e) (τs, C), 18624 cells (f) (τsa , εp), 17682 cellsFigure 6.3: Adapted meshes by different adaptation indicators for Poissonthe adjoint problem:(Z − Zh, L (U − Uh))D = (L (Z − Zh) , U − Uh)D (6.12)which is obtained by integration by parts.The second finest mesh for each refinement sequence is shown in Figure 6.3. Asdepicted in Figure 6.3a, there is unnecessary refinement on the uniformly refined meshat regions not having remarkable contribution in the functional. However, the meshresolution near the peak value in the primal solution is significantly higher than otherparts for the adapted meshes. Using the discrete p-truncation error as the adaptationindicator, Figure 6.3b, results in irregular refinement far from the peak point; however,using the continuous p-truncation error provides a more reasonable mesh. The adaptedmesh based on the continuous p-truncation error weighted by the continuous adjoint1236.5. Subsonic Inviscid Flow on NACA 0012solution has high resolution at the peak point.(#CV)1/2Error50 100 150 200 25010-410-3Figure 6.4: Discretization error of the primal problem on the adapted meshes for PoissonAnother point that needs to be considered is that the main goal of adaptation in thiscase is obtaining a more accurate functional value and the discretization error of theprimal problem, for instance, does not behave in the same way as shown in Figure 6.2.The convergence of the discretization error of the primal problem with mesh refinementis shown in Figure 6.4. Although the discretization error for all adapted meshes aresmaller than the second order solution on the uniformly refined mesh, the dash-dottedline, the convergence behaviors are not exactly the same as Figure 6.2. The discretiza-tion error on the adapted mesh based on the discretization error of the primal problemand the truncation error of the adjoint problem, the green line, which has the smallesterror when output functional is calculated, is not the best one when discretization er-ror is considered. This is not surprising since the goal of adaptation is improving thefunctional value and it does not necessarily guarantee that the discretization error orthe error in calculating any other output functional is less on the same adapted mesh.6.5 Subsonic Inviscid Flow on NACA 0012Output functionals of drag and lift are considered for the subsonic inviscid flow arounda NACA 0012 with Ma∞ = 0.5 and angle of attack α = 2◦, the same test case as1246.5. Subsonic Inviscid Flow on NACA 0012discussed in Chapter 5. The exact drag and lift is considered as the second-ordersolution on a mesh with characteristic size thirteen times smaller in area than the finestuniformly refined mesh. The farfield boundary is a circle of radius 500 chords centeredat the leading edge of the the airfoil and consequently, the errors arising from boundaryplacement is small. Theoretically, the exact drag value for this case should be zero;however, farfield effects keep the computed comparison value from being zero.(#CV)1/2Error50 100 15010-710-610-510-4(a) Drag functional(#CV)1/2Error50 100 15010-510-410-3(b) Lift functionalFigure 6.5: Convergence history for subsonic inviscid flow around NACA 0012 on theadapted meshes, Ma∞ = 0.5, α = 2◦The convergence results on the adapted meshes are shown in Figure 6.5 for bothdrag and lift functionals. The brown dash-dotted line is the non-corrected second-order functional on the uniformly refined mesh and the dashed red line is the correctedfunctional on the same mesh using the continuous p-truncation error estimate and thecontinuous adjoint solution as the best corrected functional. The solid lines are asdiscussed in Section 6.4 except that the adaptation indicator for the green line is thehigher-order terms in Eq. 6.9. Using continuous p-truncation error estimate weighted bythe continuous adjoint solution as the adaptation indicator, the solid red line, providesthe best results for the lift functional and the second best for the drag functional. Thefastest convergence rate for the drag functional is obtained using the dot product of theprimal truncation error and the adjoint discretization error as the adaptation indicator;however, for the lift functional, this indicator is not as successful as for drag. Adjoint-1256.5. Subsonic Inviscid Flow on NACA 0012based mesh adaptation predicts more accurate results compared to residual-based meshadaptation, as expected.(a) Uniform, 27538 cells (b) (τs), 28925 cells(c) (τs, C), 26808 cells (d)(τsp , εa), 20734 cellsFigure 6.6: Adapted meshes by different adaptation indicators for subsonic inviscid flowaround NACA 0012 for the drag functional, Ma∞ = 0.5, α = 2◦(a) Uniform, 27538 cells (b) (τs), 28701 cells(c) (τs, C), 22167 cells (d)(τsp , εa), 13508 cellsFigure 6.7: Adapted meshes by different adaptation indicators for subsonic inviscid flowaround NACA 0012 for the lift functional, Ma∞ = 0.5, α = 2◦The finest mesh for different adaptation indicators is shown in Figure 6.6 and 6.7for drag and lift functionals, respectively. As both lift and drag are mainly affected bythe mesh resolution at leading and trailing edges, the close-up view at these two regions1266.6. Subsonic Inviscid Flow on Multi-Element Airfoilare shown here. The mesh is over-refined at a large region near the trailing edge onlyon the uniformly refined mesh; however, both trailing and leading edge are refined foradjoint-based and higher-order error-based mesh adaptation and the mesh resolution isfiner in small regions near trailing edge. The residual-based mesh adaptation fails tohave enough resolution at the trailing edge.6.6 Subsonic Inviscid Flow on Multi-ElementAirfoilWe now consider a more complicated geometry, a multi-element airfoil, withMa∞ = 0.2and angle of attack α = 3◦. The second-order solution on a mesh with characteristiccell size eight times smaller in area than the finest mesh for which correction is appliedis considered as the exact solution to the problem. The initial mesh consisting of 1877cells is shown in Figure 6.8a. The pressure distribution for the primal problem is alsodepicted in Figure 6.8b.(a) Close-up of multi-element airfoil mesh consisting of 1877cells1.67 1.71 1.74 1.77 1.78 1.81 1.83(b) Pressure distributionFigure 6.8: Initial mesh and the primal solution distribution for subsonic inviscid flowon the multi-element airfoil, Ma = 0.2, α = 3◦As this multi-element airfoil is a high-lift configuration design, the lift is consid-1276.6. Subsonic Inviscid Flow on Multi-Element Airfoilered as the output functional of interest. The adjoint energy component of the bothcontinuous and discrete adjoint solutions for the lift functional are depicted in Figure6.9. Similar to the comparison discussed in Chapter 5, the discrete and continuousadjoint solutions are qualitatively similar. The time comparison for these adjoint solu-tion is shown in Figure 6.10 where the time for the second-order primal problem, thesecond-order continuous adjoint and the discrete adjoint problems used for correctionand the CPU time required to obtain the C1 interpolation of the solution for findingthe continuous p-TE estimate are compared. The four meshes shown in this figure arethe uniformly refined meshes. Time comparison shows that the post processing timerequired for C1 interpolation of the solution is small compared to the solution time,and scales linearly with problem size. Sensitivity of the functional with respect to theprimal solution is only a function of pressure in the case of inviscid flow. Therefore, thetime required for solving the system of equations to obtain the discrete adjoint solutionis significantly smaller than the time required to solve the continuous adjoint PDE forthe inviscid case, because there is no physical dissipation to enhance the stability of thesolution. For this inviscid case, the continuous adjoint solver oscillates before gettingclose to the solution, after which a larger time step can be used to obtain the convergedsolution.-0.95 -0.6 -0.25 0.1 0.45 0.8(a) Continuous adjoint for lift functional-0.95 -0.6 -0.25 0.1 0.45 0.8(b) Discrete adjoint for lift functionalFigure 6.9: Normalized energy component of the adjoint solution for subsonic inviscidflow on the multi-element airfoil, Ma = 0.2, α = 3◦The convergence results for the lift functional are depicted in Figure 6.11a. Boththe non-corrected and the corrected functionals using the continuous p-truncation errorestimate and continuous adjoint solution on the uniformly refined mesh are comparedto the adapted meshes. Not surprisingly, on the adjoint-based adapted meshes thefunctional is more accurate and converges faster to the exact value compared to theresidual-based adapted meshes. Furthermore, the adapted meshes generated using thecontinuous p-truncation error are more accurate than the discrete p-truncation error.1286.6. Subsonic Inviscid Flow on Multi-Element AirfoilCPU time (Sec)0102030405060Primal problemC1 interpolationContinuous adjointDiscrete adjoint5344 cells1877 cells 2988 cells 9398 cellsFigure 6.10: CPU time comparison for primal and adjoint solutions and C1 interpolationof the solution for subsonic inviscid flow on the multi-element airfoil, Ma = 0.2, α = 3◦Using the higher-order term as the adaptation indicator provides the most accurateresults with the fastest convergence rate.The results for adjoint-based adapted meshes shown in Figure 6.11a are the correctedsolutions and these corrected functionals are compared to the original non-correctedones in Figure 6.11b for both the discrete and continuous adjoint solutions. Two pointsneed to be considered here. First, since the same scale is used for both figures, com-paring the second-order non-corrected functional on the uniformly refined mesh withnon-corrected adjoint-based adapted mesh, the dash-dotted lines in Figure 6.11b, showsthat the adjoint-based adapted mesh provides a considerably more accurate functionalcompared to the uniformly refined mesh even without correction. Second, correctingthe functional calculated on the adapted mesh provides us even a more accurate valuewhich converges to the exact value faster.The finest mesh for each series is shown in Figure 6.12. Although on the uniformlyrefined mesh, all cells around the solid wall get refined, the adapted mesh focusesmainly on the leading and trailing edges of each element, the regions where the lift isaffected significantly. This is more noticeable when adjoint-based mesh adaptation or1296.7. Subsonic Viscous Flow on NACA 0012(#CV)1/2Error50 60 70 80 90 10010-610-510-410-3(a) Adaptation indicators(#CV)1/2Error50 60 70 80 90 10010-610-510-410-3(b) Correction effectFigure 6.11: Convergence history for subsonic inviscid flow around multi-element airfoilon the adapted meshes for the lift functional, Ma∞ = 0.2, α = 3◦adaptation based on higher-order error in the correction term is considered. That is thereason why a more accurate functional is obtained on the adapted meshes using thesetwo adaptation indicators in spite of the fact that the total number of cells is less thanthe uniformly refined mesh.6.7 Subsonic Viscous Flow on NACA 0012Next, we consider viscous subsonic flow around a NACA 0012 airfoil with a free-streamMach number of Ma∞ = 0.5, a Reynold number of Re = 5000, and an angle of attackα = 1◦. The second-order solution on a mesh with characteristic cell size thirteen timessmaller in area than the finest mesh for which correction is applied is considered as theexact solution to the problem. The farfield boundary is a circle of radius 100 chordscentered at the leading edge of the the airfoil and consequently, the errors arising fromboundary placement are small. As viscous flow is studied, the total drag is consideredas the output functional. Discrete and continuous adjoint solution distributions for thiscase have been discussed in Chapter 5 and in this section, we only compare the timerequired to obtain the second-order primal and adjoint solutions to the time requiredto obtain the C1 interpolation of the solution. Figure 6.13 shows that the time required1306.7. Subsonic Viscous Flow on NACA 0012(a) Uniform, 9398 cells (b) (τs), 9371 cells(c) (τs, C), 4687 cells (d)(τsp , εa), 3861 cellsFigure 6.12: Adapted meshes by different adaptation indicators for subsonic inviscidflow around multi-element airfoil for the lift functional, Ma∞ = 0.2, α = 3◦for obtaining the C1 interpolation of the solution is much smaller the time for solvingthe primal problem. However, the time for solving the continuous and discrete adjointsolutions are comparable. As a consequence of the viscous terms, convergence of thecontinuous adjoint PDE is faster compared to the inviscid case and it does not oscillatebefore getting close to the solution. Furthermore, the sensitivity of the functional withrespect to the solution is more complicated in the case of viscous flow and consequentlysolving the linear system to obtain the discrete adjoint solution needs more time.The convergence results for the drag functional are depicted in Figure 6.14a. Similarto the other test cases being studied so far, all adapted meshes outperform the non-corrected functional on the uniformly refined mesh, the brown dash-dotted line, interms of the error magnitude and convergence rate. Moreover, all of them except forthe residual-based adaptation using the discrete p-truncation error, the magenta line,outperform the corrected functional on the uniformly refined mesh, the dashed red line.The results for the adjoint-based adapted meshes using the continuous adjoint solutionare more accurate than residual-based ones and the adjoint-based using the discreteadjoint solution. The convergence behavior is quite similar to the adapted mesh basedon the higher-order terms in the correction term, the green line.The corrected functionals are compared to the non-corrected one and the result isshown in Figure 6.14b; the behavior is the same as discussed in Section 6.6.1316.7. Subsonic Viscous Flow on NACA 0012CPU time (Sec)050100150 Primal problemC1 interpolationContinuous adjointDiscrete adjoint12218 cells2617 cells 4822 cells 27538 cellsFigure 6.13: CPU time comparison for primal and adjoint solutions and C1 interpolationof the solution for subsonic viscous flow around NACA 0012, Ma∞ = 0.5, α = 1◦,Re = 5000(#CV)1/2Error50 100 15010-610-510-410-3(a) Adaptation indicators(#CV)1/2Error50 100 15010-610-510-410-3(b) Correction effectFigure 6.14: Convergence history for subsonic viscous flow around NACA 0012 on theadapted meshes for the drag functional, Ma∞ = 0.5, α = 1◦, Re = 50001326.8. Transonic Inviscid Flow on NACA 0012The finest mesh for each case is shown in Figure 6.15. Although the uniformlyrefined mesh focuses only on the leading and trailing edges, the adapted mesh hasenough resolution along the boundary layer. The mesh resolution along the boundarylayer is higher for the adjoint-based adapted mesh and the mesh adapted based on thehigher-order error in the correction term. The wake region is another feature of theviscous flow and the adjoint-based adapted mesh is more successful in resolving thispart of the flow.(a) Uniform, 27538 cells (b) (τs), 23015 cells(c) (τs, C), 26686 cells (d)(τsp , εa), 27426 cellsFigure 6.15: Adapted meshes by different adaptation indicators for subsonic viscousflow around NACA 0012 for the drag functional, Ma∞ = 0.5, α = 1◦, Re = 50006.8 Transonic Inviscid Flow on NACA 0012Finally, inviscid transonic flow around the NACA 0012 airfoil with a free-stream Machnumber of Ma∞ = 0.8 and an angle of attack α = 1.25◦ is considered. The second-order solution on a mesh with characteristic cell size eight times smaller in area thanthe finest mesh for which correction is applied is considered as the exact solution to theproblem. The farfield boundary is a circle of radius 100 chords centered at the leadingedge of the airfoil. The initial mesh consisting of 1998 cells is shown in Figure 6.16a.The pressure distribution for the primal problem is also depicted in Figure 6.16b.The discrete adjoint solution distribution for the lift functional is shown in Figure6.17. For this case, due to some robustness issues for the continuous adjoint solution,we just show the results for the discrete adjoint.1336.8. Transonic Inviscid Flow on NACA 00120 0.25 0.5 0.75 105.5(a) Close-up of NACA 0012 airfoil mesh consistingof 1998 cells0 0.25 0.5 0.75 1051.6 1.94 2.24 2.5(b) Normalized energy distributionFigure 6.16: Initial mesh and the primal solution distribution for transonic inviscid flowon NACA 0012 airfoil, Ma = 0.8, α = 1.25◦0 0.25 0.5 0.75 105-5 -3 -1 1 3 5Figure 6.17: x-momentum adjoint solution for the lift functional, transonic inviscid flowon NACA 0012 airfoil, Ma = 0.8, α = 1.25◦The convergence results for the adapted meshes are shown in Figure 6.18. The calcu-lated functional on the adjoint-based adapted meshes and the residual-based adaptedmeshes using the continuous p-truncation error are more accurate compared to non-corrected and corrected functionals on the uniformly refined mesh. For this test case, thediscrete adjoint-based mesh adaptation using the discrete and continuous p-truncationerror are compared and the continuous p-truncation error estimate is again more accu-rate.The finest mesh for each case is shown in Figure 6.19. The strong shock on the uppersurface of the airfoil is resolved using all three adaptation indicators; however, usingthe continuous p-truncation error, either for residual-based or adjoint based adaptedmeshes, a sharper shock region is detected. The residual-based indicator using the1346.8. Transonic Inviscid Flow on NACA 0012(#CV)1/2Error50 100 150 20010-410-310-2Figure 6.18: Convergence history for transonic inviscid flow around NACA 0012 on theadapted meshes for lift functional, Ma∞ = 0.8, α = 1.25◦(a) Uniform, 27048 cells (b) (τs), 36985 cells(c) (τn, D), 24745 cells (d) (τs, D), 22427 cellsFigure 6.19: Adapted meshes using different adaptation indicators for transonic inviscidflow around the NACA 0012 for the lift functional, Ma∞ = 0.8, α = 1.25◦1356.9. Discussioncontinuous p-truncation error focuses mainly on the upper shock but the adjoint-basedindicator using the continuous p-truncation error refines the weak shock on the lowersurface as well.6.9 DiscussionA summary of the results for all test cases is as follow:• For all test cases studied in this chapter, the functional on the adapted mesh iscalculated more accurately compared to the non-corrected one calculated on theuniformly refined mesh.• The results for residual-based adaptation using the continuous p-truncation er-ror, adjoint based adaptation, and adaptation based on the higher-order error inthe correction term are more accurate compared to the corrected functional onthe uniformly refined mesh almost for all cases except for the lift functional forsubsonic inviscid flow on the NACA 0012.• Residual-based adaptation using the discrete p-truncation error does not neces-sarily provide a significantly more accurate functional than the corrected one onthe uniformly refined mesh.• Residual-based mesh adaptation using continuous p-truncation error is much bet-ter than using the discrete p-truncation error for all test cases.• Adjoint-based mesh adaptation outperforms the residual-based mesh adaptationfor all test cases.• Adjoint-based mesh adaptation using the continuous adjoint solution is alwaysbetter than the discrete adjoint, or at least, they are comparable.• The results using the higher-order error in the correction term as the adaptationindicator are more accurate or comparable to the adjoint-based mesh adaptationusing the continuous adjoint solution for almost all test cases except for the liftfunctional for subsonic inviscid flow on the NACA 0012.In summary, mesh adaptation based on the continuous p-truncation error weighted bythe continuous adjoint solution, for cases where the adjoint solution is easy to calculate,1366.9. Discussionprovides the best results. When this is feasible, using the higher order error in thecorrection term is a very good choice as well. Otherwise, if the continuous adjointsolution is not available, or if it is expensive to compute, using the continuous p-truncation error weighted by the discrete adjoint solution is also helpful. The samecomparison as described at the end of Chapter 6 is shown here for the adapted meshes.The error in calculating the second-order non-corrected functional on the uniformlyrefined mesh is considered as the reference value and the ratio of the error of thefunctional on the adapted meshes to this reference value is shown here. In Chapter 5,the same meshes were used, but in the case of the adapted meshes, the best line thatfits the four points is considered and the reference value corresponding to the mesh withthe same number of control volumes, or the non-corrected functional error, is found onthat line. The results are summarized in Figure 6.20. Since the same scale is used forall five plots, comparing the residual based adaptation to the adjoint-based adaptationshows that the magnitude of the error for the adapted meshes using the truncation errorweighted by the adjoint solution is smaller. Moreover, adaptation based on continuousadjoint solution provides more consistent results for all test cases. Adaptation based onthe higher-order error in the correction terms provides the functional with the smallesterror and the results are quite consistent for all test cases except for the lift functionalfor the subsonic inviscid flow around NACA 0012.(#CV)1/2Error ratio50 100 150 200 25010-210-1100PoissonSubsonic, inviscid, dragSubsonic, inviscid, liftMulti-element, liftSubsonic, viscous, dragTransonic, inviscid, lift(a) (τn)(#CV)1/2Error ratio50 100 150 200 25010-210-1100PoissonSubsonic, inviscid, dragSubsonic, inviscid, liftMulti-element, liftSubsonic, viscous, dragTransonic, inviscid, lift(b) (τs)1376.9. Discussion(#CV)1/2Error ratio50 100 150 200 25010-210-1100PoissonSubsonic, inviscid, dragSubsonic, inviscid, liftMulti-element, liftSubsonic, viscous, drag(c) (τs, C)(#CV)1/2Error ratio50 100 150 200 25010-210-1100PoissonSubsonic, inviscid, dragSubsonic, inviscid, liftMulti-element, liftSubsonic, viscous, dragTransonic, inviscid, lift(d) (τs, D)(#CV)1/2Error ratio50 100 150 200 25010-210-1100PoissonSubsonic, inviscid, dragSubsonic, inviscid, liftMulti-element, liftSubsonic, viscous, drag(e)(τsp , εa)Figure 6.20: The error ratio for different adaptation indicators for all test cases basedon second-order functional138Chapter 7Concluding Remarks7.1 SummaryAs the capabilities of CFD software grow, the size and complexity of industrial CFDproblems are increasing as well. These new large scale problems are challenging. Aspart of analyzing these flows, important flow features should be identified and resolvedand the accuracy of the solution should be characterized. CFD software users wouldbenefit from automatic numerical error control through defect correction, a posterioriestimation of the error in outputs of engineering interest, and goal-based adaptation.Taken together, these improvements would pave the way for truly mature CFD, inwhich users would need to specify only geometry, flow conditions, output quantities ofinterest, and an error tolerance.Accurate estimation of the truncation error plays an important role in error quan-tification and consequently, developing a reliable truncation error estimator for un-structured meshes, which are used to handle the complex problem geometry, is needed.Truncation error can be used to improve the flow solution through defect correction,output functional error estimation and correction, and goal-based adaptation.There are multiple options for estimating the truncation error. If the exact solutionis known, we can calculate the flux integrals based on the exact solution to get the exacttruncation error. However, this is not possible for general problems with unknown exactsolution. Instead, a higher-order flux integral can be calculated based on the lower-ordersolution. This method, called the discrete p-TE method, includes the leading term inthe truncation error and consequently can be considered as an estimate of the truncationerror.We have demonstrated that — in contrast with the structured mesh case for whichthe truncation error has the same asymptotic order of accuracy as the discretizationerror — the truncation error for unstructured finite volume schemes is asymptoticallylarger than the discretization error, which in turn is typically of the same order asthe solution approximation error in the scheme. Furthermore, the truncation error for1397.1. Summaryunstructured meshes is rough as a result of the irregular topology of the mesh.The differences in asymptotic behavior of the truncation and discretization errorfor unstructured meshes and the features of the truncation error can be predicted bythe eigendecomposition of the discrete problem. Our results based on the eigenanalysisof the truncation error have shown that the rough error modes dominate the unstruc-tured mesh truncation error. The dominance of rough modes makes truncation errorestimation more challenging when arbitrary unstructured meshes are used. If a perfectsymmetric mesh is used, the truncation error is much smoother and easier to estimateaccurately even in the high frequency modes. Nevertheless, it is not possible to gen-erate perfectly symmetric meshes for real application cases. Therefore, the dominanceof rough error modes in the unstructured mesh truncation error suggests the need todevelop a smooth truncation error estimate that can be computed using quantities al-ready available in a typical finite volume flow solver. As mentioned, the discontinuousjumps of the coefficients of the leading terms in the Taylor series expansion of the er-ror from one control volume to another is responsible for the rough distribution of thetruncation error. Since we are using the p−truncation error approach for estimatingthe truncation error, which computes the higher-order flux integration based on thelower-order solution, two different values are obtained from reconstruction of the solu-tion at the quadrature points at the common face of the two neighboring cells wherethe flux integral is calculated. By using a continuous interpolation of the solution, wecan obtain a single value for the flux vector from two neighboring cells. The smoothsolution and consequently the smooth flux vector gives us an estimation of the trunca-tion error based on the continuous solution which was shown to provide us with p-sharpconvergence.Two different approaches were used to obtain a continuous interpolation of thesolution: using CGM, a 3D CAD query engine for meshing, and C1 interpolation of thesolution. Using CGM, the solution at each point is considered as the third componentand consequently, a smooth 3D surface with the coordinates of the 2D mesh and thesolution is obtained in which there is a single solution at the quadrature points atthe common face of the two adjacent cells. Although this method gives us a uniquesolution, this is not sufficient, as the gradient is not calculated accurately and we needa unique gradient at the quadrature points as well. Consequently, we have presented aC1 interpolation scheme to obtain continuous solution and gradients at the quadraturepoints.The performance of the original discrete p-TE method is compared to the perfor-1407.2. Conclusionsmance of the continuous p-truncation error for defect correction, output functionalcorrection and mesh adaptation for a variety of test cases, including model problemswith a manufactured solution, Euler and Navier-Stoke equation with a manufacturedsolution, and realistic flow test cases.7.2 ConclusionsThe idea of defect correction is that if the exact truncation error is added to the sourceterm of the problem and the new discrete equation with the modified source term issolved, the exact solution is obtained. Alternatively, if the p-TE estimate obtainedbased on higher-order flux integral, which is an estimation of the truncation error, isadded to the source term of the problem, the defect corrected solution should ideallybe p-sharp, implying that it converges as fast as the higher-order reconstructed solu-tion used in calculating the flux integral. This is the result for structured meshes. Forunstructured meshes, our results show that if the original p-TE method is used fordefect correction, either for the Poisson equation with diffusive fluxes or the advectionequation with convective fluxes, p-sharp convergence is not obtained. Moreover, themagnitude of the discretization error of the corrected solution is more than the uncor-rected one. Consequently, the continuous p-TE estimate of the truncation error is usedfor defect correction. Using CGM to interpolate the solution is not able to improve theperformance of defect correction significantly either. For both diffusive and convectivefluxes, using C1 interpolation to compute the continuous p-truncation error estimateprovides a corrected solution with smaller discretization error, but the convergence rateis still not as good as expected.As a consequence of the poor performance of CGM for defect correction, we contin-ued with using C1 interpolation for functional correction and goal-based mesh adapta-tion. Although C1 interpolation of the solution is not able to improve the performanceof defect correction significantly, particularly in terms of convergence rate, this doesnot necessarily mean that it is not able to improve an output functional or effectivelyadapt the mesh.The truncation error, when multiplied by the adjoint solution, is used to computea correction term for an output functional of interest. Both discrete and continuousadjoint solutions can be used. The discrete adjoint is obtained by solving a linearsystem where the left-hand side is the transpose of the Jacobian matrix and the right-1417.2. Conclusionshand side is the sensitivity of the output functional with respect to the primal solution.The continuous adjoint solution, on the other hand, is an independent PDE which needsto be discretized and solved separately. The performance of output functional correctionusing both discrete and continuous C1 interpolated truncation error weighted by thediscrete and continuous adjoint solutions were compared. Scalar equations (the Poissonand advection equations) with a manufactured solution and systems of equations (theEuler and Navier-Stokes equations) using both manufactured solutions and real flowtest cases are considered. Our results showed that using the discrete truncation errorweighted by either continuous or discrete adjoint solution is not helpful in improvingthe output functional in terms of convergence rate. On the other hand, using the C1interpolated solution improves the functional significantly. The second-order solution isused to find a continuous flux integral based on the third or fourth-order reconstruction,giving third or fourth-order convergence for the functional while only solving the primaland adjoint problems at second-order. Using fourth-order flux integration based on thethird-order solution provides us with similar improvement in convergence rate and forboth cases, the magnitude of the functional error is also less than the magnitude of theuncorrected functional error. More accurate corrected functionals are obtained whencorrection is based on the continuous adjoint since this gives a more accurate adjointsolution compared to solving a linear system which gives the discrete adjoint solution.As a result, more consistent and accurate results for a range of cases are obtained usingthe continuous adjoint. Computational time for the continuous adjoint problem isabout the same as computational time for the primal problem. For the discrete adjointproblem, the computational time is the time of solving a linear system, so about thecost of one time step for the primal. Sensitivity of the functional with respect to theprimal solution is only a function of pressure in the case of inviscid flow. Therefore, thetime required for solving the system of equations to obtain the discrete adjoint solutionis significantly smaller than the time required to solve the continuous adjoint PDEfor the inviscid case where there is not any viscous term which enhances the stabilityof the problem. For the inviscid case, the residual for the continuous adjoint solveroscillates before getting close to the solution, after which a larger time step can be usedto obtain the converged solution. However, for the viscous case, the time for solvingthe continuous and discrete adjoint solutions are comparable. As a consequence of theviscous terms, convergence of the continuous adjoint PDE is faster compared to theinviscid case. Furthermore, the sensitivity of the functional with respect to the solutionis more complicated in the case of viscous flow and consequently finding the discrete1427.2. Conclusionsadjoint solution requires more time.This significant improvement in functional correction is obtained just by C1 inter-polating the primal solution and finding the truncation error based on this interpolatedsolution and then multiplying the truncation error by the adjoint solution of the sameorder as the primal solution. It is not necessary to find the C1 interpolation of theadjoint solution to obtain significant improvement in convergence rates. By estimatingthe truncation error based on a C1 interpolated solution, higher order convergence ofthe functional is obtained by using the lower order solution. Hence, paying the extracost of computing the higher-order solution to obtain a more accurate functional whichconverges to the exact value with higher-order rate is not required and the higher-orderconvergence is obtained. Time comparison showed that the post processing time re-quired for C1 interpolation of the solution is small compared to the solution time, andscales linearly with problem size. As a result, it is a reasonable post-processing step toobtain the higher-order convergence.The truncation error can also be used as an indicator for mesh adaptation, calledresidual-based adaptation, or can be weighted by the adjoint solution, called adjoint-based mesh adaptation. The adaptation indicator for the adjoint-based adaptationis the same as the correction term used for functional correction. Furthermore, thehigher-order error in the correction term can be used as an adaptation indicator. Theeffectiveness of different adaptation indicators using discrete or continuous truncationerror were compared. Different test cases were considered. For all test cases stud-ied, the functional on the adapted mesh is calculated more accurately compared tothe non-corrected one calculated on the uniformly refined mesh. This result holds forresidual-based adaptation using the continuous p-truncation error, adjoint based adap-tation, and adaptation based on the higher-order error in the correction term. Althoughresidual-based adaptation using the original discrete p-truncation error estimate doesnot necessarily provide a significantly more accurate functional than the corrected oneon the uniformly refined mesh, residual-based mesh adaptation using the C1 interpo-lated continuous truncation error always provide a more accurate functional comparedto the functional calculated on the uniformly refined mesh. Our results show thatadjoint-based mesh adaptation out performs the residual-based mesh adaptation andusing the continuous adjoint solution is always better than the discrete adjoint, or atleast, they are comparable. The results using the higher-order error in the correctionterm as the adaptation indicator are more accurate or comparable to the adjoint-basedmesh adaptation using the continuous adjoint solution.1437.2. ConclusionsThe following points summarize the main contributions of this thesis:• We have developed a reliable truncation error estimate for unstructured meshesusing quantities already available in a typical finite volume flow solver. Thisestimate of the truncation error should be general and not dependent on thegeometry, the properties of the solution, or the governing equation such that itcan be easily generalized to any problem. The method of our choice is the p-TEmethod.• As the original discrete p-TE method is not able to provide p-sharp convergence foroutput functional correction or mesh adaptation, we developed a C1 interpolationof the solution which gives us a unique solution and gradients at the quadraturepoint at the common face of the two neighboring cells where the flux function isevaluated.• Evaluating the C1 interpolation of the solution is a cheap post-processing stepwhich uses the data already available for the lower-order solution and using a setof basis functions which needs to be solved only once and can be used for anyproblem regardless of the geometry, the governing equations or other propertiesof the solution.• The truncation error estimate calculated using C1 interpolation of the solutioncan be multiplied by the adjoint solution to get the correction term used in out-put functional correction. Both the discrete and continuous adjoint solutions canbe used. Using the continuous adjoint solution for correcting the output func-tional provides more consistent results and more accurate functionals comparedto the discrete adjoint solution. For finding the discrete adjoint solution, we onlyneed the sensitivity of the output functional with respect to the primal solutionand the Jacobian matrix; however, finding the continuous adjoint solution re-quires discretizating the continuous adjoint PDE and setting the correspondingthe boundary conditions. Once, the continuous adjoint PDE has been discretizedand the proper boundary conditions are implemented, using the continuous ad-joint solution is more recommended as it provides more consistent results.• Using the truncation error estimate calculated using C1 interpolation of the so-lution multiplied by the adjoint solution to correct the functional provides thep-sharp functional convergence which convergences to the exact value as fast as1447.3. Recommendations for Future Workthe higher-order reconstruction order used in calculating the truncation error.On the other hand, using the original p-TE method using the discrete solution,the convergence of the functional is the same as the primal solution order. Thehigher-order convergence of the output functional is obtained only by solving boththe primal and adjoint problems at lower-order, in contrast to the finite elementmethod where the higher-order adjoint solution is required. Furthermore, it isnot necessary to find the C1 interpolation of the adjoint solution to get p-sharpconvergence.• The truncation error estimate calculated using C1 interpolation of the solutioncan also be used as the adaptation indicator which provides faster convergence ofthe output functional compared to using the original estimate of the truncationerror based on the discrete solution as the adaptation indicator.• Adjoint-based mesh adaptation using the truncation error estimate calculatedusing C1 interpolation of the solution weighted by the continuous adjoint solu-tion, the same as the correction term, gives us more accurate functional whichconverges to the exact value faster. Even more accurate results are obtained bycorrecting the functional. Note that, the correction step does not require anyfurther information and is available when adjoint-based adaptation is used.• Significant improvement is obtained if adaptation is based on the higher-ordererror in the correction term. Again, no further calculation is required to obtainthis higher-order error term.7.3 Recommendations for Future WorkWe examined both scalar and systems of equations for both manufactured solutionsand real flow test cases. The real flow test cases involve inviscid and viscous flows, inthe subsonic, transonic and supersonic flow regimes for simple and complex geometries.This work may be extended to 2D turbulent flows for which an anisotropic mesh isrequired to resolve the anisotropic features of the flow along the boundary layer near thesolid wall. Using the same Argyris element to obtain the C1 interpolation of the solutionis easy; however, anisotropic curved meshes are required along the boundary layer toresolve the curved solid wall. In this case, a linear transformation form the physical1457.3. Recommendations for Future Workelement to the reference element is not sufficient and a cubic coordinate transformationis needed.For the transonic case, we only used the discrete adjoint for adjoint-based meshadaptation. The continuous adjoint solution does not converge efficiently. We usedthe Lax-Friedrich method for calculating the continuous adjoint fluxes. Using a moreaccurate flux function may be useful in improving the robustness of the continuousadjoint for transonic flow.The output functional correction and mesh adaptation using the continuous adjointsolution was more helpful compared to the discrete adjoint solution. If the discretizationscheme is adjoint-consistent, the effectiveness of output correction and mesh adaptationare the same using the discrete and continuous adjoint solutions. Therefore, improvingour discretization scheme such that it is adjoint consistent would also be helpful.The interpolation scheme we developed can be extended to any other two-dimensionalproblem without any difficulties as it worked properly for both viscous and inviscid flowswhich involve diffusive and convective terms. Extending that to 3D problems involvesfinding the proper polynomials for the 3D reference element, similar to the Argyris ele-ment for 2D, and then solving the system of equations arising from the basis functionsonce to obtain the constants. The 3D reference element which provides C1 continuityis described by Walkington [96].146Bibliography[1] First International Workshop on High-Order CFD Methods.http://people.ku.edu/z651w035/hiocfd.html, 2012. Sponsored by the AIAAFluid Dynamics Technical Committee, the US Air Force Office of ScientificResearch, and the Deutsches Zentrum fur Luft- und Raumfahrt.[2] S. Adjerid, K. D. Devine, J. E. Flaherty, and L. Krivodonova. A posteriori errorestimation for discontinuous galerkin solutions of hyperbolic problems. Computermethods in applied mechanics and engineering, 191(11):1097–1112, 2002.[3] M. Ainsworth and J.T. Oden. A Posteriori Error Estimation in Finite ElementAnalysis. Wiley-Interscience, John Wiley and Sons, 2000.[4] D. Ait-Ali-Yahia, G. Baruzzi, W. G. Habashi, M. Fortin, J. Dompierre, andM. G. Vallet. Anisotropic mesh adaptation: Towards user-independent, mesh-independent and solver-independent CFD. Part II: Structured grids. InternationalJournal for Numerical Methods in Fluids, 39(8):657–673, July 2002.[5] F. Alauzet and O. Pironneau. Continuous and discrete adjoints to the Euler equa-tions for fluids. International Journal for Numerical Methods in Fluids, 70:135–157,2012.[6] Dale A. Anderson, John C. Tannehill, and Richard H. Pletcher. ComputationalFluid Mechanics and Heat Transfer. Series in Computational Methods in Mechan-ics and Thermal Sciences. Hemisphere Publishing Corporation, New York, 1984.[7] J.H. Argyris, I. Fried, and D.W. Scharpf. The tuba family of plate elements for thematrix displacement method. The Aeronautical Journal of the Royal AeronauticalSociety, 72:701–709, 1968.[8] R. Balasubramanian and J.C. Newman III. Comparison of adjoint-based andfeature-based grid adaptation for functional outputs. International Journal forNumerical Methods in Fluids, 53:1541–1569, 2007.147Bibliography[9] Timothy J. Barth and Paul O. Frederickson. Higher order solution of the Eulerequations on unstructured grids using quadratic reconstruction. AIAA paper 90-0013, January 1990.[10] R. Becker and R. Rannacher. Weighted a posteriori error control in finite elementmethods. In Proceedings of ENUMATH-97, Heidelberg, 1998.[11] R. Becker and R. Rannacher. An optimal control approach to a posteriori errorestimation in finite element methods. Acta Numerica, 2001:1–102, 2000.[12] K. Bohmer, P. Hemker, and H. Stetter. The defect correction approach, in K.Bohmer, H. Stetter (Eds), Defect Correction Methods: Theory and Application.Springer, Berlin, 1984.[13] Gustavo C. Buscaglia and Enzo A. Dari. Anisotropic mesh optimization and itsapplication in adaptivity. International Journal for Numerical Methods in Engi-neering, 40:4119–4136, 1997.[14] Andrew W. Cary, Andrew J. Dorgan, and Mori Mani. Towards accurate flowpredictions using unstructured meshes. In Proceedings of the Nineteenth AIAAComputational Fluid Dynamics Conference, 2009. AIAA paper 2009-3650.[15] Phillippe G. Ciarlet. The finite element method for elliptic problems. Society forIndustrial and Applied Mathematics, 2002.[16] J. M. Derlaga, T. Phillips, C. J. Roy, and J. Borggaard. Adjoint and trunca-tion error based adaptation for finite volume schemes with error estimates. InIn 53rd AIAA Aerospace Sciences Meeting, AIAA SciTech. American Institute ofAeronautics and Astronautics, 2015.[17] B. Diskin and J.L. Thomas. Accuracy analysis for mixed-element finite-volumediscretization schemes. Technical Report 2007-08, National Institute of Aerospace,2007.[18] Boris Diskin and James Thomas. Notes on accuracy of finite-volume discretizationschemes on irregular grids. Applied Numerical Mathematics, 60:224–226, 2010.Rebuttal of Svard 2008.148Bibliography[19] Boris Diskin, James L. Thomas, Eric J. Nielsen, Hiroaki Nishikawa, and Jeffrey A.White. Comparison of node-centered and cell-centered unstructured finite-volumediscretizations. Part I: Viscous fluxes. In Proceedings of the Forty-Seventh AIAAAerospace Sciences Meeting, 2009. AIAA paper 2009-597.[20] Boris Diskin, James L. Thomas, Eric J. Nielsen, Hiroaki Nishikawa, and Jeffrey A.White. Comparison of node-centered and cell-centered unstructured finite-volumediscretizations: Viscous fluxes. AIAA Journal, 48(7):1326–1338, July 2010.[21] J. Dompierre, M. G. Vallet, Y. Bourgault, M. Fortin, and W. G. Habashi.Anisotropic mesh adaptation: Towards user-independent, mesh-independent andsolver-independent CFD. Part III. Unstructured meshes. International Journal forNumerical Methods in Fluids, 39(8):675–702, July 2002.[22] R.P. Dwight. Heuristic a posteriori estimation of error due to dissipation in finitevolume schemes and application to mesh adaptation. Journal of ComputationalPhysics, 227:2845–2863, 2008.[23] Krzysztof Fidkowski and David Darmofal. Reviw of Output-Based Error Esti-mation and Mesh Adaptation in Computational Fluid Dynamics. AIAA Journal,49(4):673–694, 2011.[24] L. Fox. Some improvements in the use of relaxation methods for the ordinary andpartial differential equations. Proc. Roy. Soc. London A, 190:31–59, 1947.[25] F. Fraysse, E. Valero, and J. Ponsin. Comparison of mesh adaptation using theadjoint methodology and truncation error estimates. AIAA Journal, 50(9):1920–1932, 2012.[26] M. B. Giles and N. A. Pierce. An introduction to the adjoint approach to design.Flow, Turbulence, and Combustion, 65(3–4):393–415, 2000.[27] Serge Gosselin. Delaunay refinement mesh generation of curve-bounded domains.PhD thesis, The University of British Columbia, Department of Mechanical Engi-neering, 2009.[28] W. G. Habashi, J. Dompierre, Y. Bourgault, D. Ait-Ali-Yahia, M. Fortin, andM. G. Vallet. Anisotropic mesh adaptation: Towards user-independent, mesh-independent and solver-independent CFD. Part I: General principles. InternationalJournal for Numerical Methods in Fluids, 32(6):725–744, March 2000.149Bibliography[29] W. Hackbusch. Local defect correction method and domain docomposition tech-niques, in: K. Bohmer, H. Stetter, Defect Correction Methods: Theory and Ap-plications. Springer, Berlin, 1984.[30] R. Hartmann, J. Held, and T. Leicht. Adjoint-based error estimation and adaptivemesh refinement for the rans and k-w turbulence model equations. Journal ofComputational Physics, 230(11):4268–4284, 2011.[31] Ralf Hartmann. Adaptive discontinuous Galerkin methods with shock-capturingfor the compressible Navier–Stokes equations. International Journal for NumericalMethods in Fluids, 51(9–10):1131–1156, 2006.[32] Ralf Hartmann and Paul Houston. Adaptive discontinuous Galerkin finite elementmethods for the compressible Euler equations. Journal of Computational Physics,183(2):508–532, 2002.[33] Ralf Hartmann and Paul Houston. Adaptive discontinuous Galerkin finite elementmethods for nonlinear hyperbolic conservation laws. SIAM Journal of ScientificComputing, 24(3):979–1004, 2003.[34] Marcelo Hayashi, Marco Ceze, and Ernani Volpe. Characteristic-based boundaryconditions for the Euler adjoint problem. International Journal for NumericalMethods in Fluids, 71:1297–1321, 2013.[35] Alireza Jalali. Truncation error analysis of unstructured finite volume discretizationschemes. Master’s thesis, The University of British Columbia, Department ofMechanical Engineering, 2012.[36] Alireza Jalali and Carl Ollivier-Gooch. Accuracy assessment of finite volume dis-cretizations of diffusive fluxes on unstructured meshes. In Proceedings of the Fifti-eth AIAA Aerospace Sciences Meeting. American Institute of Aeronautics and As-tronautics, 2012. AIAA Paper 2012-0608.[37] Alireza Jalali, Mahkame Sharbatdar, and Carl Ollivier-Gooch. Accuracy assess-ment of finite volume discretization schemes on unstructured meshes. Computersand Fluidss, 101:220–232, 2014.[38] Anthony Jameson, Luigi Martinelli, and Niles A. Pierce. Optimum aerodynamicdesign using the Navier-Stokes equations. Theoretical and Computational FluidDynamics, 10(1–4):213–237, 1998.150Bibliography[39] Antony Jameson. Aerodynamic design via control theory. Journal of ScientificComputing, 3(3):233–260, 1988.[40] Antony Jameson, Sriram Shankaran, and Luigi Martinelli. Continuous AdjointMethods for Unstructured Grids. AIAA Journal, 46:1226–1239, 2008.[41] O. A. Karakashian and F. Pascal. A posteriori error estimates for a discontinu-ous galerkin approximation of second-order elliptic problems. SIAM Journal onNumerical Analysis, 41(6):2374–2399, 2003.[42] J. Kautsky and N. K. Nichols. Equidistributing meshes with constraints. SIAM J.SCI. STAT, COMPUT., 1(4):499–511, 1980.[43] H. Kim and K. Nakahashi. Unstructured Adjoint Method for Navier-Stokes Equa-tions. JSME International Journal Series B, 48:202–27, 2005.[44] H. Kim, D. Sasaki, S. Obayashi, and K. Nakahashi. Aerodynamic Optimization ofSupersonic Transport Wing Using Unstructured Adjoint Method. AIAA Journal,39:1011–1020, 2001.[45] H. L. Kline, Thomas D. Economon, and Juan J. Alonso. Multi-objective optimiza-tion of a hypersonic inlet using generalized outflow boundary conditions in thecontinuous adjoint method. In 54th AIAA Aerospace Sciences Meeting, 2016.[46] M. Kurzen, T. S. Phillips, and C. J. Roy. Method of nearby problems for generatingexact solutions to 1D unsteady and 2D steady problems. Technical report, AIAA-2009-3652, 2009.[47] M. G. Larson and T. J. Barth. A posteriori Error Estimation for Discontinu-ous Galerkin Approximations of Hyperbolic Systems. In NAS Technical Report,number NAS-99-010, 1999.[48] Tobias Leicht and Ralf Hartmann. Anisotropic mesh refinement for discontinuousGalerkin methods in two-dimensional aerodynamic flow simulations. InternationalJournal for Numerical Methods in Fluids, 56:2111–2138, 2008.[49] B. Lindberg. Error estimation and iterative improvement for discretization algo-rithms. BIT, 20:486–500, 1980.151Bibliography[50] C. A. Mavriplis. Adaptive mesh strategies for the spectral element method. Com-puter Methods in Applied Mechanics and Engineering,, 116(14), 1994.[51] Fotis Mavriplis. CFD in aerospace in the new millenium. Canadian Aeronauticsand Space Journal, 46(4):167–179, 2000.[52] Christopher Michalak. Efficient high-order accurate unstructured finite-volume al-gorithms for viscous and inviscid compressible flows. PhD thesis, The Universityof British Columbia, Department of Mechanical Engineering, 2009.[53] Christopher Michalak and Carl Ollivier-Gooch. Globalized matrix-explicit Newton-GMRES for the high-order accurate solution of the Euler equations. Computersand Fluids, 39:1156–1167, 2010.[54] Bijan Mohammadi and Olivier Pironneau. Shape Optimization in Fluid Mechanics.Annu. Rev. Fluid Mech, 36:11.1–11.25, 2004.[55] A. Naumovich, M. Foerster, and R. Dwight. Algebraic multigrid within defectcorrection for the linearized euler equations. Numerical Linear Algebra with Ap-plications, 17:307–324, 2009.[56] Amir Nejat and Carl Ollivier-Gooch. A high-order accurate unstructured GMRESalgorithm for inviscid compressible flows. In Proceedings of the Seventeenth AIAAComputational Fluid Dynamics Conference. American Institute of Aeronautics andAstronautics, June 2005.[57] Amir Nejat and Carl Ollivier-Gooch. A high-order accurate unstructured finitevolume Newton-Krylov algorithm for inviscid compressible flows. Journal of Com-putational Physics, 227(4):2592–2609, 2008.[58] Amir Nejat, Carl Ollivier-Gooch, and Christopher Michalak. Accuracy assessmentmethodology for a high-order unstructured finite volume solver. In Proceedings ofthe Eighteenth AIAA Computational Fluid Dynamics Conference, 2007.[59] M. Nemec and M. J. Aftosmis. Adjoint error estimation and adaptive refinementfor embedded-boundary cartesian meshes. In Proceedings of the Eighteenth AIAAComputational Fluid Dynamics Conference. American Institute of Aeronautics andAstronautics, 2007.152Bibliography[60] Marian Nemec, Michael J. Aftosmis, and Mathias Wintzer. Adjoint-based adaptivemesh refinement for complex geometries. In Forty-sixth AIAA Aerospace SciencesMeeting, 2008. AIAA 2008-725.[61] Hiroaki Nishikawa. Beyond interface gradient: A general principle for constructingdiffusion scheme. In Proceedings of the Fortieth AIAA Fluid Dynamics Conferenceand Exhibit, 2010. AIAA paper 2010-5093.[62] W. L. Oberkampf and C. J. Roy. Verification and Validation in Scientific Com-puting. Cambridge University Press, 2010.[63] Carl Ollivier-Gooch. GRUMMP version 0.7.0 user’s guide. Technical report, De-partment of Mechanical Engineering, The University of British Columbia, 2015.[64] Carl Ollivier-Gooch, Amir Nejat, and Christopher Michalak. On obtaining high-order finite-volume solutions to the Euler equations on unstructured meshes. InProceedings of the Eighteenth AIAA Computational Fluid Dynamics Conference,2007. AIAA-2007-4464.[65] Carl Ollivier-Gooch and Christopher Roy. Reducing truncation error on unstruc-tured meshes by vertex movement. In Proceedings of the Forty-Second AIAA FluidDynamics Conference, 2012-2712. American Institute of Aeronautics and Astro-nautics, 2012.[66] Carl F. Ollivier-Gooch and Michael Van Altena. A high-order accurate unstruc-tured mesh finite-volume scheme for the advection-diffusion equation. Journal ofComputational Physics, 181(2):729–752, 2002.[67] Doug Pagnutti and Carl Ollivier-Gooch. A generalized framework for high orderanisotropic mesh adaptation. Computers and Structures, 87:670–679, 2009.[68] Michael Andrew Park. Adjoint-based, three-dimensional error prediction and gridadaptation. AIAA Journal, 42(9):1854–1862, 2004.[69] V. Pereyra. On improving an approximate solution of a functional equation bydeferred corrections. Numer. Math., 8:376–391, 1966.[70] V. Pereyra. Iterated deferred corrections for nonlinear boundary value problems.Numer. Math, 11:111–125, 1968.153Bibliography[71] Tyrone Phillips, Christopher Roy, and Jeff Borggaard. Error Transport Equa-tion Boundary Conditions for the Euler and Navier-Stokes Equations. In 52ndAerospace Sciences Meeting, AIAA SciTech, 2014-1432, 2014.[72] Niles Pierce and Michael Giles. Adjoint recovery of superconvergent functionalsfrom PDE approximations. SIAM Review, 42(2):247–264, June 2000.[73] Niles Pierce and Michael Giles. Adjoint and defect error bounding and correctionfor functional estimates. Journal of Computational Physics, 200(2):769–794, 2004.[74] O. Pironneau. On Optimum Design in Fluid Mechanics. J. Fluid Mech., 64:97–110,1974.[75] Z. Qiao and X. Yang. Wing Design by Solving Adjoint Equations. In 40th AIAAAerospace Sciences Meeting & Exhibit, 2002-0263. American Institute of Aeronau-tics and Astronautics, 2002.[76] Patrick J. Roache. Code verification by the method of manufactured solutions.Journal of Fluids Engineering, 124(1):4–10, March 2002.[77] P. L. Roe. Characteristic-based schemes for the Euler equations. In Annual Reviewof Fluid Mechanics, volume 18, pages 337–365. Annuals Reviews, Inc., 1986.[78] Phillip Roe. Error estimate for cell-vertex solutions od the compressible Eelerequations. Technical report, NASA Report, 1987.[79] Christopher Roy. Strategies for driving mesh adaptation in CFD. In Proceed-ings of the Forty-Seventh AIAA Aerospace Sciences Meeting. American Instituteof Aeronautics and Astronautics, 2009.[80] Christopher Roy. Review of discretization error estimators in scientific computing.In Proceedings of the Forty-Eighth AIAA Aerospace Sciences Meeting. AmericanInstitute of Aeronautics and Astronautics, 2010. AIAA Paper 2010-0126.[81] Mahkame Sharbatdar. Anisotropic mesh adaptation: Recovering quasi-structuredmeshes. Master’s thesis, The University of British Columbia, Department of Me-chanical Engineering, 2012.[82] Mahkame Sharbatdar, Alireza Jalali, and Carl Ollivier-Gooch. Smoothed Trunca-tion Error in Functional Error Estimation and Correction using Adjoint Methods154Bibliographyin an Unstructured Finite Volume Method. Computers & Fluids, 140:406–421,2016.[83] Mahkame Sharbatdar and Carl Ollivier-Gooch. Anisotropic mesh adaptation: Re-covering quasi-structured meshes. In Proceedings of the Fifty-First AIAA AerospaceSciences Meeting. AIAA 2013-0149, 2013.[84] Mahkame Sharbatdar and Carl Ollivier-Gooch. Eigenanalysis of truncation anddiscretization error on unstructured meshes. In 21st AIAA Computational FluidDynamics Conference, 2013-3089. American Institute of Aeronautics and Astro-nautics, 2013.[85] Lei Shi and Z.J. Wang. Adjoint-Based Error Estimation and hp-Adaptation forthe High-Order CPR Methods. In 51st AIAA Aerospace Science Meeting, 2013.[86] R. Skeel. A thoritical framework for proving accuracy results for deferred correc-tions. SIAM J. Numer. Anal., 19:171–196, 1981.[87] H.J. Stetter. The defect correction principle and discretization methods. Numer.Math., 29:425–443, 1978.[88] A. H. Stroud and Don Secrest. Gaussian Quadrature Formulas. Prentice-Hall,Englewood Cliffs, N.J., 1966.[89] T. J. Tautges. CGM: A geometry interface for mesh generation, analysis and otherapplications. Engineering with Computers, 17(3):299–314, 2001.[90] T.J. Tautges. The common geometry module (CGM): A generic, extensible geom-etry interface. In Proceedings of the 9th International Meshing Roundtable, Sandiareport SAND 2000-2207, pages 337–359. Sandia National Laboratories, 2000.[91] James L. Thomas, Boris Diskin, and Christopher Rumsey. Towards verification ofunstructured-grid solvers. In Forty-sixth AIAA Aerospace Sciences Meeting, 2008.AIAA 2008-666.[92] Michael Van Altena. High-order finite-volume discretisations for solving a modifiedadvection-diffusion problem on unstructured triangular meshes. Master’s thesis,The University of British Columbia, Department of Mechanical Engineering, Oc-tober 1999.155[93] D. A. Venditti and D. L. Darmofal. Adjoint error estimation and grid adapta-tion for functional outputs: Application to quasi-one-dimensional flow. Journal ofComputational Physics, 164(1):204–227, October 2000.[94] D. A. Venditti and D. L. Darmofal. Grid adaptation for functional outputs: Ap-plication to two-dimensional inviscid flows. Journal of Computational Physics,175(1):40–69, February 2002.[95] D. A. Venditti and D. L. Darmofal. Grid adaptation for functional outputs: Ap-plication to two-dimensional viscous flows. Journal of Computational Physics,187:22–46, 2003.[96] N. J. Walkington. A C1 tetrahedral finite element without edge degrees of freedom.SIAM Journal of Numerical Analysis, 52(1):330–342, 2014.[97] L . Wang and D. Mavriplis. Adjoint-based h-p Adaptive Discontinuous GalerkinMethods for the Compressible Euler Equations. Journal of Computational Physics,2009.[98] M. Woopen, G. May, and J. Schutz. Adjoint-Based Error Estimation and MeshAdaptation for Hybridized Discontinuous Galerkin Methods. International Journalfor numjerical methods in fluids, 76:811–834, 2014.[99] D. Zingg, S. De Rango, M. Nemec, and T. Pulliam. Comparison of several spatialdiscretizations for the Navier-Stokes equations. Journal of Computational Physics,160:683–704, 2000.156Appendix A: Constraints Equationsfor Obtaining C1 Interpolation ofthe SolutionEach basis function used for C1 interpolation of the solution is a quintic polynomial:ϕi (ξ, η) = ci0,0+ ci1,0ξ + ci0,1η+ ci2,0ξ2 + ci1,1ξη + ci0,2η2+ ci3,0ξ3 + ci2,1ξ2η + ci1,2ξη2 + ci0,3η3+ ci4,0ξ4 + ci3,1ξ3η + ci2,2ξ2η2 + ci1,2ξη3 + ci0,4η4+ ci5,0ξ5 + ci4,1ξ4η + ci3,2ξ3η2 + ci2,3ξ2η3 + ci1,4ξη4 + ci0,5η5The first derivatives are:∂ϕ∂ξ= c1,0 + 2c2,0ξ + c1,1η + 3c3,0ξ2 + 2c2,1ξη + c1,2η2 + 4c4,0ξ3 + 3c3,1ξ2η+ 2c2,2ξη2 + c1,2η3 + 5c5,0ξ4 + 4c4,1ξ3η + 3c3,2ξ2η2 + 2c2,3ξη3 + c1,4η4∂ϕ∂η= c0,1 + c1,1ξ + 2c0,2η + c2,1ξ2 + 2c1,2ξη + 3c0,3η2 + c3,1ξ3 + 2c2,2ξ2η+ 3c1,2ξη2 + 4c0,4η3 + c4,1ξ4 + 2c3,2ξ3η + 3c2,3ξ2η2 + 4c1,4ξη3 + 5c0,5η4and the second derivatives are:157Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ∂ξ2= 2c2,0 + 6c3,0ξ + 2c2,1η + 12c4,0ξ2 + 6c3,1ξη +2c2,2η2 + 20c5,0ξ3 + 12c4,1ξ2η + 6c3,2ξη2 + 2c2,3η3∂2ϕ∂ξ∂η= c1,1 + 2c2,1ξ + 2c1,2η + 3c3,1ξ2 + 4c2,2ξη +3c1,2η2 + 4c4,1ξ3 + 6c3,2ξ2η + 6c2,3ξη2 + 4c1,4η3∂2ϕ∂η2= 2c0,2 + 2c1,2ξ + 6c0,3η + 2c2,2ξ2 + 6c1,2ξη +12c0,4η2 + 2c3,2ξ3 + 6c2,3ξ2η + 12c1,4ξη2 + 20c0,5η3and the normal derivatives are:∂ϕ∂ξnξ +∂ϕ∂ηnη = (c1,0 + 2c2,0ξ + c1,1η + 3c3,0ξ2 + 2c2,1ξη + c1,2η2 + 4c4,0ξ3 + 3c3,1ξ2η +2c2,2ξη2 + c1,2η3 + 5c5,0ξ4 + 4c4,1ξ3η + 3c3,2ξ2η2 + 2c2,3ξη3 + c1,4η4)nξ(c0,1 + c1,1ξ + 2c0,2η + c2,1ξ2 + 2c1,2ξη + 3c0,3η2 + c3,1ξ3 + 2c2,2ξ2η +3c1,2ξη2 + 4c0,4η3 + c4,1ξ4 + 2c3,2ξ3η + 3c2,3ξ2η2 + 4c1,4ξη3 + 5c0,5η4)nηThe full list of 21 constraints for the 21 degrees of freedom, in Figure 3.8, which generatethe full (21× 21) system of equations is shown here. The constrains corresponding toϕ0:ϕ0|(0,0) = c00,0 = 1ϕ0|(1,0) = c00,0 + c01,0 + c02,0 + c03,0 + c04,0 + c05,0 = 0ϕ0|(0,1) = c00,0 + c00,1 + c00,2 + c00,3 + c00,4 + c00,5 = 0158Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ0∂ξ∣∣∣∣∣(0,0)= c01,0 = 0∂ϕ0∂ξ∣∣∣∣∣(1,0)= c01,0 + 2c02,0 + 3c03,0 + 4c04,0 + 5c05,0 = 0∂ϕ0∂ξ∣∣∣∣∣(0,1)= c01,0 + c01,1η + c01,2 + c01,2 + c01,4 = 0∂ϕ0∂η∣∣∣∣∣(0,0)= c00,1 = 0∂ϕ0∂η∣∣∣∣∣(1,0)= c00,1 + c01,1 + c02,1 + c03,1 + c04,1 = 0∂ϕ0∂η∣∣∣∣∣(0,1)= c00,1 + 2c00,2 + 3c00,3 + 4c00,4 + 5c00,5 = 0∂2ϕ0∂ξ2∣∣∣∣∣(0,0)= 2c02,0 = 0∂2ϕ0∂ξ2∣∣∣∣∣(1,0)= 2c02,0 + 6c03,0 + 12c04,0 + 20c05,0 = 0∂2ϕ0∂ξ2∣∣∣∣∣(0,1)= 2c02,0 + 2c02,1 + 2c02,2 + 2c02,3 = 0∂2ϕ0∂ξ∂η∣∣∣∣∣(0,0)= c01,1 = 0∂2ϕ0∂ξ∂η∣∣∣∣∣(1,0)= c01,1 + 2c02,1 + 3c03,1 + 4c04,1 = 0∂2ϕ0∂ξ∂η∣∣∣∣∣(0,1)= c01,1 + 2c01,2 + 3c01,2 + 4c01,4 = 0∂2ϕ0∂η2∣∣∣∣∣(0,0)= 2c00,2 = 0∂2ϕ0∂η2∣∣∣∣∣(1,0)= 2c00,2 + 2c01,2 + 2c02,2 + 2c03,2 = 0∂2ϕ0∂η2∣∣∣∣∣(0,1)= 2c00,2 + 6c00,3 + 12c00,4 + 20c00,5 = 0159Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ0∂ξnξ +∂ϕ0∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ0∂η∣∣∣∣∣( 12 ,0) = c00,1 +12c01,1 +14c02,1 +18c03,1 +116c04,1 = 0(∂ϕ0∂ξnξ +∂ϕ0∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c01,0 + c02,0 + c01,1 +34c03,0 +34c02,1 +34c01,2 +12c04,0 +12c03,1 +12c02,2 +12c01,2 +516c05,0 +916c04,1 +716c03,2 +716c02,3 +516c01,4 + c00,1 + c00,2 +34c00,3 +12c00,4 +516c00,5) = 0(∂ϕ0∂ξnξ +∂ϕ0∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ0∂ξ∣∣∣∣∣(0, 12) = −(c00,1 + c00,2 +34c00,3 +12c00,4 +516c00,5)= 0The constrains corresponding to ϕ1:ϕ1|(0,0) = c10,0 = 0ϕ1|(1,0) = c10,0 + c11,0 + c12,0 + c13,0 + c14,0 + c15,0 = 0ϕ1|(0,1) = c10,0 + c10,1 + c10,2 + c10,3 + c10,4 + c10,5 = 0∂ϕ1∂ξ∣∣∣∣∣(0,0)= c11,0 = 1∂ϕ1∂ξ∣∣∣∣∣(1,0)= c11,0 + 2c12,0 + 3c13,0 + 4c14,0 + 5c15,0 = 0∂ϕ1∂ξ∣∣∣∣∣(0,1)= c11,0 + c11,1η + c11,2 + c11,2 + c11,4 = 0∂ϕ1∂η∣∣∣∣∣(0,0)= c10,1 = 0∂ϕ1∂η∣∣∣∣∣(1,0)= c10,1 + c11,1 + c12,1 + c13,1 + c14,1 = 0∂ϕ1∂η∣∣∣∣∣(0,1)= c10,1 + 2c10,2 + 3c10,3 + 4c10,4 + 5c10,5 = 0160Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ1∂ξ2∣∣∣∣∣(0,0)= 2c12,0 = 0∂2ϕ1∂ξ2∣∣∣∣∣(1,0)= 2c12,0 + 6c13,0 + 12c14,0 + 20c15,0 = 0∂2ϕ1∂ξ2∣∣∣∣∣(0,1)= 2c12,0 + 2c12,1 + 2c12,2 + 2c12,3 = 0∂2ϕ1∂ξ∂η∣∣∣∣∣(0,0)= c11,1 = 0∂2ϕ1∂ξ∂η∣∣∣∣∣(1,0)= c11,1 + 2c12,1 + 3c13,1 + 4c14,1 = 0∂2ϕ1∂ξ∂η∣∣∣∣∣(0,1)= c11,1 + 2c11,2 + 3c11,2 + 4c11,4 = 0∂2ϕ1∂η2∣∣∣∣∣(0,0)= 2c10,2 = 0∂2ϕ1∂η2∣∣∣∣∣(1,0)= 2c10,2 + 2c11,2 + 2c12,2 + 2c13,2 = 0∂2ϕ1∂η2∣∣∣∣∣(0,1)= 2c10,2 + 6c10,3 + 12c10,4 + 20c10,5 = 0(∂ϕ1∂ξnξ +∂ϕ1∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ1∂η∣∣∣∣∣( 12 ,0) = c10,1 +12c11,1 +14c12,1 +18c13,1 +116c14,1 = 0(∂ϕ1∂ξnξ +∂ϕ1∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c11,0 + c12,0 + c11,1 +34c13,0 +34c12,1 +34c11,2 +12c14,0 +12c13,1 +12c12,2 +12c11,2 +516c15,0 +916c14,1 +716c13,2 +716c12,3 +516c11,4 + c10,1 + c10,2 +34c10,3 +12c10,4 +516c10,5) = 0(∂ϕ1∂ξnξ +∂ϕ1∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ1∂ξ∣∣∣∣∣(0, 12) = −(c10,1 + c10,2 +34c10,3 +12c10,4 +516c10,5)= 0The constrains corresponding to ϕ2:ϕ2|(0,0) = c20,0 = 0ϕ2|(1,0) = c20,0 + c21,0 + c22,0 + c23,0 + c24,0 + c25,0 = 0ϕ2|(0,1) = c20,0 + c20,1 + c20,2 + c20,3 + c20,4 + c20,5 = 0161Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ2∂ξ∣∣∣∣∣(0,0)= c21,0 = 0∂ϕ2∂ξ∣∣∣∣∣(1,0)= c21,0 + 2c22,0 + 3c23,0 + 4c24,0 + 5c25,0 = 0∂ϕ2∂ξ∣∣∣∣∣(0,1)= c21,0 + c21,1η + c21,2 + c21,2 + c21,4 = 0∂ϕ2∂η∣∣∣∣∣(0,0)= c20,1 = 1∂ϕ2∂η∣∣∣∣∣(1,0)= c20,1 + c21,1 + c22,1 + c23,1 + c24,1 = 0∂ϕ2∂η∣∣∣∣∣(0,1)= c20,1 + 2c20,2 + 3c20,3 + 4c20,4 + 5c20,5 = 0∂2ϕ2∂ξ2∣∣∣∣∣(0,0)= 2c22,0 = 0∂2ϕ2∂ξ2∣∣∣∣∣(1,0)= 2c22,0 + 6c23,0 + 12c24,0 + 20c25,0 = 0∂2ϕ2∂ξ2∣∣∣∣∣(0,1)= 2c22,0 + 2c22,1 + 2c22,2 + 2c22,3 = 0∂2ϕ2∂ξ∂η∣∣∣∣∣(0,0)= c21,1 = 0∂2ϕ2∂ξ∂η∣∣∣∣∣(1,0)= c21,1 + 2c22,1 + 3c23,1 + 4c24,1 = 0∂2ϕ2∂ξ∂η∣∣∣∣∣(0,1)= c21,1 + 2c21,2 + 3c21,2 + 4c21,4 = 0∂2ϕ2∂η2∣∣∣∣∣(0,0)= 2c20,2 = 0∂2ϕ2∂η2∣∣∣∣∣(1,0)= 2c20,2 + 2c21,2 + 2c22,2 + 2c23,2 = 0∂2ϕ2∂η2∣∣∣∣∣(0,1)= 2c20,2 + 6c20,3 + 12c20,4 + 20c20,5 = 0162Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ2∂ξnξ +∂ϕ2∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ2∂η∣∣∣∣∣( 12 ,0) = c20,1 +12c21,1 +14c22,1 +18c23,1 +116c24,1 = 0(∂ϕ2∂ξnξ +∂ϕ2∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c21,0 + c22,0 + c21,1 +34c23,0 +34c22,1 +34c21,2 +12c24,0 +12c23,1 +12c22,2 +12c21,2 +516c25,0 +916c204,1 +716c23,2 +716c22,3 +516c21,4 + c20,1 + c20,2 +34c20,3 +12c20,4 +516c20,5) = 0(∂ϕ2∂ξnξ +∂ϕ2∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ2∂ξ∣∣∣∣∣(0, 12) = −(c20,1 + c20,2 +34c20,3 +12c20,4 +516c20,5)= 0The constrains corresponding to ϕ3:ϕ3|(0,0) = c30,0 = 0ϕ3|(1,0) = c00,0 + c01,0 + c02,0 + c03,0 + c04,0 + c05,0 = 0ϕ3|(0,1) = c00,0 + c00,1 + c00,2 + c00,3 + c00,4 + c00,5 = 0∂ϕ3∂ξ∣∣∣∣∣(0,0)= c31,0 = 0∂ϕ3∂ξ∣∣∣∣∣(1,0)= c31,0 + 2c32,0 + 3c33,0 + 4c34,0 + 5c35,0 = 0∂ϕ3∂ξ∣∣∣∣∣(0,1)= c31,0 + c31,1η + c31,2 + c31,2 + c31,4 = 0∂ϕ3∂η∣∣∣∣∣(0,0)= c30,1 = 0∂ϕ3∂η∣∣∣∣∣(1,0)= c30,1 + c31,1 + c32,1 + c33,1 + c34,1 = 0∂ϕ3∂η∣∣∣∣∣(0,1)= c30,1 + 2c30,2 + 3c30,3 + 4c30,4 + 5c30,5 = 0163Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ3∂ξ2∣∣∣∣∣(0,0)= 2c32,0 = 1∂2ϕ3∂ξ2∣∣∣∣∣(1,0)= 2c32,0 + 6c33,0 + 12c34,0 + 20c35,0 = 0∂2ϕ3∂ξ2∣∣∣∣∣(0,1)= 2c32,0 + 2c32,1 + 2c32,2 + 2c32,3 = 0∂2ϕ3∂ξ∂η∣∣∣∣∣(0,0)= c31,1 = 0∂2ϕ3∂ξ∂η∣∣∣∣∣(1,0)= c31,1 + 2c32,1 + 3c33,1 + 4c34,1 = 0∂2ϕ3∂ξ∂η∣∣∣∣∣(0,1)= c31,1 + 2c31,2 + 3c31,2 + 4c31,4 = 0∂2ϕ3∂η2∣∣∣∣∣(0,0)= 2c30,2 = 0∂2ϕ0∂η2∣∣∣∣∣(1,0)= 2c30,2 + 2c31,2 + 2c32,2 + 2c33,2 = 0∂2ϕ3∂η2∣∣∣∣∣(0,1)= 2c30,2 + 6c30,3 + 12c30,4 + 20c30,5 = 0(∂ϕ3∂ξnξ +∂ϕ3∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ3∂η∣∣∣∣∣( 12 ,0) = c30,1 +12c31,1 +14c32,1 +18c33,1 +116c34,1 = 0(∂ϕ3∂ξnξ +∂ϕ3∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c31,0 + c32,0 + c31,1 +34c33,0 +34c32,1 +34c31,2 +12c34,0 +12c33,1 +12c32,2 +12c31,2 +516c35,0 +916c34,1 +716c33,2 +716c32,3 +516c31,4 + c30,1 + c30,2 +34c30,3 +12c30,4 +516c30,5) = 0(∂ϕ3∂ξnξ +∂ϕ3∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ3∂ξ∣∣∣∣∣(0, 12) = −(c30,1 + c30,2 +34c30,3 +12c30,4 +516c30,5)= 0The constrains corresponding to ϕ4:ϕ4|(0,0) = c40,0 = 0ϕ4|(1,0) = c40,0 + c41,0 + c42,0 + c43,0 + c44,0 + c45,0 = 0ϕ4|(0,1) = c40,0 + c40,1 + c40,2 + c40,3 + c40,4 + c40,5 = 0164Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ4∂ξ∣∣∣∣∣(0,0)= c41,0 = 0∂ϕ4∂ξ∣∣∣∣∣(1,0)= c41,0 + 2c42,0 + 3c43,0 + 4c44,0 + 5c45,0 = 0∂ϕ4∂ξ∣∣∣∣∣(0,1)= c41,0 + c41,1η + c41,2 + c41,2 + c41,4 = 0∂ϕ4∂η∣∣∣∣∣(0,0)= c40,1 = 0∂ϕ4∂η∣∣∣∣∣(1,0)= c40,1 + c41,1 + c42,1 + c43,1 + c44,1 = 0∂ϕ4∂η∣∣∣∣∣(0,1)= c40,1 + 2c40,2 + 3c40,3 + 4c40,4 + 5c40,5 = 0∂2ϕ4∂ξ2∣∣∣∣∣(0,0)= 2c42,0 = 0∂2ϕ4∂ξ2∣∣∣∣∣(1,0)= 2c42,0 + 6c43,0 + 12c44,0 + 20c45,0 = 0∂2ϕ4∂ξ2∣∣∣∣∣(0,1)= 2c42,0 + 2c42,1 + 2c42,2 + 2c42,3 = 0∂2ϕ4∂ξ∂η∣∣∣∣∣(0,0)= c41,1 = 1∂2ϕ4∂ξ∂η∣∣∣∣∣(1,0)= c41,1 + 2c42,1 + 3c43,1 + 4c44,1 = 0∂2ϕ0∂ξ∂η∣∣∣∣∣(0,1)= c41,1 + 2c41,2 + 3c41,2 + 4c41,4 = 0∂2ϕ4∂η2∣∣∣∣∣(0,0)= 2c40,2 = 0∂2ϕ4∂η2∣∣∣∣∣(1,0)= 2c40,2 + 2c41,2 + 2c42,2 + 2c43,2 = 0∂2ϕ4∂η2∣∣∣∣∣(0,1)= 2c40,2 + 6c40,3 + 12c40,4 + 20c40,5 = 0165Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ4∂ξnξ +∂ϕ4∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ4∂η∣∣∣∣∣( 12 ,0) = c40,1 +12c41,1 +14c42,1 +18c43,1 +116c44,1 = 0(∂ϕ4∂ξnξ +∂ϕ4∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c41,0 + c42,0 + c41,1 +34c43,0 +34c42,1 +34c41,2 +12c44,0 +12c43,1 +12c42,2 +12c41,2 +516c45,0 +916c44,1 +716c43,2 +716c42,3 +516c41,4 + c40,1 + c40,2 +34c40,3 +12c40,4 +516c40,5) = 0(∂ϕ4∂ξnξ +∂ϕ4∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ4∂ξ∣∣∣∣∣(0, 12) = −(c40,1 + c40,2 +34c40,3 +12c40,4 +516c40,5)= 0The constrains corresponding to ϕ5:ϕ5|(0,0) = c50,0 = 0ϕ5|(1,0) = c50,0 + c51,0 + c52,0 + c53,0 + c54,0 + c55,0 = 0ϕ5|(0,1) = c50,0 + c50,1 + c50,2 + c50,3 + c50,4 + c50,5 = 0∂ϕ5∂ξ∣∣∣∣∣(0,0)= c51,0 = 0∂ϕ5∂ξ∣∣∣∣∣(1,0)= c51,0 + 2c52,0 + 3c53,0 + 4c54,0 + 5c55,0 = 0∂ϕ5∂ξ∣∣∣∣∣(0,1)= c51,0 + c51,1η + c51,2 + c51,2 + c51,4 = 0∂ϕ5∂η∣∣∣∣∣(0,0)= c50,1 = 0∂ϕ5∂η∣∣∣∣∣(1,0)= c50,1 + c51,1 + c52,1 + c53,1 + c54,1 = 0∂ϕ5∂η∣∣∣∣∣(0,1)= c50,1 + 2c50,2 + 3c50,3 + 4c50,4 + 5c50,5 = 0166Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ5∂ξ2∣∣∣∣∣(0,0)= 2c52,0 = 0∂2ϕ5∂ξ2∣∣∣∣∣(1,0)= 2c52,0 + 6c53,0 + 12c54,0 + 20c55,0 = 0∂2ϕ5∂ξ2∣∣∣∣∣(0,1)= 2c52,0 + 2c52,1 + 2c52,2 + 2c52,3 = 0∂2ϕ5∂ξ∂η∣∣∣∣∣(0,0)= c51,1 = 0∂2ϕ5∂ξ∂η∣∣∣∣∣(1,0)= c51,1 + 2c52,1 + 3c53,1 + 4c54,1 = 0∂2ϕ5∂ξ∂η∣∣∣∣∣(0,1)= c51,1 + 2c51,2 + 3c51,2 + 4c51,4 = 0∂2ϕ5∂η2∣∣∣∣∣(0,0)= 2c50,2 = 1∂2ϕ5∂η2∣∣∣∣∣(1,0)= 2c50,2 + 2c51,2 + 2c52,2 + 2c53,2 = 0∂2ϕ5∂η2∣∣∣∣∣(0,1)= 2c50,2 + 6c50,3 + 12c50,4 + 20c50,5 = 0(∂ϕ5∂ξnξ +∂ϕ5∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ5∂η∣∣∣∣∣( 12 ,0) = c50,1 +12c51,1 +14c52,1 +18c53,1 +116c54,1 = 0(∂ϕ5∂ξnξ +∂ϕ5∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c51,0 + c52,0 + c51,1 +34c53,0 +34c52,1 +34c51,2 +12c54,0 +12c53,1 +12c52,2 +12c51,2 +516c55,0 +916c54,1 +716c53,2 +716c52,3 +516c51,4 + c50,1 + c50,2 +34c50,3 +12c50,4 +516c50,5) = 0(∂ϕ5∂ξnξ +∂ϕ5∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ5∂ξ∣∣∣∣∣(0, 12) = −(c50,1 + c50,2 +34c50,3 +12c50,4 +516c50,5)= 0The constrains corresponding to ϕ6:ϕ6|(0,0) = c60,0 = 0ϕ6|(1,0) = c60,0 + c61,0 + c62,0 + c63,0 + c64,0 + c65,0 = 1ϕ6|(0,1) = c60,0 + c60,1 + c60,2 + c60,3 + c60,4 + c60,5 = 0167Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ6∂ξ∣∣∣∣∣(0,0)= c61,0 = 0∂ϕ6∂ξ∣∣∣∣∣(1,0)= c61,0 + 2c62,0 + 3c63,0 + 4c64,0 + 5c65,0 = 0∂ϕ6∂ξ∣∣∣∣∣(0,1)= c61,0 + c61,1η + c61,2 + c61,2 + c61,4 = 0∂ϕ6∂η∣∣∣∣∣(0,0)= c60,1 = 0∂ϕ6∂η∣∣∣∣∣(1,0)= c60,1 + c61,1 + c62,1 + c63,1 + c64,1 = 0∂ϕ6∂η∣∣∣∣∣(0,1)= c60,1 + 2c60,2 + 3c60,3 + 4c60,4 + 5c60,5 = 0∂2ϕ6∂ξ2∣∣∣∣∣(0,0)= 2c62,0 = 0∂2ϕ6∂ξ2∣∣∣∣∣(1,0)= 2c62,0 + 6c63,0 + 12c64,0 + 20c65,0 = 0∂2ϕ6∂ξ2∣∣∣∣∣(0,1)= 2c62,0 + 2c62,1 + 2c62,2 + 2c62,3 = 0∂2ϕ6∂ξ∂η∣∣∣∣∣(0,0)= c61,1 = 0∂2ϕ6∂ξ∂η∣∣∣∣∣(1,0)= c61,1 + 2c62,1 + 3c63,1 + 4c64,1 = 0∂2ϕ6∂ξ∂η∣∣∣∣∣(0,1)= c61,1 + 2c61,2 + 3c61,2 + 4c61,4 = 0∂2ϕ6∂η2∣∣∣∣∣(0,0)= 2c60,2 = 0∂2ϕ6∂η2∣∣∣∣∣(1,0)= 2c60,2 + 2c61,2 + 2c62,2 + 2c63,2 = 0∂2ϕ6∂η2∣∣∣∣∣(0,1)= 2c60,2 + 6c60,3 + 12c60,4 + 20c60,5 = 0168Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ6∂ξnξ +∂ϕ6∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ6∂η∣∣∣∣∣( 12 ,0) = c60,1 +12c61,1 +14c62,1 +18c63,1 +116c64,1 = 0(∂ϕ6∂ξnξ +∂ϕ6∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c61,0 + c62,0 + c61,1 +34c63,0 +34c62,1 +34c61,2 +12c64,0 +12c63,1 +12c62,2 +12c61,2 +516c65,0 +916c64,1 +716c63,2 +716c62,3 +516c61,4 + c60,1 + c60,2 +34c60,3 +12c60,4 +516c60,5) = 0(∂ϕ6∂ξnξ +∂ϕ6∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ6∂ξ∣∣∣∣∣(0, 12) = −(c60,1 + c60,2 +34c60,3 +12c60,4 +516c60,5)= 0The constrains corresponding to ϕ7:ϕ7|(0,0) = c70,0 = 0ϕ7|(1,0) = c70,0 + c71,0 + c72,0 + c73,0 + c74,0 + c75,0 = 0ϕ7|(0,1) = c70,0 + c70,1 + c70,2 + c70,3 + c70,4 + c70,5 = 0∂ϕ7∂ξ∣∣∣∣∣(0,0)= c71,0 = 0∂ϕ7∂ξ∣∣∣∣∣(1,0)= c71,0 + 2c72,0 + 3c73,0 + 4c74,0 + 5c75,0 = 1∂ϕ7∂ξ∣∣∣∣∣(0,1)= c71,0 + c71,1η + c71,2 + c71,2 + c71,4 = 0∂ϕ7∂η∣∣∣∣∣(0,0)= c70,1 = 0∂ϕ7∂η∣∣∣∣∣(1,0)= c70,1 + c71,1 + c72,1 + c73,1 + c74,1 = 0∂ϕ7∂η∣∣∣∣∣(0,1)= c70,1 + 2c70,2 + 3c70,3 + 4c70,4 + 5c70,5 = 0169Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ7∂ξ2∣∣∣∣∣(0,0)= 2c72,0 = 0∂2ϕ7∂ξ2∣∣∣∣∣(1,0)= 2c72,0 + 6c73,0 + 12c74,0 + 20c75,0 = 0∂2ϕ7∂ξ2∣∣∣∣∣(0,1)= 2c72,0 + 2c72,1 + 2c72,2 + 2c72,3 = 0∂2ϕ7∂ξ∂η∣∣∣∣∣(0,0)= c71,1 = 0∂2ϕ7∂ξ∂η∣∣∣∣∣(1,0)= c71,1 + 2c72,1 + 3c73,1 + 4c74,1 = 0∂2ϕ7∂ξ∂η∣∣∣∣∣(0,1)= c71,1 + 2c71,2 + 3c71,2 + 4c71,4 = 0∂2ϕ7∂η2∣∣∣∣∣(0,0)= 2c00,2 = 0∂2ϕ7∂η2∣∣∣∣∣(1,0)= 2c70,2 + 2c71,2 + 2c72,2 + 2c73,2 = 0∂2ϕ7∂η2∣∣∣∣∣(0,1)= 2c70,2 + 6c70,3 + 12c70,4 + 20c70,5 = 0(∂ϕ7∂ξnξ +∂ϕ7∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ7∂η∣∣∣∣∣( 12 ,0) = c70,1 +12c71,1 +14c72,1 +18c73,1 +116c74,1 = 0(∂ϕ7∂ξnξ +∂ϕ7∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c71,0 + c72,0 + c71,1 +34c73,0 +34c72,1 +34c71,2 +12c74,0 +12c73,1 +12c72,2 +12c71,2 +516c75,0 +916c74,1 +716c73,2 +716c72,3 +516c71,4 + c70,1 + c70,2 +34c70,3 +12c70,4 +516c70,5) = 0(∂ϕ7∂ξnξ +∂ϕ7∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ7∂ξ∣∣∣∣∣(0, 12) = −(c70,1 + c70,2 +34c70,3 +12c70,4 +516c70,5)= 0The constrains corresponding to ϕ8:ϕ8|(0,0) = c80,0 = 0ϕ8|(1,0) = c80,0 + c81,0 + c82,0 + c83,0 + c84,0 + c85,0 = 0ϕ8|(0,1) = c80,0 + c80,1 + c80,2 + c80,3 + c80,4 + c80,5 = 0170Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ8∂ξ∣∣∣∣∣(0,0)= c81,0 = 0∂ϕ8∂ξ∣∣∣∣∣(1,0)= c81,0 + 2c82,0 + 3c83,0 + 4c84,0 + 5c85,0 = 0∂ϕ8∂ξ∣∣∣∣∣(0,1)= c81,0 + c81,1η + c81,2 + c81,2 + c81,4 = 0∂ϕ8∂η∣∣∣∣∣(0,0)= c80,1 = 0∂ϕ8∂η∣∣∣∣∣(1,0)= c80,1 + c81,1 + c82,1 + c83,1 + c84,1 = 1∂ϕ8∂η∣∣∣∣∣(0,1)= c80,1 + 2c80,2 + 3c80,3 + 4c80,4 + 5c80,5 = 0∂2ϕ8∂ξ2∣∣∣∣∣(0,0)= 2c82,0 = 0∂2ϕ8∂ξ2∣∣∣∣∣(1,0)= 2c82,0 + 6c83,0 + 12c84,0 + 20c85,0 = 0∂2ϕ8∂ξ2∣∣∣∣∣(0,1)= 2c82,0 + 2c82,1 + 2c82,2 + 2c82,3 = 0∂2ϕ8∂ξ∂η∣∣∣∣∣(0,0)= c81,1 = 0∂2ϕ8∂ξ∂η∣∣∣∣∣(1,0)= c81,1 + 2c82,1 + 3c83,1 + 4c84,1 = 0∂2ϕ8∂ξ∂η∣∣∣∣∣(0,1)= c81,1 + 2c81,2 + 3c81,2 + 4c81,4 = 0∂2ϕ8∂η2∣∣∣∣∣(0,0)= 2c80,2 = 0∂2ϕ8∂η2∣∣∣∣∣(1,0)= 2c80,2 + 2c81,2 + 2c82,2 + 2c83,2 = 0∂2ϕ8∂η2∣∣∣∣∣(0,1)= 2c80,2 + 6c080,3 + 12c80,4 + 20c80,5 = 0171Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ8∂ξnξ +∂ϕ8∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ8∂η∣∣∣∣∣( 12 ,0) = c80,1 +12c81,1 +14c82,1 +18c83,1 +116c84,1 = 0(∂ϕ8∂ξnξ +∂ϕ8∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c81,0 + c82,0 + c81,1 +34c83,0 +34c82,1 +34c81,2 +12c84,0 +12c83,1 +12c82,2 +12c81,2 +516c85,0 +916c84,1 +716c83,2 +716c82,3 +516c81,4 + c80,1 + c80,2 +34c80,3 +12c80,4 +516c80,5) = 0(∂ϕ8∂ξnξ +∂ϕ8∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ8∂ξ∣∣∣∣∣(0, 12) = −(c80,1 + c80,2 +34c80,3 +12c80,4 +516c80,5)= 0The constrains corresponding to ϕ9:ϕ9|(0,0) = c90,0 = 0ϕ9|(1,0) = c90,0 + c91,0 + c92,0 + c93,0 + c94,0 + c95,0 = 0ϕ9|(0,1) = c90,0 + c90,1 + c90,2 + c90,3 + c90,4 + c90,5 = 0∂ϕ9∂ξ∣∣∣∣∣(0,0)= c91,0 = 0∂ϕ9∂ξ∣∣∣∣∣(1,0)= c91,0 + 2c92,0 + 3c93,0 + 4c94,0 + 5c95,0 = 0∂ϕ9∂ξ∣∣∣∣∣(0,1)= c91,0 + c91,1η + c91,2 + c91,2 + c91,4 = 0∂ϕ9∂η∣∣∣∣∣(0,0)= c90,1 = 0∂ϕ9∂η∣∣∣∣∣(1,0)= c90,1 + c91,1 + c92,1 + c93,1 + c94,1 = 0∂ϕ9∂η∣∣∣∣∣(0,1)= c90,1 + 2c90,2 + 3c90,3 + 4c90,4 + 5c90,5 = 0172Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ9∂ξ2∣∣∣∣∣(0,0)= 2c92,0 = 0∂2ϕ9∂ξ2∣∣∣∣∣(1,0)= 2c92,0 + 6c93,0 + 12c94,0 + 20c95,0 = 1∂2ϕ9∂ξ2∣∣∣∣∣(0,1)= 2c92,0 + 2c92,1 + 2c92,2 + 2c92,3 = 0∂2ϕ9∂ξ∂η∣∣∣∣∣(0,0)= c91,1 = 0∂2ϕ9∂ξ∂η∣∣∣∣∣(1,0)= c91,1 + 2c92,1 + 3c93,1 + 4c94,1 = 0∂2ϕ9∂ξ∂η∣∣∣∣∣(0,1)= c91,1 + 2c91,2 + 3c91,2 + 4c91,4 = 0∂2ϕ9∂η2∣∣∣∣∣(0,0)= 2c90,2 = 0∂2ϕ9∂η2∣∣∣∣∣(1,0)= 2c90,2 + 2c91,2 + 2c92,2 + 2c93,2 = 0∂2ϕ9∂η2∣∣∣∣∣(0,1)= 2c90,2 + 6c90,3 + 12c90,4 + 20c90,5 = 0(∂ϕ9∂ξnξ +∂ϕ9∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ9∂η∣∣∣∣∣( 12 ,0) = c90,1 +12c91,1 +14c92,1 +18c93,1 +116c94,1 = 0(∂ϕ9∂ξnξ +∂ϕ9∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c91,0 + c92,0 + c91,1 +34c93,0 +34c92,1 +34c91,2 +12c94,0 +12c93,1 +12c92,2 +12c91,2 +516c95,0 +916c94,1 +716c93,2 +716c92,3 +516c91,4 + c90,1 + c90,2 +34c90,3 +12c90,4 +516c90,5) = 0(∂ϕ9∂ξnξ +∂ϕ9∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ9∂ξ∣∣∣∣∣(0, 12) = −(c90,1 + c90,2 +34c90,3 +12c90,4 +516c90,5)= 0The constrains corresponding to ϕ10:ϕ10|(0,0) = c100,0 = 0ϕ10|(1,0) = c100,0 + c101,0 + c102,0 + c103,0 + c104,0 + c105,0 = 0ϕ10|(0,1) = c100,0 + c100,1 + c100,2 + c100,3 + c100,4 + c100,5 = 0173Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ10∂ξ∣∣∣∣∣(0,0)= c101,0 = 0∂ϕ10∂ξ∣∣∣∣∣(1,0)= c101,0 + 2c102,0 + 3c103,0 + 4c104,0 + 5c105,0 = 0∂ϕ10∂ξ∣∣∣∣∣(0,1)= c101,0 + c101,1η + c101,2 + c101,2 + c101,4 = 0∂ϕ10∂η∣∣∣∣∣(0,0)= c100,1 = 0∂ϕ10∂η∣∣∣∣∣(1,0)= c100,1 + c101,1 + c102,1 + c103,1 + c104,1 = 0∂ϕ10∂η∣∣∣∣∣(0,1)= c100,1 + 2c100,2 + 3c100,3 + 4c100,4 + 5c100,5 = 0∂2ϕ10∂ξ2∣∣∣∣∣(0,0)= 2c102,0 = 0∂2ϕ10∂ξ2∣∣∣∣∣(1,0)= 2c102,0 + 6c103,0 + 12c104,0 + 20c105,0 = 0∂2ϕ10∂ξ2∣∣∣∣∣(0,1)= 2c102,0 + 2c102,1 + 2c102,2 + 2c102,3 = 0∂2ϕ10∂ξ∂η∣∣∣∣∣(0,0)= c101,1 = 0∂2ϕ10∂ξ∂η∣∣∣∣∣(1,0)= c101,1 + 2c102,1 + 3c103,1 + 4c104,1 = 1∂2ϕ10∂ξ∂η∣∣∣∣∣(0,1)= c101,1 + 2c101,2 + 3c101,2 + 4c101,4 = 0∂2ϕ10∂η2∣∣∣∣∣(0,0)= 2c100,2 = 0∂2ϕ0∂η2∣∣∣∣∣(1,0)= 2c100,2 + 2c101,2 + 2c102,2 + 2c103,2 = 0∂2ϕ0∂η2∣∣∣∣∣(0,1)= 2c100,2 + 6c100,3 + 12c100,4 + 20c100,5 = 0174Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ10∂ξnξ +∂ϕ10∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ10∂η∣∣∣∣∣( 12 ,0) = c100,1 +12c101,1 +14c102,1 +18c103,1 +116c104,1 = 0(∂ϕ10∂ξnξ +∂ϕ10∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c101,0 + c102,0 + c101,1 +34c103,0 +34c102,1 +34c101,2 +12c104,0 +12c103,1 +12c102,2 +12c101,2 +516c105,0 +916c104,1 +716c103,2 +716c102,3 +516c101,4 + c100,1 + c100,2 +34c100,3 +12c100,4 +516c100,5) = 0(∂ϕ10∂ξnξ +∂ϕ10∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ10∂ξ∣∣∣∣∣(0, 12) = −(c100,1 + c100,2 +34c100,3 +12c100,4 +516c100,5)= 0The constrains corresponding to ϕ11:ϕ11|(0,0) = c110,0 = 0ϕ11|(1,0) = c110,0 + c111,0 + c112,0 + c113,0 + c114,0 + c115,0 = 0ϕ11|(0,1) = c110,0 + c110,1 + c110,2 + c110,3 + c110,4 + c110,5 = 0∂ϕ11∂ξ∣∣∣∣∣(0,0)= c111,0 = 0∂ϕ11∂ξ∣∣∣∣∣(1,0)= c111,0 + 2c112,0 + 3c113,0 + 4c114,0 + 5c115,0 = 0∂ϕ11∂ξ∣∣∣∣∣(0,1)= c111,0 + c111,1η + c111,2 + c111,2 + c111,4 = 0∂ϕ11∂η∣∣∣∣∣(0,0)= c110,1 = 0∂ϕ11∂η∣∣∣∣∣(1,0)= c110,1 + c111,1 + c112,1 + c113,1 + c114,1 = 0∂ϕ11∂η∣∣∣∣∣(0,1)= c110,1 + 2c110,2 + 3c110,3 + 4c110,4 + 5c110,5 = 0175Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ11∂ξ2∣∣∣∣∣(0,0)= 2c112,0 = 0∂2ϕ11∂ξ2∣∣∣∣∣(1,0)= 2c112,0 + 6c113,0 + 12c114,0 + 20c115,0 = 0∂2ϕ11∂ξ2∣∣∣∣∣(0,1)= 2c112,0 + 2c112,1 + 2c112,2 + 2c112,3 = 0∂2ϕ11∂ξ∂η∣∣∣∣∣(0,0)= c111,1 = 0∂2ϕ11∂ξ∂η∣∣∣∣∣(1,0)= c111,1 + 2c112,1 + 3c113,1 + 4c114,1 = 0∂2ϕ11∂ξ∂η∣∣∣∣∣(0,1)= c111,1 + 2c111,2 + 3c111,2 + 4c111,4 = 0∂2ϕ11∂η2∣∣∣∣∣(0,0)= 2c110,2 = 0∂2ϕ11∂η2∣∣∣∣∣(1,0)= 2c110,2 + 2c111,2 + 2c112,2 + 2c113,2 = 1∂2ϕ11∂η2∣∣∣∣∣(0,1)= 2c110,2 + 6c110,3 + 12c110,4 + 20c110,5 = 0(∂ϕ11∂ξnξ +∂ϕ11∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ11∂η∣∣∣∣∣( 12 ,0) = c110,1 +12c111,1 +14c112,1 +18c113,1 +116c114,1 = 0(∂ϕ11∂ξnξ +∂ϕ11∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c111,0 + c112,0 + c111,1 +34c113,0 +34c112,1 +34c111,2 +12c114,0 +12c113,1 +12c112,2 +12c111,2 +516c115,0 +916c114,1 +716c113,2 +716c112,3 +516c111,4 + c110,1 + c110,2 +34c110,3 +12c110,4 +516c110,5) = 0(∂ϕ11∂ξnξ +∂ϕ11∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ11∂ξ∣∣∣∣∣(0, 12) = −(c110,1 + c110,2 +34c110,3 +12c110,4 +516c110,5)= 0The constrains corresponding to ϕ12:ϕ12|(0,0) = c120,0 = 0ϕ12|(1,0) = c120,0 + c121,0 + c122,0 + c123,0 + c124,0 + c125,0 = 0ϕ12|(0,1) = c120,0 + c120,1 + c120,2 + c120,3 + c120,4 + c120,5 = 1176Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ12∂ξ∣∣∣∣∣(0,0)= c121,0 = 0∂ϕ12∂ξ∣∣∣∣∣(1,0)= c121,0 + 2c122,0 + 3c123,0 + 4c124,0 + 5c125,0 = 0∂ϕ12∂ξ∣∣∣∣∣(0,1)= c121,0 + c121,1η + c121,2 + c121,2 + c121,4 = 0∂ϕ12∂η∣∣∣∣∣(0,0)= c120,1 = 0∂ϕ12∂η∣∣∣∣∣(1,0)= c120,1 + c121,1 + c122,1 + c123,1 + c124,1 = 0∂ϕ12∂η∣∣∣∣∣(0,1)= c120,1 + 2c120,2 + 3c120,3 + 4c120,4 + 5c120,5 = 0∂2ϕ12∂ξ2∣∣∣∣∣(0,0)= 2c122,0 = 0∂2ϕ12∂ξ2∣∣∣∣∣(1,0)= 2c122,0 + 6c123,0 + 12c124,0 + 20c125,0 = 0∂2ϕ12∂ξ2∣∣∣∣∣(0,1)= 2c122,0 + 2c122,1 + 2c122,2 + 2c122,3 = 0∂2ϕ12∂ξ∂η∣∣∣∣∣(0,0)= c121,1 = 0∂2ϕ12∂ξ∂η∣∣∣∣∣(1,0)= c121,1 + 2c122,1 + 3c123,1 + 4c124,1 = 0∂2ϕ12∂ξ∂η∣∣∣∣∣(0,1)= c121,1 + 2c121,2 + 3c121,2 + 4c121,4 = 0∂2ϕ12∂η2∣∣∣∣∣(0,0)= 2c120,2 = 0∂2ϕ12∂η2∣∣∣∣∣(1,0)= 2c120,2 + 2c121,2 + 2c122,2 + 2c123,2 = 0∂2ϕ12∂η2∣∣∣∣∣(0,1)= 2c120,2 + 6c120,3 + 12c120,4 + 20c120,5 = 0177Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ12∂ξnξ +∂ϕ12∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ12∂η∣∣∣∣∣( 12 ,0) = c120,1 +12c121,1 +14c122,1 +18c123,1 +116c124,1 = 0(∂ϕ12∂ξnξ +∂ϕ12∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c121,0 + c122,0 + c121,1 +34c123,0 +34c122,1 +34c121,2 +12c124,0 +12c123,1 +12c122,2 +12c121,2 +516c125,0 +916c124,1 +716c123,2 +716c122,3 +516c121,4 + c120,1 + c120,2 +34c120,3 +12c120,4 +516c120,5) = 0(∂ϕ12∂ξnξ +∂ϕ12∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ12∂ξ∣∣∣∣∣(0, 12) = −(c120,1 + c120,2 +34c120,3 +12c120,4 +516c120,5)= 0The constrains corresponding to ϕ13:ϕ13|(0,0) = c130,0 = 0ϕ13|(1,0) = c130,0 + c131,0 + c132,0 + c133,0 + c134,0 + c135,0 = 0ϕ13|(0,1) = c130,0 + c130,1 + c130,2 + c130,3 + c130,4 + c130,5 = 0∂ϕ13∂ξ∣∣∣∣∣(0,0)= c131,0 = 0∂ϕ13∂ξ∣∣∣∣∣(1,0)= c131,0 + 2c132,0 + 3c133,0 + 4c134,0 + 5c135,0 = 0∂ϕ13∂ξ∣∣∣∣∣(0,1)= c131,0 + c131,1η + c131,2 + c131,2 + c131,4 = 1∂ϕ13∂η∣∣∣∣∣(0,0)= c130,1 = 0∂ϕ13∂η∣∣∣∣∣(1,0)= c130,1 + c131,1 + c132,1 + c133,1 + c134,1 = 0∂ϕ13∂η∣∣∣∣∣(0,1)= c130,1 + 2c130,2 + 3c130,3 + 4c130,4 + 5c130,5 = 0178Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ13∂ξ2∣∣∣∣∣(0,0)= 2c132,0 = 0∂2ϕ13∂ξ2∣∣∣∣∣(1,0)= 2c132,0 + 6c133,0 + 12c134,0 + 20c135,0 = 0∂2ϕ13∂ξ2∣∣∣∣∣(0,1)= 2c132,0 + 2c132,1 + 2c132,2 + 2c132,3 = 0∂2ϕ13∂ξ∂η∣∣∣∣∣(0,0)= c131,1 = 0∂2ϕ13∂ξ∂η∣∣∣∣∣(1,0)= c131,1 + 2c132,1 + 3c133,1 + 4c134,1 = 0∂2ϕ13∂ξ∂η∣∣∣∣∣(0,1)= c131,1 + 2c131,2 + 3c131,2 + 4c131,4 = 0∂2ϕ13∂η2∣∣∣∣∣(0,0)= 2c130,2 = 0∂2ϕ13∂η2∣∣∣∣∣(1,0)= 2c130,2 + 2c131,2 + 2c132,2 + 2c133,2 = 0∂2ϕ13∂η2∣∣∣∣∣(0,1)= 2c130,2 + 6c130,3 + 12c130,4 + 20c130,5 = 0(∂ϕ13∂ξnξ +∂ϕ13∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ13∂η∣∣∣∣∣( 12 ,0) = c130,1 +12c131,1 +14c132,1 +18c133,1 +116c134,1 = 0(∂ϕ13∂ξnξ +∂ϕ13∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c131,0 + c132,0 + c131,1 +34c133,0 +34c132,1 +34c131,2 +12c134,0 +12c133,1 +12c132,2 +12c131,2 +516c135,0 +916c134,1 +716c133,2 +716c132,3 +516c131,4 + c130,1 + c130,2 +34c130,3 +12c130,4 +516c130,5) = 0(∂ϕ13∂ξnξ +∂ϕ13∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ13∂ξ∣∣∣∣∣(0, 12) = −(c130,1 + c130,2 +34c130,3 +12c130,4 +516c130,5)= 0The constrains corresponding to ϕ14:ϕ14|(0,0) = c140,0 = 0ϕ14|(1,0) = c140,0 + c141,0 + c142,0 + c143,0 + c144,0 + c145,0 = 0ϕ14|(0,1) = c140,0 + c140,1 + c140,2 + c140,3 + c140,4 + c140,5 = 0179Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ14∂ξ∣∣∣∣∣(0,0)= c141,0 = 0∂ϕ14∂ξ∣∣∣∣∣(1,0)= c141,0 + 2c142,0 + 3c143,0 + 4c144,0 + 5c145,0 = 0∂ϕ14∂ξ∣∣∣∣∣(0,1)= c141,0 + c141,1η + c141,2 + c141,2 + c141,4 = 0∂ϕ14∂η∣∣∣∣∣(0,0)= c140,1 = 0∂ϕ14∂η∣∣∣∣∣(1,0)= c140,1 + c141,1 + c142,1 + c143,1 + c144,1 = 0∂ϕ14∂η∣∣∣∣∣(0,1)= c40,1 + 2c140,2 + 3c140,3 + 4c140,4 + 5c140,5 = 1∂2ϕ14∂ξ2∣∣∣∣∣(0,0)= 2c142,0 = 0∂2ϕ14∂ξ2∣∣∣∣∣(1,0)= 2c142,0 + 6c143,0 + 12c144,0 + 20c145,0 = 0∂2ϕ14∂ξ2∣∣∣∣∣(0,1)= 2c142,0 + 2c142,1 + 2c142,2 + 2c142,3 = 0∂2ϕ14∂ξ∂η∣∣∣∣∣(0,0)= c141,1 = 0∂2ϕ14∂ξ∂η∣∣∣∣∣(1,0)= c141,1 + 2c142,1 + 3c143,1 + 4c144,1 = 0∂2ϕ14∂ξ∂η∣∣∣∣∣(0,1)= c141,1 + 2c141,2 + 3c141,2 + 4c141,4 = 0∂2ϕ14∂η2∣∣∣∣∣(0,0)= 2c140,2 = 0∂2ϕ14∂η2∣∣∣∣∣(1,0)= 2c140,2 + 2c141,2 + 2c142,2 + 2c143,2 = 0∂2ϕ14∂η2∣∣∣∣∣(0,1)= 2c140,2 + 6c140,3 + 12c140,4 + 20c140,5 = 0180Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ14∂ξnξ +∂ϕ14∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ14∂η∣∣∣∣∣( 12 ,0) = c140,1 +12c141,1 +14c142,1 +18c143,1 +116c144,1 = 0(∂ϕ14∂ξnξ +∂ϕ14∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c141,0 + c142,0 + c141,1 +34c143,0 +34c142,1 +34c141,2 +12c144,0 +12c143,1 +12c142,2 +12c141,2 +516c145,0 +916c144,1 +716c143,2 +716c142,3 +516c141,4 + c140,1 + c140,2 +34c140,3 +12c140,4 +516c140,5) = 0(∂ϕ14∂ξnξ +∂ϕ14∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ14∂ξ∣∣∣∣∣(0, 12) = −(c140,1 + c140,2 +34c140,3 +12c140,4 +516c140,5)= 0The constrains corresponding to ϕ15:ϕ15|(0,0) = c150,0 = 0ϕ15|(1,0) = c150,0 + c151,0 + c152,0 + c153,0 + c154,0 + c155,0 = 0ϕ15|(0,1) = c150,0 + c150,1 + c150,2 + c150,3 + c50,4 + c150,5 = 0∂ϕ15∂ξ∣∣∣∣∣(0,0)= c151,0 = 0∂ϕ15∂ξ∣∣∣∣∣(1,0)= c151,0 + 2c152,0 + 3c153,0 + 4c154,0 + 5c155,0 = 0∂ϕ15∂ξ∣∣∣∣∣(0,1)= c151,0 + c151,1η + c151,2 + c151,2 + c151,4 = 0∂ϕ15∂η∣∣∣∣∣(0,0)= c150,1 = 0∂ϕ15∂η∣∣∣∣∣(1,0)= c150,1 + c151,1 + c152,1 + c153,1 + c154,1 = 0∂ϕ15∂η∣∣∣∣∣(0,1)= c150,1 + 2c150,2 + 3c150,3 + 4c150,4 + 5c150,5 = 0181Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ15∂ξ2∣∣∣∣∣(0,0)= 2c152,0 = 0∂2ϕ15∂ξ2∣∣∣∣∣(1,0)= 2c152,0 + 6c153,0 + 12c154,0 + 20c155,0 = 0∂2ϕ15∂ξ2∣∣∣∣∣(0,1)= 2c152,0 + 2c152,1 + 2c152,2 + 2c152,3 = 1∂2ϕ15∂ξ∂η∣∣∣∣∣(0,0)= c151,1 = 0∂2ϕ15∂ξ∂η∣∣∣∣∣(1,0)= c151,1 + 2c152,1 + 3c153,1 + 4c154,1 = 0∂2ϕ15∂ξ∂η∣∣∣∣∣(0,1)= c151,1 + 2c151,2 + 3c151,2 + 4c151,4 = 0∂2ϕ15∂η2∣∣∣∣∣(0,0)= 2c150,2 = 0∂2ϕ15∂η2∣∣∣∣∣(1,0)= 2c150,2 + 2c151,2 + 2c152,2 + 2c153,2 = 0∂2ϕ15∂η2∣∣∣∣∣(0,1)= 2c150,2 + 6c150,3 + 12c150,4 + 20c150,5 = 0(∂ϕ15∂ξnξ +∂ϕ15∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ15∂η∣∣∣∣∣( 12 ,0) = c150,1 +12c151,1 +14c152,1 +18c153,1 +116c154,1 = 0(∂ϕ15∂ξnξ +∂ϕ15∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c151,0 + c152,0 + c151,1 +34c153,0 +34c152,1 +34c151,2 +12c154,0 +12c153,1 +12c152,2 +12c151,2 +516c155,0 +916c154,1 +716c153,2 +716c152,3 +516c151,4 + c150,1 + c150,2 +34c150,3 +12c150,4 +516c150,5) = 0(∂ϕ15∂ξnξ +∂ϕ15∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ15∂ξ∣∣∣∣∣(0, 12) = −(c150,1 + c150,2 +34c150,3 +12c150,4 +516c150,5)= 0The constrains corresponding to ϕ16:ϕ16|(0,0) = c160,0 = 0ϕ16|(1,0) = c160,0 + c161,0 + c162,0 + c163,0 + c164,0 + c165,0 = 0ϕ16|(0,1) = c160,0 + c160,1 + c160,2 + c160,3 + c160,4 + c160,5 = 0182Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ16∂ξ∣∣∣∣∣(0,0)= c161,0 = 0∂ϕ16∂ξ∣∣∣∣∣(1,0)= c161,0 + 2c162,0 + 3c163,0 + 4c164,0 + 5c165,0 = 0∂ϕ16∂ξ∣∣∣∣∣(0,1)= c161,0 + c161,1η + c161,2 + c161,2 + c161,4 = 0∂ϕ16∂η∣∣∣∣∣(0,0)= c160,1 = 0∂ϕ16∂η∣∣∣∣∣(1,0)= c160,1 + c161,1 + c162,1 + c163,1 + c164,1 = 0∂ϕ16∂η∣∣∣∣∣(0,1)= c160,1 + 2c160,2 + 3c160,3 + 4c160,4 + 5c160,5 = 0∂2ϕ16∂ξ2∣∣∣∣∣(0,0)= 2c162,0 = 0∂2ϕ16∂ξ2∣∣∣∣∣(1,0)= 2c162,0 + 6c163,0 + 12c164,0 + 20c165,0 = 0∂2ϕ16∂ξ2∣∣∣∣∣(0,1)= 2c162,0 + 2c162,1 + 2c162,2 + 2c162,3 = 0∂2ϕ16∂ξ∂η∣∣∣∣∣(0,0)= c161,1 = 0∂2ϕ06∂ξ∂η∣∣∣∣∣(1,0)= c161,1 + 2c162,1 + 3c163,1 + 4c164,1 = 0∂2ϕ16∂ξ∂η∣∣∣∣∣(0,1)= c161,1 + 2c161,2 + 3c161,2 + 4c161,4 = 1∂2ϕ16∂η2∣∣∣∣∣(0,0)= 2c160,2 = 0∂2ϕ16∂η2∣∣∣∣∣(1,0)= 2c160,2 + 2c161,2 + 2c162,2 + 2c163,2 = 0∂2ϕ16∂η2∣∣∣∣∣(0,1)= 2c160,2 + 6c160,3 + 12c160,4 + 20c160,5 = 0183Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ16∂ξnξ +∂ϕ16∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ16∂η∣∣∣∣∣( 12 ,0) = c160,1 +12c161,1 +14c162,1 +18c163,1 +116c164,1 = 0(∂ϕ16∂ξnξ +∂ϕ16∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c161,0 + c162,0 + c161,1 +34c163,0 +34c162,1 +34c161,2 +12c164,0 +12c163,1 +12c162,2 +12c161,2 +516c165,0 +916c164,1 +716c163,2 +716c162,3 +516c161,4 + c160,1 + c160,2 +34c160,3 +12c160,4 +516c160,5) = 0(∂ϕ16∂ξnξ +∂ϕ16∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ16∂ξ∣∣∣∣∣(0, 12) = −(c160,1 + c160,2 +34c160,3 +12c160,4 +516c160,5)= 0The constrains corresponding to ϕ17:ϕ17|(0,0) = c170,0 = 0ϕ17|(1,0) = c170,0 + c171,0 + c172,0 + c173,0 + c174,0 + c175,0 = 0ϕ17|(0,1) = c170,0 + c170,1 + c170,2 + c170,3 + c170,4 + c170,5 = 0∂ϕ17∂ξ∣∣∣∣∣(0,0)= c171,0 = 0∂ϕ17∂ξ∣∣∣∣∣(1,0)= c171,0 + 2c172,0 + 3c173,0 + 4c174,0 + 5c175,0 = 0∂ϕ17∂ξ∣∣∣∣∣(0,1)= c171,0 + c171,1η + c171,2 + c171,2 + c171,4 = 0∂ϕ17∂η∣∣∣∣∣(0,0)= c170,1 = 0∂ϕ17∂η∣∣∣∣∣(1,0)= c170,1 + c171,1 + c172,1 + c173,1 + c174,1 = 0∂ϕ17∂η∣∣∣∣∣(0,1)= c170,1 + 2c170,2 + 3c170,3 + 4c170,4 + 5c170,5 = 0184Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ17∂ξ2∣∣∣∣∣(0,0)= 2c172,0 = 0∂2ϕ17∂ξ2∣∣∣∣∣(1,0)= 2c172,0 + 6c173,0 + 12c174,0 + 20c175,0 = 0∂2ϕ17∂ξ2∣∣∣∣∣(0,1)= 2c172,0 + 2c172,1 + 2c172,2 + 2c172,3 = 0∂2ϕ17∂ξ∂η∣∣∣∣∣(0,0)= c171,1 = 0∂2ϕ17∂ξ∂η∣∣∣∣∣(1,0)= c171,1 + 2c172,1 + 3c173,1 + 4c174,1 = 0∂2ϕ17∂ξ∂η∣∣∣∣∣(0,1)= c171,1 + 2c171,2 + 3c171,2 + 4c171,4 = 0∂2ϕ0∂η2∣∣∣∣∣(0,0)= 2c170,2 = 0∂2ϕ17∂η2∣∣∣∣∣(1,0)= 2c170,2 + 2c171,2 + 2c172,2 + 2c173,2 = 0∂2ϕ17∂η2∣∣∣∣∣(0,1)= 2c170,2 + 6c170,3 + 12c170,4 + 20c170,5 = 1(∂ϕ17∂ξnξ +∂ϕ17∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ17∂η∣∣∣∣∣( 12 ,0) = c170,1 +12c171,1 +14c172,1 +18c173,1 +116c174,1 = 0(∂ϕ17∂ξnξ +∂ϕ17∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c171,0 + c172,0 + c171,1 +34c173,0 +34c172,1 +34c171,2 +12c174,0 +12c173,1 +12c172,2 +12c171,2 +516c175,0 +916c174,1 +716c173,2 +716c172,3 +516c171,4 + c170,1 + c170,2 +34c170,3 +12c170,4 +516c170,5) = 0(∂ϕ17∂ξnξ +∂ϕ17∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ17∂ξ∣∣∣∣∣(0, 12) = −(c170,1 + c170,2 +34c170,3 +12c170,4 +516c170,5)= 0The constrains corresponding to ϕ18:ϕ18|(0,0) = c180,0 = 0ϕ18|(1,0) = c180,0 + c181,0 + c182,0 + c183,0 + c184,0 + c185,0 = 0ϕ18|(0,1) = c180,0 + c180,1 + c180,2 + c180,3 + c180,4 + c180,5 = 0185Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ18∂ξ∣∣∣∣∣(0,0)= c181,0 = 0∂ϕ18∂ξ∣∣∣∣∣(1,0)= c181,0 + 2c182,0 + 3c183,0 + 4c184,0 + 5c185,0 = 0∂ϕ18∂ξ∣∣∣∣∣(0,1)= c181,0 + c181,1η + c181,2 + c181,2 + c181,4 = 0∂ϕ18∂η∣∣∣∣∣(0,0)= c180,1 = 0∂ϕ18∂η∣∣∣∣∣(1,0)= c180,1 + c181,1 + c182,1 + c183,1 + c84,1 = 0∂ϕ18∂η∣∣∣∣∣(0,1)= c180,1 + 2c180,2 + 3c180,3 + 4c180,4 + 5c180,5 = 0∂2ϕ18∂ξ2∣∣∣∣∣(0,0)= 2c182,0 = 0∂2ϕ18∂ξ2∣∣∣∣∣(1,0)= 2c182,0 + 6c183,0 + 12c184,0 + 20c185,0 = 0∂2ϕ18∂ξ2∣∣∣∣∣(0,1)= 2c182,0 + 2c182,1 + 2c182,2 + 2c182,3 = 0∂2ϕ18∂ξ∂η∣∣∣∣∣(0,0)= c181,1 = 0∂2ϕ18∂ξ∂η∣∣∣∣∣(1,0)= c181,1 + 2c182,1 + 3c183,1 + 4c184,1 = 0∂2ϕ18∂ξ∂η∣∣∣∣∣(0,1)= c181,1 + 2c181,2 + 3c181,2 + 4c181,4 = 0∂2ϕ18∂η2∣∣∣∣∣(0,0)= 2c180,2 = 0∂2ϕ18∂η2∣∣∣∣∣(1,0)= 2c180,2 + 2c181,2 + 2c182,2 + 2c183,2 = 0∂2ϕ18∂η2∣∣∣∣∣(0,1)= 2c180,2 + 6c180,3 + 12c180,4 + 20c180,5 = 0186Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ18∂ξnξ +∂ϕ18∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ18∂η∣∣∣∣∣( 12 ,0) = c180,1 +12c181,1 +14c182,1 +18c183,1 +116c184,1 = 1(∂ϕ18∂ξnξ +∂ϕ18∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c181,0 + c182,0 + c181,1 +34c183,0 +34c182,1 +34c181,2 +12c184,0 +12c183,1 +12c182,2 +12c181,2 +516c185,0 +916c184,1 +716c183,2 +716c182,3 +516c181,4 + c180,1 + c180,2 +34c180,3 +12c180,4 +516c180,5) = 0(∂ϕ18∂ξnξ +∂ϕ18∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ18∂ξ∣∣∣∣∣(0, 12) = −(c180,1 + c180,2 +34c180,3 +12c180,4 +516c180,5)= 0The constrains corresponding to ϕ19:ϕ19|(0,0) = c190,0 = 0ϕ19|(1,0) = c190,0 + c191,0 + c192,0 + c193,0 + c194,0 + c195,0 = 0ϕ19|(0,1) = c190,0 + c190,1 + c190,2 + c190,3 + c190,4 + c190,5 = 0∂ϕ19∂ξ∣∣∣∣∣(0,0)= c191,0 = 0∂ϕ19∂ξ∣∣∣∣∣(1,0)= c191,0 + 2c192,0 + 3c193,0 + 4c194,0 + 5c195,0 = 0∂ϕ19∂ξ∣∣∣∣∣(0,1)= c191,0 + c191,1η + c191,2 + c191,2 + c191,4 = 0∂ϕ19∂η∣∣∣∣∣(0,0)= c190,1 = 0∂ϕ19∂η∣∣∣∣∣(1,0)= c190,1 + c191,1 + c192,1 + c193,1 + c194,1 = 0∂ϕ19∂η∣∣∣∣∣(0,1)= c190,1 + 2c190,2 + 3c190,3 + 4c190,4 + 5c190,5 = 0187Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂2ϕ19∂ξ2∣∣∣∣∣(0,0)= 2c192,0 = 0∂2ϕ19∂ξ2∣∣∣∣∣(1,0)= 2c192,0 + 6c193,0 + 12c194,0 + 20c195,0 = 0∂2ϕ19∂ξ2∣∣∣∣∣(0,1)= 2c192,0 + 2c192,1 + 2c192,2 + 2c192,3 = 0∂2ϕ19∂ξ∂η∣∣∣∣∣(0,0)= c191,1 = 0∂2ϕ19∂ξ∂η∣∣∣∣∣(1,0)= c191,1 + 2c192,1 + 3c193,1 + 4c194,1 = 0∂2ϕ19∂ξ∂η∣∣∣∣∣(0,1)= c191,1 + 2c191,2 + 3c191,2 + 4c191,4 = 0∂2ϕ19∂η2∣∣∣∣∣(0,0)= 2c190,2 = 0∂2ϕ19∂η2∣∣∣∣∣(1,0)= 2c190,2 + 2c191,2 + 2c192,2 + 2c193,2 = 0∂2ϕ19∂η2∣∣∣∣∣(0,1)= 2c190,2 + 6c190,3 + 12c190,4 + 20c190,5 = 0(∂ϕ19∂ξnξ +∂ϕ19∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ19∂η∣∣∣∣∣( 12 ,0) = c190,1 +12c191,1 +14c192,1 +18c193,1 +116c194,1 = 0(∂ϕ19∂ξnξ +∂ϕ19∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c191,0 + c192,0 + c191,1 +34c193,0 +34c192,1 +34c191,2 +12c194,0 +12c193,1 +12c192,2 +12c191,2 +516c195,0 +916c194,1 +716c193,2 +716c192,3 +516c191,4 + c190,1 + c190,2 +34c190,3 +12c190,4 +516c190,5) = 1(∂ϕ19∂ξnξ +∂ϕ19∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ19∂ξ∣∣∣∣∣(0, 12) = −(c190,1 + c190,2 +34c190,3 +12c190,4 +516c190,5)= 0The constrains corresponding to ϕ20:ϕ20|(0,0) = c200,0 = 0ϕ20|(1,0) = c200,0 + c201,0 + c202,0 + c203,0 + c204,0 + c205,0 = 0ϕ20|(0,1) = c200,0 + c200,1 + c200,2 + c200,3 + c200,4 + c200,5 = 0188Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution∂ϕ20∂ξ∣∣∣∣∣(0,0)= c201,0 = 0∂ϕ20∂ξ∣∣∣∣∣(1,0)= c201,0 + 2c202,0 + 3c203,0 + 4c204,0 + 5c205,0 = 0∂ϕ20∂ξ∣∣∣∣∣(0,1)= c201,0 + c201,1η + c201,2 + c201,2 + c201,4 = 0∂ϕ20∂η∣∣∣∣∣(0,0)= c200,1 = 0∂ϕ20∂η∣∣∣∣∣(1,0)= c200,1 + c201,1 + c202,1 + c203,1 + c204,1 = 0∂ϕ20∂η∣∣∣∣∣(0,1)= c200,1 + 2c200,2 + 3c200,3 + 4c200,4 + 5c200,5 = 0∂2ϕ20∂ξ2∣∣∣∣∣(0,0)= 2c202,0 = 0∂2ϕ20∂ξ2∣∣∣∣∣(1,0)= 2c202,0 + 6c203,0 + 12c204,0 + 20c205,0 = 0∂2ϕ20∂ξ2∣∣∣∣∣(0,1)= 2c202,0 + 2c202,1 + 2c202,2 + 2c202,3 = 0∂2ϕ20∂ξ∂η∣∣∣∣∣(0,0)= c201,1 = 0∂2ϕ20∂ξ∂η∣∣∣∣∣(1,0)= c201,1 + 2c202,1 + 3c203,1 + 4c204,1 = 0∂2ϕ20∂ξ∂η∣∣∣∣∣(0,1)= c201,1 + 2c201,2 + 3c201,2 + 4c201,4 = 0∂2ϕ20∂η2∣∣∣∣∣(0,0)= 2c200,2 = 0∂2ϕ20∂η2∣∣∣∣∣(1,0)= 2c200,2 + 2c201,2 + 2c202,2 + 2c203,2 = 0∂2ϕ20∂η2∣∣∣∣∣(0,1)= 2c200,2 + 6c200,3 + 12c200,4 + 20c200,5 = 0189Appendix A: Constraints Equations for Obtaining C1 Interpolation of the Solution(∂ϕ20∂ξnξ +∂ϕ20∂ηnη)∣∣∣∣∣( 12 ,0) =∂ϕ20∂η∣∣∣∣∣( 12 ,0) = c200,1 +12c201,1 +14c202,1 +18c203,1 +116c204,1 = 0(∂ϕ20∂ξnξ +∂ϕ20∂ηnη)∣∣∣∣∣( 12 , 12) = −√22 (c201,0 + c202,0 + c201,1 +34c203,0 +34c202,1 +34c201,2 +12c204,0 +12c203,1 +12c202,2 +12c201,2 +516c205,0 +916c204,1 +716c203,2 +716c202,3 +516c201,4 + c200,1 + c200,2 +34c200,3 +12c200,4 +516c200,5) = 0(∂ϕ20∂ξnξ +∂ϕ20∂ηnη)∣∣∣∣∣(0, 12) = −∂ϕ20∂ξ∣∣∣∣∣(0, 12) = −(c200,1 + c200,2 +34c200,3 +12c200,4 +516c200,5)= 1190Appendix B: Transforming theNon-conserved Adjoint EulerEquation to Conserved EquationConsider the linearized steady-state Euler equations:LU = ∂∂x(AxU) +∂∂y(AyU) = f (1)whereAx =∂Fx∂U=0 1 0 0γ−12 (u2 + v2)− u2 (3− γ)u (1− γ) v γ − 1−uv v u 0u(γ−12 (u2 + v2)− h)h− (γ − 1)u2 (1− γ)uv γuAy =∂Fy∂U=0 0 1 0−uv v u 0γ−12 (u2 + v2)− v2 (1− γ)u (3− γ) v γ − 1v(γ−12 (u2 + v2)− h)(1− γ)uv h− (γ − 1) v2 γvTo obtain the continuous adjoint equation, Eq. 1 is multiplied by Z, integrated overthe domain D and integrated by parts:(∂∂x(AxU) +∂∂y(AyU) , Z)D=(U,−ATx∂Z∂x− ATy∂Z∂y)D(2)+ ((nxAx + nyAy)U,Z)∂D .191Appendix B: Transforming the Non-conserved Adjoint Euler Equation to Conserved EquationWe end up with L∗Z = −ATx ∂Z∂x − ATy ∂Z∂y for the continuous adjoint problem which isnot in conserved form. The left-hand side can be written as:− ∂∂x((γ−1)2 (u2 + v2)− u2)Z2 − uvZ3 + u(γ−12 (u2 + v2)− h)Z4Z1 + (3− γ)uZ2 + vZ3 + (h− (γ − 1)u2)Z4(1− γ) vZ2 + uZ3 + (1− γ)uvZ4(γ − 1)Z2 + γuZ4− ∂∂y−uvZ2 +(γ−12 (u2 + v2)− v2)Z3 + v(γ−12 (u2 + v2)− h)Z4vZ2 + (1− γ)uZ3 + (1− γ)uvZ4Z1 + uZ2 + (3− γ) vZ3 + (h− (γ − 1) v2)Z4(γ − 1)Z3 + γvZ4+Z2∂∂x((γ−1)2 (u2 + v2)− u2)− Z3 ∂∂x (uv) + Z4 ∂∂x(u(γ−12 (u2 + v2)− h))Z2∂∂x(3− γ)u+ Z3 ∂∂x (v) + Z4 ∂∂x (h− (γ − 1)u2)Z2∂∂x((1− γ) v) + Z3 ∂∂x (u) + Z4 ∂∂x ((1− γ)uv)Z2∂∂x(γ − 1) + Z4 ∂∂x (γu)+−Z2 ∂∂y (uv) + Z3 ∂∂y(γ−12 (u2 + v2)− v2)+ Z4 ∂∂y(v(γ−12 (u2 + v2)− h))Z2∂∂y(v) + Z3 ∂∂y ((1− γ)u) + Z4 ∂∂y ((1− γ)uv)Z2∂∂y(u) + Z3 ∂∂y ((3− γ) v) + Z4 ∂∂y (h− (γ − 1) v2)Z3∂∂y(γ − 1) + Z4 ∂∂y (γv)where the first two terms are now in conserved form and the last two terms are consid-ered as the source term.192

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.24.1-0340780/manifest

Comment

Related Items