op2_interface Package¶
op2_codes
Module¶
-
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¶
-
class
pyNastran.op2.op2_interface.op2_f06_common.
OP2_F06_Common
[source]¶ Bases:
object
-
property
cbar_force
¶
-
property
cbar_force_10nodes
¶
-
property
cbar_strain_energy
¶
-
property
cbeam_force
¶
-
property
cbeam_force_vu
¶
-
property
cbeam_strain_energy
¶
-
property
cbear_force
¶
-
property
cbend_force
¶
-
property
cbend_strain_energy
¶
-
property
cbush_force
¶
-
property
cbush_strain_energy
¶
-
property
cconeax_force
¶
-
property
cdamp1_force
¶
-
property
cdamp1_strain_energy
¶
-
property
cdamp2_force
¶
-
property
cdamp2_strain_energy
¶
-
property
cdamp3_force
¶
-
property
cdamp3_strain_energy
¶
-
property
cdamp4_force
¶
-
property
cdamp4_strain_energy
¶
-
property
cdum8_strain_energy
¶
-
property
celas1_force
¶
-
property
celas1_strain
¶
-
property
celas1_strain_energy
¶
-
property
celas1_stress
¶
-
property
celas2_force
¶
-
property
celas2_strain
¶
-
property
celas2_strain_energy
¶
-
property
celas2_stress
¶
-
property
celas3_force
¶
-
property
celas3_strain
¶
-
property
celas3_strain_energy
¶
-
property
celas3_stress
¶
-
property
celas4_force
¶
-
property
celas4_strain
¶
-
property
celas4_strain_energy
¶
-
property
celas4_stress
¶
-
property
cfast_force
¶
-
property
cgap_force
¶
-
property
cgap_strain_energy
¶
-
property
chexa_pressure_force
¶
-
property
chexa_strain
¶
-
property
chexa_strain_energy
¶
-
property
chexa_stress
¶
-
property
conm2_strain_energy
¶
-
property
conrod_force
¶
-
property
conrod_strain_energy
¶
-
property
cpenta_pressure_force
¶
-
property
cpenta_strain
¶
-
property
cpenta_strain_energy
¶
-
property
cpenta_stress
¶
-
property
cpyram_pressure_force
¶
-
property
cpyram_strain
¶
-
property
cpyram_strain_energy
¶
-
property
cpyram_stress
¶
-
property
cquad4_force
¶
-
property
cquad4_strain_energy
¶
-
property
cquad8_force
¶
-
property
cquad8_strain_energy
¶
-
property
cquadr_force
¶
-
property
cquadr_strain_energy
¶
-
property
cquadx_strain_energy
¶
-
property
crod_force
¶
-
property
crod_strain_energy
¶
-
property
cshear_force
¶
-
property
cshear_strain_energy
¶
-
property
ctetra_pressure_force
¶
-
property
ctetra_strain
¶
-
property
ctetra_strain_energy
¶
-
property
ctetra_stress
¶
-
property
ctria3_force
¶
-
property
ctria3_strain_energy
¶
-
property
ctria6_force
¶
-
property
ctria6_strain_energy
¶
-
property
ctriar_force
¶
-
property
ctriar_strain_energy
¶
-
property
ctriax6_strain_energy
¶
-
property
ctriax_strain_energy
¶
-
property
ctube_force
¶
-
property
ctube_strain_energy
¶
-
property
cvisc_force
¶
-
property
cweld_force
¶
-
property
dmig_strain_energy
¶
-
property
genel_strain_energy
¶
-
get_op2_stats
(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
(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’)
-
isubcase_name_map
= None¶ a dictionary that maps an integer of the subcaseName to the subcase_id
-
property
rbe1_strain_energy
¶
-
property
rbe3_strain_energy
¶
-
title
= None¶ BDF Title
-
property
vu_quad_force
¶
-
property
vu_tria_force
¶
-
property
weldc_strain_energy
¶
-
property
-
class
pyNastran.op2.op2_interface.op2_f06_common.
Op2F06Attributes
[source]¶ Bases:
pyNastran.op2.op2_interface.op2_f06_common.OP2_F06_Common
result_set
Module¶
- 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)
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.
set_table3_field
(str_fields, ifield, value)[source]¶ ifield is 1 based
-
pyNastran.op2.op2_interface.write_utils.
to_column_bytes
(data_list: List[numpy.ndarray], dtype_out: str, debug: bool = False) → numpy.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, dtype)[source]¶ handles downcasting data