pyyeti.nastran.n2p.usetprt¶
- pyyeti.nastran.n2p.usetprt(file, uset, printsets='m,s,o,q,r,c,b,e,l,t,a,f,n,g')[source]¶
Print Nastran DOF set membership information from USET table.
- Parameters:
file (string or file_like or 1 or 0) – Either a name of a file, or is a file_like object as returned by
open(). Use 1 to write to the screen, 0 to write nothing – just get output.uset (pandas DataFrame) – A DataFrame as output by
pyyeti.nastran.op2.OP2.rdn2cop2()printsets (string; optional) – A comma delimited string specifying which sets to print, see description below.
- Returns:
table (pandas DataFrame) – DataFrame showing set membership. The index has ‘id’, ‘dof’, ‘dof#’; the columns are the sets requested in printsets in the order given below. The rows will be truncated to non-zero rows.
Notes
printsets is a comma delimited strings that specifies which sets to print. It can be input in lower or upper case. Sets that are identical are printed together (as g and p often are). The value of “*” is equivalent to specifying all sets:
"m,s,o,q,r,c,b,e,l,t,a,d,f,fe,n,ne,g,p,u1,u2,u3,u4,u5,u6"For example, printsets = “r, c, b, a” will print only those sets (but not necessarily in that order).
The sets (and supersets) currently accounted for are:
Sets Supersets m -------------------------------------\ s ------------------------------\ > g --\ o -----------------------\ > n --/ \ q ----------------\ > f --/ \ \ r ---------\ > a --/ \ \ > p c --\ > t --/ \ > fe > ne / b ---> l --/ > d / / / e ------------------------/-----/-------/-----/
User-defined sets: u1, u2, u3, u4, u5, and u6.
See also
pyyeti.nastran.op2.OP2.rdn2cop2(),mksetpv(),rbgeom_uset(),pyyeti.nastran.op2.rdnas2cam()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', 'c'], [0, cylcoord], ... [[5, 10, 15], [32, 90, 10]], [0, cylcoord]) >>> table = nastran.usetprt( ... 1, uset, printsets='r, c') r-set -None- c-set -1- -2- ... -6- ... -10- 1= 200-1 200-2 ... 200-6 >>> table = nastran.usetprt( ... 1, uset, printsets='*') m-set, s-set, o-set, q-set, r-set, e-set, u1-set, ... u6-set -None- c-set -1- -2- ... -6- ... -10- 1= 200-1 200-2 ... 200-6 b-set -1- -2- ... -6- ... -10- 1= 100-1 100-2 ... 100-6 l-set, t-set, a-set, d-set, f-set, fe-set, ..., g-set, p-set -1- -2- ... -10- 1= 100-1 100-2 ... 200-4 = 10 11= 200-5 200-6 >>> table = nastran.usetprt(1, uset) m-set, s-set, o-set, q-set, r-set, e-set -None- c-set -1- -2- ... -6- ... -10- 1= 200-1 200-2 ... 200-6 b-set -1- -2- ... -6- ... -10- 1= 100-1 100-2 ... 100-6 l-set, t-set, a-set, f-set, n-set, g-set -1- -2- ... -10- 1= 100-1 100-2 ... 200-4 = 10 11= 200-5 200-6 >>> table m s o q r c b e l t a f n g id dof dof#... 100 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 1 2 2 0 0 0 0 0 0 2 0 2 2 2 2 2 2 3 3 0 0 0 0 0 0 3 0 3 3 3 3 3 3 4 4 0 0 0 0 0 0 4 0 4 4 4 4 4 4 5 5 0 0 0 0 0 0 5 0 5 5 5 5 5 5 6 6 0 0 0 0 0 0 6 0 6 6 6 6 6 6 200 1 7 0 0 0 0 0 1 0 0 7 7 7 7 7 7 2 8 0 0 0 0 0 2 0 0 8 8 8 8 8 8 3 9 0 0 0 0 0 3 0 0 9 9 9 9 9 9 4 10 0 0 0 0 0 4 0 0 10 10 10 10 10 10 5 11 0 0 0 0 0 5 0 0 11 11 11 11 11 11 6 12 0 0 0 0 0 6 0 0 12 12 12 12 12 12