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

Applied Computational Fluid Dynamics Techniques - Wiley Episode 2 Part 6 pps

25 378 0

Đ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

Nội dung

SPACE-MARCHING AND DEACTIVATION 369 performed using a three-stage Runge–Kutta scheme with a Courant number of C = 0.6. The dispersion calculation was run for 485 s of real time (corresponding to the time of a train entering, halting, exiting the station and the time for the next train to arrive) on a workstation with the following characteristics: Dec Alpha chip running at 0.67 GHz, 4 Gbyte of RAM, Linux operating system, Compaq compiler. Figures 16.11(b)–(e) show the resulting iso- surface of concentration level c =0.0001, as well as the surface velocities for time t = 485 s. Note the transient nature of the flowfield, which is reflected in the presence of many vortices. Deactivation checks were performed every 5 timesteps. The tolerance for deactivation was set to  u = 10 −3 . The usual run (i.e. without deactivation) took T=5,296 sec, whereas the run with deactivation took T=526 sec, i.e. a saving in excess of 1:10. This large reduction in computing time was due to two factors: the elements with the most constraining timestep are located at the entry and exit sections, and the concentration cloud only reaches this zone very late in the run (or not at all); furthermore, as this is an instantaneous release, the region of elements where concentration is present in meaningful values is always very small as compared to the overall domain. Speedups ofthis magnitudehave enabled the use of 3-D CFD runs to assess the maximum possible damage of contaminant release events (Camelli (2004)) and the best possible placement of sensors (Löhner (2005)). 17 OVERLAPPING GRIDS As seen in previous chapters, the last two decades have witnessed the appearance of a number of numerical techniques to handle problems with complex geometries and/or moving bodies. The main elements of any comprehensive capability to solve this class of problems are: - automatic grid generation; - solvers for moving grids/boundaries; and - treatment of grids surrounding moving bodies. Three leading techniques to resolve problems of this kind are as follows. - Solvers based on unstructured, moving (ALE) grids. These guarantee conservation, a smooth variation of grid size, but incur extra costs due to mesh movement/smoothing techniques and remeshing, and may have locally reduced accuracy due to distorted elements; for some examples, see Löhner (1990), Baum et al. (1995b), Löhner et al. (1999b) and Sharov et al. (2000). - Solvers based on overlapping grids. These do not require any remeshing, can use fast mesh movement techniques, allow for independent component/body gridding, but suffer from loss of conservation, incur extra costs due to interpolation and may have locally reduced accuracy due to drastic grid size variation; for some examples, see Steger et al. (1983), Benek et al. (1985), Buning et al. (1988), Dougherty and Kuan (1989), Meakin and Suhs (1989), Meakin (1993), Nirschl et al. (1994),Meakin (1997), Rogers et al. (1998) and Regnström et al. (2000), Togashi et al. (2000), Löhner (2001), Togashi et al. (2006a,b). - Solvers based on adaptive embedded grids. These do not require remeshing or mesh movement, but extraeffort is necessary to detect the location of boundarieswith respect to the mesh, to refine/coarsen the mesh as bodies move, and to treat properly the small elements that appear when moving boundaries cut through the mesh. RANS gridding presents another set of as yet unresolved problems; for some examples, see Quirk (1994), Karman (1995), Pember et al. (1995), Landsberg and Boris (1997), Aftosmis and Melton (1997), Aftosmis et al. (2000), LeVeque and Calhoun (2001), del Pino and Pironneau (2001), Peskin (2002) and Löhner (2004). A large body of work exists on overlapping grids; in fact, a whole series of conferences is devoted to the subject (Overset (2002–2006)). In a series of papers, Nakahashi and co- workers (Nakahashi et al. (1999), Togashi et al. (2000)) developed and applied overlapping grids with unstructured grids, showing good performance for the overall scheme. A general Applied Computational Fluid Dynamics Techniques: An Introduction Based on Finite Element Methods, Second Edition. Rainald Löhner © 2008 John Wiley & Sons, Ltd. ISBN: 978-0-470-51907-3 372 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES ‘distance to wall’ criterion was used to assign which points should be interpolated between grids. For each grid system, the distance to the body walls was computed. Any point from a given grid falling into the element of another grid was interpolated whenever its distance to wall was larger than that of the points of the other grid. The interpolation information was obtained from a nearest-neighbour technique. In the following, the main elements required for any solver based on overlapping grids will be discussed: interpolationcriteria between overlappinggrids, proper values of dominant mesh criteria for backgroundgrids (those grids that have no bodies or walls assigned to them) and the external boundaries of embedded grids that require interpolation and lie outside the computational domain, interpolation techniques for static and dynamic data, treatment of grids that are partially outside the flowfield, and the changes required for flow solvers. 17.1. Interpolation criteria Given a set of overlappinggrids, a criterion must be formulated in order to select which points will interpolate information from one grid to another in the overlapping regions. Criteria that are used extensively include: - a fixed number of layers around bodies or inside external domains; - the distance to the wall δ w , whereby points closer to a body interpolate to those that are farther away (Nakahashi et al. (1999)). The accuracy of any (convergent) CFD solver will increase as the element size decreases. Therefore, it seems natural to propose as the ‘dominant mesh criterion’ the element size h itself. In this way, the point that is surrounded by the smallest elements is the one onwhich the solution is evaluated. All that is required is the average element size at points. This criterion will not work for grids with uniform element size. For this reason, a better choice for the ‘dominant mesh criterion’ is the product of distance to wall and mesh size δ · h. In what follows, we will denote by s the generalized ‘distance to wall’ criterion given by s = δ p · h q , (17.1) which includes all of the criteria described above: (a) p =1,q= 0 for distance to wall; (b) p =0,q= 1 for element size; (c) p =1,q= 1 for a combination of both criteria. The generalized ‘distance to wall’ described above requires the determination of the closest distance to the bodies/walls for each gridpoint. A brute force calculation of the shortest distance from any given point to the wall faces would require O(N p · N b ),whereN p denotes the number of points and N b the number of wall boundary points. This is clearly unacceptable for 3-D problems, where N b ≈ N 2/3 p . A near-optimal way to construct the desired distance function was described at the end of Chapter 2 (see section 2.7). It uses a combination of heap lists, the point surrounding point linked list psup1, psup2, the list of faces on the boundary bface, as well as the faces surrounding points linked list fsup1, fsup2.The OVERLAPPING GRIDS 373 key idea is to move from the surfaces into the domain, obtaining the closest points/faces to any given point from previously computed, near-optimal starting locations. Except for points in the middle of a domain, the algorithm will yield the correct distance to walls with an algorithmic complexity of O(N p log(N p )), which is clearly much superior to a brute force approach. 17.2. External boundaries and domains In many instances, the bodies in the flowfield are surrounded by their own grids, which in turn are embedded into an external ‘background grid’ that defines the farfield flow conditions (see Figure 17.1). In order to define a proper ‘dominant mesh criterion’ for the external grid, the maximum value of s (see (17.1) above) is computed for the whole domain. All points belonging to the external grid are then assigned a value of s ext = 2s max . In order to force an interpolation for the points belonging to external boundaries of embedded grids (as well as the points of two layers adjacent to the external boundaries), the value of s for these points is set to an artificially high value, e.g. s out = 10s max . :_0 :_1 :_2 Figure 17.1. External boundaries 17.3. Interpolation: initialization Any overlapping grid technique requires information transfer between grids, i.e. some form of interpolation. This implies that for each point we need to see if there exists an element in a different grid from which the flowfield variables should be interpolated. A fast, parallel way of determining the required interpolation information is obtained by reversing the question, i.e. by determining which pointsof a different grid fall into any given element. A near-optimal way to construct the desired interpolation information requires a combination of: - a marker for the domain number of each point; and - an octree of all gridpoints. The algorithm consists of two parts, which may be summarized as follows (see Fig- ure 17.2). Part 1: Initialization - Mark the domain number of each gridpoint; - Construct an octree for all gridpoints; 374 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES (a) (b) (c) Figure 17.2. Interpolation: (a) bounding box; (b) points (octree); (c) retain points – different domain and inside element Part 2: Interpolation - do: loop over the elements - Obtain the bounding box for the element; - From the octree, obtain the points in the bounding box; - Retain only the points that: Correspond to other domains/grids; Are located inside the element; Have a value of s larger than the one in the element; - enddo Observe that the loop over the elements does not contain any recursions or memory contention, implying that it may be parallelized in a straightforward manner. The number of elements to be tested can, in many cases, be reduced significantly by presorting the elements that should be tested. A typical situation is a large background grid with one or two objects inside. There is no need to test elements of this background grid that are outside the bounding boxes of the interior meshes. A more sophisticated filter can be obtained via bins. The idea is to retain only elements that fall into bins covered by elements of more than one mesh/zone. This very effective filter may be summarized as follows. Part 1: Initialization - Determine the outer bounding box of all grids; - Determine the number of subdivisions (bins) in x, y, z; -Set lbins(1:nbins)=0 -Set lelem(1:nelem)=0 Part 2: First pass over the elements - do ielem=1,nelem ! Loop over the elements - Obtain the material/mesh/zone nr. of the element: iemat; - Obtain the bounding box for the element; - Obtain the bins covered by the bounding box; - do: Loop over the bins covered: If: lbins(ibin).eq.0: lbins(ibin)=iemat; If: lbins(ibin).gt.0. and .lbins(ibin).ne.iemat: lbins(ibin)=-1; - enddo - enddo OVERLAPPING GRIDS 375 Part 3: Second pass over the elements - do ielem=1,nelem ! Loop over the elements - Obtain the bounding box for the element; - Obtain the bins covered by the bounding box; - do: Loop over the bins covered: If: lbins(ibin).eq 1: lelem(ielem)=1; - enddo - enddo At the end of this second pass over the elements, all the elements that cover bins covered by elements of more than one mesh/zone will be marked as lelem(ielem)=1. Only these elements are used to obtain the interpolation information between grids. The use of any ‘dominant mesh criterion’ s can produce points that interpolate to and are interpolated from other grids. A schematic of such a situation is shown in Figure 17.3 for a 1-D domain. Point A of the background grid  0 is used for interpolating to the outer points of the interior grid  1 , but in turn passes the distance criterion and is interpolated from  1 as well. Although clearly dangerous, it is found that in most cases this will not produce invalid results. The points that are interpolated from other grids and interpolate to other grids in turn are eliminated from the list of interpolating points. For more than two grids, care has to be taken in order to eliminate pairwise grid correspondences. For example, it could happen that point i of grid A is interpolated from grid B but interpolates to grid C. In such cases, the points have to be kept in their respective lists. : : 0 1 A Figure 17.3. Interpolating interpolation points 17.4. Treatment of domains that are partially outside In some instances, the external boundaries of a region associated with a body will lie outside the ‘background grid’. A typical case is illustrated in Figure 17.4, where a portion of the boundary of body 1 with domain  1 lies outside the confines of the channel  0 . The interpolation to these points from  0 will be impossible. In order to treat cases such as this, the points that could not find host elements on a different grid are examined further. Any nearest-neighbour of these points that has not found a host is marked as belonging to an exterior boundary,and the distance to body is set to an accordingly high value. Thereafter,the interpolation between grids is attempted once more. This procedure, shown schematically in Figure 17.5, is repeated until no further points can be added to the list of exterior points that have not found a host. 17.5. Removal of inactive regions In most instances, the distance to wall criterion will produce a list of interpolation points that contains more points than required. A typical case is illustrated in Figure 17.6, where  1 ,an 376 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES :_0 :_2 :_1 :_3 Figure 17.4. Non-inclusive domains Ω_1 Ω_1 Ω_1 (a) (c) (b) Figure 17.5. Treatment of external domains internalregion associated with a moving body,coversa substantial portion of the ‘background grid’  0 . This implies that many points of  0 will be included in the interpolation lists. Clearly, the interior region covering  1 does not need to be updated. It is sufficient to interpolate a number of ‘layers’. OVERLAPPING GRIDS 377 0 : 0 : 0 :Region Where Interpolates to 0 :Region Where Interpolates to 0 :Region Where Interpolates to 0 :Region Where Interpolates to : 1 : 1 : 1 : 1 : 1 Figure 17.6. Removal of inactive inside regions An algorithm that can remove these inactive interior regions may be summarized as follows: - Initialize a point array lpoin(1:npoin)=1; - For all interpolated points: Set lpoin(i)=0; - do: Loop over the layers required - For each point: Obtain the maximum of lpoin and its neighbours; - enddo - Remove all interpolating points for which lpoin(i)=0. 17.6. Incremental interpolation Although fast and parallel, the interpolation technique discussed above can be improved substantially formovingbodies. The key assumption made is that the moving bodies will only move a small number (one, possibly two or three) of nearest-neighbours during a timestep. In this case, the points surrounding currently interpolated points can be marked, and the distance to wall test to determine intergrid interpolation is only performed for this set of elements/points. Given that the octree for the points would have to be rebuilt every timestep for moving bodies, it is advisable to use the classic neighbour-to-neighbour element search shown schematically in Figure 17.7 and discussed in Chapter 13. The marking of points, as well as the interpolation, can again be parallelized without difficulties on shared-memory machines. 17.7. Changes to the flow solver The changes required for any flow solver based on explicit timestepping or iterative implicit schemes are surprisingly modest. All that is required is a masking array over the points. For those points marked as inactive or as being interpolated, the increments in the solution are simply set to zero. The solution is interpolated at the end of each explicit timestep, or within each iteration for LU-SGS-GMRES (Luo et al. (1998)) or PCG (Ramamurti and Löhner (1996)) solvers. 378 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES Position of Overlap Point at Previous Timestep Position of Overlap Point at Current Timestep Figure 17.7. Neighbour-to-neighbour element search 17.8. Examples In order to demonstrate the viability of overlapping grid techniques, we consider a series of compressible and incompressible flow problems. The first examples are included to show that the results of overlapping grids are almost identical to those of single grids. 17.8.1. SPHERE IN CHANNEL (COMPRESSIBLE EULER) The first case consists of a sphere in a channel. The equations solved are the compress- ible Euler equations. The incoming flow is at Ma =0.67. The CAD data is shown in Figure 17.8(a), where the boundaries of the different regions are clearly visible. The surface grids and the solution obtained are shown in Figures 17.8(b) and (c). One can see the smooth transition of contour lines in the overlap region. The solution obtained for a single grid case with similar mesh size is also plotted, and as one can see, the differences are negligible. The convergence rate for both cases is summarized in Figure 17.8(d). Observe that the convergence rate is essentially the same for the single grid and overlap grid case. 17.8.2. SPHERE IN SHEAR FLOW (INCOMPRESSIBLE NAVIER–STOKES) The second case consists of a sphere in shear flow. The equations solved are the incompress- ible Navier–Stokes equations. The Reynolds number based on the sphere diameter and the incoming flow is Re = 10. The CAD data is shown in Figure 17.9(a), where the boundaries of the different regions are clearly visible. The grid in a cut plane, as well as the pressure and absolute values of the velocity for the overlapping and single grid case are given in Figures 17.9(b)–(d). The overlapping and single grids had 327961 and 272434 elements, respectively. Theconvergencerates for bothcases are summarized in Figure17.9(e). As in the previous case, the differences between the overlapping and single grid cases are negligible. The body forces for the single and overlapping grid case were f x = 2.2283,f y = 0.3176 and f x = 2.2115,f y = 0.3289, respectively, i.e. 0.7% in x and 3.4% in y. OVERLAPPING GRIDS 379 (a) (b) 1e-05 1e-04 0.001 0.01 0.1 1 0 20 40 60 80 100 120 140 160 180 Residual of Density Timeste p Overlap Body Fitted (c) (d) Figure 17.8. Sphere in channel: (a) CAD data; (b) surface grids; (c) Mach-number; (d) convergence rates 17.8.3. SPINNING MISSILE This is a typical case where overlapping grids can be used advantageouslyas compared to the traditional moving/deformingmesh with regridding approach.A missile flying at Ma = 2.5at an angle of attack of α =5 ◦ spins around its axis. The surface definition of the computational domains is shown in Figure 17.10(a). The inner grid is associated with the missile and rotates rigidly with the prescribed spin rate. The outer grid is fixed and serves as background grid to impose the farfield boundary conditions. Once the initial interpolation points have been determined, the interpolation parameters for subsequent interpolations on the moved grids are obtained using the incremental near-neighbour search technique. The compressible Euler equations are integrated using a Crank–Nicholson timestepping scheme. At each timestep, the resulting algebraic system is solved using the LU-SGS–GMRES technique (Luo et al. (1998, 1999), Sharov et al. (2000b)). Figures 17.10(b) and (c) show the grid and pressures in the plane z =0 for a particular time. The overlap regions are clearly visible. Note that one can barely see any discrepancy in the contour lines across the overlap region; neither are there any spurious reflections or anomalies in the shocks across the overlap region. [...]... approximation for the PDE; - it is difficult to introduce stretched elements to resolve boundary layers; Applied Computational Fluid Dynamics Techniques: An Introduction Based on Finite Element Methods, Second Edition Rainald Löhner © 20 08 John Wiley & Sons, Ltd ISBN: 97 8-0 -4 7 0-5 190 7-3 384 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES - adaptivity is essential for most cases; - for problems with moving... Euler with boundary layer corrections: Aftosmis et al (20 06) , - low-Reynolds-number laminar flow and/or large eddy simulation (LES): Angot et al (1999), Turek (1999), Fadlun et al (20 00), Kim et al (20 01), Gilmanov et al (20 03), Balaras (20 04), Gilmanov and Sotiropoulos (20 05), Mittal and Iaccarino (20 05), Cho et al (20 06) , Yang and Balaras (20 06) The human cost of repairing bad input data sets can... surface or within the embedded domain (Goldstein et al (1993), Mohd-Yusof (1997), Angot et al (1999), Patankar et al (20 00), Fadlun et al (20 00), Kim et al (20 01), del Pino and Pironneau (20 01), Peskin (20 02) , vande Voorde et al (20 04), Balaras (20 04), Tyagi and Acharya (20 05), Mittal and Balaras (20 05), Cho et al (20 06) , Yang and Iaccarino (20 06) ) The second approach is to apply kinematic boundary conditions... Camelli and Löhner (20 06) ); - moving/sliding bodies with thin/vanishing gaps (Baum et al (20 03), vande Voorde et al (20 04)); and - physics that can be handled with isotropic grids: - potential flow or Euler: Quirk (1994), Karman (1995), Pember et al (1995), Landsberg and Boris (1997), Aftosmis et al (20 00), LeVeque and Calhoon (20 01), Dadone and Grossman (20 02) , Baum et al (20 03), - Euler with boundary... are applied in their vicinity While used extensively (Clarke et al (1985), de Zeeuw and Powell (1991), Melton et al (1993), Quirk (1994), Karman (1995), Pember et al (1995), Landsberg and Boris (1997), Pember (1995), Roma (1995), Turek (1999), Lai and Peskin (20 00), Aftosmis et al (20 00), Cortez and Minion (20 00), LeVeque and Calhoun (20 01), Dadone and Grossman (20 02) , Peskin (20 02) , Gilmanov et al (20 03),... Pember et al (1995), Landsberg and Boris (1997), LeVeque and Calhoon (20 01), Aftosmis et al (20 00), Dadone and Pironneau (20 02) , Gilmanov et al (20 03), Gilmanov and Sotiropoulos (20 05), Mittal and Iaccarino (20 05), Cho et al (20 06) ), the argument being that flux evaluations could be optimized due to coordinate alignment and that so-called fast Poisson solvers (multigrid, fast Fourier transform) could... step/projection methods for incompressible flow (Mohd-Yusof (1997), Angot et al (1999), Fadlun et al (20 00), Kim et al (20 01), Löhner et al (20 04a,b), Balaras (20 04), Tyagi and Acharya (20 05), Mittal and Iaccarino (20 05), Yang and Balaras (20 06) ) In this case, while the kinematic boundary condition vn+1 = wn+1 is enforced strictly by (18.3) in the advective-diffusive prediction step, during the pressure...380 APPLIED COMPUTATIONAL FLUID DYNAMICS TECHNIQUES (a) (b) p [-1 .0,0.1,1 .6] abs(v) [0,0.1,5] (c) (d) 1 ’1domain.conv’ using 4 ’overlap.conv’ using 4 Velocity Residual 0.1 0.01 0.001 0.0001 0 50 100 150 20 0 Steps 25 0 300 350 400 (e) Figure 17.9 Sphere in shear flow: (a) CAD data; (b) triangulation for cut plane;... delta-function is smeared over several grid points, giving rise to different methods (Glowinski et al (1994), Bertrand et al (1997), Patankar et al (20 00), Glowinski et al (20 00), Baiijens (20 01)) If instead of a surface we are given the volume of the immersed body, then the penalization force may be applied at each point of the flow mesh that falls into the body 388 APPLIED COMPUTATIONAL FLUID DYNAMICS. .. section 18 .2. 2(b)) Let us consider the second task in more detail The problem can be solved in a number of ways (a) Loop over the immersed body elements - Initialization: - store all CFD mesh points in a bin, octree, or any other similar data structure (see Chapter 2) ; - Loop over the immersed body elements: - determine the bounding box of the element; - find all points in the bounding box; - detailed . f x = 2. 228 3,f y = 0.31 76 and f x = 2. 2115,f y = 0. 328 9, respectively, i.e. 0.7% in x and 3.4% in y. OVERLAPPING GRIDS 379 (a) (b) 1e-05 1e-04 0.001 0.01 0.1 1 0 20 40 60 80 100 120 140 160 . general Applied Computational Fluid Dynamics Techniques: An Introduction Based on Finite Element Methods, Second Edition. Rainald Löhner © 20 08 John Wiley & Sons, Ltd. ISBN: 97 8-0 -4 7 0-5 190 7-3 3 72. layers; Applied Computational Fluid Dynamics Techniques: An Introduction Based on Finite Element Methods, Second Edition. Rainald Löhner © 20 08 John Wiley & Sons, Ltd. ISBN: 97 8-0 -4 7 0-5 190 7-3 384

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

TỪ KHÓA LIÊN QUAN