Spatial discretization scheme for incompressible viscous flows N. Kumar Supervisors: J.H.M. ten Thije Boonkkamp and B. Koren CASA-day 2015 1/29
Challenges in CFD Accuracy a primary concern with all CFD solvers How to get higher accuracy? * Using higher order methods higher computational effort * Using finer grids significant increase in computational effort * Designing better numerical schemes 2/29
Incompressible viscous flow Flow governed by the incompressible Navier-Stokes equations: u x + v y =0 u t + (u 2 ) x + (uv) y = p x + ɛ(u xx + u yy ) v t + (uv) x + (v 2 ) y = p y + ɛ(v xx + v yy ) (ɛ = 1/Re) Spatial discretization: Finite volume method on a uniform staggered grid 3/29
Grid structure Figure : Mesh structure of a two-dimensional staggered grid 4/29
Control volumes Ω v y j+1 p i,j+1 o v i,j+1/2 Ω u y y j p i,j o u i+1/2,j o u i+3/2,j x i x i+1 x Figure : Control volumes for the spatial discretization of the momentum equations. 5/29
Discretization of the convective term Discretizing : (u 2 ) x + (uv) y Discretized convective term ( N u (u) ) i,j = y( ui+1,j 2 ui,j 2 ) + x ( ) u i+1/2,j+1/2 v i+1/2,j+1/2 u i+1/2,j 1/2 v i+1/2,j 1/2 Second order accurate FVM 6/29
Computation of interface velocities Required interface velocities: u i+1,j, v i+i/2,j+1/2, u i+1/2,j+1/2 Commonly used techniques: * Average value * Upwind value 7/29
Interface velocity u i+1,j u i+1,j y j u i+1/2,j u i+3/2,j x i x i+1/2 x i+1 x x i+3/2 8/29
Our research Computing interface velocities using local two-point boundary value problems Pros: Cons: * Interface velocity depending on the local Péclet number * Higher accuracy (lower error constants) * Higher computational effort * Slower convergence of the solutions 9/29
Computation of u i+1,j Solve the two-point local BVP : ((u 2 ) x ɛu xx ) = p x ((uv) y ɛu yy ), for x [x i+1/2,j, x i+3/2,j ] subject to the boundary conditions, u(x i+1/2,j ) = u i+1/2,j, u(x i+3/2,j ) = u i+3/2,j 10/29
Solution strategy Homogeneous case Including pressure gradient (u 2 ) x ɛu xx = 0 (u 2 ) x ɛu xx = p x Including the pressure gradient and the cross flux term (u 2 ) x ɛu xx = p x ((uv) y ɛu yy ) 11/29
The homogeneous case Further simplification: - Linearize the equation- Solution - Uu x ɛu xx = 0, (U is an estimate for u i+1,j ) u h i+1,j = A( P/2)u i+1/2,j + A(P/2)u i+3/2,j P U x, A(z) (e z + 1) 1 ɛ 12/29
Plot of A(z) 13/29
Including the pressure gradient Uu x ɛu xx = p x Assumption: p is piecewise linear over (x i+1/2,j, x i+3/2,j ) u i+1,j as a sum of homogeneous and inhomogeneous part u i+1,j = u h i+1,j + u p i+1,j, [ u p i+1,j = ( x)2 F ( P/2) p i+1 p i 4ɛ x F (z) ez 1 z z 2 (e z + 1). + F (P/2) p i+2 p ] i+1, x 14/29
Plot of F (z) 15/29
Including the cross flux term Uu x ɛu xx = p x ((uv) y ɛu yy ) }{{} constant = C i+1,j Assumption: ((uv) y ɛu yy ) is piecewise constant over (x i+1/2,j, x i+3/2,j ) u i+1,j = u h i+1,j + u p i+1,j + uc i+1,j u c i+1,j = 1 ɛ x 2 C i+1,j P (A(P/2) 0.5) 16/29
Interface velocity u i+1,j u i+1,j = u h i+1,j + u p i+1,j + uc i+1,j u h i+1,j = A( P/2)u i+1/2,j + A(P/2)u i+3/2,j, [ u p i+1,j = ( x)2 F ( P/2) p i+1 p i 4ɛ x u c i+1,j = 1 ɛ x 2 C i+1,j P (A(P/2) 0.5) + F (P/2) p i+2 p ] i+1, x 17/29
Iterative computation Linearization of the BVP (u 2 ) x Uu x Compute u i+1,j iteratively: update U and P etc. 18/29
Interface velocities: u i+1/2,j+1/2 and v i+1/2,j+1/2 For u i+1/2,j+1/2 use the local BVP Vu y ɛu yy = 0, y j < y < y j+1, u(y j ) = u i+1/2,j, u(y j+1 ) = u i+1/2,j+1, For v i+1/2,j+1/2 use Uv x ɛv xx = 0, x i < x < x i+1, v(x i ) = v i,j+1/2, v(x i+1 ) = v i+1,j+1/2. 19/29
Interface velocity u i+1/2,j+1/2 y j+1 u i+1/2,j+1 y y j+1/2 u i+1/2,j+1/2 y j u i+1/2,j x i Figure : Interface velocity u i+1/2,j+1/2. 20/29
Interface velocity v i+1/2,j+1/2 v i+1/2,j+1/2 v i,j+1/2 v i+1,j+1/2 y j x i x i+1/2 x i+1 x Figure : Interface velocity v i+1/2,j+1/2. 21/29
Numerical results Flow in a lid driven cavity 22/29
y Validation for driven cavity flow 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 Ghia, Ghia (128 128) 1-D local BVP method (8 8) Present (8 8) 1-D local BVP method (16 16) Present (16 16) 1-D local BVP method (32 32) Present (32 32) 0.2 0.1 0 0.4 0.2 0 0.2 0.4 0.6 0.8 1 Velocity component (u) along the vertical centerline Figure : Velocity component u along the vertical centerline of the cavity for Re = 100. 23/29
Flow in a lid driven cavity at Re = 100 Ghia-Ghia-Shin (128 128) Upwind method Present method Standard average method 1D local BVP method 1.0 0.8 0.8 0.7 0.6 0.6 y 0.5 0.4 0.4 0.2 0.3 0.2 0.0 0.4 0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 u Figure : Comparison of the velocity component u along the vertical centerline of the cavity for Re = 100. Grids used are 8 8 (dotted lines), 16 16 (dashed lines) and 32 32 (solid lines) 24/29
Flat plate boundary layer flow Figure : Flow over a flat plate at zero incidence. 25/29
Re-sensitivity Figure : Plot of velocity component u along the center of the plate over a family of Re = 4 i 100, (i = 0, 1, 2, 3, 4, 5). 26/29
Comparison with Blasius solution Figure : Comparison of the function f (η) = u/u 0 along a flat plate at zero incidence. 27/29
Conclusions Interface velocities dependent on Péclet number - Average: P 0 - Upwind: P Iterative computation: fast convergence Does not affect the formal order of accuracy, lower error constants Increased accuracy with the inclusion of pressure gradient and cross flux terms 28/29
References [1] N. Kumar, J.H.M. ten Thije Boonkkamp, and B. Koren. A new discretization method for the convective terms in the incompressible navier-stokes equations. In Finite Volumes for Complex Applications VII - Methods and Theoretical Aspects. [2] N. Kumar, J.H.M. ten Thije Boonkkamp, and B. Koren. A sub-cell discretization method for the convective terms in the incompressible navier-stokes equations. In International Conference on Spectral and Higher Order Methods 2014 (Submitted). 29/29