pyyeti.nastran.bulk.rdseconct¶
- pyyeti.nastran.bulk.rdseconct(f, *, follow_includes=True, include_symbols=None, encoding='utf_8')[source]¶
Read Nastran SECONCT cards from a Nastran bulk file.
- Parameters:
f (string or file_like or None) – Either a name of a file, or is a file_like object as returned by
open(). If file_like object, it is rewound first. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection.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:
a_ids, b_ids (1d ndarrays) – Array of GRID and SPOINT ids for superelement A and superelement B, respectively. Both outputs will be empty if no SECONCT cards found.
Notes
This routine uses
rdcards()to load the data.Examples
>>> from io import StringIO >>> from pyyeti import nastran >>> bulkdata = ( ... "SECONCT,101,0,,NO\n" ... ",3,30,11,110,19,190,27,270\n" ... "$\n" ... "SECONCT,101,0,,NO\n" ... ",1101,THRU,1104,2101,THRU,2104\n" ... ) >>> with StringIO(bulkdata) as f: ... a_ids, b_ids = nastran.rdseconct(f) >>> a_ids array([ 3, 11, 19, 27, 1101, 1102, 1103, 1104]...) >>> b_ids array([ 30, 110, 190, 270, 2101, 2102, 2103, 2104]...)