pybdf Module

Inheritance diagram of pyNastran.bdf.bdf_interface.pybdf
Main BDF class. Defines:
  • BDFInputPy

BEGIN [BULK] = [

AFPM = afpmid ARBMODEL = arbmid AUXMODEL = auxmind MASSID = massid[LABEL = masslabel] MODULE= moduleid[APPEND][LABEL = modlabel] FLXBDY = flexbody SUPER = seid TRMC = trimid UDS

]

BEGIN BULK BEGIN AUXMODEL=22 BEGIN BULK TRMC=101 BEGIN TRMC=102

class pyNastran.bdf.bdf_interface.pybdf.BDFInputPy(read_includes: bool, dumplines: bool, encoding: str, nastran_format: str = 'msc', consider_superelements: bool = True, log: Any = None, debug: bool = False)[source]

Bases: object

BDF reader class that only handles lines and not building cards or parsing cards

BDF reader class that only handles lines and not building cards or parsing cards

Parameters
read_includesbool

should include files be read

dumplinesbool

Writes ‘pyNastran_dump.bdf’ up to some failed line index

encodingstr

the character encoding (e.g., utf8, latin1, cp1252)

nastran_formatstr; default=’msc’

‘zona’ has a special read method {msc, nx, zona}

consider_superelementsbool; default=True

parse ‘begin super=2’

loglogger(); default=None

a logger for printing INCLUDE files that are loadaed

debugbool; default=False

used when testing; for the logger

get_lines(bdf_filename: Union[str, _io.StringIO], punch: Optional[bool] = False, make_ilines: bool = True) → List[str][source]

Opens the bdf and extracts the lines by group

Parameters
bdf_filenamestr

the main bdf_filename

punchbool / None; default=False

is this a punch file None : guess True : no executive/case control decks False : executive/case control decks exist

make_ilinesbool; default=True

flag for bulk_data_ilines

Returns
system_linesList[str]

the system control lines (typically empty; used for alters)

executive_control_linesList[str]

the executive control lines (stores SOL 101)

case_control_linesList[str]

the case control lines (stores subcases)

bulk_data_linesList[str]

the bulk data lines (stores geometry, boundary conditions, loads, etc.)

bulk_data_ilinesNone / (nlines, 2) int ndarray
if make_ilines = True:

the [ifile, iline] pair for each line in the file

if make_ilines = False:

ilines = None

get_main_lines(bdf_filename: Union[str, _io.StringIO]) → List[str][source]

Opens the bdf and extracts the lines

Parameters
bdf_filenamestr / StringIO

the main bdf_filename

Returns
linesList[str]

all the lines packed into a single line stream

lines_to_deck_lines(lines: List[str], make_ilines: bool = True) → Tuple[List[str], int][source]

Merges the includes into the main deck.

Parameters
linesList[str]

the lines from the main BDF

make_ilinesbool; default=True

flag for ilines

Returns
active_linesList[str]

all the active lines in the deck

ilines(nlines, 2) int ndarray
if make_ilines = True:

the [ifile, iline] pair for each line in the file

if make_ilines = False:

ilines = None

pyNastran.bdf.bdf_interface.pybdf.parse_begin(line_upper: str)[source]

BEGIN MODULE=2 LABEL=’MODULE2’

BEGIN AUXMODEL=2 BEGIN BULK AUXMODEL=2 BEGIN BULK AUXMODEL = 2

BEGIN AFPM=2 BEGIN BULK AFPM=2 BEGIN BULK AFPM = 2

BEGIN SUPER=2 BEGIN BULK SUPER=2 BEGIN BULK SUPER = 2 BEGIN BULK SUPER 2

BEGIN BULK TRMC=101 BEGIN TRMC=102

pyNastran.bdf.bdf_interface.pybdf.split_quoted_string(line: str) → List[str][source]

this is “a test” [‘this’,’is’,’a test’]