pyyeti.nastran.n2p.formtran

pyyeti.nastran.n2p.formtran(nas, se, dof, gset=False)[source]

Make a transformation matrix from a-set DOF to specified DOF within the same SE.

Parameters:
  • nas (dictionary) – This is the nas2cam dictionary: nas = op2.rdnas2cam()

  • se (integer) – The id of the superelement.

  • dof (1d or 2d array) – One or two column matrix: [ids] or [ids, dofs]; if one column, the second column is internally set to 123456 for each id

  • gset (bool; optional) – If True, and sedn == 0, transform from g-set instead of modal DOF. See below.

Returns:

  • Tran (ndarray) – Transformation from the a-set DOF of superelement se to the specified DOF (dof) of the same superelement. The transformation is as follows:

    if sedn > 0:
      {DOF} = Tran * {T & Q}
    
    if sedn == 0:
      {DOF} = Tran * {modal}       (for gset == False)
      {DOF} = Tran * {g-set}       (for gset == True)
    
  • outdof (ndarray) – The expanded version of the dof input as returned by mkdofpv():

    [id1, dof1; id1, dof2; ... id2, dof1; ...]
    

Notes

This routine is the workhorse of other routines such as formdrm() and formulvs().

Example usage:

# Want data recovery matrix from t & q dof to grids 3001 and
# 3002 of se 300:
from pyyeti import nastran
import op2
nas = op2.rdnas2cam('nas2cam')
drm = nastran.formtran(nas, 300, [3001, 3002])
# or, equivalently:
drm = nastran.formdrm(nas, 300, 300, [3001, 3002])