Change in Equivalent Plastic Strain

Mateo
Mateo Member Posts: 2
First Comment
**

Hi there,

I want to plot results in Ansys which can show the change in Equivalent Plastic Strain between the current increment and the previous increment. Something similar to Accumulated Plastic Strain, but instead of summing the values, I want to substract them. I will have around 100 steps, so I want to have it automated and be able to summarize the results in tabular data for each step.

Could anyone help me with this?

Comments

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 210
    50 Answers 100 Comments 25 Likes Name Dropper
    ✭✭✭✭
    edited June 10

    Hi

    Perhaps you can insert results with identifiers and then create a user defined result to subtract the results as needed (see here: https://www.youtube.com/watch?v=X-LV48DYn_s)
    This can be automated I suppose as needed - you can use recording to create a script.

    all the best

    Erik

  • Mateo
    Mateo Member Posts: 2
    First Comment
    **

    Hi Erik,

    thank you for your comment, highly appreciate that.

    Actually, I came up with this idea but I find it laborious in cases I have many steps/increments. Do you know if it's possible to write a command in APDL which works as following:

    deltaEPPLEQV = EPPLEQV(s) - EPPLEQV(s-1)

    where:
    EPPLEQV is the Equivalent Plastic Strain,
    s is the current step,
    s - 1 is the previous step.

    So basically I want to create a result which shows an increase in Equivalent Plastic Strain.

    Cheers,
    Mateo

  • av
    av Member Posts: 7
    First Comment
    **

    Hi Mateo,

    does this code help you? (please check the results, whether they are what you wanted)

    #

    edit index to generate the results in the right modul

    index = 0

    n_of_sets = Model.Analyses[index].GetResultsData().ResultSetCount
    postmodul = ExtAPI.DataModel.Project.Model.Analyses[index].Solution

    eppl_result_list = []
    for i in range(1,n_of_sets+1):
    eppl = postmodul.AddEquivalentPlasticStrain()
    eppl_result_list.append(eppl)
    eppl.By = SetDriverStyle.ResultSet
    eppl.SetNumber = i
    eppl.CalculateTimeHistory = 0
    eppl.Identifier = 'eppleqv_'+i.ToString()
    eppl.Name = 'eppleqv_'+i.ToString()
    myGroup = ExtAPI.DataModel.Tree.Group(eppl_result_list)
    myGroup.Name = "Equivalent plastic strain"

    udr_result_list = []
    for i in range(1,n_of_sets):
    udr = postmodul.AddUserDefinedResult()
    udr_result_list.append(udr)
    eppl.CalculateTimeHistory = 0
    udr.Name = "eppleqv_"+(i+1).ToString()+"-"+"eppleqv_"+(i).ToString()
    udr.Expression = "eppleqv_"+(i+1).ToString()+"-"+"eppleqv_"+(i).ToString()

    myGroup = ExtAPI.DataModel.Tree.Group(udr_result_list)
    myGroup.Name = "Equivalent plastic strain increment"

    ExtAPI.DataModel.Tree.Refresh()
    postmodul.EvaluateAllResults()

    Greetings,
    av

  • av
    av Member Posts: 7
    First Comment
    **

    edit index to generate the results in the right modul

    Hi Mateo,

    does this code help you?
    please edid the variable "index" to get the results in the right modul

    index = 1

    n_of_sets = Model.Analyses[index].GetResultsData().ResultSetCount
    postmodul = ExtAPI.DataModel.Project.Model.Analyses[index].Solution

    eppl_result_list = []
    for i in range(1,n_of_sets+1):
    eppl = postmodul.AddEquivalentPlasticStrain()
    eppl_result_list.append(eppl)
    eppl.By = SetDriverStyle.ResultSet
    eppl.SetNumber = i
    eppl.CalculateTimeHistory = 0
    eppl.Identifier = 'eppleqv_'+i.ToString()
    eppl.Name = 'eppleqv_'+i.ToString()
    myGroup = ExtAPI.DataModel.Tree.Group(eppl_result_list)
    myGroup.Name = "Equivalent plastic strain"

    udr_result_list = []
    for i in range(1,n_of_sets):
    udr = postmodul.AddUserDefinedResult()
    udr_result_list.append(udr)
    eppl.CalculateTimeHistory = 0
    udr.Name = "eppleqv_"+(i+1).ToString()+"-"+"eppleqv_"+(i).ToString()
    udr.Expression = "eppleqv_"+(i+1).ToString()+"-"+"eppleqv_"+(i).ToString()

    myGroup = ExtAPI.DataModel.Tree.Group(udr_result_list)
    myGroup.Name = "Equivalent plastic strain increment"

    ExtAPI.DataModel.Tree.Refresh()
    postmodul.EvaluateAllResults()

    Greetings,
    av