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

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
100 Answers 500 Comments 250 Likes First 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

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    For example, you can use :

    solu=ExtAPI.DataModel.Project.Model.Analyses[0].Solution # reference solution
    
    res=solu.AddTotalDeformation() # add total deformation result
    
    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:

    res.CreateParameter("Maximum")
    
    res.CreateParameter('ActualFrequency') 
    
    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.