[american institute of aeronautics and astronautics 10th computational fluid dynamics conference -...

13
AIM-91 -15924~ GRID CONVERGENCE FOR ADAPTIVE METHODS Gary P. Warren', W. Kyle Andersont, James L. Thomas*, and Sherrie L. ~rist' NASA Langley Research Center Hampton, Virginia 23665-5225 Abstract The ability of adaptive methods to obtain accurate results is examined using two different Euler solvers for a near-sonic flow containing several important flow features. It is shown that the accuracy obtained can be greatly effected by the lack of resolution of smooth portions of the flow caused by adapting only to the more prevalent flow features such as discontinuities. In particular, common methods of adaptation can lead to results in which shocks are well resolved but whose locations are highly inaccurate due to the lack of resolution of the smoother regions. An explanation for this behavior is given and a correction is proposed. Introduction Adaptive-grid methods for computational fluid dy- namics have gained popularity in recent years due to their potential to provide highly accurate solutions with relatively few grid points. This gain in popu- larity owes in large part to the difficulty in modeling complex three-dimensional geometries with globally- refined "structured" grids. By using adaptive-grid tech- niques, it is generally felt that important flowfield fea- tures, such as shock waves, can be resolved with a high degree of accuracy because of the flexibility to distrib- ute grid points in regions of interest. In addition, since the point distribution enables a large number of points to be concentrated in limited areas, the memory and computational times can be minimized. Grid adaptation methods can be categorized into either point-redistribution or point-addition schemes. Point-redistribution methods maintain a constant num- ber of points which are moved into the areas of interest. While this technique is easily incorporated into existing structured-grid or block-structured-grid flow solvers, it can result in very skewed grids when adapting to struc- tures that are oblique to the mesh. On the other hand, Research Scientist, Fluid Mechanics Division. t Member AIAA, Research Scientist, Fluid Mechanics Division Associate Fellow, Member AIAA, Research Scientist, Fluid Mechanics Division Copyright O 1991 by the American Institute of Aeronautics and Astronautics, Inc. N o copyright is asserted in the United States under Title 17, U.S. Code. The U.S. Government has a royalty- free license to exercise all rights under the copyright claimed hcrcin for Governmental purposes. All other rights are resewed by the copyright owner. point-addition schemes add points to the existing grid but require a significant amount of coding since an unstructured-type data set is required. In the present paper, emphasis is placed on point-addition schemes. For nonadaptive grid computations, a grid refine- ment study can be generally conducted in which the mesh spacing is systematically reduced while maintain- ing the same topology as the original grid. In this man- ner, a grid-converged solution can be obtained. Unfor- tunately, methodology for conducting this type of study for adaptive methods is not yet known so verification of accuracy can be difficult. To ensure the integrity of the solution, the goal of any refinement strategy should be 10 reduce the errors throughout the computational domain. Optimally, for a steady-state solution, adap- tive refinement should produce results that, like global refinement, reduce the global error in proportion to the spatial order of the scheme. Several adaptation strategies have been investi- gated for two-dimensional flow which can generally be classified as methods which adapt to error estimates directly1 or adapt to physical features such as flow gradienk2 The use of direct error estimation for point- addition methods, in computational fluid dynamics has been very limited, probably due to complexity associ- ated with estimating the error accurately in the adapted grids and to the "noise" which often occurs in these estimates. ~erger' has done work in this area using a central-difference flow solver and a Richardson's ex- trapolation technique to estimate the truncation error. By far the most common approach for estimating error behavior is to use the physical features of the

Upload: sherrie

Post on 15-Dec-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

AIM-91 -15924~

GRID CONVERGENCE FOR ADAPTIVE METHODS

Gary P. Warren', W. Kyle Andersont, James L. Thomas*, and Sherrie L. ~ r i s t '

NASA Langley Research Center

Hampton, Virginia 23665-5225

Abstract

The ability of adaptive methods to obtain accurate results is examined using two different Euler solvers for a near-sonic flow containing several important flow features. It is shown that the accuracy obtained can be greatly effected by the lack of resolution of smooth portions of the flow caused by adapting only to the more prevalent flow features such as discontinuities. In particular, common methods of adaptation can lead to results in which shocks are well resolved but whose locations are highly inaccurate due to the lack of resolution of the smoother regions. An explanation for this behavior is given and a correction is proposed.

Introduction

Adaptive-grid methods for computational fluid dy- namics have gained popularity in recent years due to their potential to provide highly accurate solutions with relatively few grid points. This gain in popu- larity owes in large part to the difficulty in modeling complex three-dimensional geometries with globally- refined "structured" grids. By using adaptive-grid tech- niques, it is generally felt that important flowfield fea- tures, such as shock waves, can be resolved with a high degree of accuracy because of the flexibility to distrib- ute grid points in regions of interest. In addition, since the point distribution enables a large number of points to be concentrated in limited areas, the memory and computational times can be minimized.

Grid adaptation methods can be categorized into either point-redistribution or point-addition schemes. Point-redistribution methods maintain a constant num- ber of points which are moved into the areas of interest. While this technique is easily incorporated into existing structured-grid or block-structured-grid flow solvers, it can result in very skewed grids when adapting to struc- tures that are oblique to the mesh. On the other hand,

Research Scientist, Fluid Mechanics Division. t Member AIAA, Research Scientist, Fluid Mechanics Division

Associate Fellow, Member AIAA, Research Scientist, Fluid Mechanics Division Copyright O 1991 by the American Institute of Aeronautics

and Astronautics, Inc. N o copyright is asserted in the United States under Title 17, U.S. Code. The U.S. Government has a royalty- free license to exercise all rights under the copyright claimed hcrcin for Governmental purposes. All other rights are resewed by the copyright owner.

point-addition schemes add points to the existing grid but require a significant amount of coding since an unstructured-type data set is required. In the present paper, emphasis is placed on point-addition schemes.

For nonadaptive grid computations, a grid refine- ment study can be generally conducted in which the mesh spacing is systematically reduced while maintain- ing the same topology as the original grid. In this man- ner, a grid-converged solution can be obtained. Unfor- tunately, methodology for conducting this type of study for adaptive methods is not yet known so verification of accuracy can be difficult. To ensure the integrity of the solution, the goal of any refinement strategy should be 10 reduce the errors throughout the computational domain. Optimally, for a steady-state solution, adap- tive refinement should produce results that, like global refinement, reduce the global error in proportion to the spatial order of the scheme.

Several adaptation strategies have been investi- gated for two-dimensional flow which can generally be classified as methods which adapt to error estimates directly1 or adapt to physical features such as flow gradienk2 The use of direct error estimation for point- addition methods, in computational fluid dynamics has been very limited, probably due to complexity associ- ated with estimating the error accurately in the adapted grids and to the "noise" which often occurs in these estimates. ~erger' has done work in this area using a central-difference flow solver and a Richardson's ex- trapolation technique to estimate the truncation error.

By far the most common approach for estimating error behavior is to use the physical features of the

evolving flow field since these are the most readily available quantities. These methods tacitly assume that the greatest error always occurs in high-gradient regions such as shock waves, slip lines, and stagnation points. However, if this procedure of continuous local refinement of the prevalent flow features does not also reduce the global error, then the adapted solution may be no better than the original solution, and in fact, may yield an incorrect answer. For example, adapting to the flowfield predicted by a first-order method may resolve the highest gradient features of the flowfield very well. However, the locations of some important flow features, such as shocks, are largely determined by the conditions in smooth regions of flow ahead of and behind the shock which may not be sufficiently resolved by the adaptation process so that inaccurate results may be obtained.

In the present study, the ability of adaptive meth- ods to obtain accurate solutions is studied for the case of an airfoil at near-sonic conditions. For the present study, several popular methods of adaptation are uti- lized and the results are compared with grid-converged solutions obtained using a series of globally finer grids and a structured-grid flow solver. It is shown that com- monly used adaptation strategies can lead to erroneous solutions. This behavior is analyzed and new strategies which alleviate the difficulty are introduced.

Symbols

x and y components of a unit normal

pressure

conserved state vector, Q = b PU PV ElT

coefficient for adaptation length scale

time

velocity normal to cell face

Cartesian velocities in 3: and y directions

Cartesian coordinates

shock location measured from trailing edge of airfoil

shock angle

undivided difference

ratio of specific heats, taken as 1.4

density

flow deflection angle

standard deviation of adaptation criterion

threshold value

boundary of cell

area of cell

chord length

total energy

error

error indicator

fluxes of mass, momentum, and energy

length scale for cell

length scale for cell

reference length

Mach number

average of adaptation criterion

number of cells

unit normal

Governing Equations

The governing equations are the time-dependent Euler equations, which express the conservation of mass, momentum, and energy for an inviscid gas. The equations are given by

where the state vector Q and the flux vectors @ are given as

where U is the velocity in the direction of the outward pointing unit normal

U = n o u + n y v (4)

The equations are closed with the equation of state for a perfect gas

p = (7 - l ) [ ~ - p ( u 2 + v 2 ) / 2 ] ( 5 )

Numerical Methods

Three different Euler solvers are used in this study. The first Euler solver is a structured-grid method which is used for conducting a grid convergence study whose results will be used for evaluating the accuracy of the adaptation procedures. The remaining two solvers are unstructured-grid solvers which attempt to obtain accurate solutions by adaptation. All of the solvers used in the current study utilize the same boundary conditions for the solid surface and far field.3 In addition, all the methods are second order accurate in space and are fully conservative.

The structured-grid Euler method used is from reference [4] and is referred to as CFL2D. This is a finite-volume structured-grid Euler solver which uses the flux-vector-splitting of Van ~eer. ' CFL2D is an implicit solver and uses a multigrid algorithm for con- vergence acceleration. This method is widely used and has been applied to a variety of flow problems with good success.

The first adaptive Euler solver employed in the current study is described in reference [6]. This method uses the same spatial-differencing techniques as CFL2D, but an unstructured data set is included in order to accommodate the irregularly shaped grid topologies that occur with adaptive grid embedding. The resulting computational grids are a collection of quadrilateral cells that are aligned with the original grid but are not arranged in block structures. This method uses multiple grid levels which simplifies the data struc- ture required for handling "hanging" nodes which occur at the embedded interfaces. The multi-level approach, shown in figure 1, also allows implementation of a multigrid algorithm to accelerate the convergence rate so the computer time is reduced. Note that every un- derlying coarse cell, or "parent", always has four finer cells, or "children", above it. In order to preserve the computational stencil at an embedded interface, four ghost cells are created and updated using bilinear in- terpolation from the most recent solution on the un- derlying coarse grid. To enforce conservation at the

interfaces, the fluxes from the two fine-grid faces are added and injected onto the coarse grid. The solution is advanced in time using a two-stage explicit method."

The data structure for this algorithm is obtained by extracting all the necessary pointers from an initial structured gtid. At each level of refinement, new pointers are generated from the underlying coarse-grid pointers. The semi-unstructured grid points at each level have corresponding points in a globally fine grid. Because of this, a globally fine grid file is generated initially and used to obtain the new coordinates of a refined cell. This ensures that the smoothness of the original grid is maintained. Because each subsequent grid is constructed from the initial structured grid, the method is referred to as Semi-UNstructured (SUN2D). An example of a final adapted grid for this method is shown in figure 2.

The Fully UNstructured solver (FUN2D) used in the current study is an implicit upwind-differencing code which evaluates fluxes on cell faces using either Van Leer flux-vector splittin$ or Roe flux-difference splitting.' The solution at each time steu is updated using an implicit algorithm which uses the linearized backward-Euler time-differencing scheme. At each time step, the linear system of equations is solved with a subiterative procedure in which the cells in the mesh are divided into groups (colors) so that no two cells in a given group share a common edge. For each subiteration, the solution is obtained by solving for the unknowns in a given color before proceeding to the next color. Since the solution of the unknowns in each group depends on those from all previous groups, a Gauss-Seidel type of procedure is obtained which is completely vectorizable.

Hanging node \ n

Single Grid Level Multiple-Grid Levels

Figure 1. Grid Level Structure

1 level 1

2

Figure 2. Example of Adapted Semi-Unstructured Grid

Figure 3. Example of Adapted Unstructured Grid

Unstructured grids are obtained using the De- launey triangulation procedure of ~owyer? The grid points in the interior are self generated by requiring that the aspect ratio in every cell remains below 1.5. Similar procedures have been used in the past, exam- ples of which can be found in reference [lo]. Each level of adaptation is achieved by first identifying a list of cells requiring refinement. New points, which are

located at the center of each of these cells, are then in- troduced into the existing triangulation using Bowyer's algorithm and the solution is interpolated to the new grid-point locations for use in restarting the solution. An example of an adapted grid around the leading edge of a multi-element airfoil is shown in figure 3.

Adaptation Methods and Grid Convergence

The fundamental goal of adaptive methods is to produce accurate solutions with as few grid points as possible. This can be accomplished by either redis- tributing existing mesh points or by adding new mesh points into the discretization in such a way that the er- rors are minimized over the domain. With point redis- tribution methods, a constraint is placed on the number of mesh points that are used and an attempt is made to place these points in such a way that the errors are equally distributed over the cells so that equal accu- racy can be expected for all cells. In this manner, optimum accuracy is achieved for the number of grid points used. For adaptation methods which insert new points as the calculations proceed, one should strive to maintain a similar relationship so that the highest ac- curacy can be obtained for the given number of grid points used. Furthermore, since more points are con- stantly being added, it should be possible to improve upon the global accuracy of the approximation.

With any computational algorithm for fluid me- chanics, whether an adaptive method is used or not, an obvious requirement for accuracy is that as more points are added to the mesh, the accuracy of the approxima- tion should increase until in the limit as the number of cells approaches infinity, the maximum solution error goes to zero.

where the solution error, e , is the difference between the exact solution and the computed one. Equation 6 is only realized for a consistent method when the mesh spacing uniformly approaches zero in all cells as the number of points approaches infinity.

lim hi= 0 n-cc

(7)

For structured grids, the standard methodology for grid refinement is simply to let the number of points get sufficiently large until the solution can be extrapolated to that of an infinitely refined mesh with reasonable accuracy. It is important to keep in mind however, that for each global grid refinement during this process,

the mesh spacing for each cell tends toward zero since the topology of the original mesh is maintained. Thus equations (6) and (7) are satisfied and the global error is decreased with each successive refinement.

The goal of adaptive procedures should be to re- duce the global error while significantly decreasing the number of points required in comparison to a nonadap- tive method. It is important to emphasize that the con- ditions given by equations (6) and (7) must be satisfied if a grid converged solution is to be realized. In this way, the same level of accuracy is obtained as the glob- ally refined grid but with far fewer points.

The most obvious method of adding points in an adaptive procedure is to add them at locations where the maximum errors occur. Since the exact solution to a problem is not known a priori, it is not possible to evaluate the errors exactly. Therefore, most adaptive methods rely on estimating the behavior of the error using feature-detection algorithms. These algorithms assume regions of high error are associated with regions of high gradients. It is apparent that the success or failure of all adaptive strategies is directly linked to their ability to estimate either regions of high error or quantities that behave in the same way as the errors. In particular, these latter quantities locally must eventually go to zero for all regions of the domain if the addition of new mesh points does in fact increase the local accuracy.

In applications of adaptation to fluid dynamics, the assumption that trends in the errors are associated with regions of high gradients has proven to be quite reliable at improving the resolution of many flow features. In particular, shock waves are routinely calculated with very high local resolution, leading to meshes which represent impressively the predominant features of the physical solution. It should be emphasized however, that fine resolution of discontinuities does not guaran- tee that the global errors are reduced and, more impor- tantly, that the correct locations of these discontinuities are obtained. If large errors occur in smooth regions of the flow, the location of discontinuities (or whether or not these discontinuities are even formed) may be greatly effected.

AGARD 03 Test Case

The case chosen to study is a NACA 0012 airfoil at a freestream Mach number of 0.95 and an angle of attack of 0'. This flow is characterized by an oblique shock structure emanating from the trailing edge with a weak normal shock in the wake as shown in figure 4. The normal shock is relatively weak

with a Mach number ahead of the shock less than 1 .l. A brief analysis indicates that the location of the downstream normal shock wave is very sensitive to the grid and that many adaptive strategies may indeed fail to accurately capture the correct location of the salient features although many grid points are located in the shock region.

Supersonic /Ir- Shock Flow

Sonic Line 2'' Shock Triple

/Point

Oblique Shock

Figure 4. NACA 0012, M= 0.95 Flow Structure

Using the nomenclature shown in figure 5, the relationship between the flow deflection angle 0, the shock angle /3, and the upstream Mach number M I , is given by

M: sin2 /3 - 1 tan 0 = 2 cot /3

[M:(-( + cos 2/31 + 2

This relation must be satisfied at all locations along the oblique shock. Examining the trailing edge geometry of a NACA 0012 indicates that at this location 0 has a value of approximately 7.99'. A plot of P vs. M I for this value of 0 is shown in figure 6. From grid converged solutions which are presented in the next section, it is determined that the value of M1 along the oblique shock varies from approximately 1.45 at the trailing edge to 1.25 at the shock triple point. As shown in the figure, the value of /3 is very sensitive to the value of the upstream Mach number M I , for the range of Mach numbers occurring ahead of the oblique shock. For this case, the value of 6 changes only slightly from the trailing edge of the airfoil up to the triple point.

Oblique Shock

Figure 5. Trailing Edge Detail

Figure 6. Shock Polar for 6 = BT.E. = 7.99'

The sensitivity of the normal shock location is directly related to the sensitivity of the oblique shock angle. If the expansion waves in the supersonic zone are not resolved accurately, then the values of the Mach number ahead of the oblique shock will not be accurately represented so that ,L? along the oblique shock will be highly inaccurate. U the computed value of MI is slightly lower than the actual value, the values of ,B will increase and move the oblique shock forward as shown in figure 7. The sensitivity of the normal shock location is further amplified because the length of the oblique shock from the trailing edge to the shock triple point is about 5 chord lengths.

Figure 7. Shock Movement as Mach Number Ahead of Shock Decreases

There are other physical and mathematical fea- tures which effect the location of the normal shock downstream of the airfoil trailing edge including the extent of the outer boundary. For this study, the outer boundary extent is fixed at 100 chords for all compu- tations. It is evident that this case presents a severe challenge to adaptive-grid strategies since a relatively small change in one area of the solution can greatly effect the final answer.

Grid Convergence Study

The correct location of the normal shock down- stream of the trailing edge has been determined through a grid convergence study performed using CFL2D. The grid sizes utilized for this study include 65 x 25, 129 x 49,257 x 97, and 2049 x 765 0-type grids. The coarse 65 x 25 grid contains 65 grid points on the surface of the airfoil with 25 grid lines extending out radially away from the surface; a similar relationship holds for the other grids. The effect of grid density on the loca- tion of the normal shock is shown in figure 8 where the shock location is measured downstream of the trailing edge. The shock location for each grid density has been used for extrapolating to an infinitely refined grid with a l&hord outer boundary. The normal shock location obtained in this manner is about 3.35 chords from the trailing edge. Corresponding mesh-refinement results using the method in reference [ l l ] are also shown in figure 8 which indicates that, upon extrapolation, a sim- ilar shock location of approximately 3.32 is obtained. It should be noted that the shock location obtained with CFL2D has been determined by simply measuring the location of the sonic line from contour plots. For the computations using the shock-fitting procedure of ref- erence [ l l] , a numerical location of the shock position evolves' during the computation.

Mach contours computed using CFL2D on the 2049 x 765 mesh are shown in figure 9 for the upper half of the flowfield.

Adaptive Results

For the present investigation, several popular error indicators which are used to determine locations where new grid points should be introduced are studied. Note that the term "error indicator" is used only loosely since all of the methods examined attempt to estimate the trends in the errors based on physical quantities which are readily available as the calculations proceed. For each adaptive calculation, the normal shock location is measured downstream from the trailing edge and is compared with the "exact" solution obtained from the grid convergence study with CFL2D. Because the shock locations are physically measured, they are sus- ceptable to the inaccuracies of the contouring program and measurement procedure. However, these errors are small and do not greatly effect the results shown here.

0 CFL2D

Ref. [ll]

Figure 9. NACA 0012, M= 0.95 Mach Contours

For all the adaptive methods considered below, an adaptation parameter which serves as an indicator for trends in the solution error is first evaluated in each cell. The first method of indicating error behavior which is examined in the present study is based on an undivided

1 I 1 I 8

2 4 6 , ,,., difference of velocity magnitude l /Number of Cells

141 = ILsl (9)

Figure 8. Grid Convergence of Normal Shock Location

For the computations obtained using the fully un- structured grid solver. FUN2D, the initial grid consists of 2626 cells and 1313 nodes with 128 nodes on the sur- face of the airfoil and 32 nodes along the outer bound- ary. For the semi-unstructured, SUN2D results, the starting grid is obtained by extracting pointer informa- tion from a 33 x 13 0-type mesh. For all calculations, when a new point is introduced on the airfoil surface, the location of the point is determined using a para- metric cubic spline.

This parameter has been determined to be suitable for detection of shock waves, slip lines, expansion fans, and stagnation zones.12 The second method examined is one suggested in reference [13] which is based on the square of a length parameter for each mesh cell times the absolute value of second derivatives of density with respect to the x and y coordinates,

Once an error indicator is calculated for each cell, a decision must be made based on these values as to

which cells require further refinement. In order to de- cide which cells will be refined, several strategies have been considered. The first method is that of Kallinderis [14] in which the view is taken that the optimum ar- rangement of mesh point. is one in which the average error is approximately the same in all cells. Assuming that the adaptive criterion is indeed an indication of the error in the cell, this can be achieved by flagging any cell in which the deviation from the average is higher than the standard deviation. Specifically, a new point will be introduced in each cell in which the error indicator is larger than the average plus the standard deviation. i.e. whenever

Here, m is the average of the error indicator over the grid and a is the standard deviation.

The second method used to determine which cells contain reasonably high errors is to calculate the value of the error indication parameter, 1, in each cell and then to normalize all these values to the range from zero to one. These values are then checked against a predetermined threshold value and all cells with error indicator above this level are flagged for refinement. This method has been used in past studies by Dannenhoffer in reference [12] as well as by Warren in reference [6].

Results for the NACA 0012 case described above which have been obtained using the fully unstructured code, FUN2D, and the adaptive criteria shown above are summarized in figure 10. For the results shown, both the undivided difference of velocity and the sec- ond differences in density have been used to indicate errors in the cells. For these results, the cells which require refinement are flagged according to the crite- ria of Kallenderis as described above. Figure 10 shows the percent difference in normal shock location as mea- sured from the trailing edge of the airfoil between that calculated from adaptation and from the exact solution obtained from the grid refinement study conducted with CFL2D. As seen in the figure 10, for both error indi- cators, there is an alarming difference in the resulting shock locations obtained from adaptation and that of CFL2D.

0 1 I 1 I I 0 5 10 15 20 x 10'

Number o f Cells

Figure 10. FUN2D Shock Location Error

A sample grid which results from the adaptation process is shown in figure 11. This particular grid is the result of adapting to the undivided difference in velocity magnitude; the grid obtained using the second difference in density criterion is very similar. As seen in the figure, the region around the shock has been well resolved; however, from figure 10, recall that the calculated normal shock location is in extremely poor agreement with the grid-converged solution.

Figure 11. FUN2D Final Adapted

Grid Obtained by Adapting to Aq I- I

This same calculation has been repeated starting on an initial structured 65 x 25 0-type mesh which has been triangulated. The initial structured grid has more points in the supersonic region than the initial grid used for the previous case. The error in the calculated shock location and the corresponding grid resulting from the calculations are shown in figure 10 and 12, respectively. For these results, the undivided difference in velocity magnitude has again been used as an error indicator. As seen in figure 10, the measured shock location is within 3 percent of the extrapolated CFL2D answer. The grid, shown in figure 12 exhibits the level to which the region around the shock has been resolved. As with the results shown in figure 11, the regions around the shocks are well resolved; in this case however, an accurate shock location is obtained while using the same error indicator as above and thus demonstrates the sensitivity of the procedure to the initial conditions as also discussed in [15].

Figure 12. FUN2D Final Adapted Grid Obtained by Adapting to Aq Starting on a Structured Initial Grid I- I

Figures 13 and 14 show the percentage error in shock location and the resulting grid, respectively for calculations obtained with the semi-unstructured solver SUN2D. For these calculations, the undivided differ- ence in velocity magnitude is used as an error indicator while the cells to be flagged for refinement are deter- mined by setting a threshold. For the results shown in figure 14, a threshold value of 0.35 has been used. Again, it is observed that although the resulting grid indicates a high local resolution of the oblique and

normal shocks even at a long distance from the air- foil, the normal shock location is incorrect. Results are also shown in figure 13 which have been obtained using a threshold of 0.2. Recall that with a threshold of 0.35, the final shock location is about 15 percent in error while the results obtained with a threshold of 0.2 show improved accuracy with a final error in shock lo- cation of only about 4 percent. Even then, the behavior is somewhat unsatisfactory in that the error appears to be decreasing towards zero when 9,000 cells are used, but increases beyond that point to what seems to be a higher asymptotic error.

' . . I 0 I I I I I I

0 5 10 15 20 X 10' Number o f Cells

Figure 13. SUN2D Shock Location Error

The results above show that the starting mesh and the exact manner in which cells are flagged for refinement can have a significant effect on the accuracy of the final results. For complex flows in which many discontinuities may routinely exist and a grid that is "fine enough" is not known ahead of time, it would appear that the application of adaptation based on these criteria is highly suspect.

While no other specific examples of inconsistent behavior of the adaptation process have been found in the literature, an awareness of this is strongly alluded to in reference [15]. In this reference, it is stated that for adaptation, it is necessary that a sufficiently fine initial mesh be used to prevent adaptation from occurring at incorrect locations.

flowfield even though the error indicator is always at a constant value. This is particularly true of modem up- wind algorithms in which discontinuities are routinely captured with only one interior zone. A similar sit- uation exists for error indicators based on undivided second differences.

Figure 14. SUN2D Final Ada ted

Grid Obtained by Adapting to Aq P- l It is tempting to blame the above inconsistencies

on either the ability of the error indicators to detect flow features accurately or to even question the conservation of the flow solvers. However, all the schemes used here are fully conservative. Also, the undivided difference in velocity has been shown in [12] to be a feature detection algorithm valid for shock waves, expansions, slip lines, and stagnation regions.

The inability of the previously described adapta- tion methods to consistently produce accurate results can easily be explained by considering the ability of the error indicators to accurately predict the trends in the solution error. Considering the undivided difference in velocity as an error indicator for a one-dimensional problem, it is seen that this can be written as

which for smooth flows, continuously decreases as the mesh size is decreased. However, as seen in figure 15, at a discontinuity such as a shock wave, Iigil remains approximately constant even as the mesh is locally refined. Therefore, if the region around a shock is initially flagged for refinement, it will be flagged for all subsequent adaptation cycles. The schematic of the region in the immediate vicinity of the shock, shown in figure 15, shows that refinement of this area resolves the shock very well so that this may no longer repre- sent a region of high error. This region may indeed be the most accurately resolved region of the entire

Figure 15. Schematic of Refinement in Region of Shock

In addition, if, during the adaptation process, a cell is not initially flagged because the mesh spacing around it is too coarse to adequately resolve any features, the cell remains unflagged except perhaps when cells are added nearby in such a way as to raise the value of the error indicator high enough to command attention. The result of this process is that smooth regions, or even possibly regions with discontinuities of smaller strength, are not refined during the adaptation process. Since regions of the flow surrounding the discontinuity are instrumental in determining the location of the discontinuity, it is easy to see how problems can arise by simply trying to refine shocks.

A more severe situation arises when the adaptation criterion has a local length scale in the denominator when evaluated numerically. Examples of this can be seen in references [I61 and [17]. In this case, at a

discontinuity, the error indicator tends toward infinity as the local grid spacing approaches zero. It is obvious that as a feature is refined the actual error does not go to infinity. ~annehoffer'~ outlines an example of a flow situation with two shocks of equal strength. If on the first adaptation cycle only one shock is refined, the error indicator will be twice as large for the refined shock as for the unrefined shock on the next adaptation cycle. This refinement strategy has the opposite behavior that is desired since the error indicator has the opposite behavior of the actual error at discontinuities.

With this in mind, it is appropriate to comment on the use of first-order accurate schemes in which claims of accuracy are made simply by resolving regions around discontinuities. Although conservative first- order accurate schemes satisfy the Rankine-Hugoniot relations, if the data around the discontinuity is not ac- curate, an inaccurate result will be obtained. It should be clear that if first-order accurate schemes are to be employed, adaptation needs to be applied in many re- gions including areas of smooth flow if any possibility of obtaining an accurate result is to be expected.

In order to correct the problem of constantly plac- ing new points in inappropriate regions, while possibly starving other regions of equal or perhaps even greater importance, a simple modification to the error indica- tors is proposed. Since the problem is due to a disparity in error indicators calculated on the initial coarse grid which never vanishes, a simple correction to the error indicators is to multiply each of them by a length scale associated with each cell. In this manner, as certain regions are refined and the accuracy in those regions is increased, the error indicator will decrease sufficiently to allow other important flowfield regions to be de- tected and satisfy the conditions given by equations (6) and (7). For the present study, the mMfied error indicators are expressed as

Here, li represents a characteristic length for each cell and I, is a reference length which is the same for all cells. For the current study, li is taken as the square root of the area of each cell and 1,. is simply the airfoil chord. Many possibilities exist for computing li such as the diameter of the circumcircle for a Viangle, or the area of a cell divided by the perimeter. The parameter r is taken to be unity for the cases presented here. Note

that as r becomes large, the error indicator will behave more like the undivided gradient.

Results obtained with FUN2D using this modifica- tion are shown in figures 17 and 18 with corresponding results obtained with SUN2D shown in figures 17 and 19. The initial gnds used in generating these results are the same as those previously used. The grids shown in figures 18 and 19 both result from adapting to the modified indicator based on the undivided difference of velocity. As seen in the figures, the ability of the new adaptation scheme to converge to the correct solu- tion is greatly improved for both FUN2D and SUN2D. For both methods, the error in shock location obtained from adaptation is less than 1.5 percent different from that obtained from extrapolating the CFL2D results to an infinitely fine grid.

As stated in reference [18], an optimal grid is ob- tained when the error is equally distributed over the grid. The actual distribution of the adaptation crite- ria is shown in figure 16 for the two FUN2D cases shown in figures 18 and 11. As shown, when the so- lution is converging towards the correct answer, the standard deviation of the adaptation criterion decreases which indicates equidistribution. However, if the stan- dard deviation increases, as with the undivided gradient criterion, then equidistribution does not occur and the normal shock converges to an incorrect location.

-1.21 I I I I I I I 0 5 10 15 20 X 10'

Cells

Figure 16. Standard Deviation of Adaptation Criteria

Number o f Cells

Figure 17. Shock Locations Obtained with Modified Error Estimates

as the local grid spacing approaches zero, this method does ensure the error indicators behave as the actual error in both the discontinuous and smooth regions of the flow. The procedure ensures that as the number of points goes to infinity, the local grid spacing goes to zero in all cells. The resulting grids may have an excess number of points but the trend of the solution is toward grid convergence.

Figure 18. FUN2D Final Adapted Grid Obtained with Modified Error Estimates

It should be emphasized that although the mod- ifications to the error indicators yield the correct be- havior, in that the correct solution is obtained while starting from an arbitrary initial grid, this procedure does not necessarily produce optimal grids. Specifi- cally, for the number of mesh points, the actual errors may not be equally distributed since the error indicators may not behave exactly as the actual error. However,

Figure 19. SUN2D Final Adapted Grid Obtained with Modified Error Estimates

Concluding Remarks

The use of grid adaptation methods to obtain ac- curate solutions has been examined. It has been found that for several popular methodologies, inaccurate so- lutions can result when the computations are started on arbitrary initial grids. It is shown that this is caused by the dominance of some flow features so that other, less prominent features are not detected. This can greatly effect the accuracy of the final solution.

To alleviate this problem, a simple modification to the error indicators is proposed making them valid in both smooth and discontinuous regions. The use of these new parameters yields correct solutions indepen- dently of the initial grids.

Acknowledgments

The authors would like to acknowledge Peter Hartwich for providing the results of his grid conver- gence study.

References

Berger, M., and Jameson, A., "Automatic Adap- tive Grid Refinement for the Euler Equations," AIAA Journal, vol. 24, pp. 561-567, Apr. 1985. Dannenhoffer, J. F., and Baron, J. R., "Grid Adaptation for the 2-D Euler Equations," AIAA 85-0484, Jan. 1985. Thomas, J. L., and Salas, M. D., "Far-Field Boundary Conditions for Transonic Lifting So- lutions to the Euler Equations," AIAA Journal, V O ~ . 24, pp. 1074-1080, July 1986. Anderson, W. K., Thomas, J. L., and Whitfield, D. L., "Three-Dimensional Multigrid Algorithms for the Flux-Split Euler Equations," Tech. Rep. 2829, NASA, 1988. van Leer, B., "Flux Vector Splitting for the Euler Equations," Lecture Notes in Physics, vol. 170, pp. 501-512, 1982. Warren, G. P., "Adaptive Grid Embedding for the Two-Dimensional Euler Equations," AIAA 90- 3049, Aug. 1990. Shu, C. W., and Osher, S., "Efficient Implementa- tion of Essentially Non-Oscillatory Shock Captur- ing Schemes." ICASE Report No. 87-33, 1987. Roe, P. L., "Approximate Riemann Solvers, Pa- rameter Vectors, and Difference Schemes," Jour- nal of Computational Physics, vol. 43, pp. 357- 372, 1981. Bowyer, A., "Computing Dirichlet Tessellations," Computer Journal, vol. 24, no. 2, 1981. Holmes, D. G., and Snyder, D. D., "The Gen- eration of Unstructured Triangular Meshes using

Delaunay Triangulation," in Numerical Grid Gen- eration in Computational Fluid Dynamics '88, pp. 643-652, Pineridge Press, Dec. 1988.

11. Hartwich, P., "Fresh Look at Floating Shock Fitting," AIAA 904108, Jan. 1990.

12. Dannenhoffer, J. F., Grid Adaptation for Complex Two-Dimensional Transonic Flows. PhD thesis, Massachusetts Institute of Technology, Aug. 1987.

13. Peraire, J., Vahdati, M., Morgan, K., and Zienkiewicz, 0. C., "Adaptive Remeshing for Compressible Flow Computations," Journal of Computational Physics, vol. 72, pp. 449-466, 1987.

14. Kallinderis, Y. G., and Baron, J. R., "Adaptation Methods for a New Navier-Stokes Algorithm," AIAA Journal, vol. 27, Jan. 1985.

15. Theraja, R. R., Prabhu, R. K., Morgan, K., Peraire, J., Peiro, J., and Soltani, S., "Applications of an Adaptive Unstructured Solution Algorithm to the Analysis of High Speed Flows," AIAA 90-0395, Jan. 1990.

16. Rausch, R. D., Batina, J. T., and Yang, H. T. Y., "Spatial Adaption Procedures on Unstructured Meshes for Accurate Unsteady Aerodynamic Flow Computation," AIAA 91-1 106, Apr. 1991.

17. Zakeri, G., "Resolution Function and Adaptive Refinement Method for a System of Conservation Laws," in Fifth Copper Mountain Conference on Multigrid Methods, Mar. 199 1.

18. Thompson, J. F., Warsi, Z. U. A., and Mastin, C. W., Numerical Grid Generation. North- Holland, 1985.