Thompson, Warsi, Mastin - Numerical Grid Generation (523190), страница 14
Текст из файла (страница 14)
It is the product A rather than the function Aitself, which is conserved in this form. The derivative inside the j summation can beexpanded and Eq. (III-40) invoked to obtain the simplified form:(4)which is still conservative in regard to the-derivatives.These conservative forms are in the commonly used formwhere the solution vector isand (4), and the source vector is, the "flux" vectors=.i aregiven by the brackets in (3)The flux vectors i contain metric derivatives and depend on time and the curvilinearcoordinates through these metric elements, as well as through the solution vector and thismust be taken into account in the construction of factored solution methods. A generalformulation of split solution methods (encompassing both time splitting, e.g., approximatefactorization, and spatial splitting, e.g., MacCormack method) in the curvilinear coordinatescan, however, be formulated.The non-conservative form of Eq.
(1) follows using Eq. (III-125) for the convectiveterms, Eq. (III-65) for the gradient, and Eq. (III-67) for the divergenceresulting equation may be written. The(5)since Eq. (III-70) gives(6)(The last summation in Eq. (5) is just, which vanishes for incompressible flow.)Comparison of Eq. (5) with the original equation, written in the form(7)demonstrates that the equation has been complicated by the transformation only in the sensethat the coefficient ui has been replaced by the coefficient Ui+ ( 2 i), and the Kronikerdelta in the double summation has been replaced by gij, thus expanding that summation fromthree terms to nine terms, and through the insertion of variable coefficients in the lastsummation.
This exemplifies the fact that the use of the general curvilinear coordinatesystem does not introduce any significant complications into the form of the partialdifferential equations to be solved. When it is conthat the transformed equation (5) is to besolved on a fixed rectangular field with a uniform square grid, while the original equation (7)would have to be solved on a fiels with moving curved boundaries, the advantages of usingthe curvilinear system are clear.These advantages are further evidenced by consideration of boundary conditions. Ingeneral, boundary conditions for the example being treated would be of the form(8)where is the unit normal to the boundary and , , andthese conditions transform toare specified. From Eq.
(III-79)(9)for a boundary on which i is constant. For comparison, the original boundary conditions (8)can be written in the form(10)The transformed boundary conditions thus have the same form as the original conditions, butwith the coefficient n j replaced by gij/. The important simplification is the fact that theboundary to which the transformed conditions are applied is fixed and flat (coincident with acurvilinear coordinate surface). This permits a discrete representation of the derivatives A jalong the transformed boundary without the need for interpolation.
By contrast, thederivatives Ax in the original conditions cannot be discretized along the physical boundaryjwithoutinterpolation since the boundary is curved and may be in motion.This discussion of a generic convection-diffusion equation and associated boundaryconditions should serve to allow specific physcial equations to be transformed. References toapplication of these equations are gven in the surveys Ref. [1] and [5]. Several examples alsoappear in Ref. [2].2. Discrete Representation of DerivativesApproximate values of the spatial derivatives of a function which appear in thetransformed equations may be found at a given point in terms of the function’s value at thatpoint and at neighboring points.
As noted earlier, with the problem in the transformed space,only uniform square grids need be considered, hence the standard forms for differencerepresentation of derivatives may be used. For example, in two dimensions the first, second,and mixed partials with respect to the curvilinear coordinates and are ordinarilyrepresented at an interior point (i,j) by finite differences or finite-volume expressions whichcontain function values at no more than the nine points shown below.This centered, nine-point "computational molecule" is usually preferred because of theassociated difference representations which are symmetry-preserving and second-orderaccurate.
Examples of finite-difference approximations of this type are:(11a)(11b)(12a)(12b)(13)Other second-order approximations of the mixed partial (fmolecule are:)ij which use the nine-point(14)and(15)It is clear that at boundary points, where at most first partials must be represented, thecomputational molecule cannot be centered relative to the direction of the coordinatewhich is constant on the boundary (see diagram below).There a one-sided difference must be used to approximate fappropriate for the boundary point indicated above is. The second-order formulaAny standard text on the subject of finite-difference methods will provide formulas ofalternate order and/or based on other computational molecules.A finite-volume approach uses function values at grid-cell centers and approximatesderivatives at a cell center by line (surface in 3D) integrals about the cell boundary which areequivalent to averages over the cell.
In particular, the identity(16)is used, where V is the volume of D. Thus, if a function is assumed constant along a grid-cellface, it is a simple matter to evaluate the line integral in (16) when D is a grid cell intransformed space. In terms of the two-dimensional grid:this approach gives(17a)(17b)With an edge value approximated as the average of the center values of the two cells sharingthat face, e.g.(18)the values given by (17) are equivalent to ordinary central differences (cf. Eq.
(11)) andhence are second-order accurate. The first partials of f may also be assumed constant alongeach cell edge in order to derive from (16) the following approximations of second andmixed partials at a cell center:(19a)(19b)(19c)(19d)Now, however, the averaging scheme in (18) cannot be used to approximate edge values ofthe derivatives without going outside the nine-point computational molecules shown above.Instead, a second-order accurate representation can be obtained on the nine-point moleculeusing a forward (backward) assignment for the center value of a function and a backward(forward) assignment for the first partial on a given side. There are four possible schemes ofthis type.
One uses(20)to evaluatef( , ) at all cell centers according to (17), and then uses(21)to evaluate the second and mixed partials given in (19). This method is equivalent to afinite-difference scheme which approximates first partials by backward differences of thefunction, and then approximates second and mixed partials by forward differences of the firstpartials. Consequently, the second derivatives which result are equal to those given in Eq.(12), while the resulting representations of the two mixed partialsare unequal and onlyfirst-order accurate.
If the two mixed partials are averaged, however, the second-orderexpression (15) is recovered. This is also true of the reverse scheme:(22)(23)Expressions (12) and (14) are similarly recovered from the other two possibilities (Eq. 20a,21a, 22b, and 23b or Eq. 20b, 21b, 22a, and 23a). The symmetry-preserving form (13) can berecovered by averaging the averaged mixed partial obtained in one of the first two schemesmentioned and that obtained in one of the remaining two.The manner in which boundary conditions are treated in a finite volume approachdepends on the type of conditions imposed. When Dirichlet conditions are prescribed, it isadvantageous to treat the boundary as the center line (plane in three-dimensions) of a row ofcells straddling the boundary.
The centersof these cells then fall on the physical boundarywhere the function values are known. When Neumann or mixed conditions are given,however, the boundary is best treated as coincident with cell faces.Suppose, for example, that boundary condition (9) is to be imposed at the cell edge=j-1/2 indicated below.The edge value of f i,j-1/2 cannot be approximated by the usual averaging scheme (illustratedby Eq. (18)) since there is no cell center at =j-1. It can, however, be found in terms ofneighboring cell-centered function values by using boundary condition (9) in connectionwith the forward/backward scheme used to approximate second derivatives at the cellcenters.Considering the scheme represented by Eq. (20) and (21), the values of f along the celledges shown above are:It follows from Eq.
(17) that the first partials of f at the cell center areEq. (21a,b) then give f and f along the cell edges enclosing (i,j) in terms of f i-1,j, f i-1,j+1,f i,j, f i,j+1, f i+1,j, xi and xi+1. In particular,Substitution of these expressions into boundary condition (9) then determines the edge valuexi asIn this way, f, and hence fcell-centered values of f.and f , are found on all boundary-cell edges in terms ofThe finite-difference and finite-volume techniques described thus far are appropriatefor representing all derivatives with respect to the curvilinear coordinates, even thoseappearing in the metric quantities.