# Finite volume method for two dimensional diffusion problem

The methods used for solving two dimensional Diffusion problems are similar to those used for one dimensional problems. The general equation for steady diffusion can be easily derived from the general transport equation for property Φ by deleting transient and convective terms[1]

${\displaystyle {\frac {\partial {}}{\partial {}x}}\left(\Gamma {}{\frac {\partial {}\phi {}}{\partial {}x}}\right)+{\frac {\partial {}}{\partial {}y}}\left(\Gamma {}{\frac {\partial {}\phi {}}{\partial {}y}}\right)+S=0}$

where,
${\displaystyle \Gamma }$ is the Diffusion coefficient[2] and ${\displaystyle S}$ is the Source term.[3]

A portion of the two dimensional grid used for Discretization is shown below:

In addition to the east (E) and west (W) neighbors, a general grid node P, now also has north (N) and south (S) neighbors. The same notation is used here for all faces and cell dimensions as in one dimensional analysis. When the above equation is formally integrated over the Control volume, we obtain

${\displaystyle \int _{\Delta {v}}{\frac {\partial {}}{\partial {}x}}\left(\Gamma {}{\frac {\partial {}\phi {}}{\partial {}x}}\right)dxdy+\int _{\Delta {v}}{\frac {\partial {}}{\partial {}y}}\left(\Gamma {}{\frac {\partial {}\phi {}}{\partial {}y}}\right)dxdy+\int _{\Delta {v}}S_{\phi {}}dV=0}$

Using the divergence theorem, the equation can be rewritten as :

${\displaystyle \left[{\Gamma {}}_{e}A_{e}\left({\frac {\partial {}\phi {}}{\partial {}x}}\right)_{e}-{\Gamma {}}_{w}A_{w}\left({\frac {\partial {}\phi {}}{\partial {}x}}\right)_{w}\right]+\left[{\Gamma {}}_{n}A_{n}\left({\frac {\partial {}\phi {}}{\partial {}y}}\right)_{n}-{\Gamma {}}_{s}A_{s}\left({\frac {\partial {}\phi {}}{\partial {}y}}\right)_{s}\right]+{\bar {S}}\Delta {}V=0}$

This equation represents the balance of generation of the property φ in a Control volume and the fluxes through its cell faces. The derivatives can by represented as follows by using Taylor series approximation:

${\displaystyle {{\Gamma {}}_{w}A_{w}\left({\frac {\partial {}\phi {}}{\partial {x}}}\right)}_{w}={\Gamma {}}_{w}A_{w}{\frac {({\phi {}}_{p}-{\phi {}}_{w})}{{\delta {}x}_{WP}}}}$

Flux across the east face =

${\displaystyle {{\Gamma {}}_{e}A_{e}\left({\frac {\partial {}\phi {}}{\partial {x}}}\right)}_{e}={\Gamma {}}_{e}A_{e}{\frac {({\phi {}}_{e}-{\phi {}}_{p})}{{\delta {}x}_{PE}}}}$

Flux across the south face =

${\displaystyle {{\Gamma {}}_{s}A_{s}\left({\frac {\partial {}\phi {}}{\partial {y}}}\right)}_{s}={\Gamma {}}_{s}A_{s}{\frac {({\phi {}}_{p}-{\phi {}}_{s})}{{\delta {}y}_{SP}}}}$

Flux across the north face =

${\displaystyle {{\Gamma {}}_{n}A_{n}\left({\frac {\partial {}\phi {}}{\partial {y}}}\right)}_{n}={\Gamma {}}_{n}A_{n}{\frac {({\phi {}}_{n}-{\phi {}}_{p})}{{\delta {}y}_{PN}}}}$

Substituting these expressions in equation (2) we obtain

${\displaystyle {\Gamma {}}_{e}A_{e}{\frac {({\phi {}}_{e}-{\phi {}}_{p})}{{\delta {}x}_{PE}}}-{\Gamma {}}_{w}A_{w}{\frac {({\phi {}}_{p}-{\phi {}}_{w})}{{\delta {}x}_{WP}}}+{\Gamma {}}_{n}A_{n}{\frac {({\phi {}}_{n}-{\phi {}}_{p})}{{\delta {}y}_{PN}}}-{\Gamma {}}_{s}A_{s}{\frac {({\phi {}}_{p}-{\phi {}}_{s})}{{\delta {}y}_{SP}}}+{\bar {S}}\Delta {}V=0}$

When the source term is represented in linearized form ${\displaystyle {\bar {S}}\Delta {}V=S_{u}+S_{p}*S_{\varphi }}$ , this equation can be rearranged as,

${\displaystyle \left[{\frac {{\Gamma {}}_{e}A_{e}}{{\delta {}x}_{PE}}}+{\frac {{\Gamma {}}_{w}A_{w}}{{\delta {}x}_{WP}}}+{\frac {{\Gamma {}}_{n}A_{n}}{{\delta {}y}_{PN}}}+{\frac {{\Gamma {}}_{s}A_{s}}{{\delta {}y}_{SP}}}-S_{p}\right]\phi {}_{P}}$ = ${\displaystyle {\frac {{\Gamma {}}_{e}A_{e}}{{\delta {}x}_{PE}}}\phi {}_{E}+{\frac {{\Gamma {}}_{w}A_{w}}{{\delta {}x}_{WP}}}\phi {}_{W}+{\frac {{\Gamma {}}_{n}A_{n}}{{\delta {}x}_{PN}}}\phi {}_{N}+{\frac {{\Gamma {}}_{s}A_{s}}{{\delta {}x}_{SP}}}\phi {}_{S}+S_{u}}$

This equation can now be expressed in a general discretized equation form for internal nodes, i.e.,

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

Where,

${\displaystyle a_{W}}$ ${\displaystyle a_{E}}$ ${\displaystyle a_{S}}$ ${\displaystyle a_{N}}$ ${\displaystyle a_{P}}$
${\displaystyle {\frac {{\Gamma {}}_{w}A_{w}}{{\delta {}x}_{WP}}}}$ ${\displaystyle {\frac {{\Gamma {}}_{e}A_{e}}{{\delta {}x}_{PE}}}}$ ${\displaystyle {\frac {{\Gamma {}}_{s}A_{s}}{{\delta {}x}_{SP}}}}$ ${\displaystyle {\frac {{\Gamma {}}_{n}A_{n}}{{\delta {}x}_{PN}}}}$ ${\displaystyle a_{W}+a_{E}+a_{S}+a_{N}-S_{p}}$

The face areas in y two dimensional case are :

${\displaystyle A_{w}=A_{e}=\Delta {}y}$


and

${\displaystyle A_{n}=A_{s}=\Delta {}x}$.


We obtain the distribution of the property ${\displaystyle \varphi {}}$ i.e. a given two dimensional situation by writing discretized equations of the form of equation (3) at each grid node of the subdivided domain. At the boundaries where the temperature or fluxes are known the discretized equation are modified to incorporate the boundary conditions. The boundary side coefficient is set to zero (cutting the link with the boundary) and the flux crossing this boundary is introduced as a source which is appended to any existing ${\displaystyle s_{u}}$ and ${\displaystyle S_{p}}$ terms. Subsequently the resulting set of equations is solved to obtain the two dimensional distribution of the property ${\displaystyle \varphi {}}$

## 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.