POST PROCESSING OF TIME-HISTORIES FOR LARGE STRUCTURES

Post Reply
raffaele.derisi
Posts: 7
Joined: Sun May 09, 2021 7:51 pm

POST PROCESSING OF TIME-HISTORIES FOR LARGE STRUCTURES

Post by raffaele.derisi » Sun May 09, 2021 8:18 pm

Dear all,

I am writing to ask for some clarifications on the postprocessing for large structures where you can have multiple materials (that needs to be verified against different capacities); moreover, you may not know in advance the number of elements, the number of section for each beam, and the number of fibres for each section. I am reporting below a link from which you can download (1) the STKO file of a very simple example, (2) the output (mpco), and (3) the python script for the post-processing I prepared.

https://www.dropbox.com/s/qu9n8c1keysz9 ... S.zip?dl=0

Below my questions:

1. In the file I am doing a for loop on all the elements, sections and fibers in order to obtain the largest value. Is there any way of knowing (automatically) the total number of elements in the database (line 42), the total number of sections (line 47) for each element, and the total number of fibers (line 52) for each section?

2. When you have long time histories, the strategy of creating vectors appending consecutively (line 63), and then identifying the maximum, can be very time-consuming. Is there any vectorial approach to the problem? Or are we forced to a scalar approach?

3. For some elements, we may have different stress capacity (e.g. in the case of different steel sections with different thicknesses). Is there a way of identifying the material type programmatically from the output database?

4. For the portal frame in the attached files, I have fiber sections aggregated with shear deformability. Is there any way of knowing from the output database the dimension of the cross-section, so that I can calculate additional results, such as for example the Von-Mises stresses?

5. Finally, in the postprocessing file I provided the same set of instructions with (lines 30-71) and without (lines 74-176) the user of a worker. The approach with the worker seems not working for me. I think I have made some silly mistake that I cannot catch. I am sure you can spot it very easily. Your feedback on this will be very much appreciated.

Thank you in advance for your help and support with this.

Best wishes,

Raffaele

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

Re: POST PROCESSING OF TIME-HISTORIES FOR LARGE STRUCTURES

Post by STKO Team » Mon May 10, 2021 3:04 pm

1. In the file I am doing a for loop on all the elements, sections and fibers in order to obtain the largest value. Is there any way of knowing (automatically) the total number of elements in the database (line 42), the total number of sections (line 47) for each element, and the total number of fibers (line 52) for each section?
Yes, you can find how to do it in the attached script. Basically, you need to access the mesh object inside the field object. The mesh object holds all that information.
2. When you have long time histories, the strategy of creating vectors appending consecutively (line 63), and then identifying the maximum, can be very time-consuming. Is there any vectorial approach to the problem? Or are we forced to a scalar approach?
You should pre-allocate your list, instead of using append. Also note that in your case (the computation of the absolute maximum) there is no need to store all values, you can simply compute the abs(max) during the loop.
For some elements, we may have different stress capacity (e.g. in the case of different steel sections with different thicknesses). Is there a way of identifying the material type programmatically from the output database?
We are working on it. Now, your only chance is to write a script that exports all your physical property information to a file, that you can read in post processing.
4. For the portal frame in the attached files, I have fiber sections aggregated with shear deformability. Is there any way of knowing from the output database the dimension of the cross-section, so that I can calculate additional results, such as for example the Von-Mises stresses?
You can look at the components in the result (section.force), and see whether shear is included or not.
5. Finally, in the postprocessing file I provided the same set of instructions with (lines 30-71) and without (lines 74-176) the user of a worker. The approach with the worker seems not working for me. I think I have made some silly mistake that I cannot catch. I am sure you can spot it very easily. Your feedback on this will be very much appreciated.
You need to use a QEventLoop that waits for the Working Thread to finish. Otherwise you script will end while the working thread is still working.


Here a working copy of your script:
POSTPROCESSING.zip
(2.07 KiB) Downloaded 201 times

raffaele.derisi
Posts: 7
Joined: Sun May 09, 2021 7:51 pm

Re: POST PROCESSING OF TIME-HISTORIES FOR LARGE STRUCTURES

Post by raffaele.derisi » Wed May 12, 2021 9:15 am

Dear STKO team,

thank you for the swift reply.

I have an additional question.

Is it possible to run the for loop on time steps as a parallel process? Is there any approach to run the worker and the thread on the multiprocessor?

I think using a multiprocessor approach may speed up the postprocessing that at the moment takes a long time for long time-histories and sections with many fibres.

Thank you in advance for your support with this.

Best,

Raffaele

STKO Team
Posts: 3066
Joined: Tue Oct 29, 2019 8:45 am

Re: POST PROCESSING OF TIME-HISTORIES FOR LARGE STRUCTURES

Post by STKO Team » Wed May 12, 2021 3:43 pm

Dear Raffaele,
Now it is not possible: Python has some intrinsic issues with multiprocessing, and it becomes even more difficult when it interacts with C++.
We will try to include this in future releases

Post Reply