op2_interface Package

op2_codes Module

Inheritance diagram of pyNastran.op2.op2_interface.op2_codes
pyNastran.op2.op2_interface.op2_codes.determine_sort_bits_meaning(table_code, sort_code, sort_bits)[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, stress_bits)[source]
pyNastran.op2.op2_interface.op2_codes.get_sort_method_from_table_name(table_name)[source]

helper method

op2_f06_common Module

Inheritance diagram of pyNastran.op2.op2_interface.op2_f06_common
class pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common[source]

Bases: object

del_result(self, result_name)[source]

delattr, but considers sub-objects

get_f06_stats(self)[source]
get_op2_stats(self, short=False)[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(self, result_name)[source]

Getattr, but considers sub-objects

Examples

Example 1 >>> self.eigenvectors = get_result(‘eigenvectors’)

Example 2 >>> self.ato.displacements = get_result(‘ato.displacements’)

get_table_types(self)[source]

Gets the names of the results.

has_result(self, result_name)[source]

checks to see if a result exists

isubcase_name_map = None

a dictionary that maps an integer of the subcaseName to the subcase_id

remove_empty_results(self)[source]
title = None

BDF Title

class pyNastran.op2.op2_interface.op2_f06_common.Op2F06Attributes[source]

Bases: pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common

result_set Module

Inheritance diagram of pyNastran.op2.op2_interface.result_set
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, log)[source]

Bases: object

This class is private storage interface class.

It’s an interface tool between the code and the results the user requests.

add(self, results)[source]

addds a list/str of results

clear(self)[source]

clears all the results

is_not_saved(self, result)[source]

checks to see if a result is saved

is_saved(self, result)[source]

checks to see if a result is saved

remove(self, results)[source]

removes a list/str of results

update(self, results)[source]

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.set_table3_field(str_fields, ifield, value)[source]

ifield is 1 based

pyNastran.op2.op2_interface.write_utils.write_table_header(op2_file, fascii, table_name)[source]

Writes the beginning of an op2 table

Parameters:
op2_file : file

the op2 file object

table_name : str

the table name to write