Baixe o app para aproveitar ainda mais
Prévia do material em texto
Finite-Volume Discretization 1 Finite Volume (Control-Volume Finite Difference) Method Consider the 2-D diffusion equation of the form 2 2 2 2 f f S x y ∂ ∂ + = ∂ ∂ , 0 , 0x a y b≤ ≤ ≤ ≤ (1) The procedure of the finite volume discretization technique for the PDE includes: (A) Domain discretization (B) Equation discretization Finite-Volume Discretization 2 (A) Domain Discretization The solution domain is subdivided into a finite number of small control volumes (CVs) by a mesh which defines the control surfaces (CSs), not the computational grid points. For instance, a Cartesian 2-D grid system as illustrated below: xi-1/2 xi+1/2 yj+1/2 yj-1/2 Finite-Volume Discretization 3 (B) Equation Discretization The finite volume discretization uses the integral form of the PDE over the control volume centered at the grid point P or (i, j) as the starting point: 2 2 2 2[ ] p p p p p V V f f dV S dV x y ∂ ∂ + = ∂ ∂∫ ∫ (2) By means of the divergence theorem, the volume integral of LHS of Eq. (2) can be transformed into surface integral as 4 42 2 2 2 2 1 1 [ ] ( ) p k p p p k p p A p A k k k kV V A A f f fdV f dV f n dA dA F x y n = = ∂ ∂ ∂ + = ∇ = ∇ ⋅ = = ∂ ∂ ∂∑ ∑∫ ∫ ∫ ∫ (3) Finite-Volume Discretization 4 where ( ) k k k A k A fF dA n ∂ = ∂∫ , k = e, w, s, and n, which denotes the diffusion flux over the sub-control surface k around the grid point P. Finite-Volume Discretization 5 Surface integrals The surface integral over each sub-control surface can be approximated by numerical integration schemes, such as (a) Mean-value theorem ( ) ( ) ( ) k k k k A k A k k k A f f fF dA A A n n n ∂ ∂ ∂ = = ≈ ∂ ∂ ∂∫ (4) Here the mean diffusion flux over each sub-control surface is approximated by the local value at the surface point k. Finite-Volume Discretization 6 (b) Trapezoidal integration For instance, over the sub-control surface Ae, we have ( ) [( ) ( ) ] / 2 e e e A e e ne se A f f fF dA A n n n ∂ ∂ ∂ = ≈ + ∂ ∂ ∂∫ (5) (c) Simpson 1/3 integration rule ( ) [( ) 4( ) ( ) ]/ 6 e e e A e e ne e se A f f f fF dA A n n n n ∂ ∂ ∂ ∂ = ≈ + + ∂ ∂ ∂ ∂∫ (6) Usually the simplest approximation using the mean-value theorem is used in FVD. Finite-Volume Discretization 7 Volume Integrals The simplest approximation for the volume integral is to assume that the integrand is either constant or varies linearly within the control volume so that ( ) p p p p p p V S dV S V S x y≈ ∆ = ∆ ∆∫ (7) Now, the finite volume approximation to the PDE can be expressed as ( ) ( ) ( ) ( ) ( )e e w w s s n n p f f f fA A A A S x y n n n n ∂ ∂ ∂ ∂ + + + = ∆ ∆ ∂ ∂ ∂ ∂ (8) Finite-Volume Discretization 8 Now that ( ) ( ) ( )e e e f fA y n x ∂ ∂ = ∆ ∂ ∂ ( ) ( ) ( )w e w f fA y n x ∂ ∂ = − ∆ ∂ ∂ (9a) ( ) ( ) ( )n n n f fA x n y ∂ ∂ = ∆ ∂ ∂ ( ) ( ) ( )s s s f fA x n y ∂ ∂ = − ∆ ∂ ∂ (9b) Substituting into Eq. (8) yields ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )e w n s p f f f fy y x x S x y x x y y ∂ ∂ ∂ ∂ ∆ − ∆ + ∆ − ∆ = ∆ ∆ ∂ ∂ ∂ ∂ [( ) ( ) ] /( ) [( ) ( ) ] /( )e w n s p f f f fx y S x x y y ∂ ∂ ∂ ∂ − ∆ + − ∆ = ∂ ∂ ∂ ∂ (10) Finite-Volume Discretization 9 [Interpolation at Control Surface Grids] (a) Piece-wise Linear Interpolation The assumption of a linear variation between the grid point P and its adjacent grid points E, W, N, and S. It follows that ( ) ( )( ) ( ) E P E P e E P f f f ff x x x x − −∂ ≈ = ∂ − ∆ ( ) ( )( ) ( ) P W P W w P W f f f ff x x x x − −∂ ≈ = ∂ − ∆ (11a) ( ) ( )( ) ( ) N P N P n N p f f f ff y y y y − −∂ ≈ = ∂ − ∆ ( ) ( )( ) ( ) P S P S s P S f f f ff y y y y − −∂ ≈ = ∂ − ∆ (11b) Finite-Volume Discretization 10 Incorporating the above approximations, the finite volume equation analogue to the PDE can be formulated as 2 2 ( 2 ) ( 2 )S P N W P E P f f f f f f S y x − + − + + = ∆ ∆ or , -1 , , 1 -1, , 1, ,2 2 ( 2 ) ( 2 ) =i j i j i j i j i j i j i j f f f f f f S y x + +− + − ++ ∆ ∆ (12a) In compact form, 2 2 2 21, , 1 , 1, , 1 ,2(1 )i j i j i j i j i j i jf f f f f S xβ β β− − + ++ − + + + = ∆ (12b) where /x yβ = ∆ ∆ . Finite-Volume Discretization 11 Note that the finite volume discretization thus developed gives an identical algebraic equation to that obtained using the Taylor series expansion. But this should be viewed as a special situation. Finite-Volume Discretization 12 (b) Non-Linear Interpolation Consider 1-D advection-diffusion problem of ( )( ) 0,d df d uf dx dx dx α − = 0 1x≤ ≤ (13a) subject to ( 0) 0 and ( 1) 1f x f x= = = = (13b) where u and α are the flow velocity, which is assumed to be constant, and the diffusivity of the medium, respectively. user 螢光標示 Finite-Volume Discretization 13 The analytical solution to this problem can be obtained as illustrated in Fig. 1: ( / ) ( / ) 1( ) 1 ux u ef x e α α − = − (14) Fig. 1 Solutions to the linear 1-D convection-diffusion problem. Finite-Volume Discretization 14 Application of the finite volume discretization to Eq. (13a) for a control volume around an arbitrary interior grid xi of a uniform mesh over the solution domain gives xi xi-1 xi+1 ∆x a b ( ) 0 b a d df uf dx dx dx α − =∫ ⇒ [( )( ) ] [( )( ) ] 0b b a adf dff fu dx u dxα α− − − = (15) Finite-Volume Discretization 15 In view of the form of the analytical solution, we may assume the solution of the form [ ( ) / ]0 1( ) i u x xf x C C e α−= + , 1i ix x x +≤ ≤ (16) where the two coefficients C0 and C1 are determined by enforcing Eq. (16) to satisfy 0 1 ( / ) 1 1 0 1 ( ) ( ) i i u x i i f f x x C C f f x x C C e α∆+ + = = = + = = = + ⇒ ( / ) 1 0 ( / ) 1 1 ( / ) 1 1 u x i i u x i i u x f e fC e f fC e α α α ∆ + ∆ + ∆ − = − − = − (17) Finite-Volume Discretization 16 Similarly, for the interval -1i ix x x≤ ≤ , we have -1[ ( ) / ]0 1( ) i u x xf x D D e α−= + (19) with ( / ) 1 0 ( / )1 u x i i u x f e fD e α α ∆ − ∆ − = − and 11 ( / )1 i i u x f fD e α − ∆ − = − Then, the values and the gradient at the control surfaces can be evaluated as follows: [ ( / 2) / ]1/ 2 0 1( ) u x a if f x x D D e α∆ −= = = + and 1/ 2 [ ( / 2) / ] 1( ) ( ) ( )i u x a x df df uD e dx dx α α− ∆= = (20) [ ( / 2) / ]b +1/ 2 0 1( ) u x if f x x C C e α∆= = = + and 1/ 2 [ ( / 2) / ] 1( ) ( ) ( )i u x b x df df uC e dx dx α α+ ∆= = (21) Finite-Volume Discretization 17 Substituting into Eq. (15) yields ( / ) ( / )1 1(1 ) 0 u x u x i i ie f e f f α α∆ ∆ − +− + + = or 1 1(1 ) 0x x Pe Pe i i ie f e f f− +− + + = (22) where Pex(= u∆x/α) is called the grid Peclet number. Alternatively, incorporating the linear interpolation technique, Eq. (15) takes the form of 1 1[1 ( / 2)] 2 [1 ( / 2)] 0x i i x iPe f f Pe f− ++ − + − = (23) which is identical to that obtained using central-difference formula.Finite-Volume Discretization 18 END
Compartilhar