How to create load objects in WB LS-DYNA?
Ayush Kumar
Member, Moderator, Employee Posts: 467
✭✭✭✭
Answers
-
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
0 -
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')
2