A Hermite finite element method for incompressible fluid flow - CiteSeerX

11 downloads 5048 Views 774KB Size Report
key words: divergence-free finite element; Hermite finite element; Navier-Stokes; incompressible flow; lid-driven cavity; backward-facing step; domain truncation .... of the pressure space, we get the weak form of the pressure-gradient equation,.
INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN FLUIDS Int. J. Numer. Meth. Fluids 2009; 00:1–33 Prepared using fldauth.cls [Version: 2002/09/18 v1.01]

A Hermite finite element method for incompressible fluid flow J. T. Holdeman∗ 1056 Lovell Road Knoxville, Tennessee, 37932 USA

SUMMARY We describe some Hermite stream function and velocity finite elements and a divergence-free finite element method for the computation of incompressible flow. Divergence-free velocity bases defined on (but not limited to) rectangles are presented, which produce pointwise divergence-free flow fields (∇ · uh ≡ 0). The discrete velocity satisfies a flow equation which does not involve pressure. The pressure can be recovered as a function of the velocity if needed. The method is formulated in primitive variables and applied to the stationary lid-driven cavity and backward-facing step test problems. c 2009 John Wiley & Sons, Ltd. Copyright  key words: divergence-free finite element; Hermite finite element; Navier-Stokes; incompressible flow; lid-driven cavity; backward-facing step; domain truncation

1. INTRODUCTION The Navier-Stokes equation for the computation of viscous, isothermal, incompressible fluid flow is given in dimensionless form by, ∂ 2 u = −u · ∇u + R−1 e ∇ u − ∇p + f , ∂t

∇ · u = 0,

(1)

with associated boundary conditions in the domain Ω ∈ R2 . Possibly three factors complicate computation of solutions: (1) the coupling of the pressure to the velocity and the lack of a physical equation to advance the pressure in time, (2) the presence of the continuity condition (∇·u = 0) when treated as a constraint, and (3) the unavoidable nonlinearity of the convection term. The first two can easily be eliminated. Recognizing that a vector field can be orthogonally decomposed into a solenoidal part and the (irrotational) gradient of a potential [1][2][3][4][5][6], the pressure is eliminated by the projection, ∂ 2 S (2) u = π S (−u · ∇u + R−1 e ∇ u) + f , ∂t

∗ Correspondence

to: 1056 Lovell Road, Knoxville, Tennessee, 37932 USA

c 2009 John Wiley & Sons, Ltd. Copyright 

Received 30 01 2008 Revised 13 07 2009 Accepted 16 07 2009

2

J. T. HOLDEMAN

where the solenoidal projection operator π S is related to the inverse Laplacian ([5] p735-6), f S is the non-conservative part of any body force, and we make the continuity constraint implicit. By the absence of the pressure, this equation should be understood as a kinematic equation with the incompressibility condition serving as a conservation law. A pressureless governing equation for an incompressible fluid is more fundamental than the incompressible Navier Stokes equation in the sense that it does not involve the extraneous, unnecessary pressure† . If the velocity vectors belong to a divergence-free space and we use divergence-free test functions from the same function space, the Galerkin weak form of (2) is given by [2][3][5], 2 S (v, ∂t u) = −(v, u · ∇u) + R−1 ∀ v|∇·v=0 , v|∂Ω∗ = 0, (3) e (v, ∇ u) + (v, f ), where ( · , · ) indicates the inner product over the problem domain Ω. The weight or trial function v is divergence-free and vanishes on ∂Ω∗ , the no-flow portion of ∂Ω, and we have taken some liberties with the function spaces involved. Here, the orthogonality of the solenoidal and irrotational functions produces the necessary projections. Gresho and Sani ([5] p. 431) remark that this form (3) has not been popular and seldom used because “the construction (of bases) is cumbersome . . . and the choice of elements is limited . . . ”. Among many attempts to formulate divergence-free bases, none seems to have been successful enough to be widely adopted. While it appears to have been ignored for over 30 years, a method by R. Temam, denoted in his book [3] by APX4, deserves special attention. Temam gave the basis for APX4 as a fifth-degree Hermite finite element for the stream function defined on triangles. He gives proofs for existence, uniqueness, and stability of the metod. The generalization and application of this method by the author is the subject of this paper. This paper reveals a rich set of strongly (pointwise) solenoidal finite element bases for use with the method described here on rectangles in two dimensional Cartesian and other orthogonal coordinate systems, and on quadrilaterals and triangles. All are Hermite bases. The simple computation of divergence-free flow using the Galerkin finite element method with the solenoidal basis functions shown here compels re-examination of concepts developed in the context of an impressive array of discrete projection methods. In particular, the role of the pressure boundary conditions, here decoupled from the velocity computation, is replaced in many problems by boundary conditions on the stream function, or equivalently the flow ∆ψ. For fully-developed flows, the flow and pressure gradient are known to be related by a geometry-dependent Poiseulle constant cP , n · ∇P = cP ∆ψ ([7], p309). 2. THE DIVERGENCE-FREE FINITE ELEMENT METHOD 2.1. Velocity discretization We now discretize these equations by partitioning the problem domain Ω into non-overlapping subdomains, which may be rectangles. The discrete Galerkin equations follow from (3), h h h S (vh , ∂t uh ) = −(vh , uh · ∇uh ) − R−1 e (∇v : ∇u ) + (v , f ),

∀ vh ∈ span {Si }, vh |∂Ω∗ = 0. (4)

Note that there is no surface integral in the velocity equation. In the Appendix, we show a family of four, 4-node, divergence-free bases Si defined on rectangles, but extendable to general

† Occam’s

razor: When presented with two explanations of the same observations, choose the simpler one.

c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

3

A HERMITE FINITE ELEMENT METHOD

quadrilaterals. These Hermite elements will be written as matrix-valued functions with three, four, or six columns of divergence-free vectors corresponding to stream function, velocity, and stream function second derivatives. The velocity on a typical element e is given by,  ue (x) = Si (x) Uie , (5) i∈e

where the degrees-of-freedom Ui at node i are given by,   ψi (a) Ui = ui , vi





ψi  ui  , (b) Ui =  vi  ψi,xy



 ψi  ui   v  i  or (c) Ui =  ψi,xx , ψ  i,xy ψi,yy

(6)

depending on the choice of element. Unless specified otherwise, the comma in the subscript indicates differentiation with respect to the following variables. The algebraic problem for the velocity corresponding to (4) and (5) is, ˙ = −C(U) U + R−1 MU e D U + F,

(7)

where the coefficient matrices are the assembly of the element matrices,



e Mije = Ωe STi Sj dΩe , Dij = − Ωe (∇k Si )T (∇k Sj ) dΩe ,



e (U) = Ωe STi (Sk Uke ) · ∇ Sj dΩe , Fie = Ωe STi f dΩe , Cij

(8)

and where repeated indices are to be summed over the nodes of the element or the components of the gradient, and the superscript T indicates the matrix transpose. 2.2. Pressure discretization Derivation of the equation for pressure recovery proceeds in a manner analogous to that for the velocity. Applying the irrotational projection operator π I ([5] p735-6) to (1), we get an equation for the pressure gradient in terms of the velocity [6], 2 I ∇p = π I (−u · ∇u + R−1 e ∇ u) + f ,

(9)

Where f I is any conservative body force. Using irrotational test functions from w, the gradient of the pressure space, we get the weak form of the pressure-gradient equation, 2 I (∇q, ∇p) = −(∇q, u · ∇u) + R−1 e (∇q, ∇ u) + (∇q, f ),

∀ ∇q ∈ w.

(10)

The similarity to the pressure Poisson equation is evident. The discrete form follows immediately, h 2 h h I (wh , ∇ph ) = −(wh, uh · ∇uh) + R−1 e (w , ∇ u ) + (w , f ),

wh = ∇qh , ∀ qh ∈ span {qi }.

(11)

For the pressure basis we can choose any continuous Lagrange or Hermite basis qi we wish (though preferably with a nodal structure similar to the velocity basis). There is no restriction on the order of the pressure basis relative to the velocity basis. There is no LBB condition to c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

4

J. T. HOLDEMAN

be satisfied as ∇ · u = 0 is simply a reminder, not a constraint. As the pressure is computed only when desired, this can result in a computational savings when advancing a non-steady flow in time or solving the nonlinear equations. If we expand the pressure p on a typical element e in terms of a simple cubic pressure basis {gi },   pi   gi (x) Pie , ∇pe (x) = Gi (x) Pie , Pie = pi,x , pe (x) = (12) pi,y i∈e i∈e where Gi ≡ ∇gi , the algebraic problem for the recovery of the pressure is similar to (7), ¯ P = −C(U) ¯ ¯ ¯ K U + R−1 e D U + F, where the coefficient matrices are the assembly of the

¯ e = e GT Gj dΩe , K ij i Ω

e (U) = Ωe GTi (Sk Uke ) · ∇ Sj dΩe , C¯ij

element matrices,

¯ e = e GT ∇2 Sj dΩe , D ij i Ω

F¯ie = Ωe GTi f dΩe .

(13)

(14)

A feature of this choice is that the pressure gradient is related to pressure force, and so is a ¯ is singular, but possible physical observable (problem data). The pressure-gradient matrix K this problem is resolved by using a pressure boundary condition such as fixing the pressure at a single point.

3. COMPUTATIONAL CONSIDERATIONS Now consider the issue of the nonlinearity of the governing equation. There are a number of methods for solving this, but we prefer to use simple iteration here, solving a series of linear problems. We rewrite the algebraic equation (7) in stationary nondimensional form, iteratively solving, Re−1 D U(n+1) − C(U(n)) U(n+1) + F = 0 , (15) for U(n+1) given U(n) , where we might use the Stokes solution for U(0). This iterative method is known to be globally convergent when U is unique [8]. For larger Reynolds number, where convergence of the simple iteration may be slow or non-convergent, one can introduce an under -relaxation factor 0 < γ ≤ 1, and iterate with linear interpolation, ¯ (n) = γ U(n) + (1 − γ ) U ¯ (n−1) , U ¯ (n) ) U(n+1) + F = 0 . Re−1 D U(n+1) − C(U

(16)

On the other hand, when (15) is convergent, we may be able to extrapolate and accelerate convergence with over -relaxation 1 < γ. To study convergence, we introduce the discrete L2 norms of the iterate differences,

1/2 (n) (n−1) 2 Eψn =  Ψ(n) − Ψ(n−1)  ≡ − ψi ) wi , i (ψi (17)

1/2 (n) (n−1) (n) (n−1) 2 Eun = U(n) − U(n−1) ≡ − ui )2 + (vi − vi ) ) wi , i ((ui where the sums are over the nodes i of the discrete domain. The wi are area-based weights at node i. For small Reynolds number, these norms asymptotically decrease monotonically c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

A HERMITE FINITE ELEMENT METHOD

5

when convergent. As the Reynolds number approaches the limit of convergence (for γ = 1), these norms begin to oscillate, while the means decrease exponentially, though more slowly. The oscillations can be reduced or eliminated by a suitable choice of γ , and exponential convergence accelerated and extended to higher Reynolds number to compute a quasi-stationary flow. In the next section we will investigate convergence and relaxed convergence of the elements as a function of γ in one example, and the potential effect of tangential discontinuities and the possible importance of total inter-element continuity for viscous incompressible flow in both examples.

4. SOME EXAMPLES r The divergence-free methods described in this paper were programmed in the MATLAB system for the examples to be shown. The equations were solved using the GMRES sparse iterative solver with incomplete LU preconditioning, and use under-relaxation for the higher Re examples. We will be using four four-node elements which we designate as SC (simple-cubic), BC (bicubic), Q4 (quartic) and Q5 (quintic). 4.1. The lid-driven cavity We consider the lid-driven cavity (LDC) problem, the laminar two-dimensional isothermal flow of an incompressible fluid with dynamic viscosity ν confined to a square cavity of length and width L, whose top moves at a uniform velocity uL in its own plane. This model problem has been frequently used for testing and comparing solution methods and codes. The geometry is simple, but the moving lid generates discontinuities in the velocity and singularities in the vorticities at two corners. The velocity satisfies no-flow, no-slip boundary conditions on all surfaces, so the normal component of the velocity vanishes on all bounding surfaces. The tangential velocity component vanishes on the sides and bottom, and u = uL on the top except at the corners. We take the stream function ψ to be zero on all bounding surfaces, and we take the Reynolds number to be, (18) Re ≡ L¯ uL /ν, where u¯L = uL is the mean lid velocity. The force driving the flow is proportional to the mean velocity, and by this definition, the Reynolds number is proportional to and a measure of the driving force. This distinction will be important in the case of discrete approximations. In numerical practice, the lid velocity is not discontinuous, but usually increases rapidly over a short interval at the corners. Without further consideration, this results in an effective Reynolds number of Re (1 − h/L), which difference may be significant on coarse grids, or in benchmark computations and comparisons. One need not be strictly bound by a requirement that the discrete conditions interpolate the continuum boundary condition at every node. In fact, for benchmark computations we adjust the velocity at the second and next-to-last nodes from the upper corners to make the average velocity equal to the continuous lid velocity over the first two intervals. As the velocity is discontinuous and the vorticity is singular at any non-zero Reynolds number, we find that the quasi-singularities at the top corners, particularly the entrance corner, generate increasing convergence difficulty at higher Reynolds number. For moderate Reynolds number, published results are available from a number of sources, e.g. [9][10][11], using a variety of solution methods, and there is general agreement up to about c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

6

J. T. HOLDEMAN

Re = 5000. As the Reynolds number increases, a Hopf bifurcation occurs in the solution and the flow becomes unsteady. There is a lack of general agreement as to where the first bifurcation occurs. It has been placed at below 7500, near 8000, and even at 10000 and above [11]. Using the pressureless governing equation for the velocity on a relatively coarse graded mesh, we find convergent behavior up to Re = 3200 for SC (25), and Re ∼5800 for BC (28), Q4 (30), and Q5 (32), without any upwinding or artificial damping, using the simple iteration (15). Above Re = 5000 and through Re=12500, we use (16) and find quasi-steady solutions which are in agreement with published results in this flow regime (see Figures 9 – 11). In addition to the usual no-slip, no-flow velocity boundary conditions with ψ = 0, for the bicubic, quartic and quintic elements we add the condition ψ,xy = u,x = −v,y = 0. For the quartic and quintic, we impose ψ,yy = u,y = 0 on the vertical walls (with −ψ,xx = v,x = ω , free), and −ψ,xx = v,x = 0 on the top and bottom except for the two top corner nodes (with ψ,yy = u,y = ω , free). The vorticity ω is allowed to be non-vanishing on the boundary, including the top corner nodes, and some slippage is allowed on the top boundaries of the two corner elements. 4.1.1. Convergence comparison at Re = 3200. In this section we study the convergence rates of the nonlinear algebraic problems, induced by application of the method of this paper and the four elements, as a measure of element robustness using simple iteration. While the Newton method may at times converge faster, it was not robust enough for this study. After preliminary results showed that convergence rates were independent of mesh size, we chose the 27 × 27 node graded mesh shown in Figure 1 for the comparisons. This mesh was generated by first dividing the domain width [0, L] into N − 3 equally spaced intervals. The two end intervals were each divided into two (by the mean extreme-ratio), and the resulting N − 1 intervals with nodes xk mapped into the graded intervals using the mapping,  x − x α L  k c (α) (19) xk = xc + sign(xk − xc )   , k = 1, ...N, 2 L/2 where xc = (xN+1 − x1 )/2 is the midpoint, and the grading parameter α = 0.75 . 1

1

0.8

e

d c

0.8

b 0.6

0.6

0.4

0.4

0.2

0.2

a b c

0

0

0.2

0.4

0.6

0.8

Figure 1. 27x27 graded mesh c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

1

0

d e 0

0.2

0.4

0.6

0.8

1

Figure 2. Stream lines, Re=3200 Int. J. Numer. Meth. Fluids 2009; 00:1–33

7

A HERMITE FINITE ELEMENT METHOD

Since we will be working here with a single mesh, we use the usual convention that the nodes on the upper boundary interpolate a constant lid velocity (except at the corners). We will adopt a different boundary treatment when we study the accuracy in a later section. For the computations, we use dimensionless variables by taking L = 1, uL = 1, and Re = ν −1. The convergence rates for the four elements are essentially the same for low Reynolds number (Re ≤ 100) and at Re = 100 that we find all Eψ∞ , Eu∞ ∼ exp(−1.5n). However, they are quite different for higher Reynolds numbers near their respective convergence limits. In particular, we will study the stationary solution for Re = 3200, which is near the unrelaxed convergence limit of the simple-cubic based element SC. Near that limit, the SC iterate differences decrease slowly, oscillating about the asymptotic exponential mean Eψ∞ ∼ exp(−β1 n). Figure 2 shows the stream lines from the BC element for Re = 3200. The stream function contour levels are shown in Table I. Table I. Values and labels used for stream function contours.

a −0.1175 d −0.0500

b −0.1100 e −0.0100

−0.1150 −0.0300

−1.0 × 10−10 h 1.0 × 10−4

1.0 × 10−8 2.5 × 10−4

1.0 × 10−7 i 5.0 × 10−4

−0.1000 f −1.0 × 10−4 1.0 × 10−6 1.0 × 10−3

c −0.0900 −1.0 × 10−5 g 1.0 × 10−5 j 1.5 × 10−3

−0.0700 −1.0 × 10−7 5.0 × 10−5 3.0 × 10−3

The derived pressure and vorticity are shown in Figures 3 and 4. Corresponding pressure and vorticity contour levels are given in Table II. 1

c

c

d

0.9 d

0.8

0.8 0.7

a

0.6

0.6 0.5

0.4

0.4

b

0.3 0.2

0.2

c

0.1

d 0

0

0.2

0.4

0.6

0.8

1

Figure 3. Pressure (27 × 27), Re=3200

0

0

0.2

0.4

0.6

0.8

1

Figure 4. Vorticity (27 × 27), Re=3200

The convergence behavior is shown in Figure 5 for the stream function norm Eψn and in Figure 6 for the velocity norm Eun . The norms of the iterate differences have been plotted for c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

8

J. T. HOLDEMAN

Table II. Driven cavity contour levels.

Pressure levels -.002

a 0

b .02

c .07

.05

d .11

.12

−4.0

−5.0

.09

e .17

.30

Vorticity levels 0

∓0.5

∓1.0

∓2.0

∓3.0

the four elements and asymptotic portions fit with straight lines on a semi-logarithmic plot. The convergence error curves for the velocity semi norms are essentially parallel to the stream function error curves, are smoother, and displaced upward. This displacement reflects a smaller accuracy for the velocity field. This displacement of the velocity convergence error semi-norms is consistent with the loss or one or two digits of significance respectively experienced in the solution. The parameters β1 of the asymptotic lines are given in the first line in Table III and are insensitive to mesh refinement. The plots in Figures 5 and 6 show a clear separation between the tangentially discontinuous SC element and the continuous velocity element BC for this case. Since these elements are of similar accuracy, it seems reasonable to attribute the rate difference to the continuity properties. One would conclude that at low Reynolds number, all four are competitive convergence-wise, but near the convergence limit of the SC element, the fully continuous and higher order elements would seem to have a convergence advantage. Stream function iteration, Re=3200

Nonlinear correction

s.cubic bicubic quartic quintic fit

−5

10

−10

10

Velocity iteration, Re=3200

0

10 Nonlinear correction

0

10

−5

10

s.cubic bicubic quartic quintic fit

−10

0

10 20 30 40 50 Nonlinear iteration number Figure 5. Eψn convergence

10

0

10 20 30 40 50 Nonlinear iteration number Figure 6. Eun convergence

4.1.2. Extending convergence with under-relaxation The convergence rate can be improved and convergence extended to higher Reynolds numbers with under-relaxation using (16). In Table III we compare the optimal under-relaxation factors γo and the optimal convergence rates c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

9

A HERMITE FINITE ELEMENT METHOD

Table III. Mean and optimal-relaxed asymptotic convergence parameters at Re = 3200

cubic SC

bicubic BC

quartic Q4

quintic Q5

β1

.086

.188

.206

.245

βo

.376

.390

.402

.403

γo

.830

.860

.880

.900

γc

1.05

1.14

1.14

1.17

βo at Re = 3200 for the four elements. The optimum convergence iteration results are shown in Figures 7 and 8 and are to be compared with Figures 5 and 6. The optimal convergence rates for the four elements are very similar for this problem. The exponential convergence rate for the SC element has been increased by a factor of over four by optimal under-relaxation. We view the relative values of γ0 and γc for each element as measures for comparison of the stability of the elements at a fixed Reynolds number. Relaxed stream fn iteration, Re=3200

Nonlinear correction

s.cubic bicubic quartic quintic fit

−5

10

−10

10

0

10 20 30 40 50 Nonlinear iteration number

Figure 7. OptimalEψn convergence

Relaxed velocity iteration, Re=3200

0

10 Nonlinear correction

0

10

s.cubic bicubic quartic quintic fit

−5

10

−10

10

0

10 20 30 40 50 Nonlinear iteration number

Figure 8. OptimalEun convergence

We now show the extension to higher Reynolds number. At the highest Reynolds number considered, Re = 12500, it is likely that the flow is nonstationary. In such cases, the flow computed is to be regarded as quasi-stationary, an average of the nonstationary flow. The results given in the Figures 9-11 were computed using the bicubic-derived continuous velocity element BC on the 27 × 27 mesh above. The contour levels used are those given in Table I. These are the same as used in [9] and by other authors. Here the contours are unlabeled, and used simply to illustrate the flow. The relaxed convergence behavior as a function of Reynolds number is measured by the two values of γ, the critical value γc above which the iteration is not convergent, and the optimal value γo at which the coefficient βo in the asymptotic exponential previously introduced is largest and convergence is most rapid (see Figure 12). The critical value is found by c 2009 John Wiley & Sons, Ltd. Copyright  Prepared using fldauth.cls

Int. J. Numer. Meth. Fluids 2009; 00:1–33

10

J. T. HOLDEMAN

1

1

1

0.8

0.8

0.8

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

0

0

0.2

0.4

0.6

0.8

1

0

Figure 9. Re = 7500

0

0.2

0.4

0.6

0.8

Figure 10. Re = 10000

1

0

0

0.2

0.4

0.6

0.8

1

Figure 11. Re = 12500

extrapolation, as shown by the dashed line in Figure 12. Away from the optimum value, it is found that the exponential coefficient increases approximately linearly from zero at γc toward a maximum at γo as γ decreases, then decreases approximately linearly toward zero near γ = 0. BC convergence with relaxation

Bicubic element BC

27x27 39x39 51x51

0.3

0.2

0.1 Re=3200 0

0.6

0.8 1 Relaxation parameter γ

Figure 12.

1.2

2 Relaxation parameter γ

Convergence parameter β

0.4

γ (critical) c γo (optimal)

1.8 1.6 1.4 1.2 1 0.8 0.6

0

5000 10000 Reynolds number Re

15000

Figure 13.

In Figure 12 we have plotted the (asymptotic) convergence exponent β over a range of relaxation parameter values for the BC element with Re=3200 on a 27 × 27 mesh and a few values for two larger mesh sizes. In Table IV we give the essential parameters of the BC element for the cases considered, and these are shown graphically in Figure 13. We see from this Figure that using simple iteration, the BC velocity element is in principle convergent below Re ≈ 5800, where the critical γc is greater than 1. At small enough Reynolds number, ie. Re