Insert total deformation result in modal analysis scoped to a named selection and define maximum and

Member, Moderator, Employee Posts: 873
100 Answers 500 Comments 250 Likes Second Anniversary
✭✭✭✭
edited June 2023 in Structures

How can I insert a total deformation result in a modal analysis scoped to a named selection and define maximum and frequency values as parameters?

Tagged:

Answers

  • Member, Moderator, Employee Posts: 873
    100 Answers 500 Comments 250 Likes Second Anniversary
    ✭✭✭✭
    Answer ✓

    For example, you can use :

    1. solu=ExtAPI.DataModel.Project.Model.Analyses[0].Solution # reference solution
    2.  
    3. res=solu.AddTotalDeformation() # add total deformation result
    4.  
    5. res.Location=ExtAPI.DataModel.GetObjectsByName("base")[0] # set location

    In the line above, we use "GetObjectsByName" method that returns a list of all the entitites of the Mechanical tree. Here we are searching for all objects named "base" and then using the first object in this list (hopefully, a named selection named “base”)

    As for specifying that the maximum and the frequency are parameters, one can use:

    1. res.CreateParameter("Maximum")
    2.  
    3. res.CreateParameter('ActualFrequency')
    4.  
    5. ExtAPI.DataModel.Tree.Refresh()

    Be careful, there is also a property called “Frequency” that is invisible in the details view, with an internal value of 0 Hz. Please refer to bug 385482 for further details.

Welcome!

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