Skip to content

Tiny Python script for parameter studies of rigid bodies in Ansys Mechanical

License

Notifications You must be signed in to change notification settings

simdbad/Ansys_AutoRigid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

AutoRigid script for Ansys

Purpose

Workaround for the missing parameter option regarding the stiffness behaviour of solids in Ansys Mechanical.

How it works:

The script below declares all geometries as rigid if their names end with "_rig".

It gets triggered after the geometry is updated.

This allows parameter studies with rigid bodies.

How to use:

  1. Temporarily tick the option "Connect/Run Python Code Objects when Mechanical is Launched" under Options -> Mechanical (Revert this after the parameter study)

  2. Insert a new Python code script into Ansys mechanical by right clicking on the model tree.

  3. Set the "Target Callback" to "After Geometry Changed".

  4. Copy the whole content of AutoRigid.py into the body of the "after_geometry_changed(...)" function.

  5. Right click on the script in the tree and press "Connect".

License

Published under MIT License

About

Tiny Python script for parameter studies of rigid bodies in Ansys Mechanical

Topics

Resources

License

Stars

Watchers

Forks

Languages