Block¶
- class plot3d.block.Block(X: ndarray[tuple[Any, ...], dtype[_ScalarT]], Y: ndarray[tuple[Any, ...], dtype[_ScalarT]], Z: ndarray[tuple[Any, ...], dtype[_ScalarT]])[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
- get_faces()[source]¶
 Returns a dictionary of the six faces of the block. Each face is a tuple of (X_face, Y_face, Z_face).
- 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”.
- property size: int¶
 returns the total number of nodes
- Returns:
 number of nodes
- Return type:
 int