bluemira.structural.transformation

FE transformation matrices and methods

Functions

_direction_cosine_matrix(→ numpy.ndarray)

Calculates the direction cosine (transformation) matrix for an arbitrary

_direction_cosine_matrix_debugging(dx, dy, dz, *[, debug])

Slow, ugly, safe

lambda_matrix(→ numpy.ndarray)

3-D transformation matrix, generalised to a 2-node beam.

cyclic_pattern(...)

Build a cyclic pattern of a Geometry.

Module Contents

bluemira.structural.transformation._direction_cosine_matrix(dx: float, dy: float, dz: float) numpy.ndarray

Calculates the direction cosine (transformation) matrix for an arbitrary vector in space. A number of painful edge cases are handled…

Works such that the output dcm satisfies the following properties:

local = dcm @ global global = dcm.T @ local

Parameters:
  • dx (float) – The absolute length of the vector in the x global coordinate

  • dy (float) – The absolute length of the vector in the y global coordinate

  • dz (float) – The absolute length of the vector in the z global coordinate

Returns:

  • The direction cosine matrix with reference to the global coordinate

  • system (3, 3)

Return type:

numpy.ndarray

bluemira.structural.transformation._direction_cosine_matrix_debugging(dx, dy, dz, *, debug=False)

Slow, ugly, safe

bluemira.structural.transformation.lambda_matrix(dx: float, dy: float, dz: float) numpy.ndarray

3-D transformation matrix, generalised to a 2-node beam. Effectively only handles the tiling of the direction cosine matrix transform.

Parameters:
  • dx (float) – The absolute length of the vector in the x global coordinate

  • dy (float) – The absolute length of the vector in the y global coordinate

  • dz (float) – The absolute length of the vector in the z global coordinate

Return type:

The transformation matrix (12, 12)

bluemira.structural.transformation.cyclic_pattern(geometry: bluemira.structural.geometry.Geometry, axis: numpy.ndarray, angle: float, n: int, *, include_first: bool = True) list[bluemira.structural.geometry.Geometry | bluemira.structural.geometry.DeformedGeometry]

Build a cyclic pattern of a Geometry.

Parameters:
  • geometry (bluemira.structural.geometry.Geometry) – The geometry to pattern

  • axis (numpy.ndarray) – The axis vector about which to pattern

  • angle (float) – The pattern angle [degrees]

  • n (int) – The number of sectors to pattern

  • include_first (bool) – Whether or not to include the first sector in the result

Return type:

The patterned and merged geometry