Difference between revisions of "OpenFOAM guide/H operator"

From OpenFOAMWiki
(Created page with 'The '''H''' operator is a form of shorthand notation that is not commonly used, but appears in OpenFOAM. It is comprised of a collection of terms from the momentum equation.…')
 
Line 9: Line 9:
 
* '''U''' is the uncorrected velocity;
 
* '''U''' is the uncorrected velocity;
 
* '''S''' is the discretization source term; and
 
* '''S''' is the discretization source term; and
* ''p''<sup>*</sup> is the [[pressure]] from the previous timestep or initial guess.
+
* ''p''<sup>*</sup> is the pressure from the previous timestep or initial guess.
  
The '''H''' operator is all terms on the right-hand side, excluding those involving [[pressure]]:
+
The '''H''' operator is all terms on the right-hand side, excluding those involving pressure:
  
 
<math>\mathbf H_p = \mathbf {S_m}_{,p} - \sum\limits_r A_r \mathbf{U}_r</math>
 
<math>\mathbf H_p = \mathbf {S_m}_{,p} - \sum\limits_r A_r \mathbf{U}_r</math>

Revision as of 15:37, 30 June 2010

The H operator is a form of shorthand notation that is not commonly used, but appears in OpenFOAM. It is comprised of a collection of terms from the momentum equation. A partially discretized form of the momentum equation is:

A_p \mathbf U_p = \mathbf {S_m}_{,p} - \sum\limits_r A_r \mathbf{U}_r - \boldsymbol \nabla p^*

Where:

  • subscript p is the cell index;
  • subscript r are related cells[1];
  • A are the matrix coefficients;
  • U is the uncorrected velocity;
  • S is the discretization source term; and
  • p* is the pressure from the previous timestep or initial guess.

The H operator is all terms on the right-hand side, excluding those involving pressure:

\mathbf H_p = \mathbf {S_m}_{,p} - \sum\limits_r A_r \mathbf{U}_r

Therefore the momentum equation becomes:

A_p \mathbf U_p = \mathbf H_p - \boldsymbol \nabla p

Due to its prevalence in solver algorithms, OpenFOAM implements the H operator directly in its matrix classes, including:

Notes

  1. What I'm calling related cells is conventionally called neighbours. But OpenFOAM has a different meaning for neighbours, so the term related cells is used.