TAGGED: 3d-geomertry, automation-code, pyansys, static-structural
-
-
May 27, 2025 at 4:21 pm
nethan1012
SubscriberHello,
I am currently working on automating static structural analysis using PyAnsys. One of the challenges I’m facing is assigning boundary conditions: currently, I have to manually extract the surface IDs from the geometry using the GUI, and then hard-code these IDs into my Python script. This becomes inefficient and error-prone, especially when the geometry changes frequently.
I would like to ask if there is a way to fully automate this process—specifically, to automatically detect and assign boundary conditions to surfaces in a specific direction (e.g., surfaces normal to a given axis) without manually inputting surface IDs.
Any advice or guidance would be greatly appreciated.
Thank you!
-
May 28, 2025 at 12:37 pm
Dennis Chen
SubscriberHello, there's a really easy way to do this which is to call the python script one would write inside the GUI in Pyansys.  From inside the GUI, you can access each object through the access points and once the script is working.  You can access workbench via pyansys in batch mode and generate, run and extract results in the background without ever opening ansys.Â
I actually made a quick video about this here -
&t=0sjust a suggestion, hope it helps.Â
-
- You must be logged in to reply to this topic.
-
3246
-
1031
-
974
-
859
-
798
© 2025 Copyright ANSYS, Inc. All rights reserved.