Physics:Hybrid difference scheme

From HandWiki

The hybrid difference scheme[1][2] is a method used in the numerical solution for convection–diffusion problems. It was introduced by Spalding (1970). It is a combination of central difference scheme and upwind difference scheme as it exploits the favorable properties of both of these schemes.[3][4]

Introduction[5]

Hybrid difference scheme is a method used in the numerical solution for convection-diffusion problems. These problems play important roles in computational fluid dynamics. It can be described by the general partial equation as follows:[6]

[math]\displaystyle{ \frac{\partial}{\partial t}(\rho\phi)+\nabla (\rho \mathbf{u} \phi)\,= \nabla (\Gamma \cdot \operatorname{grad} \phi)+S_{\phi} }[/math][math]\displaystyle{ \; }[/math] (1)

Where, [math]\displaystyle{ \rho }[/math] is density, [math]\displaystyle{ \mathbf{u} }[/math] is the velocity vector, [math]\displaystyle{ \Gamma }[/math] is the diffusion coefficient and [math]\displaystyle{ S_{\phi} }[/math] is the source term. In this equation property, [math]\displaystyle{ \phi }[/math] can be temperature, internal energy or component of velocity vector [math]\displaystyle{ \mathbf{u} }[/math] in x, y and z directions.

For one-dimensional analysis of convection-diffusion problem in steady state and without the source the equation reduces to,

[math]\displaystyle{ \frac{\partial}{\partial x}(\rho u \phi)\,= \frac{\partial}{\partial x}\left(\Gamma\frac{\partial \phi}{\partial x}\right),\quad 0\lt x\lt L\; }[/math] [math]\displaystyle{ \; }[/math] (2)

With boundary conditions, [math]\displaystyle{ \phi (0)\,= \phi_0 }[/math] and [math]\displaystyle{ \phi (L)\, = \phi_{L} }[/math], where L is the length, [math]\displaystyle{ \phi_0 }[/math] and [math]\displaystyle{ \phi_{L} }[/math] are the given values.

Grid generation

Integrating equation 2 over the control volume containing node N, and using Gauss’ theorem i.e.,

[math]\displaystyle{ \int_{CV} \nabla (\rho\mathbf{u}\phi)dV \,= \int_{A} \mathbf{n} \cdot (\rho\mathbf{u}\phi)dA }[/math] [math]\displaystyle{ \; }[/math] (3)

Yields the following result,

[math]\displaystyle{ \left(\rho u A \phi \right)_{r} - \left(\rho u A \phi \right)_{l} }[/math] = [math]\displaystyle{ \left(\Gamma A \frac{\partial \phi}{\partial x}\right)_{r} - \left(\Gamma A \frac{\partial \phi}{\partial x}\right)_{l} }[/math] [math]\displaystyle{ \; }[/math](4)

Where, A is the cross-sectional area of the control volume. The equation must also satisfy the continuity equation, i.e.,

[math]\displaystyle{ \left(\rho u A \right)_{r} - \left(\rho u A \right)_{l} }[/math] = 0 [math]\displaystyle{ \; }[/math] (5)

Now let us define variables F and D to represent the convection mass flux and diffusion conductance at cell faces,

[math]\displaystyle{ F\,= \rho u A }[/math][math]\displaystyle{ \; }[/math] and [math]\displaystyle{ \; }[/math][math]\displaystyle{ D\,= \frac{\Gamma A}{\delta x} }[/math] [math]\displaystyle{ \; }[/math] (6)

Hence, equations (4) and (5) transform into the following equations:

[math]\displaystyle{ F_{r} \phi_{r}-F_{l} \phi_{l}\,= D_{r}(\phi_{R}-\phi_{N})-D_{l}(\phi_{N}-\phi_{L}) }[/math] [math]\displaystyle{ \; }[/math] (7)
[math]\displaystyle{ F_{r}-F_{l}\,=0 }[/math] [math]\displaystyle{ \; }[/math] (8)

Where, the lower case letters denote the values at the faces and the upper case letters denote that at the nodes. We also define a non-dimensional parameter Péclet number (Pe) as a measure of the relative strengths of convection and diffusion,

[math]\displaystyle{ Pe \,= \frac{F}{D} \,= \frac{\rho u}{\Gamma / \delta x} }[/math] [math]\displaystyle{ \; }[/math] (9)

For a low Peclet number (|Pe|<2) the flow is characterized as dominated by diffusion. For large Peclet number the flow is dominated by convection.

Central and upwind difference scheme[3][7]

Fig 1: The grid used for discretisation in Central Difference Scheme

In the above equations (7) and (8), we observe that the values required are at the faces, instead of the nodes. Hence approximations are required to fulfill this.

In the central difference scheme we replace the value at the face with the average of the values at the adjacent nodes,

[math]\displaystyle{ \phi_{r}\,= \frac{\phi_{R} + \phi_{N}}{2} }[/math] [math]\displaystyle{ \; }[/math] and [math]\displaystyle{ \; }[/math] [math]\displaystyle{ \phi_{l}\,= \frac{\phi_{N} + \phi_{L}}{2} }[/math] [math]\displaystyle{ \; }[/math] (10)
Fig 2: The grid used for discretisation in Upwind Difference Scheme for positive Peclet number (Pe>0)
Fig 3: The grid used for discretisation in Upwind Difference Scheme for negative Peclet number (Pe < 0)

By putting these values in equation (7) and rearranging we get the following result,

[math]\displaystyle{ a_{N} \phi_{N} \,= a_{R} \phi_{R} + a_{L} \phi_{L} }[/math] [math]\displaystyle{ \; }[/math] (11)

where,

[math]\displaystyle{ a_{L} }[/math] [math]\displaystyle{ a_{R} }[/math] [math]\displaystyle{ a_{N} }[/math]
[math]\displaystyle{ D_{l} + \frac{F_{l}}{2} }[/math]
[math]\displaystyle{ D_{r} - \frac{F_{r}}{2} }[/math]
[math]\displaystyle{ a_{R} + a_{L} + (F_{r} - F_{l}) }[/math]

In the Upwind scheme we replace the value at the face with the value at the adjacent upstream node. For example, for the flow to the right (Pe>0)as shown in the diagram, we replace the values as follows;

[math]\displaystyle{ \phi_{l}\,= \phi_{L} }[/math][math]\displaystyle{ \; }[/math] and [math]\displaystyle{ \; }[/math][math]\displaystyle{ \phi_{r}\,= \phi_{N} }[/math] [math]\displaystyle{ \; }[/math] (12)

And for Pe < 0, we put the values as shown in the figure 3,

[math]\displaystyle{ \phi_{r}\,= \phi_{R} }[/math][math]\displaystyle{ \; }[/math] and [math]\displaystyle{ \; }[/math][math]\displaystyle{ \phi_{l}\,= \phi_{N} }[/math] [math]\displaystyle{ \; }[/math] (13)

By putting these values in equation (7) and rearranging we get the same equation as equation (11), with the following values of the coefficients:

[math]\displaystyle{ a_{L} }[/math] [math]\displaystyle{ a_{R} }[/math] [math]\displaystyle{ a_{N} }[/math]
[math]\displaystyle{ D_{l} + \max( F_{l} , 0) }[/math]
[math]\displaystyle{ D_{r} + \max( - F_{r} , 0) }[/math]
[math]\displaystyle{ a_{R} + a_{L} + (F_{r} - F_{l}) }[/math]

Hybrid difference scheme[3][7]

Fig 4: Diagram showing the variation of any property (ϕ) along the length (L) at different Peclet numbers (Pe)

The hybrid difference scheme of Spalding (1970) is a combination of the central difference scheme and upwind difference scheme. It makes use of the central difference scheme, which is second order accurate, for small Peclet numbers (|Pe| < 2). For large Peclet numbers (|Pe| > 2) it uses the Upwind difference scheme, which first order accurate but takes into account the convection of the fluid.

As it can be seen in figure 4 that for Pe = 0, it is a linear distribution and for high Pe it takes the upstream value depending on the flow direction. For example, the value at the left face, in different circumstances is,

[math]\displaystyle{ \phi_{l}\,= \left [\left (1 + \frac{2}{ Pe_{l} }\right) \frac{\phi_{L}}{2} + \left (1 - \frac{2}{ Pe_{l} }\right) \frac{\phi_{N}}{2}\right ] \, }[/math] [math]\displaystyle{ \; }[/math] for [math]\displaystyle{ \; }[/math] [math]\displaystyle{ -2\lt Pe_{l} \lt 2 }[/math][math]\displaystyle{ \; }[/math] (14)
[math]\displaystyle{ \phi_{l}\,= \phi_{L} }[/math] [math]\displaystyle{ \; }[/math] for [math]\displaystyle{ \; }[/math] [math]\displaystyle{ Pe_{l} \text{≥} 2 }[/math] [math]\displaystyle{ \; }[/math] (15)
[math]\displaystyle{ \phi_{l}\,= \phi_{N} }[/math] [math]\displaystyle{ \; }[/math] for [math]\displaystyle{ \; }[/math] [math]\displaystyle{ Pe_{l} \text{≤} -2 }[/math] [math]\displaystyle{ \; }[/math] (16)

Substituting these values in equation (7) we get the same equation (11) with the values of the coefficients as follows,

[math]\displaystyle{ a_{L} }[/math] [math]\displaystyle{ a_{R} }[/math] [math]\displaystyle{ a_{N} }[/math]
[math]\displaystyle{ \max \left [ F_{l} , \left ( D_{l} + \frac{ F_{l}}{2} \right ), 0 \right ] }[/math]
[math]\displaystyle{ \max \left [ -F_{r} , \left ( D_{r} - \frac{ F_{r}}{2} \right ), 0 \right ] }[/math]
[math]\displaystyle{ a_{r} + a_{l} + (F_{r} - F_{l}) }[/math]

Advantages and disadvantages

It exploits the favourable properties of the central difference and upwind scheme. It switches to upwind difference scheme when central difference scheme produces inaccurate results for high Peclet numbers. It produces physically realistic solution and has proved to be helpful in the prediction of practical flows. The only disadvantage associated with hybrid difference scheme is that the accuracy in terms of Taylor series truncation error is only first order.

See also

References

  1. Patankar, Suhas V. (1980). Numerical heat transfer and fluid flow (14. printing. ed.). Bristol, PA: Taylor & Francis. ISBN 9780891165224. 
  2. Versteeg, H.K.; Malalasekera, W. (2007). An introduction to computational fluid dynamics : the finite volume method (2nd ed.). Harlow: Prentice Hall. ISBN 9780131274983. 
  3. 3.0 3.1 3.2 Scarborough, J.B.(1958) Numerical Mathematical Analysis, 4th edn, Johns Hopkins University Press, Baltimore, MD.
  4. Spalding, D.B. (1972). A Novel Finite-difference Formulation for Differential Expression Involving Both First and Second Derivatives, Int. J. Numer. Methods Eng., Vol. 4.
  5. Pollard, A. and Siu, A. L. W. (1982). The Calculation of Some Laminar Flows Using Various Discretization Schemes, Comput. Methods Appl. Mech. Eng., Vol. 35.
  6. Borris, J.P. and Brook, D.L. (1976). Solution of the Continuity Equation by the Method of Flux Corrected Transport, J. Comput. Phys., Vol. 16.
  7. 7.0 7.1 Roache, P.J.(1976) Computational Fluid Dynamics, Hermosa, Albuquerque, NM.

External links