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:
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:
- surfaceInterpolation - the class itself;
- surfaceInterpolate - the interpolation methods, provided in the fvc namespace;
- surfaceInterpolationScheme - a generic class that is used to interface with all the derived interpolation schemes (i.e. this is an RTS base class); and
- the derived surfaceInterpolation classes.
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").