4.8 Numerical framework

The fixed value and fixed gradient conditions described in Sec. 4.2 can be combined to form a general numerical framework for boundary conditions.


The contributions from the boundary conditions to the matrix equation eqn, by discretisation of advection and Laplacian terms, can be generalised as:

  • internal” contributions to eqn, from terms including the cell value eqn;
  • boundary” contributions to eqn, from terms without eqn.

The example above shows Eq. (4.2 ) for the face value, required at a boundary for advection discretisation, in the case of a fixed gradient boundary condition. The internal “factor” on eqn is 1, which is multiplied by eqn for the contribution to the respective diagonal coefficient in eqn, as in the example in Sec. 3.24 .

The boundary factor is eqn, which is similarly multiplied by eqn for the contribution to eqn.

For the fixed value condition eqn with advection, the boundary factor is eqn and an internal factor is 0.

Laplacian discretisation requires the surface normal gradient on the faces. A fixed gradient condition delivers an equivalent boundary factor of eqn to eqn and an internal factor of 0.

With a fixed value eqn, the face normal gradient Eq. (4.3 ) gives an internal factor of eqn and a boundary factor of eqn. Both are multiplied by eqn in their contributions to eqn and the diagonal coefficient of eqn in eqn, as shown in the Laplacian discretisation in Sec. 3.24 .

The table below summarises: the “value” internal and boundary factors, contributing to the respective matrix coefficients with advection discretisation; and equivalent “gradient” factors relating to Laplacian discretisation. This provides a framework which can be extended to more complex conditions.

term factor fixed value fixed gradient

advection value internal 0 1
advection value boundary eqn eqn
Laplacian gradient internal eqn 0
Laplacian gradient boundary eqn eqn

Notes on CFD: General Principles - 4.8 Numerical framework