torchmdo.fea

Beam FEA model

class torchmdo.fea.BeamFEA(lengths, EIs, fixed_rotation, fixed_translation, thicknesses=None)[source]

Constructs an FEA model of a beam with with varying properties and loading along its length. This model has 2 degrees-of-freedom per node.

Parameters:
  • lengths (Tensor) – (n_elems,) lengths of each beam segment

  • EIs (Tensor) – (n_elems,) EIs of each beam segment

  • fixed_rotation (Tensor) – (n_elems+1,) boolean tensor whether the rotation of each node is fixed.

  • fixed_translation (Tensor) – (n_elems+1,) whether the translation of each node is fixed.

  • thicknesses (Optional[Tensor]) – (n_elems,) thicknesses of each beam segment which is useful for computing max strain

get_displacements(uniform_loads=None, f=None)[source]

Compute the displacements of the beam given the specified loading.

Parameters:
  • uniform_loads (Optional[Tensor]) – shape (n_elems,) uniform loads on each beam segment. Units should be in N/m.

  • f (Optional[Tensor]) – shape (n_elems+1, 2) force vector to use at the nodes. Note that other forces will be added to this. Units should be in N.

Return type:

Tensor

Returns:

Displacements at each node which is of shape (n_nodes, 2) where displacements[:, 0] are the translational displacements and displacements[:, 1] are the rotational displacements (in rad).