• Aucun résultat trouvé

Numerical results

Dans le document Lattice Boltzmann simulations of complex flows (Page 160-167)

III. Other topics 137

5.4. Numerical results

The proposed grid refinement strategy has been implemented in the parallel open-source library Palabos, and has been tested on two benchmarks. For the sake of illustration, we restrict to the case of a grid that is time-independent, as the aim of this chapter is to present and test a refinement criterion rather than to apply it to a time-adaptive grid.

146 Automatic grid refinement

5.4.1. 2D lid-driven cavity

As a first benchmark, the proposed algorithm is tested on the 2D lid-driven cavity, for which reference benchmark values are provided in [190]. Whereas the refinement criterion will be applied on each lattice cell in Section 5.4.2, larger regions Ri,j are considered here.

The numerical setup and structure of the solution are depicted in Fig.5.1. The system is enclosed in a square bounded domain with no-slip walls, except for the top lid, which is subject to a constant right-directed velocity. The Reynolds number is fixed to Re = 100.

The discrete time step of the simulation is pinned down by setting the velocity of the top lid in lattice units to ulb= 0.01. In this numerical example, the Knudsen number is Kn =ulb/(csRe) = 1.7·10−4 (see Eqs. (5.14) and (5.15)).

Figure 5.1.: Set-up for the cavity 2D example and norm of the non-dimensional velocity at steady state.

The domain is divided in several regions Ri,j (the example used here with five lines and five columns can be found in Fig. 5.2). The measure of the quantity Ci,j is done for a uniform resolution with N ∈ {15,30,60,120,240}, N being the number of grid points along one side of the domain. The values ofCi,j/Kn forN = 30 are depicted in Fig. 5.3.

Fig. 5.4 compares the value of theCi,j coefficient to the Knudsen number at different levels of resolution. A white color means that the regionRi,j must be refined (Ci,j >Kn),

Automatic grid refinement 147

Figure 5.2.: Division of the 2D cavity simulation domain in several regions.

Figure 5.3.: Values of C/Kn in different regions of the 2D cavity, with a fixed valueN = 30.

and gray means that the resolution is sufficient. It can be seen that at N = 15, the resolution is insufficient in the whole domain. At larger values of N, the number of white regions decreases until only the corners are left. It should be pointed out that the predictions of the algorithm seem reasonable, as the velocity gradients are obviously largest close to the top lid. Furthermore, it makes sense to require a higher grid resolution in the corners, in which the velocity imposed by the boundary condition is discontinuous.

Using the results presented in Fig.5.3, a non-uniform mesh was generated, depicted in Fig.5.5 The level zero is corresponding toN0 = 30, level one toN1 = 60, and the level two to N2 = 120. In order to assess the quality of the automatic refinement technique, a simplistic refined mesh has been built for comparison (see Fig. 5.6). The results obtained with the two non-uniform grids can then be compared with the results of a uniform grid with N = 120, and with the reference results of [190]. In total, the number of points used in the automatically generated grid is 5436, while there are 6400 points in the naively generated one depicted in Fig. 5.6, and 14400 points in the uniform one. The economy in grid points of the naive mesh if of 44.4% as compared to the uniform case, and the economy of the automatic approach is of 15% as compared to the naive one.

148 Automatic grid refinement

Figure 5.4.: Areas in a 5–by–5 grid that require grid refinement, depending on the level of grid resolutionN. White color means that further refinement is need (i.e. Ci,j >Kn), while gray stands for the fact that the resolution is sufficient.

Figure 5.5.: Level of refinement of each block on the non-uniform grid.

The root mean square (RMS) has been computed for the centerline x-component of the velocity with the results of [190] at a Reynolds of Re = 100. The three results for the centerline velocity are depicted in Fig. 5.7. The RMS values found are the same as the RMS value obtained with a uniform grid atN = 120, which is given by

RMS120 = 0.00208, RMSgr = 0.00213, RMSnaive= 0.00219, (5.23) Here, RMS120,RMSgr,RMSnaive are the RMS values of the uniform grid, the automatic, and the naive grid refinement strategy respectively. This indicates that criterion allows

Automatic grid refinement 149

for results of good quality while requiring less computational power than the naive or uniform grids.

Figure 5.6.: Three-level refinement, obtained by approximation, to achieve a good value of RMS as compared to [190].

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

−0.4

−0.2 0 0.2 0.4 0.6 0.8 1

y coordinate

uxvelocity

Reference solution Uniform grid Non uniform grid

Figure 5.7.: Vertical centerline ux velocity for reference solution, uniform (14400 points) and non-uniform (5436 points) grids.

Finally, it seems important to mention that the generation of the grid of Fig. 5.5 from Fig.5.3 is not completely straightforward at first glance, since the resolution levels do not match between the two figures. Nevertheless one must keep in mind that for the grid-refinement algorithm to be valid, on adjacent subdomains only a factor two is allowed for the ratio of resolutions. For instance if Rf0,0 =N, thenRf0,0 =N ±1 can actually be implemented. The difference appearing between Figs. 5.5 and5.3 originates from this consistency constrain of resolution level ratio between regions of different resolution.

150 Automatic grid refinement

5.4.2. 3D lid-driven cavity at Re = 12000

The results from the work of [191] have been chosen as the reference solution used for the 3D lid-driven cavity problem at high Reynolds number. In the reference work, the results are obtained using a Chebyshev spectral method. The configuration of the problem consists in a cubic domain with imposed velocity on the lid, as displayed in Fig. 5.8.

x

Figure 5.8.: Configuration of the 3D lid-driven cavity problem.

A no-slip condition was imposed on each wall, except on the lid (x−z plane aty= h) where an x-velocity was imposed as prescribed by [192]:

u(x, y =h, z) = U0 1−

whereU0 is the maximum lid velocity. The form of the above equation, whose aim is to reduce the velocity discontinuities arising along the top edges of the domain, is discussed in [191]. The exact same velocity profile is chosen here in order to compare with the solution of [192]. Here,h= 1 andU0 and the lattice relaxation parameter is chosen in order to match the Reynolds number For Re = 12000, Ma≈0.14 and Kn≈1.15·10−5. In a first step, simulations on an homogeneous grid at Re = 100 have been performed in order to assess the convergence of the criterion. In Fig. 5.9 is shown the average refinement factor as a function of the time step chosen, using a convective scaling (∆x/∆t= 100).

A simulation with N = 200 lattice sites along domain side has been performed in order to determine the resolution factor to be used for the refined grid, as provided by Eq. (5.21). An average of the refinement criterion has been computed on a duration of 1 physical second after the flow has converged. Fig. 5.10shows the value of the resolution factor in the xy plane of the domain for z= 0. One can observe that the structure of the refinement field is the same whether the vorticity (as in [181,182] for instance) or Eq. 5.20is used as a basis for the refinement factor, except for the recirculation pattern

Automatic grid refinement 151

Figure 5.9.: Average refinement factor as a function of the time step on an homogeneous grid at Re = 100, using a convective scaling (∆x/∆t= 100)

seen in the bottom right of the cavity, better captured by the proposed criterion. More generally, the similarity between the structures indicates that the proposed criterion, which has a clear physical motivation, is as valid as a heuristical approach used so far in the literature.

Vorticity norm Criterion

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Figure 5.10.: Normalized values ofRf obtained from a simulation with homogeneous grid at Re = 12000, averaged over 1 physical second as the flow is unsteady. In the left figure, the vorticity norm is displayed, whereas the criterion of Eq. (5.20) is shown in the right figure. The latter was used to determine the local resolutions in the final, refined grid.

152 Automatic grid refinement

It is worth mentioning that, in order to keep the boundary condition simple, the resolution of the grid along each wall has been fixed to the value of the highest resolution along the wall in question. The resulting grid resolutions spread fromN = 64 toN = 512 lattice sites per domain length size. A representation of the generated grid is shown in Fig. 5.11, in which the resolution is indicated by the size of the cells, though not respecting the exact size for sake of visualization. The total number of cells in the refined grid is approximately 11 millions, as compared to 134 millions for a uniform grid with the same resolution as the maximum resolution of the refined one.

Figure 5.11.: Schematic representation of the generated grid, in which the resolution is indicated by the size of the cells, though not respecting the exact size for sake of visualization. The number of cells is approximately 10% of that of a uniform grid with a resolution equal to the maximum resolution of the refined grid.

Fig. 5.12shows a comparison of the mean ux anduy velocities between the reference solution and the simulation with the auto-refined grid. Velocity values have been averaged fromt = 300 s to t= 450 s.

Dans le document Lattice Boltzmann simulations of complex flows (Page 160-167)