1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Applied Computational Fluid Dynamics Techniques - Wiley Episode 2 Part 2 pdf

25 218 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 25
Dung lượng 472,04 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Any adaptive refinement scheme is composed of three main ingredients: - an optimal-mesh criterion; - an error indicator; and - an algorithm or strategy to refine and coarsen the mesh.. I

Trang 1

Table 13.2 Particle-mesh interpolation timings

Particle-tracing time (s) 257.0 17.6

Total running time (s) 290.0 21.45

Timings (µs/particle/step) 51.4 3.52

At the beginning, the particles were placed uniformly across the mesh, following a squarelattice of nppdi×nppdi particles Figure 13.24 shows a typical sequence of 20 stepsfornpart=5×5particles In an effort to obtain an accurate timing the following set ofparameters was used:

- npart=10,000: this large set of particles minimizes the overhead associated withsubroutine calls;

- ntime=500: this large number of timesteps minimizes the start-up overheads.The particles were moved a distance ofdista=0.05every timestep On the mesh used, atmost six elements had to be tested for each particle to locate the new host element However,

in most cases only five elements required testing

The average number of remaining particles after each search pass, i.e those that have notyet found their host elements, is shown in the histogram given by Figure 13.25 To obtaintimings, two runs were performed on a Cray-XMP with and without automatic vectorization.The Cray-XMP allowed the required gather/scatter operations to be run in hardware Thetimings obtained are listed in Table 13.2 below

The results demonstrate a 14-fold speedup when using the automatic vectorization Factorslike these enable new dimensions of reality in simulations, making it possible to study newphenomena previously thought untractable

Trang 2

14 ADAPTIVE MESH REFINEMENT

The development of self-adaptive mesh refinement techniques in computational fluiddynamics (CFD), computational structural dynamics (CSD), computational electromagnet-ics (CEM) and other fields of computational mechanics is motivated by a number of factors

(a) With mesh adaptation, the numerical solution to a specific problem, given the basicaccuracy of the solver and the desired accuracy, should be achieved with the fewest degrees

of freedom This, in most cases, translates into the least amount of work for a given accuracy.Work in this context should be understood as meaning not only CPU, but also memory andman-hour requirements

(b) For some classes of problems, the savings in CPU and memory requirements exceed

a factor of 100 (see Baum and Löhner (1989)) This is equivalent to two generations ofsupercomputing For these problems, adaptive mesh refinement has acted as an enablingtechnology, allowing the simulation of previously intractable problems

(c) Mesh adaptation avoids time delays incurred by trial and error in choosing a grid that

is suitable for the problem at hand Although this may seem unimportant for repetitivesteady-state calculations, it is of the utmost importance for transient problems with travellingdiscontinuities (shocks, plastic fronts, etc.) In this way, adaptation adds a new dimension ofuser-friendliness to computational mechanics

Given these very strong motivating reasons, the last two decades have seen a tremendoussurge of activity in this area It is interesting to note that mesh adaptation in CFD, CSDand CEM appeared in the early 1980s In fact, the first conferences dedicated solely to this

subject took place around 1984 (Babuska et al (1983, 1986)) As with most of this book,

the present chapter focuses primarily on unstructured, i.e unordered, grids, such as thosecommonly encountered in finite element applications However, parallel developments in thearea of structured grids (finite difference and finite volume techniques) are mentioned whereappropriate

Any adaptive refinement scheme is composed of three main ingredients:

- an optimal-mesh criterion;

- an error indicator; and

- an algorithm or strategy to refine and coarsen the mesh

They give answers to the questions:

- How should the optimal mesh be defined?

Applied Computational Fluid Dynamics Techniques: An Introduction Based on Finite Element Methods, Second Edition.

Trang 3

- Where is refinement/coarsening required? and

- How should the refinement/coarsening be accomplished?

The topic of adaptation being now two decades old, it is not surprising that a variety ofanswers have been proposed by several authors for each of these questions In the following,the most successful ones are discussed in more depth

14.1 Optimal-mesh criteria

Before designing an adaptive mesh procedure, the analyst should have a clear idea of what is

to be achieved Reduction of manual and computational work is the obvious answer, but inorder to be more definite one needs a quantitative assessment of the optimality of the adaptivemesh procedure This leads to the immediate question: What should the optimal mesh belike? The answer to this crucial question is seldomly clear, as engineers do not always know

a priori what constitutes a sufficiently accurate answer to the problem at hand For example, if

all that is required is the lift of an airfoil (an integrated, global quantity), there is in most cases

no need for an extremely accurate solution away from the surface A number of researchershave followed guidelines with a more rigorous mathematical foundation, which are outlinedbelow

(a) Equidistribution of error The aim is to attain a grid in which the error is uniformly

distributed in space One can show that such a mesh has the smallest number of degrees

of freedom (i.e the smallest number of elements) Simply stated,

Conceptually, one can derive this criterion from the observation that for an initial mesh theerror will have an irregular distribution as shown in Figure 14.1(a) If the number of degrees offreedom is kept the same, the distribution of element size and shape is all that may be changed.Given that the error varies with element size, smaller elements are required in regions oflarge errors, whereas larger elements may be employed in regions of small errors Afterrepositioning of points, the error distribution in space will become more regular, as shown

in Figure 14.1(b) One can also see that the general aim stated in (14.1) will be achievedwhen the error is constant in the domain This mesh optimality criterion is used most often inconjunction with steady-state problems

(b) Local absolute error tolerances In many applications, the required error tolerances may

not be the same at all locations Moreover, instead of using the general minimization stated

in (14.1), one may desire to enforce absolute local bounds in certain regions of the domain:

Mesh refinement or coarsening will then take place if the local error indicator exceeds or fallsbelow given refinement or coarsening tolerances:

h > c r ⇒ refine, h < c c ⇒ coarsen.

The calculation of skin-friction coefficients of airfoils is a possible application for such

a mesh optimality criterion The mesh optimality criterion based on local absolute errortolerance is most often used for transient problems

Trang 4

x

error

x (a)

hyperbolic problems, the assumption u h ≈ u may be completely erroneous Consider an

airfoil at high angle of attack A coarse initial mesh may completely miss local separationbubbles at the leading edge that lead to massive separation in the back portion of the airfoil.Although the local error in the separation region may be very small (after all, the solutionthere is relatively smooth for a RANS simulation), the global error in the field would be very

large due to different physical behaviour Any local error indicator presently in use could miss

these features for bifurcation point regions, performing adaptation at the wrong places On

the other hand, the assumption u h ≈ u is a very reasonable one for most initial grids and

stable physics As a matter of fact, it is not so difficult to attain, given that the nature of mostengineering applications is such that:

(a) developments are evolutionary, rather than revolutionary, i.e a similar problem hasbeen solved before (the airfoil being the extreme example); and

(b) the controllability requirement of reliable products implies operation in a stable regime

of the physics

Trang 5

14.2.1 ERROR INDICATORS COMMONLY USED

The most common error indicators presently used in production codes may be grouped intothe following categories

14.2.1.1 Jumps in indicator variables

This simplest error indicator is obtained by evaluating the jump (i.e the absolute difference)

of some indicator variable like the Mach number, density or entropy within an element oralong an edge This error indicator implicitly makes the assumption

i.e first-order accuracy for the underlying scheme Error indicators of this form have beenused in industrial applications (Palmerio and Dervieux (1986), Dannenhoffer and Baron(1986), Kallinderis and Baron (1987), Mavriplis (1990b, 1991a), Aftosmis and Kroll (1991),DeZeeuw and Powell (1993)), even if the underlying numerical discretization was higher thanfirst order

14.2.1.2 Interpolation theory

Making the assumption that the solution is smooth, one may approximate the error in theelements by a derivative one order higher than the element shape function For one dimensionthis would result in a local error indicator (i.e at the element level) of the form

el h = c1h p

∂ ∂x p u p



where p − 1 is the polynomial degree of the shape functions and the pth derivative is obtained

by some recovery procedure The total error in the computational domain is then given by

This error indicator gives superior results for smooth regions On the other hand, at

discontinuities the local value of el h will stay the same no matter how fine the mesh is made

As a simple example, consider a shock across a fixed number of elements in one dimension

Assuming a grid of constant size h, the resulting error indicator at points will be of the form

|u i−1− 2u i + u i+1| Observe that the element size has disappeared, i.e no matter how fine

the mesh is made, the error indicator values close to the discontinuity will remain unchanged

Furthermore, note that the global error will indeed decrease, but only as O(h).

14.2.1.3 Comparison of derivatives

Again making the assumption that the solution is smooth, one may compare significantderivatives using schemes of different order As an example, consider the following three

Trang 6

approximations to a second derivative:

comparing (14.6a) to (14.6b,c) can give an indication as to whether it is more efficient to

h-refine the mesh (reduction of h), or to increase the order of accuracy for the stencil

(p-refinement) For unstructured grids, one may recover these derivatives with so-called recoveryprocedures (see Chapter 5)

14.2.1.4 Residuals of PDEs on adjacent grids

Assume we have a node-centred scheme to discretize the PDEs at hand At steady state,the residuals at the nodes will vanish On the other hand, if the residuals are evaluated atthe element level, non-vanishing residuals are observed in the regions that require further

refinement This error indicator has been used extensively by Palmerio et al (1985), and has

a close link to so-called output-based indicators (see below) Another possibility is to checklocally the effect of higher-order shape functions introduced at the element level or at element

boundaries (Baehman et al (1992)) These so-called p-refinement indicators have been used extensively for computational structural mechanics applications (Zienkiewicz et al (1983), Babuska et al (1983), Dunavant and Szabo (1983)).

14.2.1.5 Energy norms

Assume incompressible creeping flow For this viscous-dominated flow the solution consists

of a velocity field v with zero divergence that minimizes the dissipation energy functional

J (v)=

µ(v i ,j + v j

,i ) : (v i ,j + v j

Here v denotes the velocity field, σ the viscous stress tensor and the strain rate tensor The

dissipation energy of the error e = v − vhsatisfies the relation

least-J (e)=

Trang 7

This error estimator, although derived for creeping flows, has also been shown to be useful forflows with moderate Reynolds number (Hétu and Pelletier (1992)) One can also see that thiserror indicator is closely related to the Zienkiewicz–Zhu error indicator (Zhu and Zienkiewicz

(1987), Zienkiewicz et al (1988), Ainsworth et al (1989), Wu et al (1990)).

14.2.1.6 Energy of spatial modes

For higher-order methods, such as spectral element methods, a very elegant way to measureerrors and convergence is to separate the energy contents associated with the different shapefunctions The decrease of energy contained in the higher-order shape functions gives areliable measure of convergence (Mavriplis 1990a, 1992) At the same time, this way ofmeasuring errors provides an immediate strategy as to when to perform h-refinement (slowdecrease of energy content with increasing shape-function polynomial) or p-refinement (rapiddecrease of energy content with increasing shape-function polynomial)

14.2.1.7 Output-based error estimators

For many applications, the user is interested in a few global quantities Typical examples arelift, drag and moments for aerodynamic problems The idea is then to refine the grid only

in those regions that affect these so-called outputs This type of error estimator has receivedincreased attention in recent years (Pierce and Giles (2000), Becker and Rannacher (2001),Rannacher (2001), Giles and Süli (2002), Süli and Houston (2002), Venditti and Darmofal

(2002, 2003)) Assume a given numerical solution uh with a numerical solution error δu so

that the exact solution is given by

Furthermore, consider a desired output function I (u) (e.g the drag of a wing) and physical

constraints (e.g the Navier–Stokes equations)

Performing a Taylor series expansion we have, for the desired output function and theconstraints,

I (u) = I (u h + δu) = I (u h ) + I ,u|uh δu + hot, (14.12)

R(u) = R(u h + δu) = R(u h ) + R ,u|uh δu+ hot (14.13)where ‘hot’ stands for ‘higher-order terms’ However, the current solution already satisfies

R(u h )= 0, which implies

Trang 8

Given that numerical errors are also present for h, one can assume that, as before for u,

implying

The last term is of higher order, resulting in

This last equation may be interpreted in two ways: first as a way to improve the computed

values of I (u); and secondly as a way to estimate where to refine the mesh Note that the residual R(u) (which may be used as an error indicator by itself) is multiplied by the adjoint

 The adjoint thus ‘weighs’ the influence or importance of a given residual in space with

respect to the desired output function I (u).

14.2.1.8 Other error indicators/estimators

In a field that is developing so rapidly, it is not surprising that a variety of other error indicatorsand estimators have been proposed The more theoretically inclined reader may wish toconsult Strouboulis and Oden (1990), Strouboulis and Haque (1992a,b) and Johnsson andHansbo (1992)

14.2.2 PROBLEMS WITH MULTIPLE SCALES

All of these error indicators have been used in practice to guide mesh adaptation procedures.They all work well for their respective area of application However, they cannot beconsidered as generally applicable for problems with multiple intensity and/or length scales.None of them are dimensionless, implying that strong features (e.g strong shocks) producelarge error indicator values, whereas weak features (such as secondary shocks, contactdiscontinuities, shear layers) produce small ones Thus, in the end, only the strong features

of the flow would be refined, losing the weak ones A number of ways have been proposed tocircumvent this shortcoming

14.2.2.2 Two-pass strategy

A second option, proposed by Aftosmis and Kroll (1991), Aftosmis (1992), is to separatethe disparate intensity or length scales in two (or possibly several) passes over the mesh Inthe first pass, the strong features of the flow are considered, and appropriate action is taken

Trang 9

A second pass is performed for the elements not marked in the first pass, identifying weakfeatures of the flow, and appropriate action is taken This procedure has worked well forviscous flows with shocks, and can be combined with any of the error indicators describedabove.

14.2.2.3 Non-dimensional error indicators

An error indicator that allows even refinement across a variety of intensity and length scaleswas proposed by Löhner (1987) In general terms, for linear elements it is of the form

error= h2|second derivatives|

Dividing the second derivatives by the absolute value of the first derivatives makes the errorindicator bounded and dimensionless, and avoids the ‘eating-up’ effect of strong features The

terms following c nare added as a noise filter in order not to refine wiggles or ripples which

may appear due to loss of monotonicity The value for c n thus depends on the algorithmchosen to solve the PDEs describing the physical process at hand The multi-dimensionalform of this error indicator is given by

where N I denotes the shape function of node I The fact that this error indicator is

dimension-less allows the simultaneous use of several indicator variables Because the error indicator

is bounded (0≤ E I≤ 1), it can be used for whole classes of problems without having to

be scaled to the problem at hand This results in an important increase in user-friendliness,allowing non-expert users access to automatic self-adaptive procedures This error indicatorhas been used successfully for many years on a variety of applications (Löhner (1987,1988b, 1989a,b), Baum and Löhner (1989), Löhner and Baum (1990), Löhner and Baum

(1990), Baum and Löhner (1991, 1992), Löhner and Baum (1992), Loth et al (1992), Sivier et al (1992), Baum and Löhner (1993), Baum et al (1994, 1995), Löhner et al (2004c), Baum et al (2006)).

14.2.3 DETERMINATION OF ELEMENT SIZE AND SHAPE

After the error in the present solution has been measured, or at least the regions of thecomputational domain that require further refinement or coarsening have been identified, thenext question to be answered is the magnitude of mesh change required This question is

of minor importance for h-refinement or p-refinement, where the grid is simply subdividedfurther by factors of two in space or by adding the next higher degree polynomial to the space

of available shape functions On the other hand, for adaptive mesh movement or adaptiveremeshing, where the element size and shape vary smoothly, it is necessary to obtain a moreprecise estimation of the required element size and shape How to achieve this will be shownfor the non-dimensional error indicator given by (14.21) It is a simple matter to perform asimilar analysis for all the other error indicators described Defining the derivatives according

Trang 10

(D1) I kl = h2

|N I ,k ||N J

The principal eigenvalues of this matrix are then used to obtain reduction parameters ξ jj in

the three associated eigenvector directions Due to the symmetry of E, this is an orthogonal

system of eigenvectors that defines a local coordinate system

The variation in element size required to meet a certain tolerance can be determined withany of the error indicators enumerated in section 14.1 However, the variation in stretching,i.e the shape of the elements for the adapted 3-D mesh, requires an error indicator that isbased on a tensor of second derivatives

Trang 11

14.3 Refinement strategies

Besides the mesh optimality criterion and the error indicator/estimator, the third ingredient

of any adaptive refinement method is the refinement strategy, i.e how to refine a given mesh.

Three different families of refinement strategies have been considered to date

14.3.1 MESH MOVEMENT OR REPOSITIONING (R-METHODS)

The aim is to reposition the points in the field without changing the element topology (pointconnectivity), in order to obtain a better discretization for the problem at hand The regionsthat require more elements tend to draw points and elements from regions where a coarsermesh can be tolerated Three basic approaches have been used to date:

(a) the moving finite element method, where the position of points is viewed as a furtherunknown in a general functional to be minimized (Miller and Miller (1981));

(b) spring systems, whereby the mesh is viewed as a system of springs whose stiffness is

proportional to the error indicator (Diaz et al (1983), Gnoffo (1983), Nakahashi and Deiwert (1985), Palmerio et al (1985), Palmeiro and Dervieux (1986)); and

(c) optimization methods, whereby the position of points is changed in order to minimize

a functional (Brackbill and Saltzman (1982), Jacquotte and Cabello (1990))

Because the mesh topology is not allowed to change, mesh movement schemes are relativelysimple to code They have the desirable property of aligning elements with features oflower dimensionality than the problem at hand This stretching of elements can lead toconsiderable savings as compared to other methods On the other hand, they are not flexibleand general enough for production runs that may exhibit complex physics They are presently

used mainly in conjunction with finite difference codes (Gnoffo (1983), Carcaillet et al.

(1983), Nakahasi and Deiwert (1985), Thompson (1985), Jacquotte and Cabello (1990)),where, by the very nature of the method, no topology changes are allowed For unstructuredgrid codes, mesh movement has only been tried in academia or in conjunction with othermethods (Palmerio and Dervieux (1986)) (see section 14.3.4 below)

14.3.2 MESH ENRICHMENT (H/P-METHODS)

In this case, degrees of freedom are added or taken from a mesh One may either splitelements into new ones (h-refinement, see Figure 14.2(a)), or add further degrees of freedomwith hierarchical shape functions (Figure 14.2(b)) The same may be accomplished with theaddition of higher-order shape functions (p-refinement), again either conventional polynomi-

als (Babuska et al (1986)), spectral functions (Mavriplis (1990a, 1992)) or hierarchical shape functions (Zienkiewicz et al (1983), see Figure 14.2(c)).

For elliptic systems of PDEs, the combination of h- and p-refinement leads to exponential

convergence rates (Babuska et al (1986), Devloo et al (1988)) P-refinement methods have

so far not been used extensively in fluid mechanics The author is not aware of any production

or commercial CFD code that has a working built-in p-refinement capability Possible reasonsfor this lack of success, which stands in contrast to CSD applications (Dunavant and Szabo

(1983), Wang et al (1984), Szabo (1986), Babuska et al (1986)) are the following.

Trang 12

Level 0

1 N 2

1 N 2 N

1

Level 1

1 N

2

1 N 2 N

3 N

3 N

1

1 N 2 N

1

1 N

2 N

3

3 N

(c) (b)

(a)

Figure 14.2 Mesh enrichment

(a) The limited accuracy that is achievable for CFD applications due to monotonicityenforcement close to discontinuities (Godunov (1959)), and the lack of accurateturbulence models (Anderson and Bonhaus (1993), Hystopolulos and Simpson (1993)).Indeed, a CFD solution that claims an accuracy better than 1% for a complex flowproblem has to be considered with great scepticism On the other hand, the major gains

of high-order methods as compared to h-refinement in combination with low-ordermethods are in the range below 1% relative error

(b) The desired accuracy of engineering applications, which seldom fall below 1% relativeerror Given the uncertainties in boundary conditions, material parameters and sourceterms of typical engineering applications, 1% relative error can already be consideredunnecessarily accurate

(c) The much higher coding complexity of p-methods or h/p-methods as compared tostraightforward h-methods The only possible difficulty of h-methods is given byhanging nodes for quad- or brick-type elements (for triangles and tetrahedra even thisproblem disappears) Apart from this relatively small modification, the original one-element-type flow solver can remain unchanged On the other hand, any p-methodrequires the development and maintenance of a complete library for all the differenttypes of elements Further complications arise from the adaptation logic when h/p-typerefinements are considered

This is not to say that we may not see much activity in this area: boundary layers, shear layers,flames and other features that are currently being computed using under-resolved Navier–Stokes runs are, when properly resolved, smooth features that should be ideally suited tohigh-order discretizations

Ngày đăng: 06/08/2014, 02:20

TỪ KHÓA LIÊN QUAN