finite volume method
play

Finite Volume Method Praveen. C Computational and Theoretical Fluid - PowerPoint PPT Presentation

Finite Volume Method Praveen. C Computational and Theoretical Fluid Dynamics Division National Aerospace Laboratories Bangalore 560 017 email: praveen@cfdlab.net Workshop on Advances in Computational Fluid Flow and Heat Transfer Annamalai


  1. Finite Volume Method Praveen. C Computational and Theoretical Fluid Dynamics Division National Aerospace Laboratories Bangalore 560 017 email: praveen@cfdlab.net Workshop on Advances in Computational Fluid Flow and Heat Transfer Annamalai University October 17-18, 2005 Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  2. Topics to be covered 1. Conservation Laws 2. Finite volume method 3. Types of finite volumes 4. Flux functions 5. Spatial discretization schemes 6. Higher order schemes 7. Boundary conditions 8. Accuracy and stability 9. Computational issues 10. References Hyperbolic equations, Compressible flow, unstructured grid schemes Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  3. Conservation Laws and FVM • Basic laws of physics are conservation laws - mass, momentum, energy • Differential form ∂U ∂t + ∂f ∂x + ∂g ∂y + ∂h ∂z = 0 U - conserved variables f, g, h - flux vector • Compressible flows - shocks and other discontinuities • Classical solution may not exist • Integral form (using divergence theorem) ∂ � � U d x d y d z + ( fn x + gn y + hn z )d S = 0 ∂t Ω ∂ Ω Rate of change of U in Ω = - (Net flux across the boundary of Ω ) ⇓ Starting point for finite volume method Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  4. • Discontinuities are a consequence of conservation laws • Rankine-Hugoniot jump conditions [9, 10] ( fn x + gn y + hn z ) R − ( fn x + gn y + hn z ) L = s ( U R − U L ) n U R Shock U L • Solution satisfying integral form - weak solution • Definition (Weak solution) 1. Satisfies the differential form in smooth regions 2. Satisfies jump condition across discontinuities • Hyperbolic conservation laws - non-uniqueness • Limit of a dissipative model: Navier-Stokes → Euler Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  5. • Entropy condition - second law of thermodynamics • Entropy satisfying weak solution - unique (Kruzkov) • Conservative scheme (FVM) - correct shock location (Warnecke) • Useful for solving equations with discontinuous coefficients • FVM can be applied on arbitrary grids - structured and unstructured Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  6. • Entropy condition - second law of thermodynamics • Entropy satisfying weak solution - unique (Kruzkov) • Conservative scheme (FVM) - correct shock location (Warnecke) • Useful for solving equations with discontinuous coefficients • FVM can be applied on arbitrary grids - structured and unstructured Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  7. • Entropy condition - second law of thermodynamics • Entropy satisfying weak solution - unique (Kruzkov) • Conservative scheme (FVM) - correct shock location (Warnecke) • Useful for solving equations with discontinuous coefficients • FVM can be applied on arbitrary grids - structured and unstructured Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  8. FVM in 1-D • Divide computational domain [ a, b ] into N cells a = x 1 / 2 < x 3 / 2 < . . . < x N +1 / 2 = b C i = [ x i − 1 / 2 , x i +1 / 2 ] Ci i−3/2 i−1/2 i+1/2 i+3/2 h i • Conservation law for cell C i � x i +1 / 2 ∂ U d x + f ( x i +1 / 2 , t ) − f ( x i − 1 / 2 , t ) = 0 ∂t x i − 1 / 2 • Cell average value � x i +1 / 2 U i ( t ) = 1 U ( x, t )d x h i x i − 1 / 2 Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  9. • Conservation law for cell C i d U i h i d t + f ( x i +1 / 2 , t ) − f ( x i − 1 / 2 , t ) = 0 U i+1 U i i+1/2 • Riemann problem at each interface • Numerical flux function (Godunov approach) F i +1 / 2 ( t ) = F ( U i ( t ) , U i +1 ( t )) • Semi-discrete update equation (ODE system) d U i d t = − 1 [ F i +1 / 2 ( t ) − F i − 1 / 2 ( t )] h i Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  10. • Method of lines approach – Discretize in space – Integrate the ODE system in time • Explicit Euler scheme [ U n i ≈ U ( x i , t n ) ] U i ( t n +1 ) − U i ( t n ) = − 1 [ F i +1 / 2 ( t n ) − F i − 1 / 2 ( t n )] ∆ t h i ⇓ i − ∆ t U n +1 = U n [ F n i +1 / 2 − F n i − 1 / 2 ] i h i • Conservation: Telescopic collapse of fluxes d U i � � h i = − [ F i +1 / 2 ( t ) − F i − 1 / 2 ( t )] d t i i = − [ f ( b, t ) − f ( a, t )] Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  11. Numerical Flux Function • Simple averaging F i +1 / 2 = f (( U i + U i +1 ) / 2) or F i +1 / 2 = ( f i + f i +1 ) / 2 • Equivalent to central differencing d U i d t + 1 ( f i +1 − f i − 1 ) = 0 (unstable) h i • Two approaches 1. Central differencing with artificial dissipation [13] F i +1 / 2 = 1 2( f i + f i +1 ) − d i +1 / 2 2. Upwind flux formula [9, 10, 13, 20, 22] FVS: F i +1 / 2 = f + ( U i ) + f − ( U i +1 ) FDS: F i +1 / 2 = 1 2( f i + f i +1 ) − 1 2[(∆ f ) − i +1 / 2 − (∆ f ) + i +1 / 2 ] Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  12. • Example: convection-diffusion equation ∂U ∂t + ∂f f = aU − ν∂U ∂x = 0 , ∂x � F i +1 / 2 = aU i +1 / 2 − ν ∂U � � ∂x � i +1 / 2 • Upwind definition of interfacial state � U i if a ≥ 0 U i +1 / 2 = U i +1 if a < 0 • Central-difference for viscous term � ∂U = U i +1 − U i � � ∂x x i +1 − x i � i +1 / 2 • Upwind numerical flux F i +1 / 2 = 1 2( aU i + aU i +1 ) − | a | 2 ( U i +1 − U i ) − νU i +1 − U i x i +1 − x i Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  13. Significance of conservative scheme • Inviscid Burgers equation � U 2 f ( U ) = U 2 � ∂U ∂t + ∂ = 0 , ∂x 2 2 • Rankine-Hugoniot condition ⇒ s = 1 f R − f L = s ( U R − U L ) = 2( U L + U R ) • Non-conservative form ∂U ∂t + U ∂U ∂x = 0 • Upwind scheme (assume U ≥ 0 ) U n +1 U n i − U n − U n i i − 1 i + U n = 0 i ∆ t h or i − ∆ t U n +1 = U n h U n i ( U n i − U n i − 1 ) i Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  14. • Initial condition � 1 if x < 0 U ( x, 0) = 0 if x > 0 • Numerical solution U n i = U o i = ⇒ stationary shock • Exact solution (shock speed = 1/2) � 1 if x < t/ 2 U ( x, t ) = 0 if x > t/ 2 • Conservation form from physical considerations � U 2 U ∂U ∂t + U ∂ � = 0 ∂x 2 or � U 2 � U 3 � � ∂ + ∂ = 0 ∂t 2 ∂x 3 � U 2 L + U L U R + U 2 � • Jump conditions not identical: s = 2 R 3 U L + U R Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  15. ✆ � ✝ ☎ ✄ ✁ Higher order scheme in 1-D • Constant-in-cell representation Ci+1 ✆✂✝ Ci Ci−1 ✄✂☎ �✂✁ i−3/2 i−1/2 i+1/2 i+3/2 • First order accurate | U i − U ( x i ) | = O ( h ) h = max h i i • Reconstruction - evolution - projection Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  16. ☎ ✆ ✄ ✁ � ✝ Higher order scheme in 1-D • Reconstruct the variation within a cell Left state Ci+1 ✆✂✝ Ci Ci−1 Right ✄✂☎ state �✂✁ i−3/2 i−1/2 i+1/2 i+3/2 • Linear reconstruction ˜ U ( x ) = U i + s i ( x − x i ) , x ∈ [ x i − 1 / 2 , x i +1 / 2 ] • Biased interpolant U L U R i +1 / 2 = U i + s i ( x i +1 / 2 − x i ) , i +1 / 2 = U i +1 + s i +1 ( x i +1 / 2 − x i +1 ) , Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  17. • Flux for higher order scheme F i +1 / 2 = F ( U i , U i +1 ) • Reconstruction variables 1. Conserved variables - conservative 2. Characteristic variables - better upwinding but costly 3. Primitive variables ( ρ, u, p ) - computationally cheap • Unsteady flows - reconstruction must preserve conservation 1 � ˜ U ( x )d x = U i h i C i • Gradients for reconstruction: backward, forward, central difference s i,b = U i − U i − 1 s i,f = U i +1 − U i s i,c = U i +1 − U i − 1 , , x i − x i − 1 x i +1 − x i x i +1 − x i − 1 Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  18. • Flux for higher order scheme F i +1 / 2 = F ( U L i +1 / 2 , U R i +1 / 2 ) • Reconstruction variables 1. Conserved variables - conservative 2. Characteristic variables - better upwinding but costly 3. Primitive variables ( ρ, u, p ) - computationally cheap • Unsteady flows - reconstruction must preserve conservation 1 � ˜ U ( x )d x = U i h i C i • Gradients for reconstruction: backward, forward, central difference s i,b = U i − U i − 1 s i,f = U i +1 − U i s i,c = U i +1 − U i − 1 , , x i − x i − 1 x i +1 − x i x i +1 − x i − 1 Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

  19. • Solution with discontinuity 1 1/2 i−1 i i+1 Praveen. C, CTFD Division, NAL, Bangalore First Prev Next Last Go Back Full Screen Close Quit

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend