OneDimensional SteadyState Convection and Diffusion
From ThermalFluidsPedia
Yuwen Zhang (Talk  contribs) 

(13 intermediate revisions not shown)  
Line 90:  Line 90:  
which will be used as a criterion to check the accuracy of various discretization schemes.  which will be used as a criterion to check the accuracy of various discretization schemes.  
  +  ==Central Difference Scheme==  
  Integrating  +  Integrating eq. (1) over the control volume P (shaded area in the figure to the right), one obtains 
[[Image:Fig4.17.pngthumb400 pxalt=Control volume for onedimensional problem  Control volume for onedimensional problem.]]  [[Image:Fig4.17.pngthumb400 pxalt=Control volume for onedimensional problem  Control volume for onedimensional problem.]]  
Line 103:  Line 103:  
{{EquationRef(11)}}  {{EquationRef(11)}}  
}  }  
  The righthand side of eq. (  +  The righthand side of eq. (11) can be obtained by assuming the distribution of <math>\varphi </math> between any two neighboring grid points is piecewise linear, i.e., 
<center><math>\left( \Gamma \frac{d\varphi }{dx} \right)_{e}=\Gamma _{e}\frac{\varphi _{E}\varphi _{P}}{(\delta x)_{e}}</math></center>  <center><math>\left( \Gamma \frac{d\varphi }{dx} \right)_{e}=\Gamma _{e}\frac{\varphi _{E}\varphi _{P}}{(\delta x)_{e}}</math></center>  
Line 110:  Line 110:  
<center><math>\left( \Gamma \frac{d\varphi }{dx} \right)_{w}=\Gamma _{w}\frac{\varphi _{P}\varphi _{W}}{(\delta x)_{w}}</math></center>  <center><math>\left( \Gamma \frac{d\varphi }{dx} \right)_{w}=\Gamma _{w}\frac{\varphi _{P}\varphi _{W}}{(\delta x)_{w}}</math></center>  
  where Γ<sub>e</sub> and Γ<sub>w</sub> are the diffusivities at the faces of the control volume. To ensure that the flux of <math>\varphi </math> 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. (  +  where Γ<sub>e</sub> and Γ<sub>w</sub> are the diffusivities at the faces of the control volume. To ensure that the flux of <math>\varphi </math> 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. (11), it is necessary to know the values of <math>\varphi </math> at the faces of the control volume. If the piecewise linear profile of <math>\varphi </math> is chosen, it follows that 
<center><math>\varphi _{e}=\frac{\varphi _{E}+\varphi _{P}}{2}</math></center>  <center><math>\varphi _{e}=\frac{\varphi _{E}+\varphi _{P}}{2}</math></center>  
Line 117:  Line 117:  
<center><math>\varphi _{w}=\frac{\varphi _{P}+\varphi _{W}}{2}</math></center>  <center><math>\varphi _{w}=\frac{\varphi _{P}+\varphi _{W}}{2}</math></center>  
  Therefore, eq. (  +  Therefore, eq. (11) becomes 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 138:  Line 138:  
  eq. (  +  eq. (12) can be rearranged as 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 173:  Line 173:  
{{EquationRef(17)}}  {{EquationRef(17)}}  
}  }  
  This scheme is termed the central difference scheme because the values of <math>\varphi </math> at the faces of the control volume are taken as the averaged value between two grid points. The continuity equation requires that <math>F_{e}=F_{w}</math> and therefore, eq. (  +  This scheme is termed the central difference scheme because the values of <math>\varphi </math> at the faces of the control volume are taken as the averaged value between two grid points. The continuity equation requires that <math>F_{e}=F_{w}</math> and therefore, eq. (17) reduces to 
<math>a_{P}=a_{W}+a_{E}</math>  <math>a_{P}=a_{W}+a_{E}</math>  
  To evaluate the performance of the central difference scheme, let us consider the case of a uniform grid, i.e., <math>(\delta x)_{e}=(\delta x)_{w}=\delta x</math>, for which case eq. (  +  To evaluate the performance of the central difference scheme, let us consider the case of a uniform grid, i.e., <math>(\delta x)_{e}=(\delta x)_{w}=\delta x</math>, for which case eq. (12) can be rearranged as 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 205:  Line 205:  
}  }  
  This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (  +  This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (20) 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. 
  +  ==Upwind Scheme==  
  The central difference scheme assumes that the effects of the values of <math>\varphi </math> at two neighboring grid points on the value of <math>\varphi </math> at the face of the control volume are equal. This assumption is valid only if the effect of diffusion is dominant. If, on the other hand, the convection is dominant, one can expect that the effect of the grid point upwind is more significant than that of the point downwind. If we can assume that the value of <math>\varphi </math> at the face of the control volume is dominated by the value of <math>\varphi </math> at the grid point at the upwind side and that the effect of the value of <math>\varphi </math> at the downwind side can be neglected, the two terms on the left hand side of eq. (  +  The central difference scheme assumes that the effects of the values of <math>\varphi </math> at two neighboring grid points on the value of <math>\varphi </math> at the face of the control volume are equal. This assumption is valid only if the effect of diffusion is dominant. If, on the other hand, the convection is dominant, one can expect that the effect of the grid point upwind is more significant than that of the point downwind. If we can assume that the value of <math>\varphi </math> at the face of the control volume is dominated by the value of <math>\varphi </math> at the grid point at the upwind side and that the effect of the value of <math>\varphi </math> at the downwind side can be neglected, the two terms on the left hand side of eq. (11) can be expressed as 
  <math>(\rho u\varphi )_{e}=\left\{ \begin{matrix}  +  <center><math>(\rho u\varphi )_{e}=\left\{ \begin{matrix} 
F_{e}\varphi _{P},\text{ }F_{e}>0 \\  F_{e}\varphi _{P},\text{ }F_{e}>0 \\  
F_{e}\varphi _{E},\text{ }F_{e}<0 \\  F_{e}\varphi _{E},\text{ }F_{e}<0 \\  
  \end{matrix} \right.</math>  +  \end{matrix} \right.</math></center> 
  <math>(\rho u\varphi )_{w}=\left\{ \begin{matrix}  +  <center><math>(\rho u\varphi )_{w}=\left\{ \begin{matrix} 
F_{w}\varphi _{W},\text{ }F_{w}>0 \\  F_{w}\varphi _{W},\text{ }F_{w}>0 \\  
F_{w}\varphi _{P},\text{ }F_{w}<0 \\  F_{w}\varphi _{P},\text{ }F_{w}<0 \\  
  \end{matrix} \right.</math>  +  \end{matrix} \right.</math></center> 
The above two equations can be expressed in the following compact form:  The above two equations can be expressed in the following compact form:  
  <math>(\rho u\varphi )_{e}=\varphi _{P}\left[\!\left[ F_{e},0 \right]\!\right]\varphi _{E}\left[\!\left[ F_{e},0 \right]\!\right]</math>  +  <center><math>(\rho u\varphi )_{e}=\varphi _{P}\left[\!\left[ F_{e},0 \right]\!\right]\varphi _{E}\left[\!\left[ F_{e},0 \right]\!\right]</math></center> 
  <math>(\rho u\varphi )_{w}=\varphi _{W}\left[\!\left[ F_{w},0 \right]\!\right]\varphi _{P}\left[\!\left[ F_{w},0 \right]\!\right]</math>  +  <center><math>(\rho u\varphi )_{w}=\varphi _{W}\left[\!\left[ F_{w},0 \right]\!\right]\varphi _{P}\left[\!\left[ F_{w},0 \right]\!\right]</math></center> 
  where the operator <math>\left[\!\left[ A,B \right]\!\right]</math> denotes the greater of A and B  +  where the operator <math>\left[\!\left[ A,B \right]\!\right]</math> denotes the greater of ''A'' and ''B'' <ref name="P1980">Patankar, S.V., 1980, Numerical Heat Transfer and Fluid Flow, Hemisphere, Washington, DC. </ref>. Substituting the above expression into the left hand side of eq. (11) and using central difference for the right hand side of eq. (11), the discretized equation becomes 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 263:  Line 263:  
{{EquationRef(24)}}  {{EquationRef(24)}}  
}  }  
  The above scheme is referred to as the upwind scheme because the value of <math>\varphi </math> at the grid point on the upwind side was used as the value of <math>\varphi </math> at the face of the control volume to discretize the convection term. The upwind scheme ensures that the coefficients in eq. (  +  The above scheme is referred to as the upwind scheme because the value of <math>\varphi </math> at the grid point on the upwind side was used as the value of <math>\varphi </math> at the face of the control volume to discretize the convection term. The upwind scheme ensures that the coefficients in eq. (21) are always positive so that a physically unrealistic solution can be avoided. 
  +  ==Hybrid Scheme==  
  The upwind scheme uses the value of <math>\varphi </math> from the grid point at the upwind side as the value of <math>\varphi </math> at the face of the control volume regardless of the grid Peclet number. While this treatment can yield accurate results for cases with high Peclet number, the result will not be accurate for cases where the grid Peclet number is near zero; for which cases the central difference scheme can produce better results. Spalding  +  The upwind scheme uses the value of <math>\varphi </math> from the grid point at the upwind side as the value of <math>\varphi </math> at the face of the control volume regardless of the grid Peclet number. While this treatment can yield accurate results for cases with high Peclet number, the result will not be accurate for cases where the grid Peclet number is near zero; for which cases the central difference scheme can produce better results. Spalding <ref name="S1972">Spalding, D.B., 1972, “A Novel Finitedifference Formulation for Differential Expressions Involving both First and Second Derivatives,” Int. J. Num. Methods Eng., Vol. 4, pp. 551559. </ref> proposed a hybrid scheme that uses the central difference scheme when <math>\left \text{Pe}_{\Delta } \right\le 2</math> and the upwind scheme when <math>\left \text{Pe}_{\Delta } \right>2</math>. 
  To observe the difference between the central difference and upwind schemes, the coefficient for the east neighboring grid point, eqs. (  +  To observe the difference between the central difference and upwind schemes, the coefficient for the east neighboring grid point, eqs. (15) and (22), can be rewritten as 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
    
Line 286:  Line 286:  
The hybrid scheme can then be expressed as  The hybrid scheme can then be expressed as  
  <math>a_{E}/D_{e}=\left\{ \begin{matrix}  +  <center><math>a_{E}/D_{e}=\left\{ \begin{matrix} 
\text{Pe}_{\Delta e}\text{ Pe}_{\Delta e}<2 \\  \text{Pe}_{\Delta e}\text{ Pe}_{\Delta e}<2 \\  
1\frac{1}{2}\text{Pe}_{\Delta e}\text{ }\text{2}\le \text{ Pe}_{\Delta e}\le 2 \\  1\frac{1}{2}\text{Pe}_{\Delta e}\text{ }\text{2}\le \text{ Pe}_{\Delta e}\le 2 \\  
0\text{ Pe}_{\Delta e}>2 \\  0\text{ Pe}_{\Delta e}>2 \\  
  \end{matrix} \right.</math>  +  \end{matrix} \right.</math></center> 
which can be rewritten in the following compact form  which can be rewritten in the following compact form  
Line 310:  Line 310:  
{{EquationRef(28)}}  {{EquationRef(28)}}  
}  }  
  The above hybrid scheme combines the advantages of the central difference and upwind schemes to yield better results for cases where <math>\left \text{Pe}_{\Delta } \right\to \infty </math> or <math>\left \text{Pe}_{\Delta } \right\sim 0</math>. However, there is still room for improvement of the solution when <math>\left \text{Pe}_{\Delta } \right</math> is near 2  +  The above hybrid scheme combines the advantages of the central difference and upwind schemes to yield better results for cases where <math>\left \text{Pe}_{\Delta } \right\to \infty </math> or <math>\left \text{Pe}_{\Delta } \right\sim 0</math>. However, there is still room for improvement of the solution when <math>\left \text{Pe}_{\Delta } \right</math> is near 2. 
  +  ==Exponential and Power Law Schemes==  
  Since the exact solution of eq. (  +  Since the exact solution of eq. (1) exists, one can reasonably expect that an accurate scheme can be derived if the result of the exact solution, eq. (10), is utilized. Equation (1) can be rewritten as 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 331:  Line 331:  
{{EquationRef(30)}}  {{EquationRef(30)}}  
}  }  
  eq. (  +  eq. (29) becomes 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 340:  Line 340:  
{{EquationRef(31)}}  {{EquationRef(31)}}  
}  }  
  Integrating eq. (  +  Integrating eq. (31) over the control volume P (shaded area in first figure), yields 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 349:  Line 349:  
{{EquationRef(32)}}  {{EquationRef(32)}}  
}  }  
  Instead of assuming piecewise linear distribution of <math>\varphi </math> as with central difference scheme or assuming <math>\varphi </math> at the face of the control volume is equal to the value of <math>\varphi </math> at the grid point on the upwind side in the upwind scheme, the distribution of <math>\varphi </math> between grid points can be taken as that obtained from the exact solution, eq. (  +  Instead of assuming piecewise linear distribution of <math>\varphi </math> as with central difference scheme or assuming <math>\varphi </math> at the face of the control volume is equal to the value of <math>\varphi </math> at the grid point on the upwind side in the upwind scheme, the distribution of <math>\varphi </math> between grid points can be taken as that obtained from the exact solution, eq. (10). Applying eq. (10) between grid points E and P, we have 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 358:  Line 358:  
{{EquationRef(33)}}  {{EquationRef(33)}}  
}  }  
  Substituting eq. (  +  Substituting eq. (33) into eq. (30) and evaluating the result at <math>\begin{matrix} 
+  {} & x={{x}_{e}} \\  
+  \end{matrix}</math>, the total flux of <math>\varphi </math> at the face of control volume becomes  
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 376:  Line 378:  
{{EquationRef(35)}}  {{EquationRef(35)}}  
}  }  
  Substituting eqs. (  +  Substituting eqs. (34) and (35) into eq. (32) and rearranging the resulting equation yields 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 411:  Line 413:  
{{EquationRef(39)}}  {{EquationRef(39)}}  
}  }  
  Equations (  +  Equations (37) and (38) can be rewritten in a format similar to that of eqs. (25) – (28), i.e., 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 428:  Line 430:  
{{EquationRef(41)}}  {{EquationRef(41)}}  
}  }  
  +  [[Image:Fig4.18.pngthumb400 pxalt=Comparison among different schemes Comparison among different schemes.]]  
  +  The comparison of <math>\begin{matrix}{} & {{a}_{E}}/{{D}_{e}} \\\end{matrix}</math> for different schemes is shown in the figure to the right. It can be seen that the hybrid scheme can be viewed as an envelope of the exponential scheme. The hybrid scheme is a good approximation if the absolute value of the grid Peclet number is either very large or near zero.  
  While the exponential scheme is accurate, the computational time is much longer than for the central difference, upwind or hybrid schemes. Patankar  +  While the exponential scheme is accurate, the computational time is much longer than for the central difference, upwind or hybrid schemes. Patankar <ref name="P1981">Patankar, S.V., 1981, “A Calculation Procedure for TwoDimensional Elliptic Situations,” Numerical Heat Transfer, Vol. 4, pp. 409425.</ref> proposed a power law scheme that has almost the same accuracy as the exponential scheme but a substantially shorter computational time. The coefficient of the neighbor grid point on the east side can be obtained by 
  +  
  <math>a_{E}/D_{e}=\left\{ \begin{matrix}  +  <center><math>a_{E}/D_{e}=\left\{ \begin{matrix} 
\text{Pe}_{\Delta e}\text{ Pe}_{\Delta e}<10 \\  \text{Pe}_{\Delta e}\text{ Pe}_{\Delta e}<10 \\  
(1+0.1\text{Pe}_{\Delta e})^{5}\text{Pe}_{\Delta e}\text{ }1\text{0}\le \text{Pe}_{\Delta e}<0 \\  (1+0.1\text{Pe}_{\Delta e})^{5}\text{Pe}_{\Delta e}\text{ }1\text{0}\le \text{Pe}_{\Delta e}<0 \\  
(10.1\text{Pe}_{\Delta e})^{5}\text{ 0}\le \text{Pe}_{\Delta e}\le 10 \\  (10.1\text{Pe}_{\Delta e})^{5}\text{ 0}\le \text{Pe}_{\Delta e}\le 10 \\  
0\text{ Pe}_{\Delta e}>10 \\  0\text{ Pe}_{\Delta e}>10 \\  
  \end{matrix} \right.</math>  +  \end{matrix} \right.</math></center> 
which can be rewritten in the following compact form  which can be rewritten in the following compact form  
Line 452:  Line 453:  
}  }  
  +  ==A Generalized Expression of Discretization Schemes==  
  The above discretization schemes can be expressed in a single generalized form. The total flux J at the interface between two grid points that were defined in eq. (  +  The above discretization schemes can be expressed in a single generalized form. The total flux ''J'' at the interface between two grid points that were defined in eq. (30) can be used to define: 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 462:  Line 463:  
{{EquationRef(43)}}  {{EquationRef(43)}}  
}  }  
  which relates to the values of <math>\varphi </math> at grid points i and i+1 (see  +  
  <math>J^{*}</math> the total flux as  +  [[Image:Fig4.19.pngthumb400 pxalt=Total flux at the interface between grid points ''i'' and ''i''+1  Total flux at the interface between grid points ''i'' and ''i''+1 .]] 
+  
+  which relates to the values of <math>\varphi </math> at grid points ''i'' and ''i''+1 (see figure to the right). The first term on the right side of eq. (43) will be related to some weighted average of <math>\varphi _{i}</math> and <math>\varphi _{i+1}</math>, and the second term will be related to the difference between <math>\varphi _{i}</math> and <math>\varphi _{i+1}</math>. Thus, one can express  
+  <math>J^{*}</math> the total flux as <ref name="P1980"/>  
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 472:  Line 476:  
{{EquationRef(44)}}  {{EquationRef(44)}}  
}  }  
  where A and B are dimensionless coefficients that are functions of the grid Peclet number. If the field of <math>\varphi </math> is uniform, we will have <math>d\varphi /dx=0</math> and eq. (  +  where ''A'' and ''B'' are dimensionless coefficients that are functions of the grid Peclet number. If the field of <math>\varphi </math> is uniform, we will have <math>d\varphi /dx=0</math> and eq. (43) becomes 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 481:  Line 485:  
{{EquationRef(45)}}  {{EquationRef(45)}}  
}  }  
  Comparing eqs. (  +  Comparing eqs. (44) and (45) yields 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 491:  Line 495:  
}  }  
  +  For the grid system shown in the above figure, if we reconsider the problem in a reversed coordinate system <math>x'</math> (<math>x'=x</math>), the grid Peclet number will become <math>\text{Pe}_{\Delta }</math> and <math>J^{*}</math> becomes  
  +  
  For the grid system shown in  +  
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 502:  Line 504:  
{{EquationRef(47)}}  {{EquationRef(47)}}  
}  }  
  The symmetric properties of A and B can be obtained by comparing eqs. (  +  The symmetric properties of ''A'' and ''B'' can be obtained by comparing eqs. (44) and (47), i.e., 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 519:  Line 521:  
{{EquationRef(49)}}  {{EquationRef(49)}}  
}  }  
  For the exponential schemes discussed above, one can obtain <math>J^{*}</math> from eq(  +  For the exponential schemes discussed above, one can obtain <math>\begin{matrix}{} & {{J}^{*}} \\\end{matrix}</math> from eq(34)or (35), i.e., 
  <math>\begin{align}  +  <center><math>\begin{align} 
& J^{*}=\text{Pe}_{\Delta }\left[ \varphi _{i}+\frac{\varphi _{i}\varphi _{i+1}}{\exp (\text{Pe}_{\Delta })1} \right] \\  & J^{*}=\text{Pe}_{\Delta }\left[ \varphi _{i}+\frac{\varphi _{i}\varphi _{i+1}}{\exp (\text{Pe}_{\Delta })1} \right] \\  
& =\frac{\exp (\text{Pe}_{\Delta })\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}\varphi _{i}\frac{\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}\varphi _{i+1} \\  & =\frac{\exp (\text{Pe}_{\Delta })\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}\varphi _{i}\frac{\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}\varphi _{i+1} \\  
  \end{align}</math>  +  \end{align}</math></center> 
  Comparing the above expression with eq. (  +  Comparing the above expression with eq. (44), one obtains 
  <math>B=\frac{\exp (\text{Pe}_{\Delta })\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1},\text{ }A=\frac{\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}</math>  +  <center><math>B=\frac{\exp (\text{Pe}_{\Delta })\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1},\text{ }A=\frac{\text{Pe}_{\Delta }}{\exp (\text{Pe}_{\Delta })1}</math></center> 
  It can be verified that the above A and B satisfy eqs. (  +  It can be verified that the above ''A'' and ''B'' satisfy eqs. (46), and (48) – (49). 
  The implication of the above properties of A and B is that if the function A(  +  The implication of the above properties of ''A'' and ''B'' is that if the function ''A''(Pe<sub>Δ</sub>) for the case that <math>\text{Pe}_{\Delta }>0</math> is known, the expressions of ''A'' and ''B'' for all <math>\text{Pe}_{\Delta }</math> can be obtained. For example, if <math>\text{Pe}_{\Delta }<0</math>, eq. (46) can be used to obtain 
  <math>A(\text{Pe}_{\Delta })=B(\text{Pe}_{\Delta })\text{Pe}_{\Delta }</math>  +  <center><math>\begin{matrix}{} & {} \\\end{matrix}A(\text{Pe}_{\Delta })=B(\text{Pe}_{\Delta })\text{Pe}_{\Delta }</math></center> 
  Substituting eq. (  +  Substituting eq. (48) into the above equation yields 
  <math>A(\text{Pe}_{\Delta })=A(\text{Pe}_{\Delta })\text{Pe}_{\Delta }</math>  +  <center><math>\begin{matrix}{} & {} \\\end{matrix}A(\text{Pe}_{\Delta })=A(\text{Pe}_{\Delta })\text{Pe}_{\Delta }</math></center> 
  Considering <math>\text{Pe}_{\Delta }=\left \text{Pe}_{\Delta } \right</math> for the case that <math>\text{Pe}_{\Delta }<0</math>, the above expression can be rewritten as  +  Considering <math>\text{Pe}_{\Delta }=\left \text{Pe}_{\Delta } \right</math> for the case that <math>\begin{matrix}{} & {} \\\end{matrix}\text{Pe}_{\Delta }<0</math>, the above expression can be rewritten as 
  <math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left \text{Pe}_{\Delta } \right\text{ for Pe}_{\Delta }<0</math>  +  <center><math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left \text{Pe}_{\Delta } \right\text{ for Pe}_{\Delta }<0</math></center> 
  Since <math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)\text{ for Pe}_{\Delta }>0</math> the following expression for A under any grid Peclet number can be expressed as  +  Since <math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)\text{ for Pe}_{\Delta }>0</math> the following expression for ''A'' under any grid Peclet number can be expressed as 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 552:  Line 554:  
{{EquationRef(50)}}  {{EquationRef(50)}}  
}  }  
  Similarly, the expression of B for any grid Peclet number can be expressed as  +  Similarly, the expression of ''B'' for any grid Peclet number can be expressed as. 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 561:  Line 563:  
{{EquationRef(51)}}  {{EquationRef(51)}}  
}  }  
  Therefore, different discretization schemes for the convectiondiffusion terms can be characterized by different  +  Therefore, different discretization schemes for the convectiondiffusion terms can be characterized by different <math>A(\lefttext{Pe}_{\Delta } \right)</math>. 
  <math>A(\left  +  
  .  +  To derive the generalized formula for different discretization schemes, let us begin from eq. (32), i.e., 
  To derive the generalized formula for different discretization schemes, let us begin from eq. (  +  
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 573:  Line 574:  
{{EquationRef(52)}}  {{EquationRef(52)}}  
}  }  
  The total fluxes at the faces of the control volumes can be obtained from eq. (  +  The total fluxes at the faces of the control volumes can be obtained from eq. (44), i.e., 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 590:  Line 591:  
{{EquationRef(54)}}  {{EquationRef(54)}}  
}  }  
  Substituting the above expressions into eq. (  +  Substituting the above expressions into eq. (52) and rearranging the resulting equation yields 
  <math>\left[ D_{e}B(\text{Pe}_{\Delta e})+D_{w}A(\text{Pe}_{\Delta w}) \right]\varphi _{P}=D_{e}A(\text{Pe}_{\Delta e})\varphi _{E}+D_{w}B(\text{Pe}_{\Delta w})\varphi _{W}</math>  +  <center><math>\left[ D_{e}B(\text{Pe}_{\Delta e})+D_{w}A(\text{Pe}_{\Delta w}) \right]\varphi _{P}=D_{e}A(\text{Pe}_{\Delta e})\varphi _{E}+D_{w}B(\text{Pe}_{\Delta w})\varphi _{W}</math></center> 
which can be rearranged as  which can be rearranged as  
Line 625:  Line 626:  
    
 width="100%" <center>   width="100%" <center>  
  <math>a_{P}=a_{E}+a_{W}+(F_{e}F_{w})</math>  +  <math>\begin{matrix}{} & {} \\\end{matrix}a_{P}=a_{E}+a_{W}+(F_{e}F_{w})</math> 
</center>  </center>  
{{EquationRef(58)}}  {{EquationRef(58)}}  
}  }  
  [[Image:Fig4.20.pngthumb400 pxalt=Comparison of A(PeΔ) for different schemes   +  [[Image:Fig4.20.pngthumb400 pxalt=Comparison of A(PeΔ) for different schemes  Comparison of <math>\text{Pe}_{\Delta }</math> for different schemes.]] 
  In arriving at eqs. (  +  In arriving at eqs. (56) and (57), ''A'' and ''B'' were obtained from eqs. (50) and (51). At this point, it is apparent that different discretization schemes can be characterized by different expressions for A(Pe<sub>Δ</sub>). By comparing eqs. (56) and (57) with different expressions of ''a''<sub>E</sub> and ''a''<sub>W</sub> for different schemes, the corresponding A(Pe<sub>Δ</sub>) for different schemes can be summarized in the following table and plotted in the figure to the right<ref>Faghri, A., Zhang, Y., and Howell, J. R., 2010, Advanced Heat and Mass Transfer, Global Digital Press, Columbia, MO.</ref>. It should be noted that the difference between the power law and exponential scheme is exaggerated for clear presentation. The generalized formula represented by eqs. (55) – (58) will be very helpful to develop a generalized computer code for all schemes. A special module or subroutine can be written for different schemes. 
<center>  <center>  
<div style="display:inline;">  <div style="display:inline;">  
  '''Table  +  '''Table''' Summary of A(Pe<sub>Δ</sub>) for different schemes 
{ class="wikitable" border="1"  { class="wikitable" border="1"  
 align="center" style="background:#f0f0f0;" width="30%"  Scheme   align="center" style="background:#f0f0f0;" width="30%"  Scheme  
Line 657:  Line 658:  
}  }  
</div></center>  </div></center>  
+  
+  ==References==  
+  {{Reflist}} 
Current revision as of 02:11, 27 July 2010
Computational methodologies for forced convection

Contents 
Exact Solution
The objective of this article is to introduce various discretization schemes of the convectiondiffusion terms through discussion of the onedimensional steady state convection and diffusion problem. For a onedimensional steadystate convection and diffusion problem, the governing equation is

where the velocity, u, is assumed to be known. Both density, ρ, and diffusivity, Г, are assumed to be constants. The continuity equation for this onedimensional problem is

Equation (1) is subject to the following boundary conditions:


By introducing the following dimensionless variables

the onedimensional steadystate convection and diffusion problem can be nondimensionalized as



where

is the Peclet number that reflects the relative level of convection and diffusion. Pe becomes zero for the case of pure diffusion and becomes infinite for the case of pure advection. The exact solution of eqs. (6)  (8) can be obtained as

which will be used as a criterion to check the accuracy of various discretization schemes.
Central Difference Scheme
Integrating eq. (1) over the control volume P (shaded area in the figure to the right), one obtains

The righthand side of eq. (11) can be obtained by assuming the distribution of between any two neighboring grid points is piecewise linear, i.e.,
where Γ_{e} and Γ_{w} are the diffusivities at the faces of the control volume. To ensure that the flux of 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. (11), it is necessary to know the values of at the faces of the control volume. If the piecewise linear profile of is chosen, it follows that
Therefore, eq. (11) becomes

Defining the mass flux and diffusive conductance

eq. (12) can be rearranged as

where



This scheme is termed the central difference scheme because the values of 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. (17) reduces to
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., (δx)_{e} = (δx)_{w} = δx, for which case eq. (12) can be rearranged as

where

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 should always fall between and , which requires that the coefficients, and , are positive, i.e.,

This is the criterion for stability of the central difference scheme. It can be demonstrated that the central difference becomes unstable if eq. (20) 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.
Upwind Scheme
The central difference scheme assumes that the effects of the values of at two neighboring grid points on the value of at the face of the control volume are equal. This assumption is valid only if the effect of diffusion is dominant. If, on the other hand, the convection is dominant, one can expect that the effect of the grid point upwind is more significant than that of the point downwind. If we can assume that the value of at the face of the control volume is dominated by the value of at the grid point at the upwind side and that the effect of the value of at the downwind side can be neglected, the two terms on the left hand side of eq. (11) can be expressed as
The above two equations can be expressed in the following compact form:
where the operator denotes the greater of A and B ^{[1]}. Substituting the above expression into the left hand side of eq. (11) and using central difference for the right hand side of eq. (11), the discretized equation becomes

where



The above scheme is referred to as the upwind scheme because the value of at the grid point on the upwind side was used as the value of at the face of the control volume to discretize the convection term. The upwind scheme ensures that the coefficients in eq. (21) are always positive so that a physically unrealistic solution can be avoided.
Hybrid Scheme
The upwind scheme uses the value of from the grid point at the upwind side as the value of at the face of the control volume regardless of the grid Peclet number. While this treatment can yield accurate results for cases with high Peclet number, the result will not be accurate for cases where the grid Peclet number is near zero; for which cases the central difference scheme can produce better results. Spalding ^{[2]} proposed a hybrid scheme that uses the central difference scheme when and the upwind scheme when .
To observe the difference between the central difference and upwind schemes, the coefficient for the east neighboring grid point, eqs. (15) and (22), can be rewritten as


The hybrid scheme can then be expressed as
which can be rewritten in the following compact form

The coefficient for the west neighbor grid point can be obtained using a similar approach.

The above hybrid scheme combines the advantages of the central difference and upwind schemes to yield better results for cases where or . However, there is still room for improvement of the solution when is near 2.
Exponential and Power Law Schemes
Since the exact solution of eq. (1) exists, one can reasonably expect that an accurate scheme can be derived if the result of the exact solution, eq. (10), is utilized. Equation (1) can be rewritten as

Defining the total flux of due to convection and diffusion

eq. (29) becomes

Integrating eq. (31) over the control volume P (shaded area in first figure), yields

Instead of assuming piecewise linear distribution of as with central difference scheme or assuming at the face of the control volume is equal to the value of at the grid point on the upwind side in the upwind scheme, the distribution of between grid points can be taken as that obtained from the exact solution, eq. (10). Applying eq. (10) between grid points E and P, we have

Substituting eq. (33) into eq. (30) and evaluating the result at , the total flux of at the face of control volume becomes

Similarly, the total flux at the west face of the control volume is

Substituting eqs. (34) and (35) into eq. (32) and rearranging the resulting equation yields

where



Equations (37) and (38) can be rewritten in a format similar to that of eqs. (25) – (28), i.e.,


The comparison of for different schemes is shown in the figure to the right. It can be seen that the hybrid scheme can be viewed as an envelope of the exponential scheme. The hybrid scheme is a good approximation if the absolute value of the grid Peclet number is either very large or near zero.
While the exponential scheme is accurate, the computational time is much longer than for the central difference, upwind or hybrid schemes. Patankar ^{[3]} proposed a power law scheme that has almost the same accuracy as the exponential scheme but a substantially shorter computational time. The coefficient of the neighbor grid point on the east side can be obtained by
which can be rewritten in the following compact form

A Generalized Expression of Discretization Schemes
The above discretization schemes can be expressed in a single generalized form. The total flux J at the interface between two grid points that were defined in eq. (30) can be used to define:

which relates to the values of at grid points i and i+1 (see figure to the right). The first term on the right side of eq. (43) will be related to some weighted average of and , and the second term will be related to the difference between and . Thus, one can express J^{ * } the total flux as ^{[1]}

where A and B are dimensionless coefficients that are functions of the grid Peclet number. If the field of is uniform, we will have and eq. (43) becomes

Comparing eqs. (44) and (45) yields

For the grid system shown in the above figure, if we reconsider the problem in a reversed coordinate system x' (x' = − x), the grid Peclet number will become − Pe_{Δ} and J^{ * } becomes

The symmetric properties of A and B can be obtained by comparing eqs. (44) and (47), i.e.,


For the exponential schemes discussed above, one can obtain from eq(34)or (35), i.e.,
Comparing the above expression with eq. (44), one obtains
It can be verified that the above A and B satisfy eqs. (46), and (48) – (49). The implication of the above properties of A and B is that if the function A(Pe_{Δ}) for the case that Pe_{Δ} > 0 is known, the expressions of A and B for all Pe_{Δ} can be obtained. For example, if Pe_{Δ} < 0, eq. (46) can be used to obtain
Substituting eq. (48) into the above equation yields
Considering for the case that , the above expression can be rewritten as
Since the following expression for A under any grid Peclet number can be expressed as

Similarly, the expression of B for any grid Peclet number can be expressed as.

Therefore, different discretization schemes for the convectiondiffusion terms can be characterized by different .
To derive the generalized formula for different discretization schemes, let us begin from eq. (32), i.e.,

The total fluxes at the faces of the control volumes can be obtained from eq. (44), i.e.,


Substituting the above expressions into eq. (52) and rearranging the resulting equation yields
which can be rearranged as

where



In arriving at eqs. (56) and (57), A and B were obtained from eqs. (50) and (51). At this point, it is apparent that different discretization schemes can be characterized by different expressions for A(Pe_{Δ}). By comparing eqs. (56) and (57) with different expressions of a_{E} and a_{W} for different schemes, the corresponding A(Pe_{Δ}) for different schemes can be summarized in the following table and plotted in the figure to the right^{[4]}. It should be noted that the difference between the power law and exponential scheme is exaggerated for clear presentation. The generalized formula represented by eqs. (55) – (58) will be very helpful to develop a generalized computer code for all schemes. A special module or subroutine can be written for different schemes.
Table Summary of A(Pe_{Δ}) for different schemes
Scheme  A(PeΔ) 
Central difference  
Upwind  1 
Hybrid  
Exponential  
Power Law 
References
 ↑ ^{1.0} ^{1.1} Patankar, S.V., 1980, Numerical Heat Transfer and Fluid Flow, Hemisphere, Washington, DC.
 ↑ Spalding, D.B., 1972, “A Novel Finitedifference Formulation for Differential Expressions Involving both First and Second Derivatives,” Int. J. Num. Methods Eng., Vol. 4, pp. 551559.
 ↑ Patankar, S.V., 1981, “A Calculation Procedure for TwoDimensional Elliptic Situations,” Numerical Heat Transfer, Vol. 4, pp. 409425.
 ↑ Faghri, A., Zhang, Y., and Howell, J. R., 2010, Advanced Heat and Mass Transfer, Global Digital Press, Columbia, MO.