# Central Difference Scheme

(Difference between revisions)
 Revision as of 16:14, 2 June 2010 (view source)← Older edit Revision as of 03:17, 21 July 2010 (view source)Newer edit → Line 1: Line 1: {{Comp Method for Forced Convection Category}} {{Comp Method for Forced Convection Category}} - Integrating [[One-Dimensional_Steady-State_Convection_and_Diffusion#equation_.282.29|the governing equation]] over the control volume P (shaded area in Fig. 1), one obtains + Integrating [[One-Dimensional_Steady-State_Convection_and_Diffusion#equation_.282.29|the governing equation]] over the control volume P (shaded area in the figure to the right), one obtains - [[Image:Fig4.17.png|thumb|400 px|alt=Control volume for one-dimensional problem |Figure 1: Control volume for one-dimensional problem.]] + [[Image:Fig4.17.png|thumb|400 px|alt=Control volume for one-dimensional problem | Control volume for one-dimensional problem.]] {| class="wikitable" border="0" {| class="wikitable" border="0" Line 12: Line 12: |{{EquationRef|(1)}} |{{EquationRef|(1)}} |} |} - The right-hand side of eq. (4.211) can be obtained by assuming the distribution of $\varphi$ between any two neighboring grid points is piecewise linear (see Chapter 3), i.e., + The right-hand side of eq. (1) can be obtained by assuming the distribution of $\varphi$ between any two neighboring grid points is piecewise linear, i.e.,
$\left( \Gamma \frac{d\varphi }{dx} \right)_{e}=\Gamma _{e}\frac{\varphi _{E}-\varphi _{P}}{(\delta x)_{e}}$
$\left( \Gamma \frac{d\varphi }{dx} \right)_{e}=\Gamma _{e}\frac{\varphi _{E}-\varphi _{P}}{(\delta x)_{e}}$
Line 19: Line 19:
$\left( \Gamma \frac{d\varphi }{dx} \right)_{w}=\Gamma _{w}\frac{\varphi _{P}-\varphi _{W}}{(\delta x)_{w}}$
$\left( \Gamma \frac{d\varphi }{dx} \right)_{w}=\Gamma _{w}\frac{\varphi _{P}-\varphi _{W}}{(\delta x)_{w}}$
- where Γe and Γw are the diffusivities at the faces of the control volume. To ensure that the flux of $\varphi$ across the faces of the control volume is continuous, the harmonic mean diffusivity at the faces should be used. To evaluate the left hand side of eq. (4.211), it is necessary to know the values of $\varphi$ at the faces of the control volume. If the piecewise linear profile of $\varphi$ is chosen, it follows that + where Γe and Γw are the diffusivities at the faces of the control volume. To ensure that the flux of $\varphi$ across the faces of the control volume is continuous, the harmonic mean diffusivity at the faces should be used. To evaluate the left hand side of eq. (1), it is necessary to know the values of $\varphi$ at the faces of the control volume. If the piecewise linear profile of $\varphi$ is chosen, it follows that
$\varphi _{e}=\frac{\varphi _{E}+\varphi _{P}}{2}$
$\varphi _{e}=\frac{\varphi _{E}+\varphi _{P}}{2}$
Line 26: Line 26:
$\varphi _{w}=\frac{\varphi _{P}+\varphi _{W}}{2}$
$\varphi _{w}=\frac{\varphi _{P}+\varphi _{W}}{2}$
- Therefore, eq. (4.211) becomes + Therefore, eq. (1) becomes {| class="wikitable" border="0" {| class="wikitable" border="0"

## Revision as of 03:17, 21 July 2010

Integrating the governing equation over the control volume P (shaded area in the figure to the right), one obtains $(\rho u\varphi )_{e}-(\rho u\varphi )_{w}=\left( \Gamma \frac{d\varphi }{dx} \right)_{e}-\left( \Gamma \frac{d\varphi }{dx} \right)_{w}$ (1)

The right-hand side of eq. (1) can be obtained by assuming the distribution of $\varphi$ between any two neighboring grid points is piecewise linear, i.e., $\left( \Gamma \frac{d\varphi }{dx} \right)_{e}=\Gamma _{e}\frac{\varphi _{E}-\varphi _{P}}{(\delta x)_{e}}$ $\left( \Gamma \frac{d\varphi }{dx} \right)_{w}=\Gamma _{w}\frac{\varphi _{P}-\varphi _{W}}{(\delta x)_{w}}$

where Γe and Γw are the diffusivities at the faces of the control volume. To ensure that the flux of $\varphi$ across the faces of the control volume is continuous, the harmonic mean diffusivity at the faces should be used. To evaluate the left hand side of eq. (1), it is necessary to know the values of $\varphi$ at the faces of the control volume. If the piecewise linear profile of $\varphi$ is chosen, it follows that $\varphi _{e}=\frac{\varphi _{E}+\varphi _{P}}{2}$ $\varphi _{w}=\frac{\varphi _{P}+\varphi _{W}}{2}$

Therefore, eq. (1) becomes $(\rho u)_{e}\frac{\varphi _{E}+\varphi _{P}}{2}-(\rho u)_{w}\frac{\varphi _{P}+\varphi _{W}}{2}=\Gamma _{e}\frac{\varphi _{E}-\varphi _{P}}{(\delta x)_{e}}-\Gamma _{w}\frac{\varphi _{P}-\varphi _{W}}{(\delta x)_{w}}$ (1)

Defining the mass flux and diffusive conductance $F=\rho u,\text{ }D=\frac{\Gamma }{\delta x}$ (2)

eq. (4.212) can be rearranged as $a_{P}\varphi _{P}=a_{E}\varphi _{E}+a_{W}\varphi _{W}$ (3)

where $a_{E}=D_{e}-\frac{1}{2}F_{e}$ (4) $a_{W}=D_{w}+\frac{1}{2}F_{w}$ (5) $\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}-F_{w})$ (6)

This scheme is termed the central difference scheme because the values of $\varphi$ at the faces of the control volume are taken as the averaged value between two grid points. The continuity equation (4.202) requires that Fe = Fw and therefore, eq. (4.217) reduces to

aP = aW + aE

To evaluate the performance of the central difference scheme, let us consider the case of a uniform grid, i.e., x)e = (δx)w = δx, for which case eq. (4.212) can be rearranged as $\varphi _{P}=\frac{1}{2}\left[ \left( 1-\frac{\text{Pe}_{\Delta }}{2} \right)\varphi _{E}+\left( 1+\frac{\text{Pe}_{\Delta }}{2} \right)\varphi _{W} \right]$ (7)

where $\text{Pe}_{\Delta }=\frac{\rho u\delta x}{\Gamma }=\frac{F}{D}$ (8)

is the Peclet number using grid size as the characteristic length, which is referred to as the grid Peclet number. The grid Pe is a ratio of the strength of convection over diffusion. To ensure stability of the discretization scheme, the value of $\varphi _{P}$ should always fall between $\varphi _{E}$ and $\varphi _{W}$, which requires that the coefficients, $\varphi _{E}$ and $\varphi _{W}$, are positive, i.e., $\left| \text{Pe}_{\Delta } \right|\le 2$ (9)

This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (4.220) is violated (see Problem 4.22). The fact that the central difference scheme is stable under small grid Peclet number indicates that the central difference scheme is accurate only if the convection is not very significant.