ibfoamrig.core.InterpolationData#

class ibfoamrig.core.InterpolationData(frame)[source]#

Bases: object

IBM interpolation info for each boundary cell.

Built from interpolationInfo_boundary.dat and joined with the cell centres, so x, y, z hold the centre of the boundary cell.

classmethod from_file(path, cells)[source]#

Loads interpolation info and joins the boundary cell centres.

Parameters:
  • path (StrPath) – Path to the file.

  • cells (FieldData) – Field data of the same case and time, providing the cell centres. Must contain every boundary cell.

Returns:

The interpolation data, one row per boundary cell.

Raises:
  • FileNotFoundError – If the file does not exist.

  • ValueError – If a boundary cell is missing from cells, or the file lacks required columns.

Return type:

Self

property point_count: int#

Number of interpolation points per boundary cell.

points(index)[source]#

Returns one interpolation point of every boundary cell.

Parameters:

index (int) – Index of the point, 0 being the point on the surface.

Returns:

A frame with cellI, x, y, z of the point and, if present intCell, the cell the solver interpolates from.

Raises:

IndexError – If index is out of range.

Return type:

DataFrame

normals()[source]#

Returns the surface normal of every boundary cell.

Returns:

A frame with cellI and the normal components x, y, z.

Return type:

DataFrame