Improvements of Unsteady Simulations for Compressible Navier Stokes Based on a RK/Implicit Smoother Scheme Oren Peles and Eli Turkel Department of Applied Mathematics, Tel-Aviv University In memoriam of Prof. Saul Abarbanel. August 2-24, 28
Lecture outline Background and motivation Governing equations Two-fluids model RK/Implicit smoother with source terms Dual time stepping approach with backward differencing Dual time stepping approach with DIRK Adaptive time steps Lagrangian trajectories of burning droplets Examples Conclusions and future work
Motivation - Leidenfrost effect of droplets moving on a ratchet -Leidenfrost maze* The Leidenfrost effect is a physical phenomenon in which a liquid, in near contact with a mass significantly hotter than the liquid's boiling point, produces an insulating vapor layer keeping that liquid from boiling rapidly. Because of this 'repulsive force', a droplet hovers over the surface rather than making physical contact with it. This is most commonly seen when cooking: one sprinkles drops of water in a pan to gauge its temperature: if the pan's temperature is at or above the Leidenfrost point, the water skitters across the pan and takes longer to evaporate than in a pan below the temperature of the Leidenfrost point (but still above boiling temperature). *Cheng, C., Guy, M., Narduzzo, A., & Takashina, K. (25). The Leidenfrost Maze. European Journal of Physics, 36(3), 354
We wish to simulate the maze. Problem statement very low Mach number, unsteady, twophase flow (surrounding air and vapours from the droplets) with moving finite size droplets.
Background We wish to accelerate the computation of time dependent problems in the framework of a dual-time stepping based code with an explicit scheme for pseudo time and an implicit scheme for the physical time. Physical models low Mach compressible flows with perfect gas, two-fluids mixing model, inviscid and viscous flows. Acceleration methods within the pseudo-time marching: multigrid, local time steps, implicit residual smoothing For the pseudo time stepping a low-storage RK/Implicit Smoother method is used. We consider the schemes for the physical time Backward differencing (BDF) and Diagonally Implicit Runge-Kutta (DIRK). Adaptive time steps based on DIRK scheme.
Governing equations The Navier-Stokes equations for the conservative variables Q = in conservation form are: F is the inviscid flux Q t + F Q = F v Q + S ρ, ρu, ρv, ρw, ρe T F v is the viscous flux F = ρu, ρuu + px, ρuu + py, ρuw + pz, ρu E + p T F v =, τ x, τ y, τ z, uτ x + vτ y + wτ z + k T T ρ is the gas density, p is the pressure, u, v and w are the velocity vector components and E is the internal energy ρe = p γ + 2 ρ u2 + v 2 + w 2 τ x, τ y, τ z are the stress vectors, k is the thermal conductivity and T is the temperature
Two-Fluids model Simple modelling of steady and unsteady mixing of two perfect gases
Model governing equations h h Sc u z u y u x T H u t E pz w u t wu py v u t vu px u u t uu Sc u t Sc u t z y x z y x Pr ˆ ˆ ˆ The continuity equation is replaced by two continuity equations for the two gases composing the mixture The modified Navier-Stokes equations are given by
w y w y W Energy and Total enthalpy p E H u p E 2 2 v p v p C C w y w y w C w y w y w C Heat capacities Total density and mean molecular weight Equation of state p = ρrt W
2 2 / / / / / / / / / 2 2 U c w pw U c w pw w v u w w v v u u W U p b b p a a Transformation Jacobian for primitive to conservative variables 2 2 2 2 U c w pw U c w pw w v u w w v v u u U W v b b v a a Conservative to primitive variables transformation Jacobian
RK/Implicit smoother with source terms We solve the system in conservation form: Q t F SQ Applying the Gauss theorem for an arbitrary control volume and a discretization in time yields the basic scheme: Q t S V S F nds S V all F faces nds
The low-storage Runge-Kutta time marching scheme is: Q () = Q n Q (k+) = Q () α k+ ΔτR k Q n+ = Q (p) k = p- α k are the RK coefficients The residual of the k-th step is: R k = V all faces F n ds S k For accelerating the calculations using large CFL numbers the residual is replaced by a spatially smoothed residual ΔQ
Following Rossow 26, Swanson et al. 27, we start with the spatially discretized equation: Q t V faces Linearizing F and S in time we obtain: all F nds S I t Ands V all faces t S Q Q R k F A Q S Q - the flux Jacobian - the source Jacobian
Transforming the equations to primitive variables, the flux Jacobian is written as: where A A A Finally, the implicit smoothing scheme is given by: A 2 A A I + ε Δτ V all faces ε is a relaxation factor. A + nds Δτ S Q ΔQ local = R k ε Δτ V all faces A n ΔQ NB ds The implicit smoothing scheme is solved iteratively, using symmetric Gauss- Seidel method or red-black iterations (RB is useful for parallel computing).
Dual time stepping approach with backward differencing The system we solve in the pseudo time τ is Q τ + Q t + F Q = F v Q For each physical time step, we solve the NS equation for a steady state. The derivative with respect to the physical time is a source term and approximated via backward differencing scheme: S = Q t 3Qn+ 4Q n + Q n 2Δt
Since Q n+ is unknown, we replace it by the best approximation Q (k+) which is the solution in the next pseudo-time RK stage. We have S 3Q(k+) 4Q n + Q n 2Δt Q (k+) = Q () α k+ Δτ R k + α k+ 3Δτ 2Δt 3Δτ Identify + α k+ as a point-implicit smoothing operator and inspired by this 2Δt formulation, the modified RK/implicit smoother operator for time dependent problem is:
where the modified residual is I + ε Δτ V all faces R k = V A + nds all faces F 3 Δτ α k 2 Δt n ds 3Q() 4Q n + Q n 2Δt + Δτ S W ΔQ local = R k ε Δτ V all faces A n ΔQ NB ds We note that this formulation is not the standard one* in which the original residual is given by R k = V all faces F n ds 3Q(k) 4Q n + Q n 2Δt The original smoother operator is I + ε Δτ V all faces A + nds 3 2 Δτ Δt + Δτ S W ΔQ local = R k ε Δτ V all faces A n ΔQ NB ds *Vatsa, V., & Turkel, E. (23). Choice of variables and preconditioning for time dependent problems. In 6th AIAA Computational Fluid Dynamics Conference (p. 3692)
Shu-Osher problem comparison of Convergence between old and new method Standard method New method
Dual time stepping approach with Diagonally Implicit Runge- Kutta (DIRK) Why DIRK? DIRK is a good choice for a high order scheme. Similar to BDF, DIRK requires only one forward time step. High order scheme allows larger time steps. Internal stages cost CPU time (good for GPUs). Allows varying time steps and hence adaptive time steps. Good for sharply varying in time transient problems. Analysis for the time step is not needed.
We wish to solve the semi-discrete equation of the form The DIRK time marching scheme is u = R u t u (j) = u n Δt a ij R i j j = s u (n+) = u n Δt i= s b j R j Where R j = R u j, u n = u t n, u j is the solution of the j-th RK step and also j= a = u = u n a jj j > b j = a js u n+ = u s
We choose the DIRK3 scheme. The non-zero coefficients are given by a a a 3 2 22 33 2 6 a 32 2 a (2a ) 22 22 a a a 3 32 33 b a j js.788 For the lower order embedded scheme bˆ 5 3 2 2 bˆ 9 3 2 2 2 bˆ 2 2 3 3 2 2
Rewrite as u (j) = u n Δt j i= a ij R i R u (j) R j un u j a jj Δt a jj j i= a ij R i = ( ) Using a low-storage RK/Implicit smoother method we solve u j τ = R u j for u j in pseudo-time until R u j is sufficiently small. The residual smoother operator is I + ε Δτ V all faces A + nds Δτ a jj Δt ΔQ local = R k ε Δτ V all faces A n ΔQ NB ds
Adaptive time steps For a given DIRK scheme of order p, the embedded scheme is a scheme of lower order, p- with the same a ij coefficients and b i instead of b i Let u n+ be the solution of the given DIRK scheme after one time step of size Δt and let u n+ be the solution of the embedded scheme, both with initial condition u n, we have: u n+ = u n + c t p u n+ = u n + c t p We want to bound u n+ u n+ relative to the norm of the solution u n so that u n+ u n+ = u n u n Δt n+ Δt n Δt n+ Δt n p TOL TOL u n u n u n u n p
The TOL parameter determines the required accuracy. A large TOL enables large time steps with low accuracy while smaller TOL yields a more accurate solution with smaller time steps (so an increased CPU time).
Lagrangian trajectories of burning droplets Droplets position and velocity vectors are calculated in a Lagrangian manner with dx p = v dv p dt p and = f D v dt τ g v p u Where f D is the drag coefficient, τ u is the droplet relaxation time and v g is the velocity vector of the gas. A source term is added to the gas flow equation to account the mass flux burning rate m of the droplets Continuity equation dρ dt = m G x, t Energy equation dh dt = m C p G x, t
Where C p is the heat capacity of the burning gases escaping from the droplet and G x, t is a moving Green function which is taking in to account the finite size of the droplets cantered in its temporal position with a Gaussian width equal the droplet s radii - G x, t = σ 3 2π 3 exp x x p t 2σ 2 2 σ = 3m 4πρ /3
Results Riemann problem with perfect gas Two-fluids Riemann problem Shock-Sine wave interaction (Shu-Osher problem) Shock wave/bubble interaction Leidenfrost maze
Sod s shock tube - Riemann problem with perfect gas One-dimensional problem with initial conditions: p = PSI and T = 23: K p = PSI and T = 288: 89K on the right side of the tube on the left side Typical time step for BDF is e-6 Time steps for Tol=e-3 - Δt 3 6 Time steps for Tol=e-2 - Δt.3 5
Two-fluids Riemann problem Initial conditions P L =6894 Pa ρ L = kg/m 3 Cp/Cv=. M L =5 gr/mole P R =6894 Pa ρ R =.25 kg/m 3 Cp/Cv=.4 M R =29 gr/mole In the next slides we present the solution at t = 2ms
Velocity
Pressure Density
Shock-Sine wave interaction (Shu-Osher problem) One-dimensional problem with initial conditions: ρ = 3:85743; u = 2:629369; P=.33333 for x.4 ρ = +.2 sin 5x; u = ; P = for x >.4 BDF - Δt = 3 Tol = 2e-3 Δt 2x 3 Tol = e-2 Δt 4x 3
Shock-wave-bubble interaction (using two-fluids model) Schematic description Air, Pre-shock conditions Air, Post-shock conditions Helium, Bubble Shockwave direction M=.22 Initial conditions
Time steps evolution Typical time step for BDF is e-4 For this problem the total CPU time gain was approximately a factor of four.
Comparing results between methods
Mach number Density
The maze with the ratchet directions
Mach number contour map and streamlines
Conclusions and future work We developed a method using dual time stepping with the combination of a low-storage RK/Implicit residual smoother for pseudo time marching and DIRK for the physical time The parameter (TOL) controls the accuracy and also the CPU time The method requires less CPU time for problems with time scales which are sharply varying DIRK based dual time stepping still requires a convergence and stability analysis