How to create load objects in WB LS-DYNA?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 416
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How to create load objects in WB LS-DYNA?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 416
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    Options

    Since WB LS-DYNA is itself an ACT extension. The load-objects are ACT load-objects and not native Mechanical. Therefore, one needs to use CreateLoadObject

    Eg:

    analysis = ExtAPI.DataModel.AnalysisList[0]  # Get the analysis object
    analysis.CreateLoadObject("Section", "LSDYNA")
    analysis.CreateLoadObject("Hourglass", "LSDYNA")
    analysis.CreateLoadObject("ContactProperty", "LSDYNA")
    

    Properties:

    section = analysis.CreateLoadObject("Section", "LSDYNA")
    selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
    selection.Ids = [16]
    section.Properties['Geometry/DefineBy/Geo'].Value = selection
    
  • Aria
    Aria Member, Employee Posts: 65
    First Anniversary Ansys Employee First Answer Name Dropper
    Answer ✓
    Options

    To add on the previous response, in order to add an LS-Dyna load object, the correct header has to be activated. For the examples in Ayush's snippet, analysis.Activate() needs to be added:

    # 
    analysis = ExtAPI.DataModel.AnalysisList[0]  # Get the analysis object
    analysis.Activate()
    analysis.CreateLoadObject("Section", "LSDYNA")
    analysis.CreateLoadObject("Hourglass", "LSDYNA")
    analysis.CreateLoadObject("ContactProperty", "LSDYNA")
    

    In these cases, these load objects are found under the analysis list. For object such as rigid bodies, it is found under DataModel:

    expRB = ExtAPI.DataModel.CreateObject("ExplicitRigidBodies",'LSDYNA')