# Diffusion term

(Difference between revisions)
 Revision as of 05:16, 5 December 2005 (view source)Tsaad (Talk | contribs) (→Minimum Correction)← Older edit Latest revision as of 07:32, 22 January 2010 (view source)Dani1978 (Talk | contribs) (difference vector incorrectly defined (compare with picture!)) (10 intermediate revisions not shown) Line 1: Line 1: - ==Discretisation of the Diffusion Term == + ==Discretisation of the diffusion term == === Description=== === Description===

For a general control volume (orthogonal, non-orthogonal), the discretization of the diffusion term can be written in the following form
For a general control volume (orthogonal, non-orthogonal), the discretization of the diffusion term can be written in the following form
- $\int_{S}\Gamma\nabla\phi\cdot{\rm{d\vec S}} = \sum_{faces}\Gamma _f \nabla \phi _f \cdot{\rm{\vec S_f}}$
+ + :$\int_{S}\Gamma\nabla\phi\cdot{\rm{d\vec S}} = \sum_{faces}\Gamma _f \nabla \phi _f \cdot{\rm{\vec S_f}}$
where where *S denotes the surface area of the control volume *S denotes the surface area of the control volume *$S_f$ denotes the area of a face for the control volume *$S_f$ denotes the area of a face for the control volume - As usual, the subscript f refers to a given face. The figure below describes the terminology used in the framework of a general non-orthogonal control volume
+ As usual, the subscript f refers to a given face. The figure below describes the terminology used in the framework of a general '''non-orthogonal''' control volume
[[Image:non_orthogonal_CV_terminology.jpg]]
[[Image:non_orthogonal_CV_terminology.jpg]]
'''A general non-orthogonal control volume'''
'''A general non-orthogonal control volume'''
- Note: The approaches those are discussed here are applicable to non-orthoganal meshes as well as orthogonal meshes. -
- A control volume in mesh is made up of set of faces enclosing it. Where '''$S_f$''' represents the magnitude of area of the face. And '''n''' represents the normal unit vector of the face under consideration. If $\vec r_{P}$ and $\vec r_{N}$ are position vector of centroids of cells P and N respectively. Then, we define
If $\vec r_{P}$ and $\vec r_{N}$ are position vector of centroids of cells P and N respectively. Then, we define
- $\overrightarrow{d_{PN}}= \vec r_{P} - \vec r_{N}$ + :$\overrightarrow{d_{PN}}= \vec r_{N} - \vec r_{P}$

Line 36: Line 34: === Approach 2 === === Approach 2 === We define the vector We define the vector - $+ :[itex] \vec \alpha {\rm{ = }}\frac{{{\rm{\vec {S_f}}}}}{{{\rm{\vec S_f}} \cdot {\overrightarrow{d_{PN}}}}} \vec \alpha {\rm{ = }}\frac{{{\rm{\vec {S_f}}}}}{{{\rm{\vec S_f}} \cdot {\overrightarrow{d_{PN}}}}}$ [/itex] Line 46: Line 44: where $\bar \nabla \phi _f$ and $\Gamma _f$ are suitable face averages.
where $\bar \nabla \phi _f$ and $\Gamma _f$ are suitable face averages.
- === Orthogonal Correction Approaches === + === Orthogonal correction approaches === In non-orthogonal grids, the gradient direction that will yield an expression involving the values at the neighboring control volumes will have to be along the line joining the centroids of the two control volumes. If this direction has a unit vector denoted by $\vec e$ then, by definition
In non-orthogonal grids, the gradient direction that will yield an expression involving the values at the neighboring control volumes will have to be along the line joining the centroids of the two control volumes. If this direction has a unit vector denoted by $\vec e$ then, by definition
- $+ :[itex] \vec e {\rm{ = }} \frac{{{\rm{\overrightarrow{d_{PN}}}}}} {\left| {\overrightarrow{d_{PN}}} \right|} \vec e {\rm{ = }} \frac{{{\rm{\overrightarrow{d_{PN}}}}}} {\left| {\overrightarrow{d_{PN}}} \right|}$
[/itex]
then the gradient in the direction of $\vec e$ can be written as
then the gradient in the direction of $\vec e$ can be written as
- $\nabla \phi _f \cdot \vec e = \frac {\partial \phi_f} {\partial e} = \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|}$
+ :$\nabla \phi _f \cdot \vec e = \frac {\partial \phi_f} {\partial e} = \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|}$
If the surface vector $\vec {S_f}$ is written as the summation of two vectors $\vec {E}$ and $\vec {T}$
If the surface vector $\vec {S_f}$ is written as the summation of two vectors $\vec {E}$ and $\vec {T}$
- $\vec {S_f} = \vec {E} + \vec {T}$
+ :$\vec {S_f} = \vec {E} + \vec {T}$
where $\vec {E}$ is in the direction joining the centroids of the two control volumes, we will then be able to express the diffusive flux in terms of the neighboring control volumes plus an additional correction. This is done as follows
where $\vec {E}$ is in the direction joining the centroids of the two control volumes, we will then be able to express the diffusive flux in terms of the neighboring control volumes plus an additional correction. This is done as follows
- $\nabla \phi_f \cdot \vec {S_f} = \nabla \phi_f \cdot \vec {E} + \nabla \phi_f \cdot \vec {T}$
+ :$\nabla \phi_f \cdot \vec {S_f} = \nabla \phi_f \cdot \vec {E} + \nabla \phi_f \cdot \vec {T}$
- $\nabla \phi_f \cdot \vec {S_f} = E \nabla \phi_f \cdot \vec {e} + \nabla \phi_f \cdot \vec {T}$ .... (where E is the magnitude of $\vec E$
+ :$\nabla \phi_f \cdot \vec {S_f} = E \nabla \phi_f \cdot \vec {e} + \nabla \phi_f \cdot \vec {T}$ .... (where E is the magnitude of $\vec E$
At the outset, one obtains
At the outset, one obtains
- $\nabla \phi_f \cdot \vec {S_f} = E \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|} + \nabla \phi_f \cdot \vec {T}$
+ :$\nabla \phi_f \cdot \vec {S_f} = E \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|} + \nabla \phi_f \cdot \vec {T}$

The first term in the above equation can be thought of as the orthogonal contribution to the diffusive flux, while the second term represents the non-orthogonal effects. At this point, the vector $\vec {T}$ has not been defined yet. There are three main methods to define this vector. The first term in the above equation can be thought of as the orthogonal contribution to the diffusive flux, while the second term represents the non-orthogonal effects. At this point, the vector $\vec {T}$ has not been defined yet. There are three main methods to define this vector. - ==== Minimum Correction ==== + ==== Minimum correction ==== In the minimum correction approach, the vectors are defined as
In the minimum correction approach, the vectors are defined as
- $\vec E = (\vec e \cdot \vec S_f)\cdot \vec e = S_f \cos\theta \vec e$
+ :$\vec E = (\vec e \cdot \vec S_f)\cdot \vec e = S_f \cos\theta \vec e$
- $\vec T = (\vec S - \vec E)\cdot \vec e = S_f (\vec n - \cos\theta \vec e)$
+ :$\vec T = \vec S - \vec E= S_f (\vec n - \cos\theta \vec e)$
[[image:Non_orthogonal_CV_minimum_correction.jpg]]
[[image:Non_orthogonal_CV_minimum_correction.jpg]]
'''Minimum Correction Approach''' '''Minimum Correction Approach''' - ==== Orthogonal Correction ==== + ==== Orthogonal correction ==== - ==== Over Relaxed Correction ==== + In the orthogonal correction approach, the vectors are defined as
+ :$\vec E = S_f \vec e$
+ :$\vec T = \vec S - \vec E = S_f (\vec n - \vec e)$
+ [[image:Non_orthogonal_CV_orthogonal_correction.jpg]]
+ '''Orthogonal Correction Approach''' + + ==== Over relaxed correction ==== + Finally, in the over relaxed approach, we define
+ :$\vec E = \frac {\vec S_f \cdot \vec S_f}{\vec S_f \cdot \vec e} \vec e = \frac {S_f}{\cos \theta} \vec e$
+ :$\vec T = \vec S - \vec E = S_f (\vec n - \frac{1}{\cos \theta} \vec e)$
+ [[image:Non_orthogonal_CV_Over_relaxed_correction.jpg]]
+ '''Over Relaxed Correction Approach''' == References == == References == Line 80: Line 89: #{{reference-book|author=Ferziger, J.H. and Peric, M.|year=2001|title=Computational Methods for Fluid Dynamics|rest=ISBN 3540420746, 3rd Rev. Ed., Springer-Verlag, Berlin.}} #{{reference-book|author=Ferziger, J.H. and Peric, M.|year=2001|title=Computational Methods for Fluid Dynamics|rest=ISBN 3540420746, 3rd Rev. Ed., Springer-Verlag, Berlin.}} #{{reference-paper|author=[http://www.h.jasak.dial.pipex.com/ Hrvoje, Jasak]|year=1996|title=Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows|rest=PhD Thesis, Imperial College, University of London ([http://www.h.jasak.dsl.pipex.com/HrvojeJasakPhD.pdf download])}} #{{reference-paper|author=[http://www.h.jasak.dial.pipex.com/ Hrvoje, Jasak]|year=1996|title=Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows|rest=PhD Thesis, Imperial College, University of London ([http://www.h.jasak.dsl.pipex.com/HrvojeJasakPhD.pdf download])}} - + #{{reference-paper|author=[http://webfea-lb.fea.aub.edu.lb/fea/me/CFD/ Darwish, Marwan]|year=2003|title=CFD Course Notes|rest=Notes, American University of Beirut}} + #{{reference-paper|author=[http://jedi.knows.it/ Saad, Tony]|year=2005|title=Implementation of a Finite Volume Unstructured CFD Solver Using Cluster Based Parallel Computing|rest=Thesis, American University of Beirut}} ---- ---- Return to [[Numerical methods | Numerical Methods]] Return to [[Numerical methods | Numerical Methods]]

## Discretisation of the diffusion term

### Description

For a general control volume (orthogonal, non-orthogonal), the discretization of the diffusion term can be written in the following form

$\int_{S}\Gamma\nabla\phi\cdot{\rm{d\vec S}} = \sum_{faces}\Gamma _f \nabla \phi _f \cdot{\rm{\vec S_f}}$

where

• S denotes the surface area of the control volume
• $S_f$ denotes the area of a face for the control volume

As usual, the subscript f refers to a given face. The figure below describes the terminology used in the framework of a general non-orthogonal control volume

A general non-orthogonal control volume

If $\vec r_{P}$ and $\vec r_{N}$ are position vector of centroids of cells P and N respectively. Then, we define

$\overrightarrow{d_{PN}}= \vec r_{N} - \vec r_{P}$

We wish to approaximate the diffusive flux $D_f = \Gamma _f \nabla \phi _f \cdot{\rm{\vec S_f}}$ at the face.

### Approach 1

A first approach is to use a simple expression for estimating the gradient of a scalar normal to the face.

$D_f = \Gamma _f \nabla \phi _f \cdot \vec S_f = \Gamma _f \left[ {\left( {\phi _N - \phi _P } \right)\left| {{{\vec S_f} \over {\overrightarrow{d_{PN}}}}} \right|} \right]$

where $\Gamma _f$ is a suitable face average.

This approach is not very good when the non-orthogonality of the faces increases. If this is the case, it is advisable to use one of the following approaches.

### Approach 2

We define the vector

$\vec \alpha {\rm{ = }}\frac{{{\rm{\vec {S_f}}}}}{{{\rm{\vec S_f}} \cdot {\overrightarrow{d_{PN}}}}}$

giving us the expression:

$D_f = \Gamma _f \nabla \phi _f \cdot{\rm{\vec S_f = }}\Gamma _{\rm{f}} \left[ {\left( {\phi _N - \phi _P } \right)\vec \alpha \cdot {\rm{\vec S_f + }}\bar \nabla \phi_f \cdot {\rm{\vec S_f - }}\left( {\bar \nabla \phi_f \cdot {\overrightarrow{d_{PN}}}} \right)\vec \alpha \cdot {\rm{\vec S_f}}} \right]$

where $\bar \nabla \phi _f$ and $\Gamma _f$ are suitable face averages.

### Orthogonal correction approaches

In non-orthogonal grids, the gradient direction that will yield an expression involving the values at the neighboring control volumes will have to be along the line joining the centroids of the two control volumes. If this direction has a unit vector denoted by $\vec e$ then, by definition

$\vec e {\rm{ = }} \frac{{{\rm{\overrightarrow{d_{PN}}}}}} {\left| {\overrightarrow{d_{PN}}} \right|}$

then the gradient in the direction of $\vec e$ can be written as

$\nabla \phi _f \cdot \vec e = \frac {\partial \phi_f} {\partial e} = \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|}$

If the surface vector $\vec {S_f}$ is written as the summation of two vectors $\vec {E}$ and $\vec {T}$

$\vec {S_f} = \vec {E} + \vec {T}$

where $\vec {E}$ is in the direction joining the centroids of the two control volumes, we will then be able to express the diffusive flux in terms of the neighboring control volumes plus an additional correction. This is done as follows

$\nabla \phi_f \cdot \vec {S_f} = \nabla \phi_f \cdot \vec {E} + \nabla \phi_f \cdot \vec {T}$
$\nabla \phi_f \cdot \vec {S_f} = E \nabla \phi_f \cdot \vec {e} + \nabla \phi_f \cdot \vec {T}$ .... (where E is the magnitude of $\vec E$

At the outset, one obtains

$\nabla \phi_f \cdot \vec {S_f} = E \frac { \phi_N - \phi_P} {\left| {\overrightarrow{d_{PN}}} \right|} + \nabla \phi_f \cdot \vec {T}$

The first term in the above equation can be thought of as the orthogonal contribution to the diffusive flux, while the second term represents the non-orthogonal effects. At this point, the vector $\vec {T}$ has not been defined yet. There are three main methods to define this vector.

#### Minimum correction

In the minimum correction approach, the vectors are defined as

$\vec E = (\vec e \cdot \vec S_f)\cdot \vec e = S_f \cos\theta \vec e$
$\vec T = \vec S - \vec E= S_f (\vec n - \cos\theta \vec e)$

Minimum Correction Approach

#### Orthogonal correction

In the orthogonal correction approach, the vectors are defined as

$\vec E = S_f \vec e$
$\vec T = \vec S - \vec E = S_f (\vec n - \vec e)$

Orthogonal Correction Approach

#### Over relaxed correction

Finally, in the over relaxed approach, we define

$\vec E = \frac {\vec S_f \cdot \vec S_f}{\vec S_f \cdot \vec e} \vec e = \frac {S_f}{\cos \theta} \vec e$
$\vec T = \vec S - \vec E = S_f (\vec n - \frac{1}{\cos \theta} \vec e)$

Over Relaxed Correction Approach

## References

1. Ferziger, J.H. and Peric, M. (2001), Computational Methods for Fluid Dynamics, ISBN 3540420746, 3rd Rev. Ed., Springer-Verlag, Berlin..
2. Hrvoje, Jasak (1996), "Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows", PhD Thesis, Imperial College, University of London (download).
3. Darwish, Marwan (2003), "CFD Course Notes", Notes, American University of Beirut.
4. Saad, Tony (2005), "Implementation of a Finite Volume Unstructured CFD Solver Using Cluster Based Parallel Computing", Thesis, American University of Beirut.