Get max stress values at the nodes instead of averaged
Hi,
I am currently working on developing a Python script model in which an rst file will be read through dpf reader (dpf.Model(rst_file)) and get the nodal stress values. But, the problem here is that the nodal stress values should not be the averaged ones but the maximum among the element contributions. I mean let's say node 1 is connected to elements 1,2,3 and 4. So, what's happening now is when I convert the elementalNodal stress values to nodal internally it is averaging nodal stress values at node 1 from all the elements (1,2,3 and 4). But what I need is the maximum nodal stress value at node 1 among all the element's contributions (max. of stress at node 1 among elements 1,2,3 and 4). I am able to do this using a for loop and iterating through all the nodes and elements but it consumes a lot of time for bigger models. So, is there any efficient way of doing this?
Answers
-
@Ramdane can you have a look at this?
0 -
Hi @Samukham , writing a C++ operator will allow you to have a faster solution. we can help you on this.
For scripting version, are you using this from Mechanical or pyDPF? the syntax will be a little bit different between Iron python and CPython.
Thanks,
Ramdane
0 -
hi @Samukham , sory to get back to you so late.
@Lea PARADIS , please could you help here writing the python script?
0 -
Hi @Samukham,
Here is a link to a pull request on pydpf-core repository that sets up an example on how get maximum stress values at the nodes instead of averaged:
I added information about performances when averaging, it looks correct.
0