Tracking Fronts in One and Two-phase Incompressible ... - Springer Link

4 downloads 0 Views 1MB Size Report
Apr 22, 2009 - Stephanie Delage-Santacreu · Stephane Vincent ·. Jean-Paul Caltagirone. Received: 9 March 2007 / Revised: 1 October 2008 / Accepted: 26 ...
J Sci Comput (2009) 41: 221–237 DOI 10.1007/s10915-009-9294-0

Tracking Fronts in One and Two-phase Incompressible Flows Using an Adaptive Mesh Refinement Approach Stephanie Delage-Santacreu · Stephane Vincent · Jean-Paul Caltagirone

Received: 9 March 2007 / Revised: 1 October 2008 / Accepted: 26 March 2009 / Published online: 22 April 2009 © Springer Science+Business Media, LLC 2009

Abstract Numerical computation is an essential tool for describing multi-phase and multiscale flows accurately. One possibility consists in using very fine monogrids to obtain accurate solutions. However, this approach is very costly in time and memory size. As an alternative, an Adaptive Mesh Refinement method (AMR) has been developed in order to follow either interfaces in two-phase flows or concentration of a pollutant in one-phase flows. This method has also been optimized to reduce time and memory costs. Several 2D cases have been studied to validate and show the efficiency of the method. Keywords Adaptive mesh refinement (AMR) · Implicit solving · Conservative and non-conservative interpolations · Numerical diffusion · Interfaces · One and two-phase incompressible flows

1 Introduction One of the current difficulties in fluid mechanics is in describing multi-phase and multi-scale incompressible flows. It is difficult to simulate such flows in so far as they are complex and require important computer resources. This paper focuses on tracking interfaces in two-phase incompressible flows and inert species fronts in one-phase incompressible flows. They are described by the Navier-Stokes equations (1), either coupled with the concentration species transport equation (2) in one phase flows or the interface transport equation (3) in two phase flows.  · V = 0 ∇    ∂V  V = ρ g − ∇p  +∇  · (μ(∇  V + ∇  T V )) + (V · ∇) ρ ∂t S. Delage-Santacreu () · S. Vincent · J.-P. Caltagirone Laboratoire TREFLE, UMR 8508, site ENSCPB, Universite de science Bordeaux 1, 16 avenue Pey Berland, 33607 Pessac, France e-mail: [email protected]

(1)

222

J Sci Comput (2009) 41: 221–237

∂C   · (D ∇(C))  + V · ∇(C) =∇ ∂t ∂i  i) = 0 + V · ∇( ∂t

(2) (3)

with V the velocity vector, ρ the density, p the pressure, μ the viscosity, g the gravity  C the concentration and D the diffusion coefficient.  T the transpose vector of ∇, vector, ∇ i is the phase function repairing fluidi . As a definition, we state i = 1 in fluidi and i = 0 elsewhere. The interface between two fluids is defined by i = 0.5. The equations are approximated by the Finite Volume method described in [18] on a staggered Cartesian grid [8]. Concerning the Navier-Stokes equations, a one order Euler scheme is used for time discretization, the inertia term is treated by a linearized implicit centered scheme and the viscous terms are discretized by using a second order implicit centered scheme (for more details, see [18]). The coupling between velocity and pressure is treated by the augmented Lagrangian method described in [19], [5] and [27]. They are solved in an implicit way by using a Bi-Conjugate Gradient Stabilized II algorithm (BiCGStabII) [23] preconditioned by a Modified and Incomplete LU Gauss factorization [6]. Concerning (2), a one order classic scheme is used for time discretization. An explicit Total Variation Diminishing (TVD) scheme [14] is used for the advection term. The diffusion term is solved implicitly, by using an iterative BiCGStabII algorithm with a Jacobi preconditioner (see [6] or [23]). We specify that for a two-phase incompressible flow, the one-fluide model introduced by [13] is used. A Volume Of Fluid (VOF) method is utilized to advect the interface (see [11] for more details). Two methods have been tested to solve (3): the first one is a TVD scheme described in [10, 14] in 1D and adapted to 2D and 3D for interface tracking by [25] and the second one is the VOF − PLIC scheme introduced by [28], consisting in using equation (3) to rebuild the interface geometrically and advect it using the Lagrangian approach. The previous numerical methods are efficient if the grid size is fine enough to describe all the time and space scales of the flow. As soon as the grid size is larger than characteristic scales of the interfacial length or concentration gradient, these schemes damages the accuracy of the solution in so far as TVD scheme introduces a numerical diffusion while the VOF − PLIC is responsible for an artificial interface fragmentation. Given the fact that both numerical diffusion and fragmentation are linked to the mesh size, a very fine meshing must be used to reduce their effects and obtain accurate solutions. However, this is too expensive in memory size and time on standard fine Cartesian grids. As a result, an Adaptive Mesh Refinement (AMR) method based on the One Cell Local Multigrid (OCLM) method of [26] has been developed to obtain accurate solutions with optimized memory size and time costs. The mesh refinement strategy was first introduced by [1] to solve hyperbolic partial differential equations. Then, this method has been improved and adapted to numerous physical topics and more particularly to track interfaces in two-phase incompressible flows. For instance, we can cite the work of [9] in which an AMR approach has been coupled with an Inter-Gamma Differencing Scheme (IGDS) and a SIMPLE method to track the free surface and solve the Navier-Stokes equations on unstructured grids. In the same way, an octree AMR method coupled with a Ghost Fluid discretization of the Navier-Stokes equations and a Level Set interface tracking were carried out by [15]. This method is applied to various free surface flows interacting with objects of complex shaped. We can quote the promising works of [22] for tracking interfaces with AMR techniques or these of [17] and [20] for treating the incompressible Navier-Stokes equations.

J Sci Comput (2009) 41: 221–237

223

Contrary to existing works which are based on explicit discretizations, the present article aims at proposing a local AMR method, i.e. the refinement must be efficient at the cell scale, which is adapted to an implicit solving of the Navier-Stokes equations, coupled to scalar front or interface tracking. Section 2 is dedicated to the principles of the AMR approach and more particularly to the connections and the extension operators. In Sect. 3, we evaluate the efficiency of the developed method in conserving the solution accuracy and in minimizing the memory size and CPU time costs via 2D scalar cases which consist in shearing a fluid disk. In Sect. 4, the AMR approach is applied to both scalar and Navier-Stokes equations in 2D to evaluate its ability to deal with an academic case, called the Green Taylor vortex, and real two-phase incompressible flows related to dam break cases. Its efficiency in reducing the memory and CPU time costs are also studied. Some conclusions and perspectives are given in Sect. 5.

2 Principle of the AMR Method In the present section, we give a reminder of the essential points of the AMR approach described in [3] and [4] which is an improvement on the OCLM method developed by [26]. First, we specify that the scalar unknowns (concentration, phase function, pressure) are calculated on the nodes of the pressure grid and the velocity unknowns are calculated on the nodes of the velocity grids. The nodes of the pressure grid (respectively velocity grids) are called pressure (respectively velocity) nodes. Let G0 be a staggered cartesian grid composed of a pressure grid and velocities grids, the AMR approach consists in generating fine staggered Cartesian grids (called AMR cells) from G0 . These AMR cells belong to the first level of refinement G1 . More generally, this approach consists in generating fine grid cells of level GL from a coarser cell of level GL−1 , L ∈ [1, N L] (where N L is the number of refinement levels). The refinement procedure is managed by a refinement criterion based on the concentration (respectively phase function) gradient for a one phase flow (respectively two phase flow) (see [4]). More precisely, the same refinement criterion is used for both scalar and vectorial equations. The velocity gradient is not used as a refinement criterion but it could be. We specify that only a pressure node PL−1 of level GL−1 can generate an AMR cell, provided that the solution SL−1 on node PL−1 verifies the refinement criterion. This AMR cell is composed of a pressure fine grid and a velocity fine grid per component, as shown in Fig. 1. Only pressure nodes PL belonging to the interior of this AMR cell can generate others of level GL+1 . An odd cutting is required to ensure a consistent connection between AMR cells of a same refinement level (a three cutting has been chosen in Fig. 1). As explained in [3], the solution SL on pressure and velocity nodes belonging to the limits of the AMR cell (see Fig. 1) of level GL is calculated by means of an extension operator, namely non-conservative interpolations Q1 , Q2 or Q3 . The solution SL on pressure and velocity nodes belonging to the interior of the AMR cell (see Fig. 1) of level GL is calculated thanks to the discretized equations and the numerical methods presented in the introduction section. The first essential point of this approach is its implicitation: it consists in introducing the interpolation coefficients inside the discretization matrix so as to solve every node in an implicit way and in only one step. Given that the solution SL calculated on the nodes of an AMR cell of level GL is more accurate than the solution SL−1 calculated on its father node PL−1 of level GL−1 , a Full

224

J Sci Comput (2009) 41: 221–237

Fig. 1 Composition of an AMR cell

Weighted Control Volume (FWCV) method, introduced by [7], is used as a restriction operator. It consists in approximating SL−1 by the solution SL on the nodes belonging to the interior of the AMR cell as it follows:   9 SL−1 (PL−1 )dV = i=1 SL (PL,i )dV (4) Vf ather

Vson (i)

where Vfather is the control volume of the father node and Vson (i), i ∈ [1, . . . , 9] the control volume of the son node PL,i . The second essential point of the method is the connections between AMR cells enabling transmission of information from cell to cell, which improves the accuracy of the solution. Given that this principle is an improvement on the method used in the description given by [3], the following paragraph is dedicated to this principle. 2.1 Principle of connections The purpose of this principle is to minimize the number of interpolated nodes to improve the accuracy of the solution. In fact, the refinement acts at the scale of one coarse cell but after connections, the cells of a same refinement level form a global refinement level (see Fig. 2). For instance, we choose to solve (2) where the unknown is the concentration C. We remind that the refinement criterion is based on scalar unknowns. Given that for this example, the scalar unknown is the concentration, we choose a refinement criterion based on it. The concentration CL−1 is calculated on the pressure nodes of level GL−1 . We assume that the concentration CL−1 on two adjoining pressure nodes PL−1 of level GL−1 verifies the refinement criterion. Therefore they generate AMR cells. Figure 3 shows there is an overlapping. Each grey diamond pressure node of the left AMR cell has an east pressure neighbour belonging to the right boundary of the same AMR cell. However, the grey circle pressure nodes of the right AMR cell have the same coordinates as the east pressure neighbours of the grey diamond pressure nodes. As a result, each grey circle pressure node of the right AMR cell becomes the new east pressure neighbour of a diamond grey pressure node of the left AMR cell. In the same way, each grey diamond pressure node becomes the west pressure neighbour of a grey circle pressure node of the right AMR cell. Moreover, the pressure nodes which both

J Sci Comput (2009) 41: 221–237

225

Fig. 2 Coarse mesh of pressure nodes G0 and one level of refinement G1 . Several nodes of level G0 have created AMR cells because they verify the refinement criterion. G1 acts as a global refinement level, and yet it is composed of a series of connected AMR cells

Fig. 3 Connections procedure of two AMR cells for the fine pressure grids in 2D

belong to the overlapping area and to the right (respectively left) boundary of the left (respectively right) AMR cell are no longer solved. However they retain their identity in the AMR tree structure (see Fig. 4) to make the refinement-derefinement dynamic management and the connection procedure possible. The solution SL is obtained by a non-conservative interpolation procedure on the black circle nodes. If we take the example of Fig. 3, each grey diamond pressure node of the left AMR cell can be connected if and only if the west neighbour of the grey diamond pressure nodes father has created an AMR cell. This test is true in Fig. 3, therefore the grey diamond nodes can be connected to the grey circle pressure nodes. When several AMR cells of level GL are generated from pressure nodes of level GL−1 , the connection procedure is used wherever there are overlapping areas. The unknown SL is not calculated on the nodes which both belong to the limits of the AMR cells and the overlapping areas whereas SL is solved on the other nodes belonging to the limits of the AMR cells by using a non-conservative interpolation procedure (Q1 or binary interpolation, see Sect. 2.2). SL is solved on the nodes belonging to the interior of the AMR cells by using the discretized equations. We remind that level GL is considered as a single grid for the solving whereas each AMR cell conserves its identity to make the refinement-derefinement procedure possible. A similar approach is adopted to connect velocity nodes of AMR cells.

226

J Sci Comput (2009) 41: 221–237

Fig. 4 Tree structure of several refinement levels with a refinement coefficient equal to 3. A pressure node of level G0 can generate an AMR cell of level G1 . Then the pressure nodes belonging to the interior of this AMR cell can generate other cells of level G2 . For the levels of refinement G1 and G2 , only pressure nodes of the interior of AMR cells are represented

Fig. 5 Steps to implicitate the AMR method

2.2 Extension Operators: Non-conservative Interpolation The finite elements of Lagrange are chosen to build the interpolation functions. They consist in approximating the unknowns by a polynomial of degree n ∈ [1, 3], P ∈ Qn = vect{x l zm } ∀(l, m) ∈ [1, n] (see [3] and [4] for more details). A fourth non-conservative interpolation, called binary interpolation, was implemented only for discontinuous unknowns belonging to the pressure grid, such as the concentration C or the phase function i of fluidi . Let S be this scalar unknown and PL−1 be a pressure node of level GL−1 which has generated an AMR cell of level GL , L ∈ [1, N L]. For all pressure nodes PL belonging to this cell, the binary interpolation consists in imposing: S(PL ) = 1 if 0.5 ≤ S(PL−1 ) ≤ 1 and S(PL ) = 0 if 0 ≤ S(PL−1 ) < 0.5. 2.3 Implicitation of the AMR Approach When an implicit solver is used, the discretized equations can be put into the form n+1 = B0n where B0n is the second member at time iteration n, X0n+1 the unknown An+1 0 X0 the discretization matrix at time iteration at time iteration n + 1 on a mesh G0 and An+1 0 n + 1 (see Fig. 5, left). n+1 = B0n to solve is When a first refinement level G1 is generated, the system An+1 0 X0 modified to take into account the new nodes of the mesh. The new system to solve is An+1 X n+1 = B n where B n = (B0 , B1 )n is the second member at time iteration n on the

J Sci Comput (2009) 41: 221–237

227

mesh G0 ∪ G1 , X n+1 = (X0 , X1 )n+1 the unknown on the mesh G0 ∪ G1 at time iteration  A 0 n+1 the discretization matrix of the mesh G0 ∪ G1 at time iteration n + 1 and An+1 = 00 A1 n + 1 (see Fig. 5, center). We specify that the unknowns X1 of level G1 are solved by using either an interpolation procedure or the discretized equations. The coefficients of the matrix A1 correspond to those of the discretized equations on level G1 , so A1 has to be modified in order to take into account of the nodes solved by using an interpolation procedure. For this, the lines i of the matrix A1 which correspond to nodes solved thanks to an interpolation procedure are replaced by interpolation coefficients. A zero is put on the second member B1,i where X1,i is interpolated (black lines). Hence we obtain a new system to be solved, which takes into account the refinement and interpolation procedures (see Fig. 5, right). More details are available in [3] and [4].

3 Application of the Method to Scalar Equations 3.1 Sheared Disk in a Two Dimensional One-phase Flow We aim at showing the ability of the method to obtain accurate solutions when moving concentration fronts are tackled. We also aim at minimizing memory size and CPU time costs. A two dimensional square domain  of characteristic length L = 0.1 m, initially full of a pure fluid (concentration equal to zero), is considered. A disk of a polluted fluid of concentration 1 g m−3 is initially introduced in . The concentration is sheared by an imposed rotating velocity field (5). The governing equation is (2) with a diffusion coefficient D = 10−8 m2 s−1 .     (2x − 1) (2y − 1) u(x, y) = −0.1 cos sin (5) 2L 2L     (2y − 1) (2x − 1) cos v(x, y) = 0.1 sin 2L 2L 3.1.1 Accuracy of Solutions As it has been shown in [3], the Q1 interpolation used as an extension operator can avoid the oscillation phenomenon. However, this operator introduces a small numerical diffusion when it is used for nodes too close to the front. As a result, a binary interpolation was used in this case (2.2). First, we analyse the space convergence of the AMR approach by using the formula  = k( √LN )q , where  is the discrete L2 norm, k a constant, N the number of nodes and q the convergence order. Given the fact that an analytical solution does not exist, a solution calculated on a very fine mesh G = 1296 × 1296 is chosen as a reference solution. We obtain a limit convergence order q = 2 with and without AMR. The accuracy and the convergence order of the standard schemes are not damaged by their non conforming AMR extension. Figures 6 and 7 show the efficiency of this method in reducing the numerical diffusion while the number of refinement levels increases. We specify the connections between the refinement levels are made unstructured only for the graphic application.

228

J Sci Comput (2009) 41: 221–237

Fig. 6 Concentration obtained with a binary interpolation at time t = 8 s from a coarse mesh G0 = 16 × 16. There is one refinement level on the left and two on the right

Fig. 7 Concentration field obtained with a binary interpolation at time t = 8 s from a coarse mesh G0 = 16 × 16 and three refinement levels (left). Mesh associated to the concentration field (right)

In Fig. 8, we compare the concentration field obtained on a monogrid G = 16 × 16 at time t = 8 s with the one for the coarse mesh G0 = 16 × 16 when three refinement levels are considered. We note that the maximum value of C is about 0.28 g m−3 in the left figure. So the concentration field has been greatly diffused. In the right figure, the concentration field observed on G0 = 16 × 16 has a maximum value Cmax = 0.8 g m−3 . Therefore, it is less diffused than in the left figure. This result shows that the FWCV injection improves C on the coarse mesh in such a way that the numerical diffusion is limited. 3.1.2 Memory Cost Analysis We compare the memory size needed to simulate the shearing of the disk during 8 seconds using the AMR method with the memory size required for the same case without AMR. This study is essential to estimate the memory gains obtained with the approach. We note memamr (respectively mem) the memory size (in Mo) required for the AMR amr . NNL repsimulation (respectively simulation without AMR), Rmem the ratio Rmem = mem mem resents the number of nodes needed to calculate the solution with N L levels of refinement.

J Sci Comput (2009) 41: 221–237

229

Fig. 8 Concentration field obtained with a binary interpolation at time t = 8 s on a monogrid G = 16 × 16 (left) and on the coarse mesh G0 = 16 × 16 when three refinement levels are used (right) Table 1 Memory size required to simulate the case of the sheared disk on different meshes Mesh

memamr

Rmem

RN

60 × 60

18

mem 7

2650

3721

2.6

0.71

180 × 180

37

34

14018

32761

1.1

0.43

540 × 540

82

281

61170

292681

0.3

0.21

NN L

NG

Let NG be the number of nodes needed for the simulation on a mesh G, without AMR. This . mesh is equivalent to the finest grid used in the case with AMR. RN is defined as RN = NNNL G For the case with AMR, we use a coarse mesh G0 = 20 × 20, a time step t = 3.08 × 10−4 s and we simulate the sheared disk from one to three refinement levels. Table 1 shows the evolution of the previously defined parameters when the number of refinement levels increases for the AMR case as well as when the monogrid G becomes finer and finer for the case without AMR. We can see on Table 1 that the ratio Rmem > 1 until two refinement levels. This means that the AMR approach is more expensive than a classic solving on a fine cartesian grid. Indeed, when the reference monogrid is not fine enough, the overcost induced by the management of the AMR structure induces a numerical cost greater than the one required by the management a fine grid everywhere in . For three refinement levels our approach is interesting because a memory size gain of 30% has been achieved with the AMR method, compared with the classic one. If we pay attention to the evolution of the ratio RN , we realize RN is linked to Rmem . We aim at evaluating a critical value of RN , noted RNc . For this, we deem the AMR algorithm cost becomes interesting when the minimum memory profit is superior or equal to 25%, i.e.: Rmemc = 0.75. A linear regression between Rmem and RN enables us to obtain a straight line of equation: Rmem = 4.605 × RN − 0.7376 with a correlation coefficient equal to 0.995. We deduce RNc = 32% i.e. that this approach is efficient in minimizing the memory size cost as long as the number of nodes used with the AMR method is inferior to 32% of the nodes which would have been used with a similar fine monogrid. This is very satisfying in 2D. 3.1.3 CPU Time Cost Analysis The purpose of this subsection is to estimate the efficiency of the AMR method concerning the simulation time tamr . Let ttot be the average CPU time of simulation for one iteration.

230

J Sci Comput (2009) 41: 221–237

Table 2 Comparison of averaged CPU time at N T = 26000 for different refinement levels Number of levels

tref

tsol

ttot

tref ttot

tsol ttot

1

0.002499

0.01193

0.02001

0.1249

0.5962

2

0.04609

0.07379

0.1343

0.3432

0.5494

3

0.4509

0.2476

0.7481

0.6027

0.3310

Table 3 Comparison of simulation time with and without AMR

Mesh 60 × 60

tamr 522.1

twamr

rt

475.3

1.10

180 × 180

3495

3144

1.11

540 × 540

19460

25860

0.75

ttot includes the refinement  management time tref and the solving times tsol . tref , tsol and 1 ttot are defined as: NT i=1,NT ti , where N T is the number of time iterations and ti the considered CPU time per iteration. Table 2 represents the different average times tref , tsol and ttot from one to three refinement levels. The coarse mesh is G0 = 20 × 20 and the time step is t = 3.08 × 10−4 s. We have tref and ttsol in order to evaluate the distribution of the costs of also calculated the ratios ttot tot t

ref increases refinement and solving operations in one iteration. We notice on Table 2 that ttot tsol while ttot decreases when the number of refinement levels increases. For three refinement levels, the refinement management algorithm is more expensive in terms of CPU time than the solving algorithm. This can be explained by the fact that (2) is easy to solve. So we ask ourselves if the CPU time of simulation tamr is smaller than that obtained tamr . without AMR, twamr . We note rt = twamr As for the memory cost of the AMR method, the CPU time cost becomes interesting from three refinement levels (rt = 0.75 in Table 3). The results are satisfying since a CPU time profit of 25% has been made for three refinement levels (see Table 3). However, the CPU time cost depends on the complexity of the equation to solve. So we cannot estimate a priori the time gains.

3.2 Sheared Disk in a Two Dimensional Two-phase Flow The aim of this subsection is to show the ability of the method to treat the same case as that of Sect. 3.1 with two immiscible fluids, fluid1 and fluid2 . As a result, we consider the same situation as in Sect. 3.1. The polluted fluid is replaced by fluid1 and the pure fluid by fluid2 . Equation (3) is solved to track the interface. We detail the AMR contribution for the VOF − PLIC method. As it is known, the VOF − PLIC method is efficient in obtaining an accurate position of the interface. However, the interface tends to be fragmented when the fluid is too sheared compared with the mesh used. The coarser the mesh, the more fragmented the disk. The problem is that if the shearing is so strong that the number of nodes needed to avoid fragmentation is superior to the available memory size, the VOF − PLIC method becomes unusable. As a consequence, we aim at coupling the AMR approach to the VOF − PLIC method so that it becomes usable for finer meshes. The results concerning the memory and CPU time costs are the same as those in Sect. 3.1. That is the reason why we have restricted our study

J Sci Comput (2009) 41: 221–237

231

Fig. 9 Comparison of the interface position on three refinement levels (G0 = 20×20) (left) with the interface position obtained without AMR (right), at time t = 6.3 s

Fig. 10 Comparison of the interface position on three refinement levels (G0 = 20 × 20) (left) with the interface position obtained without AMR (right), at time t = 12.6 s. The dash-dot line circle represents the initial position of the interface

to the behaviour of this coupling. The discrete L2 norm error is equal to 6 × 10−14 , which means that both solutions are identical. Secondly, we impose the velocity field for 6.3 s to the disk and then the opposite one for 6.3 s to reverse the shearing. We compare the phase function F1 calculated on a monogrid G = 540 × 540 with F1 obtained on a coarse mesh G0 = 20 × 20 and three refinement levels, at times t = 6.3 s and t = 12.6 s (see Figs. 9 and 10). Results are similar in both cases, which is very satisfying. As in Sect. 3.2, the same conclusion applies when a VOF − TVD method is used for treating interfaces, i.e. the AMR method is efficient in reducing the numerical diffusion while the number of refinement levels increases.

4 Application of the Method to the Navier-Stokes Equations in 2D Two Phase Incompressible Flows The purpose of this section is to study the ability of the AMR method to preserve the accuracy of the solution, to minimize the memory and CPU time costs while solving the Navier-Stokes equations in two phase flows. 4.1 Green-Taylor Vortex We consider a square domain  = [−0.1 m, 0.1 m] × [−0.1 m, 0.1 m] of characteristic length L = 0.2 m, in which an unsteady flow called the Green-Taylor vortex is induced. This vortex has been modified by introducing a source term (see (6)) in the Navier-Stokes equations in order to obtain a steady solution different from zero. More details are available in [2]. The initial velocity field is equal to zero. The analytical velocity field is imposed on the limits of the domain . A disk of a second fluid, whose physical characteristics are

232 Table 4 Evolution of the errors G1 , G2 and G3 along with the mesh size variations of G0 at time t = 6 s, t = 0.01 s

J Sci Comput (2009) 41: 221–237 Mesh G0

G1

G2

G3

20 × 20

6.880 × 10−5

1.628 × 10−5

4.495 × 10−6

3.143 × 10−6

9.323 × 10−7

2.737 × 10−7

40 × 40 60 × 60

1.387 × 10−5

3.763 × 10−6

1.083 × 10−6

Table 5 Performance of the Bi-CGStab II solver and of the augmented Lagrangian method at t = 6 s on the refinement level G1 , t = 0.01 s Augmented Lagrangian iterations 1 3 10

Residual

 · V ∇

G1

1.8 × 10−7

2.9 × 10−7

1.26 × 10−3

1.7 × 10−11

1.1 × 10−9

1.15 × 10−3

3.7 × 10−9

2.7 × 10−8

1.16 × 10−3

the same as the surrounding fluid, i.e. a marker fluid, is initially introduced to manage the refinement-derefinement procedure and then sheared by Green-Taylor vortex. We specify the Navier-Stokes equations and (3) are solved. A TVD scheme is used to solve (3).     2 μ x y sin u0 (x, y) = − 2 cos 2L 2L 2L (6)     2 μ x y sin v0 (x, y) = cos 2L2 2L 2L 4.1.1 Accuracy of Solutions The aim of this subsection is to evaluate the ability of the method to solve the Navier-Stokes equations by using the augmented Lagrangian approach. This test case has been chosen as it provides an analytical solution which enables us to study the space convergence. However the interest of the AMR method is limited given that the velocity field does not present sharp local variations. We note G1 (respectively G2 , G3 ) the discrete L2 norm error between the theoretical solution and the numerical velocity field on the refinement level G1 (respectively G2 , G3 ). Table 4 represents these errors obtained for several coarse meshes G0 . We notice they decrease when the number of refinement levels or the number of nodes on G0 increase. These results enable us to evaluate a space convergence order q = 2 which demonstrates that the AMR approach does not damage the convergence order of the discretization schemes. We aim at assessing the influence of the method on the implicit solver. For this, we show on Table 5 the evolution of the residual, the divergence and G1 when the number of augmented Lagrangian iterations (N Tal ) varies. We can notice that the residual of the iterative method and G1 decrease when N Tal increases. So the AMR grid structure does not damage the performance of the Bi-CGStab II solver. Concerning the divergence free property, it diminishes until a threshold is reached. Indeed, the augmented Lagrangian method forces the divergence to stay at constant level. This is due to the non-conservative interpolation of the velocity at the boundaries of the refinement levels which are characterized by interpolations that does not verify the divergence free property.

J Sci Comput (2009) 41: 221–237 Table 6 Memory size required to simulate the case of the Green-Taylor vortices on different meshes

233 Mesh 60 × 60

memamr

mem

NN L

NG

Rmem

RN

7

8

3898

11285

0.9

0.35

180 × 180

15

50

12143

98645

0.3

0.12

540 × 540

38

420

38782

879125

0.1

0.02

4.1.2 Memory Cost Analysis We aim at evaluating the gains of memory obtained with the AMR method. For this, we compare the memory size required to simulate the shearing of the disk during 0.5 seconds using the AMR approach with the memory size used for the same case without AMR. We have chosen to simulate the AMR case with the following parameters: G0 = 20 × 20, from one to three refinement levels and t = 0.001 s. The same approach and notations as in Sect. 3.1 are adopted. Given the fact that we solve the Navier-stokes equations and (3) on a staggered Cartesian grid (cf. [8]), the number of nodes required to solve these equations is the sum of the pressure and velocity nodes. Let NNL (respectively NG ) be this sum of nodes for the AMR case (respectively the classic case without AMR). We notice in Table 6 that Rmem < 1 whatever the number of refinement levels. If we link the variations of Rmem with those of RN , a linear regression gives a straight line of equation Rmem = 2.55 × RN − 0.015 with a correlation coefficient equal to 0.9996. We estimate RNc = 30% for Rmemc = 75%, i.e. this approach is efficient in minimizing the memory size cost as long as the number of nodes used with the AMR method is inferior to 30% of the nodes which would have been used with a similar fine monogrid. So we obtain a similar result as that of Sect. 3.1. This means that the gain in memory cost, obtained by the AMR approach compared with a classic method, depends on the number of nodes required to solve the equation and not on the number of equations solved. 4.1.3 CPU Time Cost Analysis We aim at studying the efficiency of the AMR approach in minimizing the CPU time cost of simulation tamr compared with the CPU time cost of simulation twamr . We have chosen to simulate the AMR case with the following parameters: G0 = 20 × 20, from one to three refinement levels and t = 0.001 s. The same notations as in Sect. 3.1 are used. Given the fact that we solve the Navier-stokes equations and (3), we note tsol−NS (respectively tsol−ad ) the average CPU time of simulation per iteration to solve the Navier-Stokes equations (respectively (3)). tsol = tsol−NS + tsol−ad . We can observe on Table 7 that the solving of the Navier-Stokes equations is very expensive compared with the solving of (3) and with the refinement management. In fact, this cost represents about 99% of the average CPU time ttot . This means that the CPU time cost of the AMR algorithm is insignificant compared with the CPU time cost of the Navier-stokes equations solving. Table 8 shows a benefit in the simulation time tamr ranging from 30% to 60% in relation to the simulation time twamr . However, it is difficult to evaluate this benefit in advance because the parameter rt cannot be linked to another one except the complexity of the solving which is impossible to estimate a priori.

234

J Sci Comput (2009) 41: 221–237

Table 7 Comparison of averaged CPU time at N T = 500 for different refinement levels tref ttot

tsol ttot

Number of levels

tref

1

0

0.0523

0.0001

0.0526

0

1

2

0.001

0.6471

0.0013

0.6502

0.0023

0.997

3

0.0452

5.9895

0.008

6.0542

0.0075

0.991

Table 8 Comparison of simulation time with and without AMR

tsol−N S

tsol−ad

ttot

Mesh

tamr

twamr

rt

60 × 60

26.44

36.98

0.7

180 × 180

325.2

565.2

0.6

540 × 540

3027

7274

0.4

4.2 Collapse of a Liquid Column on a Rigid Horizontal Plane The purpose of this subsection is to analyse the ability of the AMR approach to treat a real two-phase flow case. We consider the situation described in [16], namely a 2D rectangular domain  = [0 m, 1.2 m] × [0 m, 0.14 m]. A water column, whose base dimension is a = 0.057 m and height H0 = n2 a, is initially present on the left of the domain . The rest of the domain is full of air. We specify n is a real number verifying n2 = 2 for the treated case. The governing equations are (1) and (3). A TVD scheme is used to solve the last one. According to [16], when the water column, initially at rest on the domain , collapses on to the rigid plane, the fluid spreads out and the height of the column, h, falls. The following notations are used: Ta = nt ga , Z = az and H = anh2 , where z is the distance of surge front and g the acceleration due to gravity. We study the evolution of Z and H on a coarse mesh G0 = 100 × 30 and one refinement level for the dimensionless time Ta = 3.3, t = 10−4 s. The results obtained using the AMR method are compared with the experimental results of [16] and the numerical results of [12]. Figure 11 left represents the evolutions of H along with Ta . We notice a very slow fall at the beginning (Ta < 0.5). Then the speed of the H fall is intensified and is linear for 0.5 ≤ Ta ≤ 2.2. Finally, the fall slows down to H < 0.4. We cannot fail to note the numerical results obtained using the AMR method are very close to those obtained by [16] and [12]. As for the evolution of Z, Fig. 11 right shows that the AMR approach and the method used by [12] give satisfying numerical results given the fact that the maximum error between each numerical method and the experimental results is about 6%. The only difference is that the AMR method under-estimates Z whereas the [12] approach over-evaluates it. 4.3 Collapse of a Liquid Column on A Dampened Horizontal Plane As for in Sect. 4.2, we aim at studying the ability of the AMR approach in treating the collapse of a water column on a dampened horizontal plane. We consider the situation described in [21], namely a 2D rectangular domain  = [0 m, 1.2 m] × [0 m, 0.14 m]. A water column, whose base dimension is a = 0.06 m and height H0 = 0.1 m, is initially present on the left of the domain . The horizontal plane is initially covered with water hf = 0.01 m high. The rest of the domain is full of air. We compare the numerical results obtained on a coarse mesh G0 = 400 × 47 with the experiment results of [21] and the numerical ones of [24] (see Fig. 12).

J Sci Comput (2009) 41: 221–237

235

Fig. 11 Collapse of a water column: evolution of H (left) and Z (right) Fig. 12 Collapse of a water column: Residual height H at time t = 0.24 s, hf = 0.01 m, t = 2 × 10−4 s. For the AMR case G0 = 400 × 47 with one refinement level

The water column is initially at rest on the domain . When it collapses, the fluid spreads out and the height H of the column falls on the dampened plane. Given the fact that the plane is initially covered with water, a jet forms during the collapse of the column and breaks. We note in Fig. 12 that our approach and that of [24] give a good estimation of the break zone around x = 0.8 m, compared with the experimental result: the differences between numerical and experimental results vary from 1% to 3%. The numerical results concerning the estimation of the parameter H in the break zone seems to be correct (the error between numerical and experimental results is about 16%). We assume the gap is partially due to the fact that this parameter is very difficult to evaluate experimentally (see images in [21]). In fact, the presence of a lot of foam makes it difficult to locate the free surface accurately. 5 Conclusion An adaptive mesh refinement method acting at the cell scale has been developed to track interfaces in two-phase incompressible flows and species concentrations in one-phase in-

236

J Sci Comput (2009) 41: 221–237

compressible flows. The main originality of this approach consists in the implementation of an implicit method and in the fact that each refinement level is made of a series of linked AMR cells. This approach turns out to be efficient in treating this sort of problem in 2D in so far as it enables us to obtain accurate solutions, second convergence order for both NavierStokes and transport equations and numerical solutions close to experimental and numerical results from the literature. The accuracy of the velocity field is likely to be improved by the development of conservative interpolations to treat the divergence free property by means of augmented Lagrangian techniques. The AMR approach has been optimized with respect to memory requirements and CPU time. It results in a memory profit superior or equal to 25% as long as the number of nodes used with the AMR method is inferior to around RNc = 30% of the nodes which would have been used with a similar fine monogrid, for both 2D Navier-Stokes and transport equations. Its efficiency in reducing CPU time has been demonstrated in 2D for both Navier-Stokes and transport equations. In fact, CPU time profits increase when the complexity of the equations solving increases. As it has been explained, this is due to the fact that the dynamic management of the AMR approach becomes negligible compared with the implicit solving of complex equations.

References 1. Berger, M.J., Colella, P.: Local adaptive mesh refinement for hyperbolic partial differential equations. J. Comput. Phys. 82, 64–84 (1989) 2. Caltagirone, J.P., Breil, J.: A vector projection method for solving the Navier-Stokes equations. C. R. Acad. Sci. Paris, Ser. II b, Mec. Fluides Numér. 327, 1179–1184 (1999) 3. Delage, S., Vincent, S., Caltagirone, J.P., Heliot, J.P.: A hybrid linking approach for solving the conservation equations with an Adaptive Mesh Refinement method. J. Comput. Appl. Math. 191(2), 280–296 (2006) 4. Delage-Santacreu, S.: A hybrid Adaptive Mesh Refinement method to track interfaces in incompressible flows. PhD thesis, Universite Bordeaux 1 (2006) 5. Fortin, M., Glowinsky, R.: Methodes de Lagrangien augmente. Application a la Resolution Numerique de Problemes aux Limites. Methodes Mathematiques de l’Informatique, vol. 1. Dunod, Paris (1982) 6. Gustafsson, I.: On first and second order symmetric factorization methods for the solution of elliptic difference equations. Chalmers University of Technology (1978) 7. Hackbush, W.: Local defect correction method and domain decomposition techniques, in defect correction methods: Theory and applications. In: Bomer, K., Stetter, H.J. (eds.) Computation Supplementation, vol. 5, pp. 89–113. Springer, Vienna (1984) 8. Harlow, H., Welch, J.E.: Numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. Phys. Fluids 8, 2182–2189 (1965) 9. Hay, A., Visonneau, M.: Computation of free surface flows with local mesh adaptation. Int. J. Numer. Methods Fluids 49, 785–816 (2005) 10. Hirsh, C.: Numerical Computation of Internal and External Flows, vol. 2: Computational Methods for Inviscid and Viscous Flows. Lectures in Mathematics, Landford. Birkhauser, Zurich (1992) 11. Hirt, C.W., Nichols, B.D.: Volume of fluids (VOF) method for the dynamics of free boundaries. J. Comput. Phys. 39(1), 201–225 (1981) 12. Ishii, E., Ishikawa, T., Tanabe, Y.: Hybrid Particle/Grid method for predicting motion of micro and macro-free surfaces. J. Fluid Eng. 128, 921–930 (2006) 13. Kataoka, I.: Local instant formulation of two phase flow. Int. J. Multiph. Flow 12, 745–758 (1986) 14. Leveque, R.J.: Numerical Methods for Conservation Laws. Wiley, Chichester (1990) 15. Losasso, F., Fedkiv, R., Osher, S.: Spatially adaptive techniques for level set methods and incompressible flow. Comput. Fluids 35, 995–1010 (2006) 16. Martin, J.C., Moyce, W.J.: An experimental study of the collapse of liquids columns on a rigid horizontal plane. Phys. Trans. Ser. A, Math. Phys. Sci. 244, 312–325 (1952) 17. Minion, M.L.: A projection method for locally refined grids. J. Comput. Phys. 127, 158 (1996) 18. Patankar, S.V.: Numerical Heat Transfer and Fluid Flow. Series in Computational Methods in Mechanics and Thermal Sciences, vol. 1. Hemisphere, Washington (1980)

J Sci Comput (2009) 41: 221–237

237

19. Peyret, R., Taylor, T.D.: Computational Methods for Fluid Flows. Springer Series in Computational Physics. Springer, New York (1983) 20. Popinet, S.: Gerris: a tree-based adaptive solver for the incompressible Euler equations in complex geometries. J. Comput. Phys. 190, 572–600 (2003) 21. Stansby, P.K., Chegini, A., Barnes, T.C.D.: The initial stages of dam-break flow. J. Fluid Mech. 374, 407–424 (1998) 22. Strain, J.: Tree methods for moving interfaces. J. Comput. Phys. 151, 616–648 (1999) 23. Van Der Vorst, H.A.: A fast and smoothly converging variant of BI-CG for the solution of non-symmetric linear systems. SIAM J. Sci. Stat. Comput. 13(2), 631–644 (1992) 24. Vincent, S.: Modelling incompressible flows of non-miscible fluids. PhD thesis, Universite Bordeaux 1 (1999) 25. Vincent, S., Caltagirone, J.P.: Efficient solving method for unsteady incompressible interfacial flow problems. Int. J. Numer. Methods Fluids 30, 795–811 (1999) 26. Vincent, S., Caltagirone, J.P.: One Cell Local Multigrid method for solving unsteady incompressible multi-phase flows. J. Comput. Phys. 163, 172–215 (2000) 27. Vincent, S., Caltagirone, J.P., Lubin, P., Randrianarivelo, T.N.: An adaptive augmented Lagrangien method for three dimensional multimaterial flows. Comput. Fluids 33, 1273–1289 (2004) 28. Youngs, D.L.: Time-Dependent Multimaterial Flow with Large Fluid Distorsion. Morton and Baines, New York (1982)

Suggest Documents