result_objects Package

element_table_object Module

Inheritance diagram of pyNastran.op2.result_objects.element_table_object
class pyNastran.op2.result_objects.element_table_object.ElementTableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.op2_objects.BaseElement

build()[source]

sizes the vectorized attributes of the ElementTableArray

combine(result, is_sort1=True)[source]
data_type()[source]
get_stats(short: bool = False) → List[str][source]
property headers
class pyNastran.op2.result_objects.element_table_object.RealElementTableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.element_table_object.ElementTableArray

data_type() → str[source]
extract_xyplot(element_ids, index)[source]
property is_complex
property is_real
property nnodes_per_element

op2_objects Module

Inheritance diagram of pyNastran.op2.result_objects.op2_objects
class pyNastran.op2.result_objects.op2_objects.BaseElement(data_code, isubcase, apply_data_code=True)[source]

Bases: pyNastran.op2.result_objects.op2_objects.ScalarObject

class pyNastran.op2.result_objects.op2_objects.BaseScalarObject[source]

Bases: pyNastran.op2.op2_interface.op2_codes.Op2Codes

The base scalar class is used by:
  • RealEigenvalues

  • BucklingEigenvalues

  • ComplexEigenvalues

  • ScalarObject

build_dataframe() → None[source]

creates a pandas dataframe

property class_name
export_to_hdf5(group, log: cpylog.SimpleLogger) → None[source]

exports the object to HDF5 format

get_headers()[source]
get_stats(short: bool = False)[source]
object_attributes(mode='public', keys_to_skip=None, filter_properties=False)[source]
object_methods(mode='public', keys_to_skip=None)[source]
write_f06(f06_file, header=None, page_stamp='PAGE %s', page_num=1, is_mag_phase=False, is_sort1=True) → int[source]
class pyNastran.op2.result_objects.op2_objects.ScalarObject(data_code, isubcase, apply_data_code=True)[source]

Bases: pyNastran.op2.result_objects.op2_objects.BaseScalarObject

Used by all vectorized objects including:
  • DisplacementArray

  • RodStressArray

apply_data_code() → None[source]
cast_grid_type(grid_type_str)[source]

converts a grid_type string to an integer

property dataframe

alternate way to get the dataframe

get_data_code(prefix: str = ' ') → List[str][source]
get_unsteady_value()[source]
print_data_members()[source]

Prints out the “unique” vals of the case.

Uses a provided list of data_code[‘data_names’] to set the values for each subcase. Then populates a list of self.name+’s’ (by using setattr) with the current value. For example, if the variable name is ‘mode’, we make self.modes. Then to extract the values, we build a list of of the variables that were set like this and then loop over them to print their values.

This way there is no dependency on one result type having [‘mode’] and another result type having [‘mode’,’eigr’,’eigi’].

recast_gridtype_as_string(grid_type)[source]

converts a grid_type integer to a string

Point type (per NX 10; OUG table; p.5-663): =1, GRID Point =2, Scalar Point =3, Extra Point =4, Modal =5, p-elements, 0-DOF -6, p-elements, number of DOF

update_data_code(data_code)[source]
update_dt(data_code, unused_dt)[source]

This method is called if the object already exits and a new time/freq/load step is found

pyNastran.op2.result_objects.op2_objects.get_complex_times_dtype(nonlinear_factor: Union[int, float], size: int) → Tuple[str, str, str][source]
pyNastran.op2.result_objects.op2_objects.get_times_dtype(nonlinear_factor: Union[int, float], size: int, analysis_code_fmt=None) → Tuple[str, str, str][source]

scalar_table_object Module

Inheritance diagram of pyNastran.op2.result_objects.scalar_table_object
defines:
  • ScalarTableObject

class pyNastran.op2.result_objects.scalar_table_object.RealScalarTableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.scalar_table_object.ScalarTableArray

data_type()[source]
extract_xyplot(node_ids, index)[source]
property is_complex
property is_real
write_op2(op2_file, fascii, itable, new_result, date, is_mag_phase=False, endian='>')[source]

writes an OP2

class pyNastran.op2.result_objects.scalar_table_object.ScalarTableArray(data_code, unused_is_sort1, isubcase, unused_dt)[source]

Bases: pyNastran.op2.result_objects.op2_objects.ScalarObject

build()[source]

sizes the vectorized attributes of the ScalarTableArray

build_data(ntimes, nnodes, ntotal, nx, ny, float_fmt)[source]

actually performs the build step

build_dataframe()[source]

creates a pandas dataframe

combine(result, is_sort1=True)[source]
data_type()[source]
finalize()[source]

Calls any OP2 objects that need to do any post matrix calcs

get_headers() → List[str][source]
get_stats(short=False) → List[str][source]
property headers
set_as_sort1()[source]

changes the table into SORT1

table_object Module

Inheritance diagram of pyNastran.op2.result_objects.table_object
defines:
  • TableObject

  • RealTableArray

  • ComplexTableArray

these are used by:
  • RealDisplacementArray

  • RealVelocityArray

  • RealAccelerationArray

  • RealEigenvaluesArray

  • RealSPCForcesArray

  • RealMPCForcesArray

  • RealAppliedLoadsArray

  • ComplexDisplacementArray

  • ComplexVelocityArray

  • ComplexAccelerationArray

  • ComplexEigenvaluesArray

  • ComplexSPCForcesArray

  • ComplexMPCForcesArray

  • ComplexAppliedLoadsArray

class pyNastran.op2.result_objects.table_object.ComplexTableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.table_object.TableArray

complex displacement style table

classmethod add_freq_case(table_name, node_gridtype, data, isubcase, freqs, is_sort1=True, is_random=False, is_msc=True, random_code=0, title='', subtitle='', label='')[source]
data_type()[source]
extract_xyplot(node_ids, index, index_str)[source]
property is_complex
property is_real
write_op2(op2_file, fascii, itable, new_result, date, is_mag_phase=False, endian='>')[source]

writes an OP2

write_sort1_as_sort1(f06_file, page_num, page_stamp, header, words, is_mag_phase)[source]
write_sort1_as_sort2(f06_file, page_num, page_stamp, header, words, is_mag_phase)[source]
class pyNastran.op2.result_objects.table_object.RealTableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.table_object.TableArray

displacement style table

classmethod add_modal_case(table_name, node_gridtype, data, isubcase, modes, eigenvalues, mode_cycles, is_sort1=True, is_random=False, is_msc=True, random_code=0, title='', subtitle='', label='')[source]
classmethod add_static_case(table_name, node_gridtype, data, isubcase, is_sort1=True, is_random=False, is_msc=True, random_code=0, title='', subtitle='', label='')[source]
classmethod add_transient_case(table_name, node_gridtype, data, isubcase, times, is_sort1=True, is_random=False, is_msc=True, random_code=0, title='', subtitle='', label='')[source]
data_type()[source]
extract_xyplot(node_ids, index)[source]
property is_complex
property is_real
set_as_static_case()[source]
write_csv(csv_file, is_mag_phase=False)[source]
write_op2(op2_file, fascii, itable, new_result, date, is_mag_phase=False, endian='>')[source]

writes an OP2

class pyNastran.op2.result_objects.table_object.TableArray(data_code, is_sort1, isubcase, dt)[source]

Bases: pyNastran.op2.result_objects.op2_objects.ScalarObject

Base class for:
  • RealTableArray

  • ComplexTableArray

assert_equal(table, rtol=1e-05, atol=1e-08)[source]
build()[source]

sizes the vectorized attributes of the TableArray

build_data(ntimes, nnodes, ntotal, nx, ny, float_fmt)[source]

actually performs the build step

build_dataframe()[source]

creates a pandas dataframe

works: 0.24.2 broken: 0.25.0

combine(result, is_sort1=True)[source]
data_type()[source]
finalize()[source]

Calls any OP2 objects that need to do any post matrix calcs

get_headers() → List[str][source]
get_stats(short=False) → List[str][source]
property headers
set_as_sort1()[source]

changes the table into SORT1

pyNastran.op2.result_objects.table_object.append_sort1_sort2(data1, data2, to_sort1=True)[source]

data1 : (ntimes, nnids, 6) data2 : (nnids, ntimes, 6)

pyNastran.op2.result_objects.table_object.oug_data_code(table_name, analysis_code, is_sort1=True, is_random=False, random_code=0, title='', subtitle='', label='', is_msc=True)[source]
pyNastran.op2.result_objects.table_object.pandas_extract_rows(data_frame, ugridtype_str, index_names)[source]

removes the t2-t6 for S and E points