Full text
ENERGY-CONSISTENT DISCRETIZATION OF VISCOUS DISSIPATION WITH APPLICATION TO NATURAL CONVECTION FLOWS B. Sanderse1and F. X. Trias2 1Centrum Wiskunde & Informatica Science Park 123, Amsterdam, The Netherlands 2Heat and Mass Transfer Technological Center, Technical University of Catalonia, C/Colom 11, 08222 Terrassa (Barcelona), Spain. b[email protected], francesc.xavier[email protected] Abstract An energy-consistent formulation of incompressible natural convection flows is proposed. In particular, a discretization of the viscous dissipation term is derived which is consistent with the local kinetic energy equation that follows from the momentum equation. Numerical experiments of Rayleigh–B´ enard convection (RBC) and Rayleigh–Taylor instabilities confirm that with the proposed dissipation function, the energy exchange between kinetic and internal energy is exactly preserved. Consequently, the value of the Nusselt number on the cold plate becomes larger than on the hot plate, with the difference increasing with increasing Gebhart number. Finally, three-dimensional simulations of turbulent RBC show that energy balances are exactly satisfied even for very coarse grids; therefore, we consider that the proposed discretization forms an excellent starting point for testing sub-grid scale models. 1 Introduction The presence of diffusion in the Navier–Stokes equations causes dissipation, acting as a sink of kinetic energy and a source of internal energy. Evaluating the dissipation function locally is for example important in studying natural convection flows with large length scales, such as in the Earth mantle (see Gebhart (1962); Turcotte et al. (1974)). In this paper, we include the viscous dissipation term in the internal energy equation such that we get a correct global energy balance. We propose a discrete dissipation operator, and show that it cannot be chosen freely but is implied by the discretization of the viscous terms in the momentum equations and by the definition of the kinetic energy. This discrete dissipation operator is not only of use in the internal energy equation, but also useful beyond the context of natural convection flows, e.g. when estimating the dissipation of kinetic energy in turbulent flows in a numerical simulation. We also propose a time integration method that preserves the total energy balance upon time marching. 2 Methodology We are studying incompressible flow under the Boussinesq approximation, consisting of the mass, momentum and internal energy equations: ∇·u= 0,(1) ρ0∂u ∂t +∇·(u⊗u)=−∇p+µ∇2u −ρ0β(T−T0)g,(2) ∂ ∂t(ρ0cT) + ∇·(u(ρ0cT)) = µΦ + λ∇2T. (3) The focus here is on the viscous dissipation term Φ := k∇uk2, which is commonly ignored in equation (3). The viscous dissipation is responsible for a decrease in kinetic energy and an increase in internal energy, which for a closed box with no-slip boundary conditions reads: dEk dt=−µZΩ ΦdΩ + ZΩ βgρ0(T−T0)vdΩ,(4) dEi dt=µZΩ ΦdΩ + Z∂Ω λ∇T·ndS, (5) such that the sum of the two cancels when considering the global energy equation: dE dt=dEk dt+dEi dt =ZΩ βgρ0(T−T0)vdΩ + Z∂Ω λ∇T·ndS. (6) In order to have a discrete equivalent of Eqs.(4)-(6), we need a carefully designed discretization method, which will be obtained by extending the well-known energy-conserving (‘MAC’) discretization on a staggered grid Harlow and Welch (1965). The staggered grid discretization naturally leads to the following local kinetic energy definition: ki,j :=1 4u2 i+1/2,j +1 4u2 i−1/2,j+ 1 4v2 i,j+1/2+1 4v2 i,j−1/2.(7)
0.2 0.4 0.6 0.8 x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 y 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 (a) t= 30,Ge = 0.1 0.2 0.4 0.6 0.8 x 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 y 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 (b) t= 35,Ge = 0.1 0 20 40 60 80 100 t -0.02 0 0.02 0.04 0.06 0.08 0.1 0.12 energy change (c) Energy exchange: kinetic+internal versus potential energy. Figure 1: Rayleigh–Taylor simulation results. This kinetic energy definition, together with the momentum equation, implies the following discrete dissipation function Φi,j =1 4Φu i+1/2,j +1 4Φu i−1/2,j+ 1 4Φv i,j+1/2+1 4Φv i,j−1/2,(8) where Φu i+1/2,j =−ui+3/2,j −ui+1/2,j ∆x2 −ui+1/2,j −ui−1/2,j ∆x2 −ui+1/2,j+1 −ui+1/2,j ∆y2 −ui+1/2,j −ui+1/2,j−1 ∆y2 ,(9) and Φv i,j+1/2=−vi+1,j+1/2−vi,j+1/2 ∆x2 −vi+1,j−1/2−vi,j−1/2 ∆x2 −vi,j+3/2−vi,j+1/2 ∆y2 −vi,j+1/2−vi,j−1/2 ∆y2 .(10) We employ the implicit midpoint method to integrate the spatially discretized equations in time. Based on (i) our proposed discrete dissipation function (8), (ii) the energy-conserving nature of the implicit midpoint method (see Sanderse (2013)), (iii) the compatibility of the divergence and gradient operators on a staggered grid, and (iv) the skew-symmetry of the convective terms, we obtain a discrete energy balance that mimics Eq.(6): En+1 h−En h ∆t=βgρ0(Vn+1/2 h)T(ATn+1/2 h+yT)+ λ1T(DTTn+1/2 h+ ˆyT).(11) Here, Eh=Ek,h +Ei,h =1 2VT hΩVVh+ 1TΩpTh is the discrete approximation to the total energy, Ais an averaging operator from temperature locations to velocity locations, DTis the discrete diffusion operator for the temperature, and yTand ˆyTtake boundary conditions into account. 3 Results for Rayleigh–Taylor flow We firstly simulate the well-known Rayleigh– Taylor problem, which features a rectangular box (all boundaries no-slip and adiabatic) with a cold fluid on top of a warm fluid. The domain size is 1×2, the grid is 64 ×128, the time step ∆t= 5 ·10−3and the end time t= 100. There are 3 dimensionless quantities: the Rayleigh number Ra = 106, the Prandtl number Pr = 0.71 and the Gebhart number Ge = 10−1. The Gebhart number is defined as Ge = βgH cand arises due to inclusion of viscous dissipation (see the seminal paper by Gebhart (1962)). After an initial instability has developed, an asymmetry in the solution appears around t= 30, triggering a sequence of well-known ‘mushroom’ type plumes: hot plumes rising upward and cold plumes sinking downward (figures 1a-1b). The viscous dissipation causes an increase in average temperature. Most existing natural convection models, which ignore the viscous dissipation term, would not predict such a temperature increase. In our model the temperature increase exactly matches the kinetic energy loss through viscous dissipation, and this is confirmed by figure 1c, which shows the different terms in equation (11).
(y ,T) E p E k 1 2(u,u) E i ∫ Ω T d Ω √ 1 Pr Ra Nu h √ 1 Pr Ra Nu c −( y ,∇⋅(uT)) (v , T ) √ 1 Pr Ra (Nu c −1)y c √ 1 Pr Ra (Nu h −1)y h Ge √ Pr Ra (y ,Φ) √ Pr Ra ε U Figure 2: Energy exchanges for RBC: between potential and kinetic, (v, T) = RΩvT dΩ, and between kinetic and internal energies, pPr /RaU. Moreover, energy exchanges through the domain (top at ycand bottom at yh) boundaries are twofold: (i) input of potential energy, ((Nuc−1)yc+ (Nuh−1)yh)/√Pr Ra, and (ii) output of internal energy, (Nuh−Nuc)/√Pr Ra. (a) Ra = 108and Ge = 0. (b) Ra = 108and Ge = 1. (c) Ra = 1010 and Ge = 0. (d) Ra = 1010 and Ge = 1. Figure 3: Visualization of instantaneous temperature fields corresponding to the statistically steady state of the DNS simulations using meshes of 400×208×208 ≈17.3M(Ra = 108) and 1024×768×768 ≈604M(Ra = 1010), respectively. The distribution of isothermal surfaces is the same for all the four cases. 4 Turbulent Rayleigh–B´ enard flow As a final test-case, we consider the numerical simulation of a turbulent air-filled (Pr = 0.71) Rayleigh– B´ enard convection (RBC) at two different Rayleigh numbers, Ra = 108and 1010. Results are presented in non-dimensional form by taking the cavity height, H, and the temperature difference, ∆T, as reference length and temperature, respectively. Then, depending on the choice for the reference velocity, uref , the dimensionless governing equations can take a different form. Namely, ∇·u= 0,(12) ∂u ∂t +∇·(u⊗u) = −∇p0+α1∇2u+α2Tey, (13) ∂T ∂t +∇·(uT) = α3Φ + α4∇2T. (14) where the αi’s can be expressed in terms of three above-mentioned dimensionless numbers, being the
Rayleigh number Ra, the Prandtl number Pr and the Gebhart number Ge (also known as the dissipation number; see Schubert et al. (2001), for instance): Ra = βg∆TH3 νκ ,(15) Pr = ν κ,(16) Ge = βgH c.(17) Here, we take uref =√βg∆TH as the buoyant velocity, leading to the following values of αi’s in Eqs.(13) and (14) α1=rPr Ra α2= 1 α3= GerPr Ra,(18) α4=1 √Pr Ra γ=α1 α3 =1 Ge.(19) Direct numerical simulations (DNS) were carried out and analyzed in previous studies by Dabbagh et al. (2016, 2020) without taking into account the viscous dissipation effects (Ge = 0). Here, the results are extended to Ge = 0.1and Ge = 1 keeping the same domain size (π×1×1) and mesh resolution (400×208×208 for Ra = 108, and 1024×768×768 for Ra = 1010). Grids are constructed with a uniform grid spacing in the periodic x-direction whereas wallnormal points (yand zdirections) are distributed following a hyperbolic-tangent function as follows (identical for the z-direction) yi=1 21 + tanh {γy(2(i−1)/Ny−1)} tanh γy(20) with i={1, . . . , Nz+ 1}, where Nyand γyare the number of control volumes and the concentration factor in the y-direction, respectively. In our case, γy=γz= 1.4for Ra = 108and γy=γz= 1.6for Ra = 1010. For further details, the reader is referred to previous works by Dabbagh et al. (2016, 2020). Instantaneous temperature fields corresponding to the statistically steady state are displayed in Figure 3. As expected, thermal dissipation effects at Ge = 1 lead to a significant increase in the average cavity temperature which is clearly visible for both Rayleigh numbers. Therefore, the flow symmetry (in average sense) with respect to the mid-height plane is lost for Ge >0leading to higher (lower) Nusselt number for the top (bottom) wall. Subsequently, the top (bottom) thermal boundary layer becomes thinner (thicker) with respect to the case at Ge = 0. This implies that mesh resolution requirements in the near-wall region are also asymmetrical; however, in this work, for the sake of simplicity, the grid spacing at the two walls is the same regardless of the Gebhart number. All simulations have been carried out for 500 timeunits starting from a zero velocity field and uniformly 0 100 200 300 400 500 t -6 -4 -2 0 2 4 6 dE/dt (a) Finest grid: 400 ×208 ×208 ≈17.3M. 0 100 200 300 400 500 t -6 -4 -2 0 2 4 6 dE/dt (b) Coarsest grid: 50 ×26 ×26 ≈0.034M. Figure 4: Time-evolution of the most relevant energy contributions for Ge = 1. distributed random temperatures between TCand TH. Therefore, initially the discrete kinetic energy of the system increases. Then, after a sufficiently long period of time (around 50 time-units) a statistically steady state is reached. This is clearly observed in Figure 4 where the time-evolution of various rate-of-changes of energy are shown. Results correspond to Ra = 108 and Ge = 1 using a very fine (400 ×208 ×208 ≈ 17.3M) and a very coarse mesh. Similar results are obtained for the other tested configurations. As expected, once a statistically steady state is reached, the kinetic energy fluctuates around its mean value and, therefore, its rate-of-change, dEk,h/dt, fluctuates around zero. Only two terms contribute to the kinetic energy of the system (see Figure 2): the global viscous dissipation, U,h, given by U,h =ZΩ ΦdΩ,(21) and the contribution of the buoyancy forces given by α2VT h(ATh(t) + yT). These two contributions ex-
actly cancel each other on average when a statistically steady state is reached. The former is transferred into internal energy, Ei,h, whereas the latter can be viewed as a transfer from potential to kinetic energy. An interesting observation can be made in this regard: the time-evolution of the discrete potential energy is obtained by left-multiplying the discrete temperature transport equation by yh, which is a vector containing the y-coordinate (i.e. in the direction of the gravitational field) of the cell centers where the discrete temperature field, Th, is stored. This leads to three contributions: from the convective term, yT hCT(Vh)Th, from the viscous dissipation term, α3yT hΩpΦh(Vh), and from the diffusive term, α4yT h(DTTh+ ˆyT). Likewise the continuous case (see Figure 2), the contribution from the convective term exactly cancels with the buoyancy flux, α2(ATh(t) + yT), whereas the other two contributions appear as additional terms in the time derivative of potential energy. If we ignore these two extra terms, global balance is exactly preserved at the discrete level dEk,h dt+γdEi,h dt= α2VT h(ATh+yT) + γα4(NuH−NuC)(22) This proofs that the viscous dissipation function has indeed been discretized correctly, since an imbalance between the viscous dissipation implied by the kinetic energy equation and the explicitly added viscous dissipation in the internal energy equation would otherwise show up. These energy balances are exactly satisfied even for very coarse grids (see Figure 4b) which is a very relevant feature of the discretization approach presented in this work. Namely, energy transfers are exactly preserved at the discrete level without introducing any artificial source/sink of energy. This implies that global energy balances that lead to exact relations such as α4(Nu(1) −Nu(0)) = α3U(1),(23) α4(Nu(y0)−Nu(0)) = α3U(y0),(24) and α2α4(Nu(0) −1) = α1U(1) −α2α3Z1 0 U(y) dy. (25) where U(y0) = ZΩ|y<y0 ΦdΩ(26) are preserved at the discrete level. This is clearly shown in Figure 5 where Nusselt numbers obtained for a wide range of meshes are displayed. The finest meshes correspond to the DNS simulations shown in Figure 3 whereas coarser and coarser meshes have been generated by reducing the number of grid points in each spatial direction by factors of approximately √2. Hence, after six successive mesh coarsenings, the total number of grid points is reduced by approximately ((√2)6)3= 29= 512. This under-resolution causes a pile-up of (kinetic) energy close to the smallest resolved scales, that leads to higher values of U and, therefore, an increase of both NuH(see equation 25) and NuC−NuH(see equation 23). Since the numerical discretization is not interfering with these energy balances, the solution errors can only be attributed to the (lack of) effect of the sub-grid scales. Therefore, we consider that the discretization presented here forms an excellent starting point for testing sub-grid scale models. 104105106107108 number of grid points 0 10 20 30 40 50 60 70 Nu Ge=0 Ge=0.1, lower Ge=0.1, upper Ge=1, lower Ge=1, upper (a) Ra = 108. 106107108109 number of grid points 0 50 100 150 200 250 300 350 Nu Ge=0 Ge=0.1, lower Ge=0.1, upper Ge=1, lower Ge=1, upper (b) Ra = 1010. Figure 5: Nusselt numbers at lower and upper plate for a set of meshes at Ge = 0,Ge = 0.1and Ge = 1. 5 Conclusions In this work, we have proposed an energyconsistent discretization of the viscous dissipation function. The viscous dissipation function is an important quantity, for example in turbulent flow computations, where it is critical to assess the global energy balances, or in natural convection flows, where it leads
to internal heating. This latter case has been the focus of this article, and we have shown that including the viscous dissipation function in the internal energy equation leads to a consistent total energy balance: viscous dissipation acts as a sink in the kinetic energy equation and as a source in the internal energy equation, such that the sum of internal and kinetic energy only changes due to buoyancy and thermal diffusion. An important avenue for future work lies in the assessment of subgrid-scale models for turbulent flows, including those driven by buoyancy. For example, in large-eddy simulation, the kinetic energy equation of the resolved scales and of the subgrid-scales features viscous dissipation terms, and the current work provides a basis for proper discrete representations of these terms. Acknowledgments This publication is part of the project ”Discretize first, reduce next” (with project number VI.Vidi.193.105) of the research programme NWO Talent Programme Vidi which is (partly) financed by the Dutch Research Council 546 (NWO). F.X.T. is supported by the Ministerio de Econom´ ıa y Competitividad, Spain, RETOtwin project (PDC2021-120970- I00). Calculations were carried out on MareNostrum 4 supercomputer at BSC. We thankfully acknowledge these institutions. References Dabbagh, F., Trias, F. X., Gorobets, A., and Oliva, A. (2016). On the evolution of flow topology in turbulent Rayleigh-B´ enard convection. Physics of Fluids, 28:115105. Dabbagh, F., Trias, F. X., Gorobets, A., and Oliva, A. (2020). Flow topology dynamics in a threedimensional phase space for turbulent Rayleigh- B´ enard convection. Physical Review Fluids, 5:024603. Gebhart, B. (1962). Effects of viscous dissipation in natural convection. J. Fluid Mech., 14(2):225–232. Harlow, F. H. and Welch, J. E. (1965). Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface. Phys. Fluids, 8(12):2182. Sanderse, B. (2013). Energy-conserving Runge–Kutta methods for the incompressible Navier–Stokes equations. Journal of Computational Physics, 233:100–131. Schubert, G., Turcotte, D. L., and Olson, P. (2001). Mantle Convection in the Earth and Planets. Cambridge University Press. Turcotte, D. L., Hsui, A. T., Torrance, K. E., and Schubert, G. (1974). Influence of viscous dissipation on B´ enard convection. J. Fluid Mech., 64(2):369–374.