OpenFOAM guide/SurfaceInterpolation

From OpenFOAMWiki
Jump to: navigation, search
This article is about the surface interpolation family of classes in libfiniteVolume. For the surfaceInterpolation class itself, see surfaceInterpolation (class).

The surfaceInterpolation classes implemented in the finite volume library perform interpolation from volume fields to face fields, a critical calculation in the discretization process for the finite volume method, particularly for co-located meshes, as is used by OpenFOAM. OpenFOAM implements dozens of different schemes for this operation. This kind of interpolation is denoted:

\left . \boldsymbol \Phi \right \vert_{v \to f} Notation used by Marupio in this wiki

1 Schemes

The schemes are selected in the fvSchemes file, and loaded using runTime selection. There are more than fifty schemes available in OpenFOAM-extend, including:

  • QUICK - quadratic upwind interpolation;
  • linear - central differencing scheme;
  • upwind - upwind differencing scheme; and
  • skewCorrected - skew upwind scheme.

These are selected in fvSchemes. For a list of all available schemes for your installation, use bananas.

2 Components

Important components of surface interpolation include:

3 Code

The interpolate function is found in surfaceInterpolate, and is available in the fvc namespace:

fvc::interpolate(phi);

The linear scheme is explicitly included with fvCFD.H, a file that at the top level of most solvers. To specifically force a linear interpolation:

linearInterpolate(phi);

Velocity flux, (phi in OpenFOAM) is calculated using surfaceInterpolation by default (when using #include "createPhi.H").