Block

class plot3d.block.Block(X: ndarray, Y: ndarray, Z: ndarray)[source]

Plot3D Block definition

cell_volumes()[source]

Compute volume of all cells

Returns:

volume of all cells

Return type:

numpy.ndarray

Reference:

Davies, D.E. and Salmond, D.J., “Calculation of the Volume of a General Hexahedron for Flow Predicitons”, AIAA Journal, vol. 23, No. 6, pp. 954-956, June 1985. It is (supposedly) exact for a hexahedral whose faces are bi-linear surfaces (i.e., the simplest surface that can be fit through the four nodes defining the face).

cylindrical()[source]

Converts the block to cylindrical coordinate system. The rotation axis is assumed to be “x” direction

scale(factor: float)[source]

Scales a mesh by a certain factor

Parameters:

factor (float) – _description_

shift(shift_amount: float, direction: str = 'z')[source]

shifts the blocks by a certain amount

Parameters:
  • shift_amount (float) – _description_

  • direction (str, optional) – _description_. Defaults to “z”.

plot3d.block.reduce_blocks(blocks: List[Block], factor: int)[source]

reduce the blocks by a factor of (factor)

Parameters:
  • blocks (List[Block]) – list of blocks to reduce in size

  • factor (int, optional) – Number of indicies to skip . Defaults to 2.

Returns:

[description]

Return type:

[type]