pyyeti.cb.rbmultchk¶
- pyyeti.cb.rbmultchk(f, drm, name, rb, labels=None, drm2=None, prtnullrows=False, bset='first')[source]¶
Rigid-body multiply check on a data recovery matrix.
- Parameters:
f (string or file_like or 1 or None) – Either a name of a file, or is a file_like object as returned by
open()orio.StringIO. Input as integer 1 to write to stdout. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection.drm (2d ndarray) – Data recovery matrix (DRM).
name (string) – Name of the DRM; used for titling.
rb (2d ndarray) – Rigid-body modes; number of rows is either b-set or b+q-set sized. Number of columns is 6.
labels (None or list; optional) – If list, it is a list of strings for DRM labeling. Up to first 15 characters will be used.
drm2 (None or 2d ndarray; optional) – Optional second DRM; only used in the null rows check to see if drm and drm2 share a common set of null rows. Useful for DRMs that are meant to be used together, as in DTMA*a + DTMD*d and would be expected to share the same set of null rows (if any).
prtnullrows (bool; optional) – If True, print the null rows in the DRM * rb section; otherwise only print the non-null rows. (Note that the null rows are still listed below that table.)
bset (string or 1d ndarray) – Set either to ‘first’ or ‘last’ depending on whether the b-set DOF are first or last. Or, bset can be set to a partition vector to the b-set DOF. bset is only referenced if number of rows in rb is less than the number of columns in drm. In that case, it is assumed that rb only has the b-set DOF and that drm must be partitioned down to have only the b-set columns.
- Returns:
drmrb (2d ndarray) – Matrix =
drm @ rb
Notes
- The printout has these 5 sections:
A header, with name in it.
An extreme coordinate table.
A potentially large table showing the complete results of the DRM multiplied by the rigid-body modes.
A summary table showing only the 6 rows that yielded the maximum response for each of the 6 rigid-body modes.
A list of null rows, includes information about DRM2 if input.
If any triplet of rows matches the pattern shown below, the coordinates are included in the printout (sections 2, 3, 4). For rows that do not match that pattern, the coordinates are left blank.
The expected pattern for rigid-body displacements for a node is:
[ 1 0 0 0 Z -Y 0 1 0 -Z 0 X 0 0 1 Y -X 0 ]
The pattern shown assumes the node is in the same coordinate system as the reference node. If this is not the case, the 3x3 coordinate transformation matrix (from reference to local) will show up in place of the the 3x3 identity matrix shown above. This routine will use that 3x3 matrix to convert coordinates to that of the reference before checking for the expected pattern. This all means that the use of local coordinate systems is acceptable for this routine.
- Raises:
ValueError – If rb does not have 6 columns.
ValueError – If bset is needed and is a string other than ‘first’ or ‘last’.
See also
cbcheck(),rbdispchk(),cbcoordchk(),pyyeti.nastran.n2p.rbgeom(),pyyeti.nastran.n2p.rbgeom_uset()Examples
>>> from pyyeti import cb, nastran >>> import numpy as np >>> nodes = [[0., 0., 0.], [10., 20., 30.]] >>> ATM = nastran.rbgeom(nodes) >>> rb = np.eye(6) >>> _ = cb.rbmultchk(1, ATM, 'ATM', rb) ---------------------------------------------- Results for ATM * RB ---------------------------------------------- Extreme Coordinates from ATM X Y Z ---------- ---------- ---------- Minimums: 0.0000 0.0000 0.0000 Maximums: 10.0000 20.0000 30.0000 ATM has 12 (100.0%) non-NULL rows and 0 (0.0%) NULL rows. ATM * RB results: (NOT including NULL rows) Note: "Unit Scale" is output/input, ... scaling which is: 1.0 Row Label Coordinates (x, y, z) ... ------ -------- ---------------------------------- ... 1 0.0000, 0.0000, 0.0000 ... 2 0.0000, 0.0000, 0.0000 ... 3 0.0000, 0.0000, 0.0000 ... 4 , , ... 5 , , ... 6 , , ... 7 10.0000, 20.0000, 30.0000 ... 8 10.0000, 20.0000, 30.0000 ... 9 10.0000, 20.0000, 30.0000 ... 10 , , ... 11 , , ... 12 , , ... Absolute Maximums from ATM * RB results: Row Label Coordinates (x, y, z) ... ------ -------- ---------------------------------- ... 1 0.0000, 0.0000, 0.0000 ... 2 0.0000, 0.0000, 0.0000 ... 3 0.0000, 0.0000, 0.0000 ... 8 10.0000, 20.0000, 30.0000 ... 7 10.0000, 20.0000, 30.0000 ... 7 10.0000, 20.0000, 30.0000 ... There are no NULL rows in ATM.