Energy conserving time integration methods for the incompressible Navier-Stokes equations B. Sanderse WSC Spring Meeting, June 6, 2011, Delft June 2011 ECN-M--11-064
Energy conserving time integration methods for the incompressible Navier-Stokes equations B. Sanderse WSC Spring meeting, June 6 2011, Delft
Power Introduction Wake effects: Reduced power production of downstream turbines Increased loads on downstream turbines Turbine number R.J. Barthelmie et al. Modelling the impact of wakes on power output at Nysted and Horns Rev. In European Wind Energy Conference and Exhibition, Marseille, 2009.
Introduction Goal: accurate and efficient numerical simulation of wind turbine wakes Important characteristics of wakes: turbulent mixing large-scale turbulent structures travelling long distances anisotropic turbulence
Introduction The incompressible Navier-Stokes equations describe turbulent fluid flow: u u =0, t +(u ) u = p + ν 2 u. To compute flows of practical interest, we need: A numerical approximation to the NS equations A turbulence model
Introduction Requirements for discretization: low numerical diffusion high order (spatial/temporal) discretization stable long-term integration Energy-conserving discretizations 1 : Correctly capture the turbulence energy spectrum and cascade Non-linear stability bound 1: B. Perot (2010), Discrete conservation properties of unstructured mesh schemes, Annual Review Fluid Mechanics.
Energy-conserving discretization Classical discretizations minimize local truncation error τ h = O(h p ) h 0 However, in turbulent flow computations, coarse grids are the rule Focus on discretizations that conserve some fundamental properties of the equations This is beneficial for the global error: L h e h = τ h
Energy properties of incompressible NS The incompressible Navier-Stokes equations: u u =0, t +(u ) u = p + ν 2 u. possess a number of mathematical properties, e.g. The convective operator is skew-symmetric The diffusive operator is symmetric The divergence and gradient operator are related
Energy properties of incompressible NS In inviscid flow energy is an invariant: dk dt = ν( u, u) 0, k The NS equations are then time-reversible = 1 2 u2 Time-reversibility has been proposed as test for energy conservation 1 1: Duponcheel et al. (2008), Time reversibility of the Euler equations as benchmark for energy conserving schemes, JCP
Spatial discretization Finite volume method on staggered Cartesian grid Exact conservation of mass Compatible divergence and gradient operator, no pressure-velocity decoupling y j Skew-symmetric convective operator Energy is conserved: a stable discretization on any grid! v i,j y j 1 p i,j u i,j y j 1 x i 1 x i Fourth order accuracy: Verstappen & Veldman, JCP 2003 x i 1 Figure 3.4: Staggered grid layout with p-centered control v
Spatial discretization Method of lines gives non-autonomous semi-discrete DAE system of index 2: Mu = g 1 (t) Ω du dt + C(u, u) νdu + Gp = g 2(t) Continuous properties are mimicked in a discrete sense: (Gp, u) = (Mu,p) (C(u, v),w)= (v, C(u, w)) (C(u, u),u)=0
Temporal discretization Current practice: multistep or multistage methods with pressure correction and explicit convection Not energy conserving, not time-reversible Research questions: Energy conservation and/or time reversibility with Runge- Kutta methods? Order reduction when applying Runge-Kutta methods to the incompressible NS equations? Can implicit methods be more efficient than explicit methods?
U i = u n + t j=1(a ij PF j )+GL 1 (g 1 (t i Runge-Kutta methods u n+1 = u n + t s (b i PF i )+GL 1 (g 1 (t n+ i=1 Here s is the number of stages, and we assume that the classical General form: to non-stiff ODEs) is r with stage s order is q. The coefficients a E ij compact form using Butcher tableaux: U i = u n + t MU i = g 1 (t i ) u n+1 = u n + t Mu n+1 = g 1 (t n+1 ) where we have assumed that j=1 a ij F (U j,p j,t j ) supplemented with consistent initial conditions s i=1 c 1 a 11 a 12... a 1s c 2 a 21 a 22............. c s a s1...... a ss b 1...... b s b i F (U i,p i,t i ) c i = As in [47], we return to a formulation including the pressure by woensdag 8 juni 2011 leading (w) to s j=1 a ij.,
Energy conservation and Runge-Kutta Energy conservation (periodic BC, ν =0): s (u n+1,u n+1 )=(u n,u n )+2 t b i (F i,u i )+... i=1 s t 2 m ij (F i,f j ). i,j=1 (F i,u i )=0: MU i =0, (C(U i,u i ),U i )=0, m ij =0: m ij = b i b j b i a ij b j a ji M = G
U i = u n + t Time reversibility and Runge-Kutta u n+1 = u n + t s (a ij PF j )+GL 1 (g 1 (t i ) Time where reversibility we have and assumed energy that conservation conditions are satisfied by Gauss methods s c i = a ij. j=1 s (b i PF i )+GL 1 (g 1 (t n+ Time Here reversibility s is the number of stages, and we assume that the classical to non-stiff ODEs) u n+c isir with stage u n+1 c order is i q. The coefficients a E ij, compact form using Butcher tableaux: Conditions for coefficients: c 1 a 11 a 12... a 1s a ij + a s+1 i,s+1 j = b j, c 2 a 21 a 22.... b i = b s+1 i,........., c i =1 c s s+1 i a s1...... a ss b 1...... b s As in [47], we return to a formulation including the pressure by s i=1 j=1
Gauss-Legendre Runge-Kutta methods Butcher tableaux: 1 2 1 2 1 (a) s =1 1 2 3 6 1 2 + 3 6 1 4 1 4 + 3 6 1 2 (b) s =2 1 4 3 6 1 4 1 2 Energy-conserved in time: stable discretization for any time step 1: Hairer et al. (1989), The numerical solution of differential-algebraic systems by Runge-Kutta methods
Gauss-Legendre Runge-Kutta methods Convergence order 1 : ODE DAE u DAE p s odd s +1 s 1 2s s even s s 2 1: Hairer et al. (1989), The numerical solution of differential-algebraic systems by Runge-Kutta methods
Solution of non-linear system Solution of non-linear system with Newton linearization I + a11 tj c 1 tg M 0 U1 p 1 = R I + a 11 tj(u 1 ) a 12 tj(u 1 ) c 1 tg 0 a 21 tj(u 2 ) I + a 22 tj(u 2 ) 0 c 2 tg M 0 0 0 0 M 0 0 U 1 U 2 p 1 p 2 = R
Unsteady boundary conditions For general g 1 (t) there is no guarantee that Mu n+1 = g 1 (t n+1 ) Additional projection 1 : û n+1 = u n + t s i=1 u n+1 =û n+1 Gφ b i F i Lφ = Mû n+1 g 1 (t n+1 ) is now of order u n+1 2s 1: Ascher & Petzold (1991): Projected implicit Runge-Kutta methods for differential-algebraic equations, SIAM J. Num. Anal.
Computing the pressure Using the inverse of the Butcher tableau p i = p n + t Z i = 1 t Order reduction expected s j=1 s j=1 p n+1 = p n + t a ij Z j ω ij (p j p n ) s b i Z i i=1
Computing the pressure Higher order accurate with additional Poisson equation: Lp n+1 = M F n+1 ġ 1 (t n+1 ) does not influence and can be computed as postprocessing step p n+1 u n+1
Alternative I: pressure correction Sacrificing energy conservation: pressure correction Provisional velocity: Pressure solve: u u n t = F ( un + u 2 ) Gp n 1 2 L p = 1 t (Mu g 1 (t n+1 )) Velocity update: u n+1 u t = 1 2 G p
Alternative I: pressure correction An energy error is introduced since Mu = g 1 (t n+1 ) The scheme remains unconditionally stable, but only in a linear sense 1 u n+1 2 + t2 8 Gpn+1 2 u n 2 + t2 8 Gpn 2. Time reversibility is unaffected 1: van Kan (1986): A second-order accurate pressure-correction scheme for viscous incompressible flow, SIAM J.Sci.Stat.Comput.
Alternative II: linear convection Sacrificing time-reversibility: extrapolated convecting velocity (C(u, u),u)=0: independent of the time level of the convecting velocity First order: Second order: Still unconditionally stable Linear system Not time reversible C(u n,u n+1/2 ) C 3 2 un 1 2 un 1,u n+1/2
Summary energy conserving time reversible y n y IRK IRK - linear (ERK-cons) n IRK - PC ERK Table 4: Overview energy conservation and time reversibility.
1 0.7 0.6 1 0.7 0.6 0 0.5 0 0.5 1 0.4 0.3 1 0.4 0.3 Summary 2 0.2 0.1 2 0.2 0.1 3 5 4 3 2 1 0 1 2 3 0 3 5 4 3 2 1 0 1 2 3 0 (a) ERK2 (b) ERK4 3 1 3 1 2 0.9 0.8 2 0.9 0.8 1 0.7 0.6 1 0.7 0.6 0 0.5 0 0.5 1 0.4 0.3 1 0.4 0.3 2 0.2 0.1 2 0.2 0.1 3 5 4 3 2 1 0 1 2 3 0 3 5 4 3 2 1 0 1 2 3 0 IRK2 (c) IRK2 Figure 1: Stability regions. IRK4 (d)
Shear-layer roll-up Initial condition on a domain of u = tanh tanh Boundary conditions: periodic Inviscid: ν =0 Time reversal at t =8 y π/2 [0, 2π] [0, 2π] δ y π, y>π, 3π/2 y δ v = ε sin(x), p =0.
Shear-layer roll-up Implicit midpoint 100x100 volumes t =0.05
Shear-layer roll-up 2 x 10 14 0 2 ɛ k 4 6 8 10 0 2 4 6 8 10 12 14 16 t
Shear-layer roll-up 1 x 10 3 0 IRK2 - PC 1 2 3 ɛ k 4 5 6 7 8 0 2 4 6 8 10 12 14 16 t
Shear-layer roll-up Implicit midpoint 10x10 volumes t =1
Shear-layer roll-up Explicit RK 4 100x100 volumes t =0.05
Shear-layer roll-up 0.5 x 10 7 0 ERK4 ERK4 0.5 1 ɛ k 1.5 2 2.5 3 3.5 0 2 4 6 8 10 12 14 16 t
Shear-layer roll-up 2nd order Adams- Bashforth t =0.05 100x100 volumes
Shear-layer roll-up 10 2 10 4 10 6 2 32x32 volumes t =4 10 8 3 ɛk 10 10 10 12 4 ERK2 IRK2 IRK2 linear IRK2 PC ERK4 IRK4 10 14 10 16 10 2 10 1 t
Corner flow stiff problem; boundary layers, ν =1/10 domain [0, 1] [0, 1] 20x20 volumes simulation until t =1 u =0,v = sin(π(x 3 3x 2 +3x))e 1 1/t p + ν u x =0 v x =0 u = v =0 u = v =0
Corner flow 10 2 ERK2 ERK4 10 4 10 6 ɛ k 10 8 10 10 10 12 10 14 10 4 10 3 10 2 10 1 10 0 t
Corner flow 10 2 IRK2 IRK2 linear IRK2 PC AB CN 10 4 10 6 ɛ k 10 8 10 10 10 12 10 14 10 4 10 3 10 2 10 1 10 0 t
Corner flow 10 2 IRK4 IRK4 no projection 10 4 10 6 ɛ k 10 8 10 10 10 12 10 14 10 4 10 3 10 2 10 1 10 0 t
Corner flow 10 2 10 4 ERK2 IRK2 IRK2 linear IRK2 PC AB CN ERK4 IRK4 IRK4 no projection 10 6 ɛ k 10 8 2 10 10 4 10 12 10 14 10 4 10 3 10 2 10 1 10 0 t
Corner flow: computational time 10 2 10 4 10 6 ERK2 IRK2 IRK2 linear IRK2 PC AB CN ERK4 IRK4 IRK4 no projection ɛ k 10 8 10 10 10 12 10 14 10 1 10 0 10 1 10 2 10 3 CPU
Conclusions Time-reversible and energy-conserving integration of the NS equations can be achieved with Gauss methods Order reduction for the velocity is observed for unsteady boundary conditions only, and can be cured with an extra projection step. Cheaper methods can be constructed by linearizing or splitting, leading to loss of time-reversibility or energy conservation properties. Optimization of matrix solvers and investigation of turbulent flow will shed more light on the usefulness of these properties.