BFE GetElementValues with all nodes Bug ?

Member Posts: 46
10 Comments First Anniversary Name Dropper
**
edited January 2024 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:

  1. analysis = Model.Analyses[0]
  2. reader = analysis.GetResultsData()
  3. BFEResults = reader.GetResult('BFE')
  4. # Use the element number 1
  5. len(BFEResults.GetElementValues([1], True))
  6. #>16
  7. len(BFEResults.GetElementValues([1], False))
  8. #>10
  9. len(BFEResults.GetElementValues(1))
  10. #>10
  11. #----------------------------------
  12. #Try Stress
  13. Stress=reader.GetResult('S')
  14. Stress.SelectComponents(['X'])
  15. len(Stress.GetElementValues([1],True))
  16. #>10
  17. len(Stress.GetElementValues([1],False))
  18. #>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

  • Member, Employee Posts: 42
    Second Anniversary 5 Answers 10 Comments 5 Likes
    ✭✭✭✭

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

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

  • Member Posts: 46
    10 Comments First Anniversary Name Dropper
    **
    edited May 2024

    @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:

    1. analysis = ExtAPI.DataModel.Project.Model.Analyses[0]
    2. reader = analysis.GetResultsData()
    3. reader.CurrentResultSet=4
    4. result = reader.GetResult("BFE")
    5. print(result.GetElementValues([1],True))
    6. 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

Welcome!

It looks like you're new here. Sign in or register to get started.