OneDimensional SteadyState Convection and Diffusion
From ThermalFluidsPedia
Line 1:  Line 1:  
{{Comp Method for Forced Convection Category}}  {{Comp Method for Forced Convection Category}}  
  Exact Solution  +  ==Exact Solution== 
  The objective of this  +  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 
{ class="wikitable" border="0"  { class="wikitable" border="0"  
Line 101:  Line 101:  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(11)}} 
}  }  
The righthand side of eq. (1) can be obtained by assuming the distribution of <math>\varphi </math> between any two neighboring grid points is piecewise linear, i.e.,  The righthand side of eq. (1) can be obtained by assuming the distribution of <math>\varphi </math> between any two neighboring grid points is piecewise linear, i.e.,  
Line 125:  Line 125:  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(12)}} 
}  }  
Defining the mass flux and diffusive conductance  Defining the mass flux and diffusive conductance  
Line 134:  Line 134:  
<math>F=\rho u,\text{ }D=\frac{\Gamma }{\delta x}</math>  <math>F=\rho u,\text{ }D=\frac{\Gamma }{\delta x}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(13)}} 
}  }  
Line 146:  Line 146:  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(14)}} 
}  }  
where  where  
Line 155:  Line 155:  
<math>a_{E}=D_{e}\frac{1}{2}F_{e}</math>  <math>a_{E}=D_{e}\frac{1}{2}F_{e}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(15)}} 
}  }  
Line 163:  Line 163:  
<math>a_{W}=D_{w}+\frac{1}{2}F_{w}</math>  <math>a_{W}=D_{w}+\frac{1}{2}F_{w}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(16)}} 
}  }  
Line 171:  Line 171:  
<math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  <math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  
</center>  </center>  
  {{EquationRef(  +  {{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. (7) reduces to  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. (7) reduces to  
Line 184:  Line 184:  
<math>\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]</math>  <math>\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]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(18)}} 
}  }  
where  where  
Line 193:  Line 193:  
<math>\text{Pe}_{\Delta }=\frac{\rho u\delta x}{\Gamma }=\frac{F}{D}</math>  <math>\text{Pe}_{\Delta }=\frac{\rho u\delta x}{\Gamma }=\frac{F}{D}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(19)}} 
}  }  
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 <math>\varphi _{P}</math> should always fall between <math>\varphi _{E}</math> and <math>\varphi _{W}</math>, which requires that the coefficients, <math>\varphi _{E}</math> and <math>\varphi _{W}</math>, 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 <math>\varphi _{P}</math> should always fall between <math>\varphi _{E}</math> and <math>\varphi _{W}</math>, which requires that the coefficients, <math>\varphi _{E}</math> and <math>\varphi _{W}</math>, are positive, i.e.,  
Line 202:  Line 202:  
<math>\left \text{Pe}_{\Delta } \right\le 2</math>  <math>\left \text{Pe}_{\Delta } \right\le 2</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(20)}} 
}  }  
Line 236:  Line 236:  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(21)}} 
}  }  
where  where  
Line 245:  Line 245:  
<math>a_{E}=D_{e}+\left[\!\left[ F_{e},0 \right]\!\right]</math>  <math>a_{E}=D_{e}+\left[\!\left[ F_{e},0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(22)}} 
}  }  
Line 253:  Line 253:  
<math>a_{W}=D_{w}+\left[\!\left[ F_{w},0 \right]\!\right]</math>  <math>a_{W}=D_{w}+\left[\!\left[ F_{w},0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(23)}} 
}  }  
Line 261:  Line 261:  
<math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  <math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  
</center>  </center>  
  {{EquationRef(  +  {{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. (4.221) are always positive so that a physically unrealistic solution can be avoided.  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. (4.221) are always positive so that a physically unrealistic solution can be avoided.  
Line 274:  Line 274:  
<math>a_{E}/D_{e}=1\frac{1}{2}\text{Pe}_{\Delta e},\text{ Central difference scheme}</math>  <math>a_{E}/D_{e}=1\frac{1}{2}\text{Pe}_{\Delta e},\text{ Central difference scheme}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(25)}} 
}  }  
Line 282:  Line 282:  
<math>a_{E}/D_{e}=1+\left[\!\left[ \text{Pe}_{\Delta e},0 \right]\!\right],\text{ Upwind scheme}</math>  <math>a_{E}/D_{e}=1+\left[\!\left[ \text{Pe}_{\Delta e},0 \right]\!\right],\text{ Upwind scheme}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(26)}} 
}  }  
The hybrid scheme can then be expressed as  The hybrid scheme can then be expressed as  
Line 299:  Line 299:  
<math>a_{E}/D_{e}=\left[\!\left[ \text{Pe}_{\Delta e},1\frac{1}{2}\text{Pe}_{\Delta e},0 \right]\!\right]</math>  <math>a_{E}/D_{e}=\left[\!\left[ \text{Pe}_{\Delta e},1\frac{1}{2}\text{Pe}_{\Delta e},0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(27)}} 
}  }  
The coefficient for the west neighbor grid point can be obtained using a similar approach.  The coefficient for the west neighbor grid point can be obtained using a similar approach.  
Line 308:  Line 308:  
<math>a_{W}/D_{w}=\left[\!\left[ \text{Pe}_{\Delta w},1+\frac{1}{2}\text{Pe}_{\Delta w},0 \right]\!\right]</math>  <math>a_{W}/D_{w}=\left[\!\left[ \text{Pe}_{\Delta w},1+\frac{1}{2}\text{Pe}_{\Delta w},0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{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 (see Problem 4.23).  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 (see Problem 4.23).  
Line 320:  Line 320:  
<math>\frac{d}{dx}\left( \rho u\varphi \Gamma \frac{d\varphi }{dx} \right)=0</math>  <math>\frac{d}{dx}\left( \rho u\varphi \Gamma \frac{d\varphi }{dx} \right)=0</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(29)}} 
}  }  
Defining the total flux of <math>\varphi </math> due to convection and diffusion  Defining the total flux of <math>\varphi </math> due to convection and diffusion  
Line 329:  Line 329:  
<math>J=\rho u\varphi \Gamma \frac{d\varphi }{dx}</math>  <math>J=\rho u\varphi \Gamma \frac{d\varphi }{dx}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(30)}} 
}  }  
eq. (4.229) becomes  eq. (4.229) becomes  
Line 338:  Line 338:  
<math>\frac{dJ}{dx}=0</math>  <math>\frac{dJ}{dx}=0</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(31)}} 
}  }  
Integrating eq. (4.231) over the control volume P (shaded area in Fig. 4.17), yields  Integrating eq. (4.231) over the control volume P (shaded area in Fig. 4.17), yields  
Line 347:  Line 347:  
<math>\begin{matrix}{}\\\end{matrix}J_{e}=J_{w}</math>  <math>\begin{matrix}{}\\\end{matrix}J_{e}=J_{w}</math>  
</center>  </center>  
  {{EquationRef(  +  {{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. (4.210). Applying eq. (4.210) between grid points E and P, we have  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. (4.210). Applying eq. (4.210) between grid points E and P, we have  
Line 356:  Line 356:  
<math>\frac{\varphi (x)\varphi _{P}}{\varphi _{E}\varphi _{P}}=\frac{\exp [\text{Pe}_{\Delta \text{e}}(xx_{P})/(\delta x)_{e}]1}{\exp (\text{Pe}_{\Delta \text{e}})1}</math>  <math>\frac{\varphi (x)\varphi _{P}}{\varphi _{E}\varphi _{P}}=\frac{\exp [\text{Pe}_{\Delta \text{e}}(xx_{P})/(\delta x)_{e}]1}{\exp (\text{Pe}_{\Delta \text{e}})1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(33)}} 
}  }  
Substituting eq. (4.233) into eq. (4.230) and evaluating the result at <math>x=x_{e}</math>, the total flux of <math>\varphi </math> at the face of control volume becomes  Substituting eq. (4.233) into eq. (4.230) and evaluating the result at <math>x=x_{e}</math>, the total flux of <math>\varphi </math> at the face of control volume becomes  
Line 365:  Line 365:  
<math>J_{e}=F_{e}\left[ \varphi _{P}+\frac{\varphi _{P}\varphi _{E}}{\exp (\text{Pe}_{\Delta e})1} \right]</math>  <math>J_{e}=F_{e}\left[ \varphi _{P}+\frac{\varphi _{P}\varphi _{E}}{\exp (\text{Pe}_{\Delta e})1} \right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(34)}} 
}  }  
Similarly, the total flux at the west face of the control volume is  Similarly, the total flux at the west face of the control volume is  
Line 374:  Line 374:  
<math>J_{w}=F_{w}\left[ \varphi _{W}+\frac{\varphi _{W}\varphi _{P}}{\exp (\text{Pe}_{\Delta w})1} \right]</math>  <math>J_{w}=F_{w}\left[ \varphi _{W}+\frac{\varphi _{W}\varphi _{P}}{\exp (\text{Pe}_{\Delta w})1} \right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(35)}} 
}  }  
Substituting eqs. (4.234) and (4.235) into eq. (4.232) and rearranging the resulting equation yields  Substituting eqs. (4.234) and (4.235) into eq. (4.232) and rearranging the resulting equation yields  
Line 384:  Line 384:  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(36)}} 
}  }  
where  where  
Line 393:  Line 393:  
<math>a_{E}=\frac{F_{e}}{\exp (\text{Pe}_{\Delta e})1}</math>  <math>a_{E}=\frac{F_{e}}{\exp (\text{Pe}_{\Delta e})1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(37)}} 
}  }  
Line 401:  Line 401:  
<math>a_{W}=\frac{F_{w}\exp (\text{Pe}_{\Delta w})}{\exp (\text{Pe}_{\Delta w})1}</math>  <math>a_{W}=\frac{F_{w}\exp (\text{Pe}_{\Delta w})}{\exp (\text{Pe}_{\Delta w})1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(38)}} 
}  }  
Line 409:  Line 409:  
<math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  <math>\begin{matrix}{}\\\end{matrix}a_{P}=a_{W}+a_{E}+(F_{e}F_{w})</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(39)}} 
}  }  
Equations (4.237) and (4.238) can be rewritten in a format similar to that of eqs. (4.225) – (4.228), i.e.,  Equations (4.237) and (4.238) can be rewritten in a format similar to that of eqs. (4.225) – (4.228), i.e.,  
Line 418:  Line 418:  
<math>a_{E}/D_{e}=\frac{\text{Pe}_{\Delta e}}{\exp (\text{Pe}_{\Delta e})1}</math>  <math>a_{E}/D_{e}=\frac{\text{Pe}_{\Delta e}}{\exp (\text{Pe}_{\Delta e})1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(40)}} 
}  }  
Line 426:  Line 426:  
<math>a_{W}/D_{w}=\frac{\text{Pe}_{\Delta w}\exp (\text{Pe}_{\Delta w})}{\exp (\text{Pe}_{\Delta w})1}</math>  <math>a_{W}/D_{w}=\frac{\text{Pe}_{\Delta w}\exp (\text{Pe}_{\Delta w})}{\exp (\text{Pe}_{\Delta w})1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(41)}} 
}  }  
The comparison of <math>a_{E}/D_{e}</math> for different schemes is shown in Fig. 1. 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.  The comparison of <math>a_{E}/D_{e}</math> for different schemes is shown in Fig. 1. 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.  
Line 449:  Line 449:  
<math>a_{E}/D_{e}=\left[\!\left[ 0,\left( 10.1\left \text{Pe}_{\Delta e} \right \right)^{5} \right]\!\right]+\left[\!\left[ 0,\text{Pe}_{\Delta e} \right]\!\right]</math>  <math>a_{E}/D_{e}=\left[\!\left[ 0,\left( 10.1\left \text{Pe}_{\Delta e} \right \right)^{5} \right]\!\right]+\left[\!\left[ 0,\text{Pe}_{\Delta e} \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(42)}} 
}  }  
Line 460:  Line 460:  
<math>J^{*}=\frac{J}{\Gamma /\delta x}=\text{Pe}_{\Delta }\varphi \frac{d\varphi }{d(x/\delta x)}</math>  <math>J^{*}=\frac{J}{\Gamma /\delta x}=\text{Pe}_{\Delta }\varphi \frac{d\varphi }{d(x/\delta x)}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(43)}} 
}  }  
which relates to the values of <math>\varphi </math> at grid points i and i+1 (see Fig. 4.19). The first term on the right side of eq. (4.243) 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  which relates to the values of <math>\varphi </math> at grid points i and i+1 (see Fig. 4.19). The first term on the right side of eq. (4.243) 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  
Line 470:  Line 470:  
<math>J^{*}=B(\text{Pe}_{\Delta })\varphi _{i}A(\text{Pe}_{\Delta })\varphi _{i+1}</math>  <math>J^{*}=B(\text{Pe}_{\Delta })\varphi _{i}A(\text{Pe}_{\Delta })\varphi _{i+1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{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. (4.243) becomes  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. (4.243) becomes  
Line 479:  Line 479:  
<math>J^{*}=\text{Pe}_{\Delta }\varphi _{i}=\text{Pe}_{\Delta }\varphi _{i+1}</math>  <math>J^{*}=\text{Pe}_{\Delta }\varphi _{i}=\text{Pe}_{\Delta }\varphi _{i+1}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(45)}} 
}  }  
Comparing eqs. (4.244) and (4.245) yields  Comparing eqs. (4.244) and (4.245) yields  
Line 488:  Line 488:  
<math>\begin{matrix}{}\\\end{matrix}B(\text{Pe}_{\Delta })A(\text{Pe}_{\Delta })=\text{Pe}_{\Delta }</math>  <math>\begin{matrix}{}\\\end{matrix}B(\text{Pe}_{\Delta })A(\text{Pe}_{\Delta })=\text{Pe}_{\Delta }</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(46)}} 
}  }  
Line 500:  Line 500:  
<math>J^{*}=B(\text{Pe}_{\Delta })\varphi _{i+1}A(\text{Pe}_{\Delta })\varphi _{i}</math>  <math>J^{*}=B(\text{Pe}_{\Delta })\varphi _{i+1}A(\text{Pe}_{\Delta })\varphi _{i}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(47)}} 
}  }  
The symmetric properties of A and B can be obtained by comparing eqs. (4.244) and (4.247), i.e.,  The symmetric properties of A and B can be obtained by comparing eqs. (4.244) and (4.247), i.e.,  
Line 509:  Line 509:  
<math>\begin{matrix}{}\\\end{matrix}A(\text{Pe}_{\Delta })=B(\text{Pe}_{\Delta })</math>  <math>\begin{matrix}{}\\\end{matrix}A(\text{Pe}_{\Delta })=B(\text{Pe}_{\Delta })</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(48)}} 
}  }  
Line 517:  Line 517:  
<math>\begin{matrix}{}\\\end{matrix}B(\text{Pe}_{\Delta })=A(\text{Pe}_{\Delta })</math>  <math>\begin{matrix}{}\\\end{matrix}B(\text{Pe}_{\Delta })=A(\text{Pe}_{\Delta })</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(49)}} 
}  }  
For the exponential schemes discussed above, one can obtain <math>J^{*}</math> from eq(4.234)or (4.235), i.e.,  For the exponential schemes discussed above, one can obtain <math>J^{*}</math> from eq(4.234)or (4.235), i.e.,  
Line 550:  Line 550:  
<math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left[\!\left[ \text{Pe}_{\Delta },0 \right]\!\right]</math>  <math>A(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left[\!\left[ \text{Pe}_{\Delta },0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(50)}} 
}  }  
Similarly, the expression of B for any grid Peclet number can be expressed as (see Problem 4.24).  Similarly, the expression of B for any grid Peclet number can be expressed as (see Problem 4.24).  
Line 559:  Line 559:  
<math>B(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left[\!\left[ \text{Pe}_{\Delta },0 \right]\!\right]</math>  <math>B(\text{Pe}_{\Delta })=A(\left \text{Pe}_{\Delta } \right)+\left[\!\left[ \text{Pe}_{\Delta },0 \right]\!\right]</math>  
</center>  </center>  
  {{EquationRef(  +  {{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  
Line 571:  Line 571:  
<math>J_{e}^{*}\text{D}_{e}=J_{w}^{*}\text{D}_{w}</math>  <math>J_{e}^{*}\text{D}_{e}=J_{w}^{*}\text{D}_{w}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(52)}} 
}  }  
The total fluxes at the faces of the control volumes can be obtained from eq. (4.244), i.e.,  The total fluxes at the faces of the control volumes can be obtained from eq. (4.244), i.e.,  
Line 580:  Line 580:  
<math>J_{e}^{*}=B(\text{Pe}_{\Delta e})\varphi _{P}A(\text{Pe}_{\Delta e})\varphi _{E}</math>  <math>J_{e}^{*}=B(\text{Pe}_{\Delta e})\varphi _{P}A(\text{Pe}_{\Delta e})\varphi _{E}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(53)}} 
}  }  
Line 588:  Line 588:  
<math>J_{w}^{*}=B(\text{Pe}_{\Delta w})\varphi _{W}A(\text{Pe}_{\Delta w})\varphi _{P}</math>  <math>J_{w}^{*}=B(\text{Pe}_{\Delta w})\varphi _{W}A(\text{Pe}_{\Delta w})\varphi _{P}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(54)}} 
}  }  
Substituting the above expressions into eq. (4.252) and rearranging the resulting equation yields  Substituting the above expressions into eq. (4.252) and rearranging the resulting equation yields  
Line 601:  Line 601:  
<math>a_{P}\varphi _{P}=a_{E}\varphi _{E}+a_{W}\varphi _{W}</math>  <math>a_{P}\varphi _{P}=a_{E}\varphi _{E}+a_{W}\varphi _{W}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(55)}} 
}  }  
where  where  
Line 610:  Line 610:  
<math>a_{E}=D_{e}A(\text{Pe}_{\Delta e})=D_{e}\left\{ A(\left \text{Pe}_{\Delta e} \right)+\left[\!\left[ \text{Pe}_{\Delta e},0 \right]\!\right] \right\}</math>  <math>a_{E}=D_{e}A(\text{Pe}_{\Delta e})=D_{e}\left\{ A(\left \text{Pe}_{\Delta e} \right)+\left[\!\left[ \text{Pe}_{\Delta e},0 \right]\!\right] \right\}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(56)}} 
}  }  
Line 618:  Line 618:  
<math>a_{W}=D_{w}B(\text{Pe}_{\Delta w})=D_{w}\left\{ A(\left \text{Pe}_{\Delta w} \right)+\left[\!\left[ \text{Pe}_{\Delta w},0 \right]\!\right] \right\}</math>  <math>a_{W}=D_{w}B(\text{Pe}_{\Delta w})=D_{w}\left\{ A(\left \text{Pe}_{\Delta w} \right)+\left[\!\left[ \text{Pe}_{\Delta w},0 \right]\!\right] \right\}</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(57)}} 
}  }  
Line 627:  Line 627:  
<math>a_{P}=a_{E}+a_{W}+(F_{e}F_{w})</math>  <math>a_{P}=a_{E}+a_{W}+(F_{e}F_{w})</math>  
</center>  </center>  
  {{EquationRef(  +  {{EquationRef(58)}} 
}  }  
Revision as of 05:44, 21 July 2010
Computational methodologies for forced convection

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 the governing equation over the control volume P (shaded area in the figure to the right), one obtains

The righthand side of eq. (1) 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. (1), 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. (1) becomes

Defining the mass flux and diffusive conductance

eq. (2) 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. (7) 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. (2) 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. (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.
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. (4.211) 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 (Patankar, 1980). Substituting the above expression into the left hand side of eq. (4.211) and using central difference for the right hand side of eq. (4.211), 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. (4.221) 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 (1972) 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. (4.215) and (4.222), 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 (see Problem 4.23).
Exponential and Power Law Schemes
Since the exact solution of eq. (4.201) exists, one can reasonably expect that an accurate scheme can be derived if the result of the exact solution, eq. (4.210), is utilized. Equation (4.201) can be rewritten as

Defining the total flux of due to convection and diffusion

eq. (4.229) becomes

Integrating eq. (4.231) over the control volume P (shaded area in Fig. 4.17), 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. (4.210). Applying eq. (4.210) between grid points E and P, we have

Substituting eq. (4.233) into eq. (4.230) and evaluating the result at x = x_{e}, 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. (4.234) and (4.235) into eq. (4.232) and rearranging the resulting equation yields

where



Equations (4.237) and (4.238) can be rewritten in a format similar to that of eqs. (4.225) – (4.228), i.e.,


The comparison of a_{E} / D_{e} for different schemes is shown in Fig. 1. 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 (1981) 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. (4.230) can be used to define:

which relates to the values of at grid points i and i+1 (see Fig. 4.19). The first term on the right side of eq. (4.243) 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 (Patankar, 1980)

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. (4.243) becomes

Comparing eqs. (4.244) and (4.245) yields

For the grid system shown in Fig. 1, 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. (4.244) and (4.247), i.e.,


For the exponential schemes discussed above, one can obtain J^{ * } from eq(4.234)or (4.235), i.e.,
Comparing the above expression with eq. (4.244), one obtains
It can be verified that the above A and B satisfy eqs. (4.246), and (4.248) – (4.249). 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. (4.246) can be used to obtain
A(Pe_{Δ}) = B(Pe_{Δ}) − Pe_{Δ}
Substituting eq. (4.248) into the above equation yields
A(Pe_{Δ}) = A( − Pe_{Δ}) − Pe_{Δ}
Considering for the case that Pe_{Δ} < 0, 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 (see Problem 4.24).

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. (4.232), i.e.,

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


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

where


a_{P} = a_{E} + a_{W} + (F_{e} − F_{w}) 
In arriving at eqs. (4.256) and (4.257), A and B were obtained from eqs. (4.250) and (4.251). At this point, it is apparent that different discretization schemes can be characterized by different expressions for A(PeΔ). By comparing eqs. (4.256) and (4.257) with different expressions of aE and aW for different schemes, the corresponding A(PeΔ) for different schemes can be summarized in Table 1 and plotted in Fig. 2. 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. (4.255) – (4.258) 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 1 Summary of A(PeΔ) for different schemes
Scheme  A(PeΔ) 
Central difference  
Upwind  1 
Hybrid  
Exponential  
Power Law 