op2_interface Package
op2_codes Module
digraph inheritancec88becc3be {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.op2.op2_interface.op2_codes.Op2Codes" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"];
}
- pyNastran.op2.op2_interface.op2_codes.determine_sort_bits_meaning(table_code: int, sort_code: int, sort_bits: tuple[int, int, int]) tuple[int, bool, bool][source]
Value Sort type Data format Random ===== ========= =========== ====== 0 SORT1 Real No 1 SORT1 Complex No 2 SORT2 Real No 3 SORT2 Complex No 4 SORT1 Real Yes 5 SORT2 ??? Yes 6 SORT2 Real Yes
table_code%1000 = function3()
SPCForce = table_code % 1000 (function 3)
- pyNastran.op2.op2_interface.op2_codes.get_scode_word(s_code: int, stress_bits: list[int]) str[source]
- pyNastran.op2.op2_interface.op2_codes.get_scode_word_assert(s_code: int, stress_bits: list[int]) str[source]
op2_f06_common Module
digraph inheritance7399eee4e6 {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common" [URL="#pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"];
"pyNastran.op2.op2_interface.op2_f06_common.Op2F06Attributes" [URL="#pyNastran.op2.op2_interface.op2_f06_common.Op2F06Attributes",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"];
"pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common" -> "pyNastran.op2.op2_interface.op2_f06_common.Op2F06Attributes" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
- class pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common[source]
Bases:
object- get_op2_stats(short: bool = False) str[source]
Gets info about the contents of the different attributes of the OP2 class.
Examples
*Detailed OP2 Stats* >>> self.get_op2_stats()
- displacements[1]
isubcase = 1 type=RealDisplacementArray nnodes=72 data: [t1, t2, t3, r1, r2, r3] shape=[1, 72, 6] dtype=float32 gridTypes sort1 lsdvmns = [1]
- spc_forces[1]
isubcase = 1 type=RealSPCForcesArray nnodes=72 data: [t1, t2, t3, r1, r2, r3] shape=[1, 72, 6] dtype=float32 gridTypes sort1 lsdvmns = [1]
- ctetra_stress[1]
type=RealSolidStressArray nelements=186 nnodes=930 nodes_per_element=5 (including centroid) eType, cid data: [1, nnodes, 10] where 10=[oxx, oyy, ozz, txy, tyz, txz, o1, o2, o3, von_mises] data.shape = (1, 930, 10) element name: CTETRA sort1 lsdvmns = [1]
*Appreviated OP2 Stats* >>> self.get_op2_stats(short=True) displacements[1]; RealDisplacementArray; [1, 72, 6]; [t1, t2, t3, r1, r2, r3]
- get_result(result_name: str) dict[source]
Getattr, but considers sub-objects
Examples
Example 1 >>> self.eigenvectors = self.get_result(‘eigenvectors’)
Example 2 >>> self.ato.displacements = self.get_result(‘ato.displacements’)
- isubcase_name_map
a dictionary that maps an integer of the subcaseName to the subcase_id
- title
BDF Title
- class pyNastran.op2.op2_interface.op2_f06_common.Op2F06Attributes[source]
Bases:
OP2_F06_Common
result_set Module
digraph inheritance6f7a17e2ea {
bgcolor=transparent;
rankdir=LR;
size="";
"pyNastran.op2.op2_interface.result_set.ResultSet" [URL="#pyNastran.op2.op2_interface.result_set.ResultSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="This class is private storage interface class."];
}
- Defines:
ResultSet(allowed_results)
allowed
found
saved
is_saved(result)
is_not_saved(result)
clear()
add(result)
remove(results)
_found_result(result)
update(self, results)
- class pyNastran.op2.op2_interface.result_set.ResultSet(allowed_results: list[str], results_map: dict[str, Any], log: SimpleLogger)[source]
Bases:
objectThis class is private storage interface class.
It’s an interface tool between the code and the results the user requests.
we’ll set the allowed results
- Parameters:
- allowed_resultslist[str]
all results that are allowed
- results_mapdict[str, Any]
combined objects (e.g., ato, psd, stress, force, …)
- logSimpleLogger
the logging object
- pyNastran.op2.op2_interface.result_set.add_results_of_exact_type(all_results: list[str], result_word: str) list[str][source]
- Parameters:
- all_resultslist[str]
all the results to check against
- result_wordstr
‘stress’, ‘strain’, … ‘stress’ lets in stress.cquad4_stress, but not psd.cquad4_stress or grid_point_stress.discontinuities
- Returns:
- results_to_addlist[str]
the results to add
write_utils Module
Defines methods for the op2 & hdf5 writer
- pyNastran.op2.op2_interface.write_utils.export_to_hdf5(self, group, log)[source]
exports the object to HDF5 format
- pyNastran.op2.op2_interface.write_utils.get_complex_fdtype(dtype)[source]
complex64 -> float32; complex128 -> float64
- pyNastran.op2.op2_interface.write_utils.get_title_subtitle_label(title: str, subtitle: str, label: str, superelement_adaptivity_index: str = '') tuple[bytes, bytes, bytes][source]
- TODO: subtitle is missing
superelement_adaptivity_index
- pyNastran.op2.op2_interface.write_utils.set_table3_field(str_fields, ifield: int, value)[source]
ifield is 1 based
- pyNastran.op2.op2_interface.write_utils.to_column_bytes(data_list: list[ndarray], dtype_out: str, debug: bool = False) ndarray[source]
Takes an stackable numpy array of mixed types (e.g., ints/strings) and casts them to the appropriate output datatype (typically float32/float64).
An array is stackable if it’s the same shape (e.g., ints/floats). This requirement is a bit looser for strings (4 characters per 32-bit float)
- pyNastran.op2.op2_interface.write_utils.view_dtype(array_obj: ndarray, dtype) ndarray[source]
handles downcasting data
Submodules
op2_commonModuleop2_readerModuleOP2ReaderOP2Reader.binary_debugOP2Reader.debug_fileOP2Reader.generic_stop_table()OP2Reader.get_marker1()OP2Reader.get_marker1_4()OP2Reader.get_marker1_8()OP2Reader.get_nmarkers()OP2Reader.get_nmarkers4()OP2Reader.get_nmarkers8()OP2Reader.get_skip_read_record_ndata()OP2Reader.get_subtable_name4()OP2Reader.get_subtable_name8()OP2Reader.h5_fileOP2Reader.is_debug_fileOP2Reader.is_valid_subcase()OP2Reader.load_as_h5OP2Reader.logOP2Reader.read_3_blocks4()OP2Reader.read_3_markers()OP2Reader.read_3_markers4()OP2Reader.read_aemonpt()OP2Reader.read_block4()OP2Reader.read_block8()OP2Reader.read_casecc()OP2Reader.read_cddata()OP2Reader.read_cstm()OP2Reader.read_eqexin()OP2Reader.read_fol()OP2Reader.read_frl()OP2Reader.read_geom_table()OP2Reader.read_gpl()OP2Reader.read_gpls()OP2Reader.read_ibulk()OP2Reader.read_icase()OP2Reader.read_intmod()OP2Reader.read_long_block()OP2Reader.read_markers()OP2Reader.read_markers4()OP2Reader.read_markers8()OP2Reader.read_meff()OP2Reader.read_modeOP2Reader.read_monitor()OP2Reader.read_nastran_version()OP2Reader.read_omm2()OP2Reader.read_qualinfo()OP2Reader.read_results_table()OP2Reader.read_results_table4()OP2Reader.read_results_table8()OP2Reader.read_rst()OP2Reader.read_sdf()OP2Reader.read_stdisp()OP2Reader.read_string_block()OP2Reader.read_table_name()OP2Reader.read_table_name4()OP2Reader.read_table_name8()OP2Reader.read_tol()OP2Reader.read_xcasecc()OP2Reader.read_xsop2dir()OP2Reader.show()OP2Reader.show_data()OP2Reader.show_ndata()OP2Reader.unpack_table_name()OP2Reader.unpack_table_name4()OP2Reader.unpack_table_name8()
SubTableReadErroreqexin_to_nid_dof_doftype()get_read_skip_record()read_dofs()read_oaercshm()read_oaerof()read_oaerohmd()read_oaerop()read_oaeroscd()read_oaerotv()read_ovg()update_op2_datacode()
op2_scalarModule