TAGGED: 2d-simulation, Design Points, doe, planar
-
-
May 13, 2024 at 1:59 pmSimone LuXSubscriber
In Ansys Workbench 2024R1, I am carrying a parametric analysis (DOE) where a geometry changes (trough SpaceClaim parameters).
I need to work with planar elements (2D Analysis) and I need the behavior to be planar strain.
But every time the geometry is reloaded it is set back to "plain stress".
I tried to resolve by connecting a py script, as follow:
  my_body = DataModel.GetObjectById(342)
  my_body.Behavior = Model2DBehavior.PlaneStrainbut at every sesign point the ID changes so I can't get the most updated one automatically.
Is there a way to force "plain strain"?
Or is there a way to scope a body trough it's name or index instead of internal ID?
thanks! -
May 14, 2024 at 6:54 pmmjmiddleAnsys Employee
The Design of Experiments (DOE) works through parametric updates, which are just changes in dimensions. If you are making topological changes there should be many other problems that will prevent it from working. With parametric updates, IDs don't change.
Assuming you haven't created grouping folders to screw up the order, you can get the body by its position in the Outline under geometry:
my_body = ExtAPI.DataModel.Project.Model.Geometry.Children[0].Children[0]
The first "Children" is for the part and the second is the body. If you don't see multibpdy parts, then each body is a singular body in a singular part.
To get Outline objects by name seen in Outline:
my_body = ExtAPI.DataModel.GetObjectsByName('My Body')[0]
Since there can be multiple Oultine items with the same name, the zero index gets the first one.
Â
-
- You must be logged in to reply to this topic.
-
421
-
192
-
178
-
162
-
140
© 2024 Copyright ANSYS, Inc. All rights reserved.