Get max stress values at the nodes instead of averaged

Options
Samukham
Samukham Member Posts: 35
First Anniversary First Comment Name Dropper
edited June 2023 in Structures

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

  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 117
    First Answer First Comment First Anniversary Ansys Employee
    admin
    Options

    @Ramdane can you have a look at this?

  • Ramdane
    Ramdane Member, Employee Posts: 11
    First Comment First Anniversary Ansys Employee Name Dropper
    edited June 2023
    Options

    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

  • Samukham
    Samukham Member Posts: 35
    First Anniversary First Comment Name Dropper
    Options

    Hi @Ramdane , thanks for your response and for offering help. We're trying to implement this from pyDPF, through which we read the .rst file from the Python environment and the above-said post-processing task has to be performed.

  • Ramdane
    Ramdane Member, Employee Posts: 11
    First Comment First Anniversary Ansys Employee Name Dropper
    Options

    @Samukham , OK let me get back to you then with a script example that we can evaluate. If the perfs are not good than we can write a C++ operator.

  • Samukham
    Samukham Member Posts: 35
    First Anniversary First Comment Name Dropper
    Options

    @Ramdane Sounds good

  • Ramdane
    Ramdane Member, Employee Posts: 11
    First Comment First Anniversary Ansys Employee Name Dropper
    Options

    hi @Samukham , sory to get back to you so late.

    @Lea PARADIS , please could you help here writing the python script?

  • Lea PARADIS
    Lea PARADIS Member, Employee Posts: 2
    Ansys Employee First Answer Name Dropper First Comment
    Options

    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: https://github.com/ansys/pydpf-core/pull/1043

    I added information about performances when averaging, it looks correct.