/path-analysis

ANSYS extension package for computing and exporting stress and temperature analyses along linear paths

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

PathAnalysis package for ANSYS Mechanical

Extension package for ANSYS Mechanical for computing and exporting stress and temperature analyses along linear paths.

Sharing

Repo Developer Portal discussion


Introduction

This package was developed as a simple (i.e. quick and dirty) tool to compute and export stress and temperature analyses along linear paths between a point and surface pair selected in ANSYS Mechanical. Check this link or this link or this link for more information on linearization along FEM/FEA paths. This article also provides a good example.

This has the aim of producing analyses necessary for licensing pressure vessels under some regulations (e.g. ASME's BPVC Section VIII, afcen's RCC-MRx Code).


Installation

To install this package in your local ANSYS Mechanical, simply copy the contents of the extensions folder into the directory of same name that can be found in:

C:\Users\<username>\AppData\Roaming\Ansys\<version>\ACT\extensions\

Don't forget to substitute <username> and <version>!


Usage

After installation, the extension must be loaded in the Workbench toolbar: Extensions > Extensions Manager by enabling the check-box for PathAnalysis. A menu of the same name should appear in the toolbar of your results visualization window (i.e. not in the workbench): Toolbar menu of the PathAnalysis extension.

To use the extension:

  1. first create named selections for both a node and a surface in your results visualization window;
  2. then click the Path button (route icon) in the toolbar to create the shortest path between them;
  3. then click the Calculate button (calculator icon) to compute the stress and temperature analysis summaries and export them as a CVS file on your Desktop.

The Calculate button can perform its action for multiple paths, so steps 1 and 2 can be repeated as many times as necessary. The Delete button (paper shreder icon) can be used to delete analysis solutions for all paths.

The example file in the repo can be used to test the extension after it has been installed and enabled.

It contains a named Node and a named Surface that can define a path, in a simple geometry loaded with a simple temperature distribution. Altering the given node/surface and clicking Path a few times can provide us with linear paths to perform an example analysis: Multiple paths created by changing the Node and Surface named selections.

Solutions are produced and renamed accordingly: One of the path analysis solutions: the Linearized Equivalent Stress along the first path.

And the summaries are exported as a CSV file onto the Desktop, that can be opened with Excel for example: Solution summaries exported and opened as a spreadsheet.


Development

The extension is a simple set of files: one .XML for configuring the toolbar and a few .PY to define the functions necessary to run its features.

If you intend to modify the package, it might be a good idea to enable the debugging mode in the ANSYS Mechanical GUI. To do so, in the Workbench toolbar: Tools > Options > Extensions, enable the check-box for Debug Mode.

For additional information on XML tags and custom extensions, one can always check the Online API and XML Reference Guides in ANSYS ACT Developers Guides.