First, Second, and Third Order Finite-Volume Schemes for Diffusion Hiro Nishikawa 51st AIAA Aerospace Sciences Meeting, January 10, 2013 Supported by ARO (PM: Dr. Frederick Ferguson), NASA, Software Cradle.
All Created Equal all men are created equal, - Thomas Jefferson, The Declaration of Independence Are all PDEs created equal?
Hyperbolic vs Parabolic Hyperbolic (inviscid): - Principle of upwinding (dissipation) led to many useful schemes. - Robust 1st-order schemes - a home to come back. - A variety of unstructured, high-order schemes. Parabolic (viscous): - Lack of universal guiding principles. - Lack of robust 1st-order schemes (rely on inconsistent scheme). - Much less variety for unstructured, high-order schemes. - Degraded accuracy of derivatives on irregular grids. They don t seem created equal...
Who Created PDEs? all men are created equal, that they are endowed by their Creator with certain unalienable Rights, - Thomas Jefferson, The Declaration of Independence We created PDEs. Then, we can recreate them equal.
Recreate Them Hyperbolic First-Order Hyperbolic System Method JCP2007, 2010, 2012, AIAA2009, 2011, 2013 Methods for hyperbolic systems apply to all PDEs. Dramatic simplification/improvements to numerical methods
Turn Every Food into a Burger Simple, Efficient, Accurate. Sushi Burger! It looks eccentric, but the taste is the same, or even better.
Nishikawa, JCP2007 Hyperbolic Diffusion System t u = ν ( xx u + yy u) Sushi Burger for Diffusion steady t u = ν ( x p + y q) t p = ( x u p)/t r t q = ( y u q)/t r 0 = ν ( x p + y q), p = x u, q = y u, 0=ν ( xx u + yy u), System is equivalent to diffusion in the steady state for any Tr : T r = L2 r ν, L r = 1 2π Unsteady computation possible by dual-time formulation (implicit) with a steady solver used in the inner iteration.
Nishikawa, JCP2007 Hyperbolic Diffusion System Sushi Burger for Diffusion t U + x F + y G = S, U = u p, F = νp u/t r, G = νq 0, S = 0 p/t r q 0 u/t r q/t r Normal Jacobian: Real eigenvalues: A n = H U = (Fn x + Gn y ) U ν λ 1 =, λ 2 = T r ν T r, λ 3 =0
Energy Estimate Integrate over the domain l E =(u, L 2 rp, L 2 rq) x (hyperbolic system): d dt Ω steady EdV = ν Ω (p 2 + q 2 ) dv Ω f E n da E = u 2 + L 2 r(p 2 + q 2 ) f E =( νup, νuq) which reduces to the energy estimate for the Laplace equation: 0= Ω u udv Energy estimate consistent with steady diffusion problem Ω u u n da
Diffusion is Hyperbolic Hyperbolic Advection-Diffusion System (JCP2010) Hyperbolic Navier-Stokes System (AIAA2011-3043) If you have a good inviscid scheme, you have a very good viscous scheme. - Equal order of accuracy for solution and derivatives. - O(h) time step; O(1/h) condition number.
Edge-Based Finite-Volume Method NASA s FUN3D; Software Cradle s SC/Tetra; DLR Tau code, etc. Edge-based finite-volume scheme: k V j du j dt = k {k j } Φ jk A jk + S j V j A jk = n l jk + n r jk n l jk n r jk with the upwind flux at edge midpoint: j Φ jk = 1 2 (H L + H R ) 1 2 A n (U R U L ) Accuracy is determined by the left and right states.
First-Order Scheme Home sweet home for diffusion schemes
First-Order Scheme for Diffusion Left and right states: R U L = U j, U R = U k j k Discrete Energy Estimate: L j {j} V j de j dt = e b {e b } f E 1 + f E 2 2 ˆn eb A eb j {j} ν(p 2 j + q 2 j )V j ν 2L r e {e} ɛ jk A jk Consistent with continuous energy estimate Dissipation ɛ jk =(u k u j ) 2 + L 2 r [(p k p j,q k q j ) ˆn jk ] 2 0 First-order upwind diffusion scheme is energy-stable for general grids.
Second-Order Scheme Even better
Second-Order Scheme For triangular/tetrahedral and smooth mixed grids. 1. Compute gradients at nodes (e.g., LSQ). 2. Extrapolate the solution to the midpoint. L R Left and right states: u L = u j + 1 2 (p j,q j ) l jk, u R = u k 1 2 (p k,q k ) l jk j k p L = p j + 1 2 p j l jk, p R = p k 1 2 p k l jk q L = q j + 1 2 q j l jk, q R = q k 1 2 q k l jk l jk =(x k x j,y k y j ) Gradients are not needed for the solution.
Taylor Expansion 5 4 steady du j dt = ν( xp + y q) νh 6L r [ ( 2+ 5) x (p x u)+ 2 y (p x u)+ 2 x (q y u)+( 2+ 5) y (q y u) νh2 12 [ xx( x p + y q)+ xy ( x p + y q)+ yy ( x p + y q)] + O(h 3 ), steady dp j dt = 1 T r ( x u p) h2 6T r steady dq j dt = 1 T r ( y u q) h2 6T r Source discretization [ xx (p x u)+ xy (p x u)+ xy (q y u)+ 1 ] 2 ( xxp + yy p + xx q) [ yy (q y u)+ xy (q y u)+ xy (p x u)+ 1 ] 2 ( xxq + yy q + xx p) 6 1 2 j 3 ] + O(h 3 ), + O(h 3 ) Second-order accurate for solution and gradients. First-order error makes it stable with forward Euler.
Third-Order Scheme A new wave
Third-Order Scheme For triangular/tetrahedral grids only. (Katz and Sankaran JCP2011) R L j k 1. 2nd-order gradients at nodes (e.g., LSQ quadratic fit). 2. Extrapolate flux/solution to the midpoint. H L = H j + 1 2 H j l jk, H R = H k 1 2 H k l jk Third-order accuracy on a second-order stencil Source term needs special discretization (NIA CFD Seminar 12-04-12).
Divergence Form of Source Write the source term at each node j as follows: S x F s + y G s F s = 0 (y y j ) q/t r, Gs = 0 (y y j ) p/t r So that (x x j ) q/t r t U + x F + y G = S (x x j ) p/t r t U + x (F F s )+ y (G G s )=0 The system is fully hyperbolic with no source terms. Source term discretization is not needed.
Third-Order Scheme (Katz and Sankaran JCP2011) 1. 2nd-order gradients at nodes (e.g., LSQ). 2. Extrapolate flux/solution to the midpoint. 3. Upwind flux for fully hyperbolic system. L R Left and right states: u L = u j + 1 2 (p j,q j ) l jk, u R = u k 1 2 (p k,q k ) l jk j k p L = p j + 1 2 p j l jk, p R = p k 1 2 p k l jk q L = q j + 1 2 q j l jk, q R = q k 1 2 q k l jk Gradients are not needed for the solution.
Taylor Expansion (3rd-order) steady du j dt = ν( xp + y q) νh 6L r [ ( 2+ 5) x (p x u)+ 2 y (p x u)+ 2 x (q y u)+( 2+ 5) y (q y u) νh2 12 [ xx( x p + y q)+ xy ( x p + y q)+ yy ( x p + y q)] + O(h 3 ), steady dp j dt = 1 ( x u p) h2 [( xx + xy )(q y u)+ xx (p x u)+ y ( x q y p)] + O(h 3 ), T r 6T r steady dq j dt = 1 ( y u q) h2 [( xy + yy )(p x u)+ yy (q y u) x ( x q y p)] + O(h 3 ) T r 6T r ] Third-order accurate for solution and gradients. First-order error makes it stable with forward Euler.
Numerical Experiment Exact solution: u(x, y) = sinh(πx)sin(πy)+sinh(πy)sin(πx) sinh(π) 1 - n x n grids: n = 9, 17, 33, 65, 129, 257. - Dirichlet boundary condition. y - 10 neighbors for quadratic fit. (to avoid ill-conditioning of LSQ matrix) - Forward Euler time stepping 0 0 1 x - Steady state reached when residual drops below 1.0E-15 - Comparison with the Galerkin scheme
Max CFL Number Max CFL numbers determined by Fourier analysis: First-Order Second-Order Third-Order Forward Euler 1.3032 0.7313 0.7313 Hyperbolic schemes are stable with O(h) time step: O(1/h) faster than typical schemes with O(h^2) time step.
Error Convergence 1 Log 10 (L 1 error of u) 1 2 3 4 5 6 u: solution p: x-derivative Galerkin 1st Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 Log 10 (h) Log 10 (L 1 error of p) 0 1 2 3 4 5 6 LSQ (Galerkin) 1st Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 0 Log (h) 10 1st-order accurate solution and gradients.
Error Convergence 2 Log 10 (L 1 error of u) 1 2 3 4 5 6 u: solution p: x-derivative Galerkin 1st Order 2nd Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 Log 10 (h) Log 10 (L 1 error of p) 0 1 2 3 4 5 6 LSQ (Galerkin) 1st Order 2nd Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 0 Log 10 (h) 2nd-order accurate solution and gradients.
Error Convergence 3 Log 10 (L 1 error of u) 1 2 3 4 5 6 u: solution p: x-derivative Galerkin 1st Order 2nd Order 3rd Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 Log (h) 10 Log 10 (L 1 error of p) 0 1 2 3 4 5 6 LSQ (Galerkin) 1st Order 2nd Order 3rd Order Slope 1 Slope 2 Slope 3 7 2.5 2 1.5 1 0.5 0 Log 10 (h) 3rd-order accurate solution and gradients.
Cost Comparison Cost per time step (the irregular grid case). Galerkin First-Order Second-Order Third-Order Forward Euler 0.66 1.00 1.26 1.33 Almost the same. Reality is that hyperbolic schemes are more economical because they converge O(1/h) faster than typical diffusion schemes.
Time to Solution O(1/h) acceleration overwhelms the increased cost per time step. CPU Time 2500 2000 1500 1000 500 Galerkin 1st Order 2nd Order 3rd Order Log 10 ( CPU Time ) 4 2 0 Galerkin 1st Order 2nd Order 3rd Order Slope 2 Slope 1.5 2 0 0 2 4 6 Number of nodes (x 10000) 2 3 4 5 Log 10 ( Number of nodes ) Orders of magnitude acceleration in CPU time.
Conclusions Diffusion and source recreated hyperbolic. 1. Energy-stable first-order diffusion scheme 2. Equal order of accuracy for sol. and gradients on irregular grids. 3. Third-order diffusion scheme by fully hyperbolic system Third-order scheme is incomparably efficient and accurate.
Future Work Uniformly third-order advection-diffusion scheme. Implicit schemes. Time-dependent problems. Third-order scheme for Navier-Stokes (2nd-order scheme in AIAA2011). New system for accurate velocity gradients (vorticity, turb source). Hyperbolic formulation for turbulence models (robust diffusion). Various Other Applications: - High-order residual-distribution schemes, dispersion eq., Incomp. NS at INRIA - 3rd-order active flux scheme at University of Michigan - Entropy-consistent scheme at Universiti Sains Malaysia - Many other potential applications: DG, SV, CESE, SUPG, etc.
Declaration of Hyperbolicity We hold these truths to be self-evident, that all PDEs are created equal, that they are endowed by us with certain unalienable Rights, that among these are hyperbolicity, consistent and accurate schemes and the pursuit of robustness.