# Central Difference Scheme

(Difference between revisions)
 Revision as of 03:17, 21 July 2010 (view source)← Older edit Current revision as of 03:20, 21 July 2010 (view source) Line 34: Line 34: - |{{EquationRef|(1)}} + |{{EquationRef|(2)}} |} |} Defining the mass flux and diffusive conductance Defining the mass flux and diffusive conductance Line 43: Line 43: $F=\rho u,\text{ }D=\frac{\Gamma }{\delta x}$ $F=\rho u,\text{ }D=\frac{\Gamma }{\delta x}$ - |{{EquationRef|(2)}} + |{{EquationRef|(3)}} |} |} - eq. (4.212) can be rearranged as + eq. (2) can be rearranged as {| class="wikitable" border="0" {| class="wikitable" border="0" Line 55: Line 55: - |{{EquationRef|(3)}} + |{{EquationRef|(4)}} |} |} where where Line 64: Line 64: $a_{E}=D_{e}-\frac{1}{2}F_{e}$ $a_{E}=D_{e}-\frac{1}{2}F_{e}$ - |{{EquationRef|(4)}} + |{{EquationRef|(5)}} |} |} Line 72: Line 72: $a_{W}=D_{w}+\frac{1}{2}F_{w}$ $a_{W}=D_{w}+\frac{1}{2}F_{w}$ - |{{EquationRef|(5)}} + |{{EquationRef|(6)}} |} |} Line 80: Line 80: $\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}-F_{w})$ $\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}-F_{w})$ - |{{EquationRef|(6)}} + |{{EquationRef|(7)}} |} |} - 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 $F_{e}=F_{w}$ and therefore, eq. (4.217) reduces to + 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 requires that $F_{e}=F_{w}$ and therefore, eq. (7) reduces to $a_{P}=a_{W}+a_{E}$ $a_{P}=a_{W}+a_{E}$ - To evaluate the performance of the central difference scheme, let us consider the case of a uniform grid, i.e., $(\delta x)_{e}=(\delta x)_{w}=\delta x$, for which case eq.  (4.212) can be rearranged as + To evaluate the performance of the central difference scheme, let us consider the case of a uniform grid, i.e., $(\delta x)_{e}=(\delta x)_{w}=\delta x$, for which case eq.  (2) can be rearranged as {| class="wikitable" border="0" {| class="wikitable" border="0" Line 93: Line 93: $\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]$ $\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]$ - |{{EquationRef|(7)}} + |{{EquationRef|(8)}} |} |} where where Line 102: Line 102: $\text{Pe}_{\Delta }=\frac{\rho u\delta x}{\Gamma }=\frac{F}{D}$ $\text{Pe}_{\Delta }=\frac{\rho u\delta x}{\Gamma }=\frac{F}{D}$ - |{{EquationRef|(8)}} + |{{EquationRef|(9)}} |} |} 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., 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., Line 111: Line 111: $\left| \text{Pe}_{\Delta } \right|\le 2$ $\left| \text{Pe}_{\Delta } \right|\le 2$ - |{{EquationRef|(9)}} + |{{EquationRef|(10)}} |} |} - 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. + + This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (10) is violated. 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.

## Current revision as of 03:20, 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}}$ (2)

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

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

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

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 requires that Fe = Fw and therefore, eq. (7) 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. (2) 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]$ (8)

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

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$ (10)

This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (10) is violated. 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.