pyyeti.nastran.n2p.rbgeom¶
- pyyeti.nastran.n2p.rbgeom(grids, refpoint=array([[0, 0, 0]]))[source]¶
Compute 6 rigid-body modes from geometry.
- Parameters:
grids (3-column matrix) – Coordinates in basic; columns are [x, y, z].
refpoint (integer or 3-element vector) – Defines location that rb modes will be relative to: either row index into grids (starting at 0) or the [x, y, z] location.
- Returns:
rb (ndarray) – Rigid-body modes; rows(grids)*6 x 6.
Notes
All grids are assumed to be in the same rectangular coordinate system. For a much more sophisticated routine, see
rbgeom_uset().Examples
>>> import numpy as np >>> from pyyeti import nastran >>> grids = np.array([[0., 0., 0.], [30., 10., 20.]]) >>> nastran.rbgeom(grids) array([[ 1., 0., 0., 0., 0., -0.], [ 0., 1., 0., -0., 0., 0.], [ 0., 0., 1., 0., -0., 0.], [ 0., 0., 0., 1., 0., 0.], [ 0., 0., 0., 0., 1., 0.], [ 0., 0., 0., 0., 0., 1.], [ 1., 0., 0., 0., 20., -10.], [ 0., 1., 0., -20., 0., 30.], [ 0., 0., 1., 10., -30., 0.], [ 0., 0., 0., 1., 0., 0.], [ 0., 0., 0., 0., 1., 0.], [ 0., 0., 0., 0., 0., 1.]])