Difference between revisions of "OpenFOAM guide/SurfaceInterpolation"
(Created page with '{{About|the surface interpolation family of classes in libfiniteVolume|the surfaceInterpolation class itself|surfaceInterpolation (class)}} The surfaceInterpolation classes imple…') |
|||
Line 18: | Line 18: | ||
* [[surfaceInterpolation (class)|surfaceInterpolation]] - the class itself; | * [[surfaceInterpolation (class)|surfaceInterpolation]] - the class itself; | ||
− | * [[surfaceInterpolate]] - the [[interpolation]] methods, provided in the | + | * [[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 | * [[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. | * the derived surfaceInterpolation classes. | ||
== Code == | == Code == | ||
− | The <tt>interpolate</tt> function is found in [[surfaceInterpolate]], and is available in the | + | The <tt>interpolate</tt> function is found in [[surfaceInterpolate]], and is available in the fvc namespace: |
<tt>fvc::interpolate(phi);</tt> | <tt>fvc::interpolate(phi);</tt> | ||
Line 32: | Line 32: | ||
Velocity flux, (phi in [[OpenFOAM]]) is calculated using surfaceInterpolation by default (when using <tt>#include "createPhi.H"</tt>. | Velocity flux, (phi in [[OpenFOAM]]) is calculated using surfaceInterpolation by default (when using <tt>#include "createPhi.H"</tt>. | ||
− | [[Category: | + | [[Category:OpenFOAM coding guide]] |
Revision as of 15:29, 30 June 2010
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".