+ All Categories
Home > Documents > [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit...

[American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit...

Date post: 14-Dec-2016
Category:
Upload: vasanth-kumar
View: 216 times
Download: 2 times
Share this document with a friend
15
32nd AIAA Fluid Dynamics Conference and Exhibit 24-26 June 2002, St. Louis, Missouri AIAA 2002-3109 Copyright © 2002 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.
Transcript
Page 1: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

VERIFICATION OF 2D NAVIER-STOKES CODES BY THE METHOD OF

MANUFACTURED SOLUTIONS

Vasanth Kumar Murali� and Clarence O.E. Burgy

Computational Simulation and Design CenterMississippi State University

Mississippi State, Mississippi 39762 U.S.A.

Abstract

Implementations of numerical algorithms tosolve systems of partial di�erential equations areoften assumed to work correctly and are proneto coding errors that degrade the accuracy of thesimulation. To insure that the code is writtencorrectly, one needs to verify whether all parts ofthe code are behaving the way they ought to. Codeveri�cation would be an easy task if exact solutionsexisted to the governing equations but these are rarebecause of the geometric complexity and the non-linearity of most problems in computational uiddynamics (CFD). The Method of ManufacturedSolutions (MMS) is used to verify the observedorder-of-accuracy of the implementation of anumerical method by modifying the governingequations to drive the solution to a prescribedfunction and is very helpful in this regard becauseit does not depend on the existence of exactsolutions. In the current study, the MMS isimplemented on two-dimensional �nite volumecodes that solve the Euler equations. Exponentialfunctions are used as exact functions from which the\manufactured" solutions are derived. The sourceterms for the modi�ed equations are evaluated usingthe symbolic manipulation software, Mathematica.Grid convergence studies, to determine the observedorder-of-accuracy, are presented. The structuredcode which implements the compressible Eulerequations yielded an order-of-accuracy between �rstand second order. The unstructured code whichimplements the incompressible Euler equationsyielded second order accurate results.

�Graduate Student, Mississippi State University, StudentMember AIAAyAssistant Research Professor, Computational Engineering,Mississippi State University, Member of AIAA

I. Introduction

Computer codes written to solve engineeringproblems serve as an approximation, within adesired level of accuracy, to the actual physicsthey simulate. It is possible to solve these highlynon-linear systems but often coding errors areintroduced and erroneous assumptions about thediscretization method are made that degrade theorder-of-accuracy of the code. In recent years,the accuracy aspect of the implementation ofthe discretization, application of correct boundaryconditions (BCs), numerical approximations likeinterpolating functions, iterative convergence issuesand parallel solution issues within codes havebeen in focus in literature.1,2 Stern3, for examplehas developed a methodology for quantifyingseveral sources of error within complicated RANSsimulations. The quanti�cation of the uncertaintyin simulations and verifying whether the numericalmethods implemented in an algorithm are codedcorrectly becomes essential in order to enhance thecon�dence that can be placed in the results beingproduced by it. The need to rigorously demonstratethat the code yields a solution to the discretizedequations that is consistent with the governingequations is critical. Code veri�cation is the processthat aids in addressing the numerical accuracyissues in coding CFD problems and tries to quantifythe error in simulations. Code validation, which isnot the subject of this paper, is the process thatdetermines how accurately a particular numericalsimulation agrees with experimental results whichis, in part, a representative of how well thegoverning equations model the physics.

Code veri�cation, according to Roache,4 is theprocess of convincingly demonstrating that whenthe mesh discretization size tends to zero, thecode yields a solution to the continuum equations.

1

American Institute of Aeronautics and Astronautics

32nd AIAA Fluid Dynamics Conference and Exhibit24-26 June 2002, St. Louis, Missouri

AIAA 2002-3109

Copyright © 2002 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.

Page 2: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Salari and Knupp5 describe it as the process ofdetermining whether the numerical scheme for thegoverning equations of a problem is solved to thetheoretical order-of-accuracy of the discretizationmethod employed and thus can identify potentialsources of coding errors. Veri�cation would besimpler if exact solutions could be determined easilyfor the governing equations since they serve asbenchmarks for accuracy veri�cation of numericalsimulations;6 however, it is diÆcult to �nd exactsolutions for the Navier-Stokes equations due to thegeometric complexity and the non-linearity of thepartial di�erential equations, except for a very fewspecial cases.6,7,8

In the absence of exact solutions, grid re�nementstudies with a sequence of grids are often used. Theerror in the converged solutions between successivegrids in the sequence can be used to measure theobserved order-of-accuracy of a code. The studyassumes that the solution, in the limit as mesh sizes�x;�y ! 0, is converging to the exact solutions tothe discretized equations which need not be trueespecially if there is a coding error. Such a studyis computationally expensive especially for three-dimensional problems due to large problem sizesand because of the need of a highly converged �negrid solution. Another drawback of grid re�nementstudies is that the method cannot verify all aspectsof the solution algorithm, for example 2nd ordererrors in a 2nd order code. Therefore, the needarose for a purely mathematical exercise that canperform the same tasks as a grid re�nement studybut without its shortcomings. The MMS canrigorously verify codes and identify possible sourcesof erroneous coding. As a robust tool for codeveri�cation, the Method of Manufactured Solutions(MMS) was originally proposed and developed bySteinberg and Roache.9 Oberkampf and Blottner,10

also recognized the ease of application of the MMSto several ow problems.

The MMS essentially solves a modi�ed set ofgoverning equations with additional source termswhich can be evaluated exactly. The method veri�esthe numerical discretization scheme implemented,coordinate transformations, boundary conditionsand other numerical approximations in a code,apart from coding errors.4,5,11 The solutions arechosen as opposed to being determined as inthe case of analytical solutions, which is oftendiÆcult. Moreover, the choice of the manufactured

solution itself is not limited by the problem andone such solution can be used over a wide rangeof applications. Another important advantageof the method is that the grids need not begenerated similar to that for physical problems.So problems sizes for grid convergence studies aresmaller compared to the grid re�nement studieswhich solves a physical problem. Veri�cationof codes has been made much simpler with theadvent of the MMS. The inspiration for the presentwork stems from the need to better understandand implement code veri�cation, particularly usingthe MMS, for two-dimensional �nite-volume codes.In the current study, a structured compressibleEuler code and an unstructured incompressibleEuler code were studied to highlight the di�erencesin the implementation of the MMS and in thevarious issues that arise, as a consequence, in eachalgorithm.

The following section describes the MMSprocedure. The next two sections focus on itsapplication to a structured, compressible Eulersolver and an unstructured, incompressible Eulersolver respectively, with a discussion of the choiceof the manufactured solutions, the �nite-volumeimplementation and the various issues that arise. Adiscussion of error estimation results are presentedin section IV.

II. The Method of Manufactured Solutions

Steinberg and Roache,9 developed theMethod of Manufactured Solutions. The term\Manufactured Solution" was also used, amongthe �rst, by Oberkampf et al.10 The main ideabehind the Method of Manufactured Solutions isto manufacture a solution that is continuous anddi�erentiable so that it exercises all the terms inthe governing equations to at least the order-of-accuracy predicted by the discretization method.The manufactured solution need not be physicallyrelevant because veri�cation is a mathematicalexercise only.4 Salari and Knupp5 have done adetailed study of this novel method and havepresented various guidelines for manufacturingsolutions to systems of PDEs. The solution can beused to verify all parts of a code by modifying thegoverning equations with the appropriate sourceterms. The idea is to solve the modi�ed set ofequations to determine the error in the solution.If the system of equations are represented on the

2

American Institute of Aeronautics and Astronautics

Page 3: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

computational domain as

L(Q) = f(x; y) (1)

with boundary condition

B(Q) = g(x; y) on @ (2)

where functions f and g are original source terms,the modi�ed equations are given by

L(Q) = L(Qe) (3)

with boundary condition on @

B(Q) = B(Qe) (4)

where L(Qe) are the source terms that need tobe computed by passing the manufactured exactsolutions, Qe, in to the di�erential operator L

with the original source terms,f(x; y) and g(x; y)cancelling out because they do not depend on Q.The implementation of the discretization of thegeometric functions, f and g, can be veri�ed witha direct grid re�nement study as we know theexact values of these functions. These new sourceterms, L(Qe), are added for each control-volume orelement in the domain, with BCs being modi�edappropriately, prior to the solution procedure. Theinitial conditions (ICs) are set to the value ofthe manufactured solution at t = 0 for eachpoint in the computational domain. The sourceterms, B(Qe), for the boundary conditions need tobe carefully evaluated based on the type of BC.Implementation of the correct BCs proved to be themost challenging part in the procedure as observedby Salari et al.5 The solution is then obtained fromthe modi�ed code. A grid convergence study isneeded subsequently to obtain the observed order-of-accuracy of the code as a ratio of errors. Thestudy is performed on a sequence of grids with thestep sizes halved in every direction in successivegrids.

Let be de�ned as the computational domain ofthe problem, fQc the solution as obtained from thecoarse grid using MMS, fQf the solution as obtainedfrom the �ne grid. The error in the solution fromthe two di�erent grids are given by

Ec =

R j(fQc �Qe)jdR

d(5)

Ef =

R j(

fQf �Qe)jdRd

(6)

The magnitude of error is not of concern because theaim is to determine the observed order of the codefrom error ratios that are a relative measure. Theobserved order-of-accuracy, p, can then be obtainedfrom the above equations as a ratio of the errors as,assuming a step size halving,

p = log2

�Ec

Ef

�(7)

The observed order, p, is a measure of whetherthe code is achieving the order-of-accuracy of thediscretized equations. The error analysis can beperformed similarly to verify the implementationof all numerical methods within a code byinspecting how each one a�ects the observedorder. Any inaccurate coding procedure or lowerorder approximations and transformations a�ectthe value of p and will be captured by the method.

In the current study, two two-dimensional�nite-volume codes, a cell-centered structured codeand a node-centered unstructured solver, wereconsidered. Steady manufactured solutions wereused for the conserved variables. Exponentialfunctions were used to construct these solutions.Exponential functions are continuous everywhereand are di�erentiable in�nitely. They will thusexercise derivatives of all orders in the governingequations. Moreover, they are asymptoticallyincreasing functions and thus are more general thansymmetrical solutions. These functions are non-zero everywhere which avoids problems such assquare roots of negative numbers. Because of theuse of exponential functions, the grid coordinatesneed to be scaled to avoid high round-o� errors.Alternately, normalized functions can be used toavoid scaling of the grid coordinates. Also, sincethe solution does not vary steeply in the domain, thecell sizes in the far-�eld and the interior should becomparable to minimize the error in the calculationof the source terms.

III. Implementation

Structured Euler Solver

Choice of Solutions

The MMS procedure was applied to verify animplicit �nite-volume code that solves the two-dimensional time-dependent Euler equations on

3

American Institute of Aeronautics and Astronautics

Page 4: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

structured grids. The code uses a cell-centeredapproach. The governing equations in Cartesiancoordinates12,13 are

@~q

@t+

@ ~f

@x+

@~g

@y= 0 (8)

~q =��; �u; �v; e

�(9)

~f =��u; �u2 + p; �uv; u(e+ p)

�(10)

~g =��v; �uv; �v2 + p; v(e+ p)

�(11)

where � is the density, �u and �v the momentums,e the total energy and p the pressure. The pressureis a thermodynamic variable de�ned as

p = ( � 1)

�e�

12��u2 + v2

��(12)

The governing equations are then modi�ed toinclude the source terms that are evaluated usingthe symbolic manipulation package, Mathematica.The modi�ed equations to be solved then are

@~q

@t+

@ ~f

@x+

@~g

@y=

@ ~qe@t

+@ ~fe@x

+@ ~ge@y

(13)

where the subscript, e, refers to variables basedon the exact solution. The steady manufacturedsolutions chosen for the code were

�e = exey (14)

ue = e2xe2y (15)

ve = e2xe2y (16)

ee =32e5xe5y (17)

The pressure is evaluated using the thermodynamicrelation, eqn. 12, as

pe =12( � 1)e5xe5y (18)

This choice of solutions would make the ow locallysupersonic everywhere in the domain. The aimwas to test the solution algorithm when the owis steady and fully supersonic in the domain. If Uis the ow velocity then for this choice of solutions,

jU j > c �pu2 + v2 > c

where u and v are the velocities and c is the speedof sound. The steady source terms for the �rstequation in eqn. 8, given byI

V

�@(�eue)

@x+

@(�eve)@y

�dV (19)

is calculated based on the exact solutions for eachcontrol volume in the computational domain, V .Since the manufactured solutions are steady, thederivatives with respect to time vanish. So onlythe partial derivatives with respect to x and y needto be evaluated. To evaluate the source terms in asimpler way, the ux derivative terms are cast in anintegral form around the control-volume boundariesby the Gauss-Divergence theorem, since all control-volumes are closed surfaces. For example for the�rst equation in eqn. 8, the surface integral is givenby I

@(�euenx + �eveny)dS (20)

where nx and ny are edge normals and S � @ is thecontrol-volume boundary. A typical control-volume1234 is shown in �g. 1. The steady source terms

(i,j)

(i-1,j)

(i,j-1)

2

4(i-1,j-1)

1,2,3,4 Vertices in the Grid.

CV EdgesCell Center (i,j)

3

1

Figure 1: Control-Volume in Structured Mesh

for eqn. 13 is determined by evaluating eqn. 20along the edges 12, 23, 34 and 41 of a cell. Thecontribution is stored in the cell center. The sourceterms for all the governing equations are evaluatedalong similar lines.

Initial and Boundary Conditions

The initial conditions for all cell centers inthe grid were set to the manufactured solutions,evaluated at that point based on the grid location(x; y). The characteristic variable boundaryconditions in the code are implemented byphantom nodes for impermeable wall, sub-sonicand supersonic in ow and out ow situations tofacilitate the handling of points near boundaries.13

The variable values at these points are obtained in

4

American Institute of Aeronautics and Astronautics

Page 5: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

the code from the relation

p = 2b �in

where is p, u, or v and the subscripts p, band in refer to phantom, boundary and interiorrespectively. To mimic this transformation withinthe code, the location of the phantom points needto be set to calculate the values of the variables atthose locations. So, the cells at the boundaries weremirrored about the boundary at the impermeablewall. The location (xp; yp) of the phantom pointsnear the wall, shown in �g. 2, are set to be the cellcenters of these \phantom" cells given by

xp = 2xb � xin

yp = 2yb � yin

The locations for the boundary points (xb; yb)

in

p

b

Figure 2: Location of Phantom Points nearImpermeable Wall

were set to be midpoint of the boundary edges.However, at the far-�eld, the phantom pointswere chosen to be the boundary edge midpointsin order to reproduce the implementation of theoriginal BCs in the code. Analogous to the interiorequations, the source terms for the boundaries wereevaluated from the original relation by plugging themanufactured solution in to the boundary operator,B, in eqn. 4 for the supersonic and re-entrantBCs. The phantom cells near the impermeablewall and the sub-sonic boundaries were set to theexact solutions based on (xp; yp). The de�nition ofthe phantom point locations proved to be the mostcritical part. The scheme was not stable for otherchoices of phantom point locations. The codes usesexplicit boundary conditions which introduces morediÆculties in the implementation of the MMS BCs.

Solution Technique

The code has various solution algorithmsimplemented for implicitly solving the discretized

equations at each time step. The current studyfocussed on verifying the implementation of thesecond order ux di�erencing scheme using Roe-averaged variables. A �ne C-H mesh of size 161x97,similar to one shown in �g. 3, was generated for aNACA0012 airfoil using GUMBz and GUMBOx. Asequence of coarser grids were then generated byremoving the alternate i; j lines. The initial gridsize was chosen such that 3 levels of re�nementwere possible while ensuring that the boundaries areretained the same. Further, to avoid large solutionvariable values due to large grid sizes, since thesolutions are non-scaled exponentials, the grids werescaled such that �1 < x < 0 and �1 < y < 0. Thelimiters were turned o� to avoid in uence of �rstorder approximations.

Figure 3: C-H structured mesh

Multiblock, Multigrid Structured Grid Generation System,Simcenter, ERCGraphical Unstructured-Multiblock Omnitool, Simcenter,ERC

5

American Institute of Aeronautics and Astronautics

Page 6: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Unstructured Solver

Choice of Solutions

The MMS was applied to a two-dimensionalnode-centered �nite-volume code that solves theincompressible Euler equations on unstructuredtopologies. Chorin's14 arti�cial compressibilityform of the governing equations for the inviscidproblem in Cartesian coordinates15 are given by

@~q

@t+

@ ~f

@x+

@~g

@y= 0 (22)

~q =�p; u; v

�(23)

~f =��u; u2 + p; uv

�(24)

~g =��v; uv; v2 + p

�(25)

where p, u and v are pressure and velocities.The constant � is the arti�cial compressibilityfactor. Unlike the compressible Euler equations,the pressure is a primitive variable. The governingequations are modi�ed, similar to eqn. 19, to includethe source terms, the only di�erence being thenumber of equations. The ow will be sub-criticalin the entire ow domain. The steady manufacturedsolutions chosen for the code are

pe = e2xe2y (26)

ue = exey (27)

ve = exey (28)

A typical control volume is shown in �g. 4.

A control-volume for a vertex, say 1, is de�nedas the polygon formed by the centroids of elementssurrounding it (I-VIII in �g. 4) and the midpointsof edges that intersect it.16 The source terms for allcontrol volumes are then evaluated in a proceduresimilar to that used for the structured code. Thesurface integral form of the source term for themodi�ed �rst equation in eqn. 22I

@(uenx + veny)dS (29)

is determined by evaluating eqn. 29 along thedashed lines in �g. 4, that form the control-volumeboundary. The calculated values are stored in theappropriate vertices. Detailed description of thesolution methodology is placed in ref. 16.

1 2

3

4

5

6

7

8

9

I

II

III

IV

V

VI VII

VIII

I, II, III.....Elements

- - - CV edges1,2,3... Vertices

Figure 4: Control-Volume for Unstructured Mesh

Initial and Boundary Conditions

The initial conditions for all vertices were setto the value of the manufactured solutions att = 0, based on the grid location. The codeuses characteristic variable boundary conditionsat the impermeable wall and the far-�eld BCsimplemented in the code are consistent with thatsuggested in ref. 17. Details of the boundaryconditions are given in refs. 15,16,17. Since the codeis a node-centered �nite-volume method, the (x; y)location of the boundary points are the coordinatesof the vertices that lie on the boundaries. The codeuses implicit boundary conditions which proved tobe much easier to handle than the explicit versionused in the structured code. The source terms forthe BCs were determined, similar to the structuredcode, by passing the manufactured solutions in tothe boundary operator, B.

Solution Technique

The code uses a second order ux di�erencingscheme using Roe-averaged variables for calculatingthe net ux through a CV edge. A fairly coarseunstructured mesh with 2064 nodes was generatedfor a NACA0012 airfoil, �g. 5, using AFLR2{.18

All the elements in the grid were triangles. Thiswas subsequently h-re�ned three times to obtain the

Advancing Front/Local-Reconnection Unstructured GridGenerator, 2D version, Engineering Research Center,Mississippi State University

6

American Institute of Aeronautics and Astronautics

Page 7: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Figure 5: Initial Unstructured Mesh for NACA0012

grid sequence, where each element is split in to fourelements as shown in �g. 6. In h-re�nement, anytriangle 123 in the grid is split at the midpoints ofeach of its sides to form four elements. The AFLR2routine uses a spline for controlling the boundarypoint position and spacing to h-re�ne the boundarypoints on the spline. This is essential to maintainthe boundary object shape. The smoothing andreconnection routines in the grid generator wereturned o�. The grids were scaled to avoid largesolution values since the exact solutions were non-scaled. The limiters were turned o� to avoiddegradation in the observed order due to theirin uence on the solution.

IV. Results

Structured Code

The steady source terms for the governingequations are shown in the Appendix. Toinvestigate the observed order-of-accuracy of thecode, convergence studies were performed on a gridsequence, shown in Table 1. A typical grid forstudying the ow over a NACA0012 would havepoints packed near the leading and trailing edges

3

6

54

1 2

Figure 6: h-Re�nement in an Unstructured mesh

Grid Quads161x97 1536081x49 384041x25 96021x13 240

Table 1: C-H Grid Sequence

and around the surface of the airfoil to capture owfeatures like shocks that represent rapid variationin solution. In general, the cells in the far-�eldare much larger than the interior cells becausethe solution gradient is lower compared to theinterior. For the modi�ed problem, however, ifthe manufactured solutions constructed are smooth,continuous functions as in the current study, thegrids need not have boundary layer packing orother grid features to capture ow features thatrepresent high gradient solutions. This is possiblesince the solution, due to the smoothness of theexact solutions, will not change rapidly in a region.In such a situation, the cells near the airfoilsurface could be larger than that for a real owproblem. As a result, the computational cost islower compared to that required for traditional gridre�nement studies. On the other hand, large cellsizes introduce high errors compared to smaller cellsbecause the source terms are evaluated using anedge based integration. Thus, the departure of thecomputed solution from the exact solution was moreprominent in regions with larger control-volumes,although order-of-accuracy was una�ected.

Figure 7 shows the convergence history for the

7

American Institute of Aeronautics and Astronautics

Page 8: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

sequence. The quantity shown is the relative norm

0 50 100 150 200Iterations

10-15

10-10

10-5

100

Normalized Residual Norm

Convergence History

161 x 9781 x 4941 x 2521 x 13

Figure 7: Convergence History for Structured Code- Normalized Residual Norm

of the entire residual in the domain normalized withthe value at the �rst iteration. It was observedthat the residual quickly dropped several ordersin magnitude suggesting that the solution is wellconverged. The exact solutions chosen are such thatthe contour lines are parallel to the line x + y = k,where k is a constant. This is illustrated by �g. 9for the density calculated by the code for the �negrid, 161x97. The norm of the error in the solutionfor the conserved variables are shown in Tables 2-5.Figure 8 shows the variation of error in density withthe iterations for the sequence. The error in densitycontour plot is shown in �g. 10.

The structured code does not achieve thetheoretical order-of-accuracy of the second orderspatial discretization scheme. It can be noticedthat the error near the boundaries is higher relativeto the interior indicating that the solutions mightnot have converged to the correct solution at theselocations. The far-�eld boundaries correspondingto i = 1 and i = 161 and the sub-sonic owboundary regions were observed to have highererrors compared to the airfoil wake and the re-entrant region. This behavior could be attributedto the non-uniformity of C-H meshes5 and to thenon-linearity of the governing equations. One more

0 10 20 30 40 50Iterations

0

0.001

0.002

0.003

Error in Density - L1Norm

Time Variation of Error in Density

161 x 9781 x 4941 x 2521 x 13

Figure 8: Time Variation of Error in Density,Structured Solver

Grid Error Error Ratio Order, p21x13 2.42972E-03 N.A. -41x25 7.39464E-04 3.29 1.7281x49 2.10397E-04 3.51 1.81161x97 6.44032E-05 3.27 1.71

Table 2: Order-of-Accuracy, �, for StructuredSolver

aspect of the results was that the error in the u�and v� velocities di�ered markedly even though theexact solutions chosen were the same. This is dueto the asymmetry of the C-H mesh about the owdirection, in this case being about x = y line sincethe u� and v� velocity magnitudes are equal.

Unstructured Solver

The source terms for the steady governingequations are placed in the Appendix. The gridsequence used for the grid convergence studies isshown in Table 6. The convergence history showingthe relative norm of the total residual for thegrids is shown in �g. 11. The �gure shows thatthe magnitude of the normalized residual droppedby at least 5 signi�cant digits suggesting good

8

American Institute of Aeronautics and Astronautics

Page 9: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Figure 9: Converged Solution - Density(�), 161 x 97grid

Figure 10: Error in Solution - Density(j� � �ej),161 x 97 grid

9

American Institute of Aeronautics and Astronautics

Page 10: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Grid Error Error Ratio Order, p21x13 1.39527E-03 N.A. -41x25 4.18560E-04 3.33 1.7481x49 1.14745E-04 3.65 1.87161x97 3.13060E-05 3.67 1.87

Table 3: Order-of-Accuracy, u � velocity, forStructured Solver

Grid Error Error Ratio Order, p21x13 1.17811E-03 N.A. -41x25 3.66461E-04 3.21 1.6881x49 1.04173E-04 3.52 1.81161x97 2.98162E-05 3.49 1.80

Table 4: Order-of-Accuracy, v � velocity, forStructured Solver

Grid Error Error Ratio Order, p21x13 1.07840E-03 N.A. -41x25 3.32229E-04 3.25 1.7081x49 9.31788E-05 3.57 1.83161x97 2.49418E-05 3.74 1.90

Table 5: Order-of-Accuracy, e, for StructuredSolver

Grid Nodes Elements1 2064 40092 8137 160363 32310 641444 128764 256576

Table 6: Unstructured Grid Sequence generatedusing AFLR2

convergence. The convergence tolerance for the

0 2000 4000 6000Iterations

10-8

10-6

10-4

10-2

100

Relative Norm of Residual

Convergence History

4009 elements16036 elements64144 elements256576 elements

Figure 11: Convergence History for UnstructuredSolver - Normalized Residual Norm

absolute residual norms was set at 1E � 10 to savecomputational e�ort. The pressure contours forthe coarse grid are shown in �g. 13. The errorin pressure is also shown in �g. 14 for the samegrid. The error near far-�eld region correspondingto sub-critical out ow was higher compared to theinterior and the sub-critical in ow regions. It wasalso observed, as shown in �g. 14, that the error washigher in the region where the advancing fronts fromthe airfoil surface and the far-�eld collide. Thiscould be due to the skewness of the elements in thatregion. The variation of the error in pressure withsolution iteration is shown in �g. 12. The observedorders for the conserved variables are shown inTables 7-9. As observed in the structured code,the observed orders of the u� and the v� velocitiesdi�ered. The code produced close to second-orderaccurate results.

Conclusion

The MMS has been implemented to verifytwo codes, a cell-centered structured code thatsolves the compressible Euler equations and anode-centered unstructured code that solves theincompressible Euler equations, using exponential

10

American Institute of Aeronautics and Astronautics

Page 11: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Elements Error Error Ratio Order, p4009 1.18882E-04 N.A. -16036 2.90720E-05 4.09 2.0364144 7.45177E-06 3.90 1.96256576 1.85796E-06 4.01 2.00

Table 7: Order-of-Accuracy, p, for UnstructuredSolver

Elements Error Error Ratio Order, p4009 7.77568E-05 N.A. -16036 1.97244E-05 3.94 1.9864144 5.15112E-06 3.83 1.94256576 1.34593E-06 3.83 1.94

Table 8: Order-of-Accuracy, u, for UnstructuredSolver

Elements Error Error Ratio Order, p4009 7.37109E-05 N.A. -16036 1.88381E-05 3.92 1.9764144 4.99747E-06 3.77 1.91256576 1.32812E-06 3.76 1.91

Table 9: Order-of-Accuracy, v, for UnstructuredSolver

0 500 1000 1500Iterations

0

5e-05

0.0001

0.00015

0.0002

Error in Solution

Variation of Error in Pressure

4009 elements16036 elements64144 elements256576 elements

Figure 12: Time Variation of Error in Pressure,Unstructured Solver

functions to manufacture exact solutions for the ow equations. The two-dimensional steady-stateproblems were considered. The governing equationsand the boundary conditions were modi�ed toinclude the additional source terms that wereevaluated using Mathematica. The implementationof the boundary conditions, we felt, was themost challenging part of MMS. The BCs for theunstructured code were easier to implement thanthe structured code. The de�nition of location ofthe phantom cell centers in the structured code werecritical in obtaining stable solutions.

Grid convergence studies were performed todetermine the observed order of the discretizationmethods. The structured code yielded an orderless than 2 for the conserved variables while theunstructured code yielded second-order accurateobserved orders for all variables. It was observedthat large grid cell sizes increased the actualmagnitude of error in the computed solution,although the order-of-accuracy remained practicallyunin uenced. The codes have been veri�ed.

11

American Institute of Aeronautics and Astronautics

Page 12: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Figure 13: Solution - Pressure, p, contours, 2064nodes

Figure 14: Error in Pressure, jp� pej, 2064 nodes

12

American Institute of Aeronautics and Astronautics

Page 13: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

*

References

[1] Mehta, U.B., \Some Aspects of Uncertaintyin Computational Fluid Dynamics Results,"ASME Journal of Fluids Engineering, Vol. 113,No. 4, December 1991, pp. 538-543.

[2] Roache, P.J., \Perspective: A Method forUniform Reporting of Grid Re�nementStudies," ASME Journal of FluidsEngineering, Vol. 116, September 1994,pp. 405-413.

[3] Stern, F., Wilson, R.V., Coleman, H. andPatterson, E, \Comprehensive Approachto Veri�cation and Validation of CFDSimulations-Part1: Methodology andProcedures," ASME Journal of FluidsEngineering, Vol. 123, No. 4, December2001,pp. 793-802.

[4] Veri�cation and Validation in ComputationalScience and Engineering, Roache, P.J.,Hermosa Publishers, Albuquerque, NM, 1998.

[5] Salari, K., Knupp, P., \Code Veri�cation bythe Method of Manufactured Solutions,"SAND2000-1444, Sandia NationalLaboratories, Albuquerque, NM, June 2000.

[6] Wang, Chang-Yi, \On a Class of ExactSolutions of the Navier-Stokes Equations,"Journal of Applied Mechanics, Vol. 33, pp 696-698, 1966.

[7] Ross Ethier, C., Steinman, D.A., \ExactFully 3D Navier-Stokes Solutions forBenchmarking," International Journal forNumerical Methods in Fluids, Vol. 19, pp369-375, 1994.

[8] Rajagopal, K.R., \On a Class of ExactSolutions to the Navier-Stokes Equations,"International Journal of Engineering andScience, Vol. 22, No. 4, pp. 451-458, 1984.

[9] Steinberg, S., Roache, P.J., \SymbolicManipulation and Computational FluidDynamics," AIAA Journal, Vol. 22, No. 10,October 1984,pp. 1390-1394.

[10] Oberkampf, W.L., Blottner, F.G., Aeschliman,\Methodology for Computational FluidDynamics: Code Veri�cation/Validation,"AIAA Paper No. 95-2226, 26th AIAA FluidDynamics Conference," San Diego, June 1995.

[11] Oberkampf, W.L., Blottner, F.G., \Issuesin Computational Fluid Dynamics: CodeVeri�cation and Validation," AIAA Journal,Vol. 36, No.5, pp 687-695, 1998.

[12] Jameson, A., \Numerical Solution of theEuler Equations for Compressible InviscidFluids," Proceedings of the INRIA Workshopon Numerical Methods for the Euler Equationsof Fluid Dynamics, Rocquencourt, France,December 7-9, 1983.

[13] Whit�eld, D.L., Janus, J.M., \Three-Dimensional Unsteady Euler EquationsSolution Using Flux Vector Splitting," AIAAPaper No. 84-1552, 17th Fluid Dynamics,Plasma Dynamics and Lasers Conference,Snowmass, CO, June 1984.

[14] Chorin, A.J., \A Numerical Methodfor Solving Incompressible Viscous FlowProblems," Journal of Computational Physics,Vol. 2, 1967, pp. 12-26.

[15] Whit�eld, D.L., Taylor, L.K., \NumericalSolution of the Two-Dimensional Time-Dependent Incompressible Euler Equations,"MSSU-EIRS-ERC-93-14, NSF EngineeringResearch Center, Mississippi State University,April 1994.

[16] Hyams, D.G., \An Investigation ofParallel Implicit Solution Algorithms forIncompressible Flows on UnstructuredTopologies," Ph.D. Dissertation, MississippiState University, May 2000.

[17] Cabello, J., Morgan, K., L�ohner, R., \AComparison of Higher Order Schemes Usedin a Finite Volume Solver for UnstructuredGrids," AIAA Paper No. 94-2293, 25th AIAAPlasmadynamics and Lasers Conference,Colorado Springs, CO, June 1994.

[18] Marcum, D.L., \Advancing-Front/Local-Reconnection (AFLR) Unstructured GridGeneration," Computational Fluid DynamicsReview, Edited by M.M. Hafez and K. Oshima,1997.

13

American Institute of Aeronautics and Astronautics

Page 14: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

Appendix

Compressible Euler Equations

The integral form of the continuity equation forthe two-dimensional compressible Euler equationsin Cartesian coordinates isI

V

�@�

@t+

@(�u)@x

+@(�v)@y

�dV = 0 (A-1)

The source terms are found by using the exactsolutions to evaluate eqn. A-1. By the Divergencetheorem, the equation is converted to a surfaceintegral around every control-volume as shown ineqn. A-2. This is the source term for the continuityequation, S�.

S� =I@

(�euenx + �eveny)dS (A-2)

There are 4 edges, which are straight lines, in acontrol-volume in the structured grid. For each edgeeqn. A-2 is evaluated. For a cell-center (i; j) thesource term is given by

S�(i; j) =4X

k=1

q(b2k + d2k) �

nx

��e3(ak+ck)

3(bk + dk)+

e3(ak+bk+ck+dk)

3(bk + dk)

+ ny

��e3(ak+ck)

3(bk + dk)+

e3(ak+bk+ck+dk)

3(bk + dk)

�!ak = x(i� 1; j)

bk = x(i; j)� x(i� 1; j)

ck = y(i� 1; j)

dk = y(i; j)� y(i� 1; j)

(A-3)

where k denotes a CV edge, say that joining points(i; j) and (i�1; j), x; y refer to the coordinates andnx; ny are unit normal components of that edge.This is illustrated in �g. A-1.

The source terms for other governing equations areevaluated similar to eqn. A-3 and are not presentedhere due to space constraints.

Incompressible Euler Equations

The integral form of the continuity equation forthe two-dimensional incompressible Euler equations

�������� ��������(i-1,j) (i,j)

n n

i,j - verticesn - unit normal

Figure A-1: Edge Integration in Structured Grid

in arti�cial compressibility form14 isIV

�@p

@t+

@(�u)@x

+@(�v)@y

�dV = 0 (A-4)

where � is the compressibility factor. Writing thisequation similar to eqn. A-2 in surface integral form

Sp =I@

�(uenx + veny)dS (A-5)

The number of control-volume edges will varydepending on the vertex connectivity in the domain(refer to Figure 4). For each edge around thecontrol-volume, eqn. A-5 is evaluated. For a vertexi, the sum over all edges is the source term, Sp, givenby

Sp(i) =NiXel=1

2X

k=1

� �q(b2k + d2k) �

nx

��e(ak+ck)

(bk + dk)+

e(ak+bk+ck+dk)

(bk + dk)

+ ny

��e(ak+ck)

(bk + dk)+

e(ak+bk+ck+dk)

(bk + dk)

�!!(A-6)

where Ni denotes the number of elements thatintersect the element i, k denotes a CV edge in theelement. See Figure A-2 for an illustration. Theterms with subscript k are de�ned for k = 1 as

ak =(xi+xj)

2

bk = xc � ak

ck =(yi+yj)

2

dk = yc � ck

14

American Institute of Aeronautics and Astronautics

Page 15: [American Institute of Aeronautics and Astronautics 32nd AIAA Fluid Dynamics Conference and Exhibit - St. Louis, Missouri (24 June 2002 - 26 June 2002)] 32nd AIAA Fluid Dynamics Conference

������

����

������

����������������

����������������

i

j

l

k=2

(xc,yc)

k=1

nn

n - unit normalc - centroidi,j,l - vertices

Figure A-2: Edge Integration in Unstructured Grid

and for k = 2 as

ak = xc

bk =(xi+xl)

2 � xc

ck = yc

dk =(yi+yl)

2 � yc

where (x; y) are the coordinates of the vertices.Subscript c refers to the centroid of the elementformed by the vertices i; j; l. (x; y) refers tothe coordinates of vertices i; j; l and nx; ny refersto the CV edge unit normal components. Thesource terms for the other equations are evaluatedsimilarly.

15

American Institute of Aeronautics and Astronautics


Recommended