BFE GetElementValues with all nodes Bug ?

Options
1990chs
1990chs Member Posts: 43
First Comment Name Dropper
edited January 20 in General Language Questions

When I use GetElementValues to get a list element BFE result, there is some problem occur.
The model mesh is solid187 which has 10 nodes (4 cornor nodes).
The python code and output is as the follow:

analysis = Model.Analyses[0]
reader = analysis.GetResultsData()
BFEResults = reader.GetResult('BFE')
# Use the element number 1
len(BFEResults.GetElementValues([1], True))
#>16
len(BFEResults.GetElementValues([1], False))
#>10
len(BFEResults.GetElementValues(1))
#>10
#----------------------------------
#Try Stress
Stress=reader.GetResult('S')
Stress.SelectComponents(['X'])
len(Stress.GetElementValues([1],True))
#>10
len(Stress.GetElementValues([1],False))
#>4

As the up code, when I use BFEResults.GetElementValues([1], True) to get element BFE, then we get 16 nodes results, but for SOLID187, the maximum nodes number is 10. Why got 16 ? For stress, it seems right.
The GetElementValues help description:

Answers

  • Abel Ramos
    Abel Ramos Member, Employee Posts: 35
    5 Likes First Answer First Comment First Anniversary
    Options

    Hello, which version are you using? I've tested 1 bolt in your example on 2024R1 and it seems to be working as expected:

    analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
    reader = analysis.GetResultsData()
    reader.CurrentResultSet=4
    result = reader.GetResult("BFE")
    print(result.GetElementValues([1],True))
    print(len(result.GetElementValues([1],True)))
    

  • 1990chs
    1990chs Member Posts: 43
    First Comment Name Dropper
    edited May 3
    Options

    @Abel Ramos said:
    Hello, which version are you using? I've tested 1 bolt in your example on 2024R1 and it seems to be working as expected:

    analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
    reader = analysis.GetResultsData()
    reader.CurrentResultSet=4
    result = reader.GetResult("BFE")
    print(result.GetElementValues([1],True))
    print(len(result.GetElementValues([1],True)))
    

    I have tested it on version 2019R3 and 2023R1, the result seems not right, I am not sure it is fixed on 2024R1.
    In another question, I explain it.
    From you result, it seems fixed.
    https://discuss.ansys.com/discussion/2897/using-getelementvalues-to-get-bfe-values-bug#latest