Using Ansys Scripting with pyMAPDL, pyDPF-Post, and More – PART 1: Running and Post-Processing an Ansys Model Outside Ansys

Using Ansys Scripting with pyMAPDL, pyDPF-Post, and More - PART 1: Running and Post-Processing an Ansys Model Outside Ansys
Categories:
One of the Python scripts created using Ansys Scripting

Using the Ansys Scripting API to Execute an Ansys MAPDL Solve and Post Process the Results in Python

PADT’s Alex Grishin has been busy doing some cool Multiphysics optimization work. As part of that effort, he used Ansys scripting to:

  1. Build models in Ansys Mechanical
  2. Programmatically control solving the model in Ansys MAPDL
  3. Extract the stiffness matrix and load vectors
  4. Post-process the displacement and stress solution in Python

First, he shares how to install pyansys from github.com. Then Alex uses a NAFEMS challenge problem to show how to do all of this, including increasingly more accurate ways to script the post-processing. Along the way he uses Ansys API tools pyMAPDL to access the Ansys MAPDL solver, and pyDPF to interface with the Ansys toolset, including extracting the results.

The Results on the Left Were Created with Ansys Scripting in Python
The Results on the Left Were Created with Ansys Scripting in Python

Please find a PDF of his tutorial here:

And here is a zip file with the Scripts and the Ansys Mechanical database archive he used:

Alex is working on some additional tutorials on scripting in Python with this incredibly powerful Ansys API. And don’t forget, if you are interested in having PADT help your Ansys scripting, contact us and let’s talk.

The Two Results on the Left Were Created with Ansys Scripting in Python
The Two Results on the Left Were Created with Ansys Scripting in Python
Categories

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

04/22/2024

Experience Stratasys Truck Tour: Houston, TX

04/24/2024

Structures Updates in Ansys 2024 R1 (2)

04/24/2024

Experience Stratasys Truck Tour: Houston, TX

05/07/2024

Experience Stratasys Truck Tour: Albuquerque, NM

05/07/2024

Dynamic Simulation for Rocket Propellant Systems! - Webinar

05/08/2024

Fluent Materials Processing Updates in Ansys 2024 R1 - Webinar

05/13/2024

Experience Stratasys Truck Tour: Tempe, AZ

05/14/2024

Simulation World 2024

05/15/2024

Simulation World 2024

05/16/2024

Simulation World 2024

05/22/2024

Optics Updates in Ansys 2024 R1 - Webinar

06/12/2024

Connect Updates in Ansys 2024 R1 - Webinar

06/26/2024

Structures Updates in Ansys 2024 R1 (3) - Webinar

06/27/2024

E-Mobility and Clean Energy Summit

07/10/2024

Fluids Updates in Ansys 2024 R1 - Webinar

08/05/2024

2024 CEO Leadership Retreat

10/23/2024

PADT30 | Nerdtoberfest 2024

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: