pyNastran/op2/op2_geom

This is the pyNastran.op2.op2_geom.rst file.

op2_geom Module

Inheritance diagram of pyNastran.op2.op2_geom
Defines:
  • read_op2_geom(op2_filename=None, combine=True, subcases=None,

    exclude_results=None, include_results=None, validate=True, xref=True, build_dataframe=False, skip_undefined_matrices=True, mode=’msc’, log=None, debug=True, debug_file=None, encoding=None)

  • OP2Geom(make_geom=True, debug=False, log=None, debug_file=None, mode=’msc’) - OP2

class pyNastran.op2.op2_geom.OP2Geom(make_geom: bool = True, debug: bool = False, log: Optional[Any] = None, debug_file: Optional[str] = None, mode: str = 'msc')[source]

Bases: pyNastran.bdf.bdf.BDF, pyNastran.op2.op2_geom.OP2GeomCommon

creates an interface for the OP2 and BDF classes

Initializes the OP2 object

Parameters
make_geombool; default=False

reads the BDF tables

debugbool; default=False

enables the debug log and sets the debug in the logger

log: log()

a logging object to write debug messages to (.. seealso:: import logging)

debug_filedefault=None -> no debug

sets the filename that will be written to

modestr; default=’msc’

{msc, nx}

export_hdf5_file(hdf5_file, exporter=None)[source]

Converts the OP2 objects into hdf5 object

Parameters
hdf5_fileH5File()

an h5py object

exporterHDF5Exporter; default=None

unused

TODO: doesn’t support:
  • BucklingEigenvalues

gpdt_to_nodes()[source]

converts the GPDT & EQEXIN tables to node ids

property is_geometry
read_op2(op2_filename: Union[str, pathlib.PurePath, None] = None, combine: bool = True, build_dataframe: Optional[bool] = False, skip_undefined_matrices: bool = False, encoding: Optional[str] = None)[source]

see OP2.read_op2

class pyNastran.op2.op2_geom.OP2GeomCommon(make_geom: bool = True, debug: bool = False, log: Optional[Any] = None, debug_file: Optional[str] = None, mode: Optional[str] = None)[source]

Bases: pyNastran.op2.op2.OP2, pyNastran.op2.tables.geom.geom_common.GeomCommon

interface for the OP2Geom class for to loading subclasses

Initializes the OP2 object

Parameters
make_geombool; default=False

reads the BDF tables

debugbool; default=False

enables the debug log and sets the debug in the logger

log: log()

a logging object to write debug messages to (.. seealso:: import logging)

debug_filedefault=None -> no debug

sets the filename that will be written to

modestr; default=None -> ‘msc’

{msc, nx}

save(obj_filename: str = 'model.obj', unxref: bool = True) → None[source]

Saves a pickleable object

pyNastran.op2.op2_geom.attach_op2_results_to_bdf(bdf_model: pyNastran.bdf.bdf.BDF, op2_model: Optional[pyNastran.op2.op2.OP2] = None, validate: bool = True) → pyNastran.op2.op2_geom.OP2Geom[source]

We’re up-converting a BDF and an OP2 result into an OP2Geom object.

pyNastran.op2.op2_geom.bdf_to_op2_geom(model: pyNastran.bdf.bdf.BDF, validate: bool = True) → pyNastran.op2.op2_geom.OP2Geom[source]

converts a BDF() -> OP2Geom()

pyNastran.op2.op2_geom.read_op2_geom(op2_filename: Optional[Union[str, PurePath]] = None, combine: bool = True, subcases: Optional[List[int]] = None, exclude_results: Optional[List[str]] = None, include_results: Optional[List[str]] = None, validate: bool = True, xref: bool = True, build_dataframe: bool = False, skip_undefined_matrices: bool = True, mode: str = 'msc', log: SimpleLogger = None, debug: bool = True, debug_file: Optional[str] = None, encoding: Optional[str] = None)[source]

Creates the OP2 object without calling the OP2 class.

Parameters
op2_filenamestr (default=None -> popup)

the op2_filename

combinebool; default=True

True : objects are isubcase based False : objects are (isubcase, subtitle) based;

will be used for superelements regardless of the option

subcasesList[int, …] / int; default=None->all subcases

list of [subcase1_ID,subcase2_ID]

exclude_results / include_resultsList[str] / str; default=None

a list of result types to exclude/include one of these must be None

validatebool

runs various checks on the BDF (default=True)

xrefbool

should the bdf be cross referenced (default=True)

build_dataframebool; default=False

builds a pandas DataFrame for op2 objects

skip_undefined_matricesbool; default=False

True : prevents matrix reading crashes

logLog()

a logging object to write debug messages to

(.. seealso:: import logging)

debugbool; default=False

enables the debug log and sets the debug in the logger

debug_filestr; default=None (No debug)

sets the filename that will be written to

encodingstr

the unicode encoding (default=None; system default)

Returns
modelOP2()

an OP2 object

Todo

creates the OP2 object without all the read methods ..

Note

this method will change in order to return an object that does not have so many methods