Difference between revisions of "OpenFOAM guide/Interpolation (by cell)"
(Created page with '{{About|the interpolation class in OpenFOAM's libfiniteVolume||Interpolation (disambiguation)}} This article refers to classes in the interpolat…') |
m (moved Interpolation (by cell) to OpenFOAM guide/Interpolation (by cell): Prevent name collisions) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{About|the interpolation class in [[OpenFOAM]]'s | + | {{About|the interpolation class in [[OpenFOAM]]'s libfiniteVolume||Interpolation (disambiguation)}} |
This article refers to classes in the interpolation (by cell) family, which includes: | This article refers to classes in the interpolation (by cell) family, which includes: | ||
Line 7: | Line 7: | ||
* interpolationCellPointFace. | * interpolationCellPointFace. | ||
− | These classes all perform linear [[interpolation]] on a | + | These classes all perform linear [[interpolation]] on a volume field, given a cell and arbitrary location within that cell. Used by meshToMeshInterpolation. They are primarily employed by post-processing sampling utilities, such as <tt>sample</tt>. |
== interpolation (base class) == | == interpolation (base class) == | ||
− | This class holds a reference to a | + | This class holds a reference to a volume field, and explicitly holds references to some of its components. It is an abstract base class that provides an interface for the other classes in this family. |
== interpolationCell == | == interpolationCell == |
Latest revision as of 19:20, 30 June 2010
This article is about the interpolation class in OpenFOAM's libfiniteVolume. For other uses, see Interpolation (disambiguation). |
This article refers to classes in the interpolation (by cell) family, which includes:
- interpolation (abstract base class);
- interpolationCell;
- interpolationCellPoint; and
- interpolationCellPointFace.
These classes all perform linear interpolation on a volume field, given a cell and arbitrary location within that cell. Used by meshToMeshInterpolation. They are primarily employed by post-processing sampling utilities, such as sample.
Contents
1 interpolation (base class)
This class holds a reference to a volume field, and explicitly holds references to some of its components. It is an abstract base class that provides an interface for the other classes in this family.
2 interpolationCell
This class is an implementation of a nearest-cell interpolation, and although it appears trivial (i.e. interpolating to the nearest cell in a class that requires the cell index as a parameter!), when loaded by runTime selection by a post-processing utility, this class basically turns off interpolation. There are no explicit manifestations of this class in OpenFOAM - it is loaded exclusively by runTime selection.
3 interpolationCellPoint
Interpolate to an arbitrary location within a cell. This class works by:
- breaking each face down into triangles;
- defining tetrahedra using these triangles and the cell centre-point;
- cycling through all tetrahedra to find which encloses the arbitrary point; and
- using inverse distance weights to perform linear interpolation.
4 interpolationCellPointFace
Given an arbitrary point within the cell, find the nearest point on one of its faces. This class works by:
- finding a candidate face by projecting a line from the cell-centre through the arbitrary point;
- decomposing the cell face into traingles that include the face centre-point and two vertices;
- defining tetrahedra using these triangles and the cell centre-point;
- searches for the tetrahedron enclosing the point;
- if this fails, it repeats this for all faces;
- if the face is not an empty fvpatch, it returns the normal projection of the point onto the selected face;
- if the face is an empty fvpatch, it returns the cell centre instead.