19th AIAA Computational Fluid Dynamics - 5 June 009, San Antonio, Texas AIAA 009-3797 19th AIAA Computational Fluid Dynamics Conference, - 5 June 009, San Antonio, Texas Direct Numerical Simulations of a Two-dimensional Viscous Flow in a Shocktube using a Kinetic Energy Preserving Scheme Yves Allaneau and Antony Jameson Stanford University, Stanford, California, 94305, USA This paper presents the results of flow computations done using Jameson s finite volume kinetic energy preserving scheme. Direct numerical simulations were performed in a twodimensional viscous shocktube. This testcase proves that the method is stable, extremely low dissipative and computationally fast. Finally unexpected patterns observed in the flow are described. Re Reynolds Number P r Prandtl Number x Spatial Coordinate t Time variable v i i th component of flow velocity ρ Density p Pressure E Total Energy H Specific Total Enthalpy k Specific Kinetic Energy µ Dynamic Viscosity λ Volume Viscosity κ Coefficient of heat conduction Specific Heat C p Nomenclature Ω Ω Fixed spatial domain Boundary of the domain Ω Superscript i, j Coordinate directions Subscript o, p Grid Locations I. Introduction The massive use of Direct Numerical Simulation in today s flow computations is confronted by many obstacles. The complexity of the fluid dynamics equations and their discretized counterparts make the process extremely expensive in terms of computational costs. Additionally, some problems are still encountered when trying to describe complex geometries as automatic mesh generation remains an open question. Graduate Student, Department of Aeronautics and Astronautics, Stanford University, AIAA Member. Professor, Department of Aeronautics and Astronautics, Stanford University, AIAA Member. 1 of 11 Copyright 009 by the American Institute of Aeronautics and American Astronautics, Institute Inc. All of rights Aeronautics reserved. and Astronautics
Furthermore, even if one manages to set up and run such a computation, results can be disappointing and unrepresentative of a real phenomenon. One example is when excessive dissipation is introduced by the numerical scheme. Very often, dissipation is added in the computation to help capture shockwaves or enhance stability. If the addition of artificial viscosity is not completely controlled and strictly limited to where it is needed, dampening could occur over the entire computational domain. In that case, some features of the flow, such as eddies in turbulent flow, can be completely erased by the simulation. Jameson recently developed a scheme that overcomes some of these problems. His finite volume Kinetic Energy Preserving scheme respects the global balance of kinetic energy over the computational domain, along with the balance of mass, momentum and total energy. The respect of the kinetic energy law for smooth flow provides enough stability to perform viscous computations of more complex flows, even involving the computation of shockwaves. As this method does not add any artificial viscosity, we can expect to observe fine features in the flow that would not necessarily be observed with the use of other schemes. The purpose of this paper is to prove that the Kinetic Energy Preserving scheme can be efficiently implemented and provides good quality results on direct numerical simulations of viscous flows. Section of this paper briefly describes the Kinetic Energy Preserving scheme developed by Jameson and the formalism used to solve the equations. Section 3 presents a computation of the flow in a shocktube using the Kinetic Energy Preserving scheme and the Roe scheme. A comparison is made based on the results obtained. In Section 4, we study the flow more carefully in the pseudosteady area. We define pseudosteady area as the zone between the expansion and the shockwave containing the contact discontinuity. In the inviscid approximation, the flow is uniform and steady in this area. When viscosity is present, some interesting patterns can be observed. II. Kinetic Energy Preserving scheme for viscous flow In a recent paper, Jameson 1, presented a new semi-discrete finite volume scheme to solve the Navier- Stokes equations. This scheme has the property to satisfy the global conservation law for kinetic energy. We shall briefly describe this scheme in the present section. A. Continuous Model First, consider the three-dimensional Navier-Stokes equations in their conservative form: where ρ ρv 1 u = ρv ρv 3 ρe u t + x i f i u) = 0 1) and f i = ρv i ρv i v 1 + pδ i1 σ i1 ρv i v + pδ i σ i ρv i v 3 + pδ i3 σ i3 ρv i H v j σ ij q j The viscous stress tensor σ ij is given for a Newtonian fluid by σ ij ij vk v = λδ + µ i x k x + vj j x ). Often i in aerodynamics, λ is taken to be equal to 3 µ. The heat flux is proportional to the temperature gradient Fourier s Law) q j = κ T x. j An equation for the kinetic energy k = 1 ρvi momentum equations. Indeed, It follows by substituting t ρv i ) and ρ t k t = ) 1 t ρvi = v i t ) can be derived by combining the continuity and the ρv i ) vi ρ t by their corresponding fluxes that: of 11
k t + ) ] [v j x j p + ρ vi v i σ ij = p vj vi σij xj x j 3) We assume that we are interested in a domain Ω fixed in space. Ω denotes the boundary of Ω. By integrating 3) over the domain Ω, we get a global conservation law for kinetic energy. t Ω kdv = Ω [v j p + ρ vi ) v i σ ij ] n j ds + Ω ) p vj vi σij xj x j dv 4) Definition 1 A numerical scheme to solve the viscous Navier-Stokes equations is said to be Kinetic Energy Preserving if it satisfies a discrete analog of 4). Here we have assumed that the domain contains no discontinuity. If a shockwave is present in Ω, the relation 4) does not hold anymore. B. Semi-discrete approach Now, we consider a finite volume discretization of the governing equations in the domain Ω. The generic cell is a polyhedral control volume o. Each cell has one or more neighbors. The face separating cell o and cell p has an area A op, and we define n i op to be the unit normal to this face, directed from o to p. Evidently n i op = n i po. We also define S i op = A op n i op. S i op can be interpreted as the projected face area in the coordinate direction i. Boundary control volumes are closed by an outer face of directed area S i o = p Si op a control volume is delimited by a closed surface). In this framework, the semi-discrete finite volume approximation of the governing equations takes the form: u o vol o t + fop i n i opa op = 0 5) or vol o u o t + p neighbor p neighbor f i op S i op = 0 6) For a boundary control volume b, another contribution to the fluxes f i b S b comes from the outer face. Now we assume that u o and f i op take the form: ρ o ρ o v 1 o u o = ρ o vo ρ o vo 3 ρ o E o and fop i = ρv i ) o ρv i v 1 ) op + pδ i1 σ i1 ) op ρv i v ) op + pδ i σ i ) op ρv i v 3 ) op + pδ i3 σ i3 ) op ρv i H) op v j σ ij + q j ) op 7) Jameson has exhibited a set of sufficient conditions on the elements of f i op that lead to a Kinetic Energy Preserving KEP) scheme. Proposition 1 If the elements of f i op defined in 7) satisfy the following conditions: 3 of 11
a - ρv i v j ) op = 1 ρvi ) op v j p + v j o) b - pδ ij σ ij ) op = 1 pδij σ ij ) o + 1 pδij σ ij ) p and if the fluxes at the boundaries are evaluated such that: c - fb i = f i u b ) where b is a boundary control volume then the semi discrete finite volume scheme 6) satifies the discrete global variation law for kinetic energy. Indeed in that case, the discrete kinetic energy k o satisfies the following relation: d dt vol o k o = o b + o S j b p o p v j b vb i p b + ρ b ) v i bσ ij b vo i + vp i Sop i σo ij p ) vo i + vp i Sop i ) 8) which is indeed a discretization of 4). Condition a of the previous proposition is not very restrictive and allows some degrees of freedom in the construction of the fluxes defined in 7). Let s denote by g op the arithmetic average of the quantity g between cell o and cell p : g op = g o + g p )/. We can rewrite condition a ρv i v j) op = ρv i) op vj op 9) We can evaluate the average ρv i) op by any means ρv i) op = ρ opv i op or ρv i op for example) and then deduce ρv i v j) by using 9) to satisfy condition a. op This degree of freedom could be used to design schemes that also satisfy other properties than Kinetic Energy Preservation. III. Direct Numerical Simulation of a two-dimensional flow in a shocktube The scheme developed by Jameson has been applied on two-dimensional computations. We showed experimentally that the conditions stated in section II, which are sufficient to conserve numerical global kinetic energy in the case of a smooth flow are actually providing enough stability to perform computations in a flow containing discontinuities such as shockwaves. This improved stability removes the need of adding artificial viscosity to capture shockwaves, the main drawback of artificial viscosity being that it tends to add dissipation everywhere on the computational domain. The chosen test case is a two-dimensional viscous Sod shocktube 3, 4. It allows us to study the behavior of the scheme in boundary layers, shockwaves and expansions. Although the scheme is designed for general unstructured mesh, we implemented it on rectilinear and curvilinear grids, as the shape of the shocktube is quite simple. The shocktube is characterized by its left and right initial states, both at rest at the beginning of the simulation. The left state is characterized by its pressure p l, its density ρ l and its temperature T l. The right state is also characterized by its pressure p r, its density ρ r and its temperature T r. Pressure, density and temperature can be related by the perfect gas law. The length of the shocktube is L, the height is h. The aspect ratio of the shocktube is defined by α = h/l. We assume that the walls of the shocktube are rigid and adiabatic. Viscosity is evaluated using Sutherland s formula µt ) = C T 3/ T + S For air, at reasonable temperatures, C = 1.456 10 6 kg/ ms K) and S = 11K. 4 of 11
We define the velocity V l = p l /ρ l proportional to the speed of sound in the left region and the Reynolds number Re = ρ llv l µ l 10) where µ l = µt l ). The Prandtl number is given by it was taken to be equal to 5. P r = µc p κ 11) Numerical computations were done for the Kinetic Energy Preserving scheme using this averaging formula for the convective terms: ρv i ) op = ρ opv i op ρv i v j) op = ρ opv i opv j op ρv i H ) 1) op = ρ opv i oph op Note that condition a of proposition 1) does not require a specific form for ρv i H ). We just chose it to op be consistent with the continuity and momentum fluxes. Viscous stress was evaluated in each cell by introducing a complementary mesh, for which cell vertices are the centers of the original control volumes. Time integration was performed using the Total Variation Diminishing Runge Kutta 3 like scheme proposed by Shu 5. For a semi discrete scheme in the form this 3-stages scheme advances from time n to time n + 1 by u + Ru) = 0 13) t u 1 = u n tru n ) u = 3 4 un + 1 4 u1 1 4 tru1 ) u n+1 = 1 3 un + 3 u 3 tru ) This time discretization does not guarantee the preservation of kinetic energy in time. One could use a Crank-Nicholson semi implicit scheme as suggested by Jameson 1 to ensure conservation in time, but the computational costs would increase in important proportions. Eventually, results were checked using a classic Roe scheme 6, advanced explicitly in time by a Runge Kutta scheme. A. Simple shocktube and comparison with Roe Scheme First, we ran the simulation for the case ρ r = 5 ρ l 14) p r = p l 15) v l = v r = 0 16) T l = T r = 300 K 17) The Reynolds number was Re = 5000 and the aspect ratio α =. This odd shaped shocktube guarantees that the boundary layers will not affect the flow at the centerline too much. The grid size was 4096 cells in the x-direction and 56 cells in the y-direction only half of the domain is computed using this 5 of 11
mesh, the second half is obtained by symmetry). The grid is uniform in the x-direction but stretched in the y-direction such that y min /L = α/4000. Figure 1 shows at time t = 136L/V l the variations of nondimensional pressure, density, velocity and energy at the centerline. Figure presents a comparison of the pressure profile along the centerline for the Roe scheme and the KEP scheme. We can notice that the KEP scheme provides sharper results than the Roe scheme which prooves that it introduces less dissipation. Results are especially convincing at the shockwave. 1 Pressure 1 Density 0 1 a) Pressure 0 1 b) Density 1 x-velocity 3 Energy.8.6.4. 1.8 0 0 1 c) x-velocity 1.6 0 1 d) Energy Figure 1. Variation of state variables along the centerline. Re = 5000, α = Figure 3 is a global picture of the x-velocity in the shocktube. The shape of the boundary layer and the curved aspect of the shockwave near the walls are in agreement with the usual results observed in a viscous shocktube 8, 9. Lighter colors coincide with faster flow. B. Study of nonclassical effects in the pseudosteady flow area In the previous part, α was chosen to be equal to for a Reynolds number of 5000 in order to observe phenomena similar to the inviscid case on the centerline. Actually, if we had plot the pressure on a line closer to the wall, the picture would have been quite different. The quasi complete absence of dissipation introduced by the KEP scheme allowed us to capture some unexpected features of the flow in the pseudosteady region, where the contact discontinuity is see Figure 4). Figure 5 is a sketch of the pattern observed in the flow for the case described above. A +) indicates a pressure wave or pressure point, where the pressure is larger than in the inviscid case. A -) indicates a depression, where the pressure is lower than in the inviscid computation. 6 of 11
1 Pressure KEP Pressure Roe Pressure KEP Pressure Roe 8 5 6 4 5 8 6 4 6 8 6 65 7 75 8 85 9 a) At the start of the expansion b) Through the shockwave Figure. Comparison of pressures on the centerline for the KEP scheme and the Roe scheme at two locations. y/l 0 0 Figure 3. Distribution of nondimensional x -velocity in the shocktube The first obvious pattern that can be observed is the pressure waves developing at the base of the expansion, near the walls. These waves are starting in the boundary layer and are curved towards the direction of the flow. Figure 6 shows the shape of pressure waves in the pseudosteady area for 3 different values of α. When α is varied, the shape of the waves remains the same. As a consequence, when α is reduced too much, the waves end up by crossing each other case α = ). If α is further reduced case α = on the figure), waves will reflect on the walls. On the other side of the pseudosteady area, near the shockwave this time, we can observe depression waves. These are visible on figures 4 and 6 again. They seem to start in the boundary layer near the shockwave and extend upstream in the pseudosteady area. These wave are much more smooth than the one previously described. Their s shape is particularly obvious in the case α =, but the way these waves interfere for smaller values of α is not very clear. Eventually, a third pressure pattern can be observed in the flow, this time not visible on the previous figures. Just after the shockwave after the shockwave is in the pseudosteady region), in the boundary layer, a high pressure point can be observed, as shown on figure 7. Figure 7 represents the variation of pressure along the wall for the case α =, Re = 5000. Interesting fact is that this high pressure point is located at the root of the depression wave described above. The small bump observed in figure 7-a for coincides with the reflection of the pressure waves decribed earlier. Note on 7-b the overshoot in pressure located near the shockwave. Once again, it seems that the KEP scheme is less dissipative than the Roe scheme. The interpretation of these various patterns have not yet been established and more simulations are 7 of 11
5 5 5 5 0.05 0 5 0.05 5 5 0.05 1 a) x-velocity 1 b) y-velocity 5 4 5 3 5 5 1 5 0.05 9 1 c) Pressure Figure 4. Distributions of nondimensional velocities and pressure in the pseudosteady area contact discontinuity area) in the case Re = 5000, α =, t = 136L/V l expansion shockwave + + centerline + + Figure 5. Pressure pattern observed in the pseudosteady area of the flow. A +) is a surpressure compared to the inviscid case while a ) corresponds to a depression. Re = 5000, α =. required to understand how they develop in time. 8 of 11
a) α =, y min /L = α/000 b) α =, y min /L = α/400 c) α =, y min /L = α/4000 Figure 6. Pressure Waves pattern in the pseudosteady flow area for α =, α =, α = 06. Re = 5000. 9 of 11
1 Wall Pressure KEP 5 Wall pressure KEP Wall pressure Roe 5 5 0 1 a) Wall pressure KEP 3 4 5 6 7 8 9 b) Shockwave wall pressure Figure 7. Pressure distribution along the walls of the shocktube. α =, Re = 5000 IV. Conclusion This paper proves that the Kinetic Energy Scheme can be applied efficiently on more complex geometries. It as been seen that it allows a correct description of shockwaves, expansion fans and boundary layers. Experimentally, it has been confirmed that the number of grid points required to ensure numerical stability is proportional to the local cell Reynolds number Re o = ρv 3 vol o µ. For a global Reynolds number of 5000, stability was ensured using grids as large as 4096 mesh cell in the x-direction by 56 mesh cells in the y-direction. This might seem to be a lot, but the KEP fluxes are extremly simple and cheap to evaluate on each cell face. Furthermore, the use of an explicit code makes it easily parallelizable with a large scalability, by simple domain decomposition. For example, when computing the flow in the shocktube for a global Reynolds number of 5000 and α =, using a 4096 51 cells mesh and y min /L = α/000, the computation took only 9 hours on a small 16 CPUs cluster. Acknowledgments Yves Allaneau is supported by a Stanford Graduate Fellowship. This work is also supported by the AFOSR grant #FA 9550-07-1-0195 from the Computational Math Program under the direction of Dr. Fariba Fahroo. References 1 A. Jameson, The Construction of Discretely Conservative Finite Volume Schemes that Also Globally Converve Energy or Entropy, Journal of Scientific Computing, Vol. 34-, p. 15-187, 008 A. Jameson, Formulation of Kinetic Energy Preserving Conservative Schemes for Gas Dynamics and Direct Numerical Simulation of One-Dimensional Viscous Compressible Flow in a Shock Tube Using Entropy and Kinetic Energy Preserving Schemes, Journal of Scientific Computing, Vol. 34-, p. 188-08, 008 3 G. A. Sod, Survey of Several Finite Difference Methods for Systems of Nonlinear Hyperbolique Conservation Laws, Journal of Computational Physics, Vol. 6, p. 1-31, 1978 4 P. Jorgenson and E. Turkel, Central Difference TVD and TVB Schemes for Time Dependant and Steady State Problems, 30th Aerospace Sciences Meeting and Exhibit sponsored by the AIAA, Reno, Nevada, January 6-9 199 5 C. W. Shu, Total Variation Diminishing Time Discretizations, SIAM Journal on Scientific and Statistical Computing, Vol. 9, p. 1073-1084 6 P. L. Roe, Approximate Riemann Solvers, Parameter Vectors and Difference Scheme, Journal of Computational Physics, Vol. 14, p. 357-37, 1981 7 A. Jameson, Analysis and Design of Numerical Schemes for Gas Dynamics 1 Artificial Diffusion, Upwind Biasing, Limiters and Their Effects on Accuracy and Multigrid Convergence, International Journal of Computational Fluid Dynamics, Vol. 5, p. 1-38, 1995 8 H. Mirels, Test Time in Low-Pressure Shock Tubes, The physics of Fluids, vol. 6-9, p. 101-114, 1963 10 of 11
9 H. Mirels, Flow Nonuniformities in Shock Tubes Operating at Maximimum Test Times, The Physics of Fluids, Vol. 9-10, p. 1907-191, 1966 11 of 11