# Finite volume method for one-dimensional steady state diffusion

The Finite volume method in computational fluid dynamics is a discretization technique for partial differential equations that arise from physical conservation laws. These equations can be different in nature, e.g. elliptic, parabolic, or hyperbolic. The first well-documented use of this method was by Evans and Harlow (1957) at Los Alamos. The general equation for steady diffusion can be easily be derived from the general transport equation for property Φ by deleting transient and convective terms.[1]

General Transport equation can be defined as

${\displaystyle {\frac {\partial \rho \phi }{\partial t}}+\operatorname {div} (\rho \phi \upsilon )=\operatorname {div} (\Gamma \operatorname {grad} \phi )+S_{\phi }}$,

where
${\displaystyle \rho }$ is density and ${\displaystyle \phi }$ is the conserved quantity,
${\displaystyle \Gamma }$ is the Diffusion coefficient[2] and ${\displaystyle S}$ is the Source term.[3]
${\displaystyle \operatorname {div} (\rho \phi \upsilon )}$ is the Net rate of flow of ${\displaystyle \phi }$ out of fluid element (convection),
${\displaystyle \operatorname {div} (\Gamma \operatorname {grad} \phi )}$ is Rate of increase of ${\displaystyle \phi }$ due to diffusion,
${\displaystyle S_{\phi }}$ is Rate of increase of ${\displaystyle \phi }$ due to sources.

${\displaystyle {\frac {\partial \rho \phi }{\partial t}}}$ is Rate of increase of ${\displaystyle \phi }$ of fluid element(transient),

Conditions under which the transient and convective terms goes to zero:

For one-dimensional, steady-state diffusion, General Transport equation reduces to:

${\displaystyle \operatorname {div} (\Gamma \operatorname {grad} \phi )+S_{\phi }=0}$,

or,

${\displaystyle {\frac {d}{dx}}(\Gamma \operatorname {grad} \phi )+S_{\phi }=0}$.

The following steps comprise the finite volume method for one-dimensional steady state diffusion -

STEP 1
Grid Generation

• Divide the domain into equal parts of small domain.
• Place nodal points at the center of each small domain.
Dividing small domains and assigning nodal points (Figure 1)
• Create control volumes using these nodal points.
Control volume and control volume & boundary faces (Figure 2)
• Create control volumes near the edges in such a way that the physical boundaries coincide with control volume boundaries (Figure 1).
• Assume a general nodal point 'P' for a general control volume. Adjacent nodal points to the East and West are identified by E and W respectively. The West-side face of the control volume is referred to by 'w' and the East-side control volume face by 'e' (Figure 2).
Steady state one-dimensional diffusion (Figure 3)
• The distance between WP, wP, Pe and PE are identified by ${\displaystyle \delta x_{WP}}$,${\displaystyle \delta x_{wP}}$,${\displaystyle \delta x_{Pe}}$ and ${\displaystyle \delta x_{PE}}$ respectively (Figure 4).

STEP 2
Discretization

Control volume width (Figure 4)
• The crux of Finite volume method is to integrate the governing equation over each control volume.
• Nodal points are used to discretize equations.
• At nodal point P, the control volume integral is given by (Figure 3)

${\displaystyle \int _{\Delta V}{\frac {d}{dx}}\left(\Gamma {\frac {d\phi }{dx}}\right)dV+\int _{\Delta V}SdV=\left(\Gamma A{\frac {d\phi }{dx}}\right)_{e}-\left(\Gamma A{\frac {d\phi }{dx}}\right)_{w}+{\overrightarrow {S}}\Delta V=0}$ ,

where

${\displaystyle A}$ is Cross-sectional Area Cross section (geometry) of control volume face, ${\displaystyle \Delta V}$ is Volume, ${\displaystyle {\overrightarrow {S}}}$is average value of source S over the control volume.

• It states that the difference between the diffusive flux Fick's laws of diffusion of ${\displaystyle \phi }$ through the east and west faces of some volume corresponds to the change in the quantity ${\displaystyle \phi }$ in that volume.
• The diffusive coefficient of ${\displaystyle \phi }$ and ${\displaystyle {\frac {d\phi }{dx}}}$ are required in order to reach a useful conclusion.
• Central differencing technique [1] is used to derive the diffusive coefficient of ${\displaystyle \phi }$:

${\displaystyle \Gamma _{w}={\frac {\Gamma _{W}+\Gamma _{P}}{2}}}$ ,

${\displaystyle \Gamma _{w}={\frac {\Gamma _{P}+\Gamma _{E}}{2}}}$.

• ${\displaystyle {\frac {d\phi }{dx}}}$ is calculated using the nodal point values (Figure 4):

${\displaystyle \left({\frac {d\phi }{dx}}\right)_{e}={\frac {\phi _{E}-\phi _{P}}{\delta x_{PE}}}}$ ,
${\displaystyle \left({\frac {d\phi }{dx}}\right)_{w}={\frac {\phi _{P}-\phi _{W}}{\delta x_{WP}}}}$,

• In some practical situations, the source term can be linearized:

${\displaystyle {\overrightarrow {S}}\Delta V=S_{u}+S_{p}\phi _{p}}$.

• Merging the above equations leads to

${\displaystyle \Gamma _{e}A_{e}\left({\frac {\phi _{E}-\phi _{P}}{\delta x_{PE}}}\right)-\Gamma _{w}A_{w}\left({\frac {\phi _{P}-\phi _{W}}{\delta x_{PE}}}\right)+(S_{u}+S_{p}\phi _{p})}$.

• Re-arranging gives

${\displaystyle \left({\frac {\Gamma _{e}}{\delta x_{PE}}}A_{e}+{\frac {\Gamma _{w}}{\delta x_{WP}}}A_{w}-S_{p}\right)\phi _{P}=\left({\frac {\Gamma _{w}}{\delta x_{WP}}}A_{w}\right)\phi _{W}+\left({\frac {\Gamma _{e}}{\delta x_{WP}}}A_{e}\right)\phi _{E}+S_{u}}$.

• Compare and identify the above equation with

${\displaystyle a_{P}\phi _{P}=a_{W}\phi _{W}+a_{E}\phi _{E}+S_{u}}$

where

${\displaystyle a_{W}}$ ${\displaystyle a_{E}}$ ${\displaystyle a_{P}}$
${\displaystyle {\frac {\Gamma _{w}}{\delta x_{WP}}}A_{w}}$ ${\displaystyle {\frac {\Gamma _{e}}{\delta x_{PE}}}A_{e}}$ ${\displaystyle a_{W}+a_{E}-S_{P}}$

STEP 3:
Solution of equations

• Discretized equation must be set up at each of the nodal points in order to solve the problem.
• The resulting system of linear algebraic equations Linear equation can then be solved to obtain ${\displaystyle \phi }$ at the nodal points.
• The matrix of higher order [2] can be solved in MATLAB.

This method can also be applied to a 2D situation. See Finite volume method for two dimensional diffusion problem.

## References

• Patankar, Suhas V. (1980), Numerical Heat Transfer and Fluid Flow, Hemisphere.
• Hirsch, C. (1990), Numerical Computation of Internal and External Flows, Volume 2: Computational Methods for Inviscid and Viscous Flows, Wiley.
• Laney, Culbert B.(1998), Computational Gas Dynamics, Cambridge University Press.
• LeVeque, Randall(1990), Numerical Methods for Conservation Laws, ETH Lectures in Mathematics Series, Birkhauser-Verlag.
• Tannehill, John C., et al., (1997), Computational Fluid mechanics and Heat Transfer, 2nd Ed., Taylor and Francis.
• Wesseling, Pieter(2001), Principles of Computational Fluid Dynamics, Springer-Verlag.
• Carslaw, H. S. and Jager, J. C. (1959). Conduction of Heat in Solids. Oxford: Clarendon Press
• Crank, J. (1956). The Mathematics of Diffusion. Oxford: Clarendon Press
• Thambynayagam, R. K. M (2011). The Diffusion Handbook: Applied Solutions for Engineers: McGraw-Hill
1. ^ "Navier-Stokes Equations in Fluid Mechanics". Efunda.com. Retrieved 2013-10-29.
2. ^ "Diffusion – useful equations". Life.illinois.edu. Retrieved 2013-10-29.
3. ^ "SSCP: Programming Strategies". Physics.drexel.edu. Retrieved 2013-10-29.