pyyeti.nastran.bulk.bulk2uset¶
- pyyeti.nastran.bulk.bulk2uset(*args, follow_includes=True, include_symbols=None, encoding='utf_8')[source]¶
Read CORD2* and GRID cards from file(s) to make a USET table
- Parameters:
*args – File names or file handles as returned by
open(). Files referred to by handle are rewound first. A GUI is opened for file selection if no arguments are provided or if an argument is either a directory name or None.follow_includes (bool; optional) – If True, INCLUDE statements will be followed recursively. Note that if f is a StringIO object, or another object that does not have a name property, this parameter will be set to False.
include_symbols (dict; optional) – A dictionary mapping Nastran symbols to an associated path. These can be read from a file using
rdsymbols().encoding (string; optional) – Encoding to use when opening text file. This option will be passed to any files read in via the follow_includes option.
- Returns:
uset (pandas DataFrame) – A DataFrame as output by
pyyeti.nastran.op2.OP2.rdn2cop2()coordref (dictionary) – Dictionary with the keys being the coordinate system id and the values being the 5x3 matrix:
[id type 0] # output coord. sys. id and type [xo yo zo] # origin of coord. system [ T ] # 3x3 transformation to basic Note that T is for the coordinate system, not a grid (unless type = 1 which means rectangular)
Notes
This is the reverse of
uset2bulk().Note that
asm2uset()is similar to this routine but written specifically for Nastran .asm files. That routine will return a USET table ordered to match the model (according to the SECONCT card); it also returns a b-set boolean partition vector.All grids are put in the ‘b’ set. This routine uses
pyyeti.nastran.n2p.addgrid()to build the output.