How can I gather element table data of a sub-set of elements?

Mike Rife
Mike Rife Member, Employee Posts: 23
5 Likes First Anniversary First Comment Ansys Employee
edited November 2023 in Structures

PyMAPDL has additional methods of retrieving just the data from Mechanical APDL listings. As an example we want to gather a list of lists of some result, like Y deformation, for a sub-set of elements from a full harmonic analysis. This example is a simple 24x4 square shell mesh with one end fixed and the other end an applied force in Y.

mapdl.post1()
mapdl.esel('s','cent','x',15.5)
mapdl.nsle()

results = []

for sub in range(1,21):
    mapdl.set(1, sub, 'velo', 'ampl')
    etable = mapdl.etable('uyetab', 'u', 'y')
    etable_list = mapdl.pretab('uyetab').to_list()
    results.append(etable_list)
mapdl.allsel()

The list 'results' is then (16, 40, 64, 88 are the element IDs of the selected elements):

Mike

Tagged:

Answers

  • Mike Rife
    Mike Rife Member, Employee Posts: 23
    5 Likes First Anniversary First Comment Ansys Employee

    I should have added that the PyMAPDL post processing method post_processing.element_values() will return an Numpy array of just the data.