pyyeti.nastran.n2p.rbgeom_uset¶
- pyyeti.nastran.n2p.rbgeom_uset(uset, refpoint=array([[0, 0, 0]]))[source]¶
Compute 6 rigid-body modes from geometry using a USET table.
- Parameters:
uset (pandas DataFrame) – A DataFrame as output by
pyyeti.nastran.op2.OP2.rdn2cop2()refpoint (integer or vector) – Defines location that rb modes will be relative to. Either an integer specifying the node ID (which is in the uset table), or it is a coordinates vector [x, y, z] in basic.
- Returns:
rb (6-column array) – Rigid-body modes in “global” coordinates.
Notes
The return rb is analogous to the output of Nastran VECPLOT option 4. Here, “global” means the combination of all local coordinate systems. In other words, the rigid-body modes are in all the local coordinates of the grids. The refpoint is given unit translations and rotations in the basic coordinate system.
All SPOINTs (scalar points), all EPOINTs (extra points), and GRIDS in the q-set or in the “left over” c-set will have 0’s.
This routine will handle grids in rectangular, cylindrical, and spherical coordinates.
See also
pyyeti.nastran.bulk.bulk2uset(),rbgeom(),pyyeti.nastran.op2.rdnas2cam(),pyyeti.nastran.op2.OP2.rdn2cop2(),usetprt()Examples
>>> import numpy as np >>> from pyyeti import nastran >>> # first, make a uset table: >>> # node 100 in basic is @ [5, 10, 15] >>> # node 200 in cylindrical coordinate system is @ >>> # [r, th, z] = [32, 90, 10] >>> cylcoord = np.array([[1, 2, 0], [0, 0, 0], [1, 0, 0], ... [0, 1, 0]]) >>> uset = nastran.addgrid( ... None, [100, 200], 'b', [0, cylcoord], ... [[5, 10, 15], [32, 90, 10]], [0, cylcoord]) >>> np.set_printoptions(precision=2, suppress=True) >>> nastran.rbgeom_uset(uset) # rb modes relative to [0, 0, 0] array([[ 1., 0., 0., 0., 15., -10.], [ 0., 1., 0., -15., 0., 5.], [ 0., 0., 1., 10., -5., 0.], [ 0., 0., 0., 1., 0., 0.], [ 0., 0., 0., 0., 1., 0.], [ 0., 0., 0., 0., 0., 1.], [ 0., 0., 1., 0., -10., 0.], [ 0., -1., 0., 32., -0., -10.], [ 1., 0., 0., 0., 32., -0.], [ 0., 0., 0., 0., 0., 1.], [ 0., 0., 0., 0., -1., 0.], [ 0., 0., 0., 1., 0., 0.]])