Cheat Sheets
Mechanical Scripting: Geometry panel view cheatsheet
This cheat sheet helps python users looking to manipulate the geometry panel view within Ansys Mechanical.
PyMotorCAD Cheat Sheet
This is a quick-reference guide for PyMotorCAD.
PyDPF-Post Cheat Sheet
This is a quick-reference guide for PyDPF-Post.
PyDPF-Core Cheat Sheet
This is a quick-reference guide for PyDPF-Core.
PyMechanical Cheat Sheet
This is a quick-reference guide for PyMechanical.
PyDynamicReporting Cheat Sheet
This is a quick-reference guide for PyDynamicReporting.
PyFluent Cheat Sheet
This is a quick-reference guide for PyFluent.
PyPrimeMesh Cheat Sheet
This is a quick-reference guide for PyPrimeMesh.
PyAEDT EDB Client Library Cheat Sheet
This is a quick-reference guide for the PyAEDT EDB Client Library.
PyAEDT Client Library Cheat Sheet
This is a quick-reference guide for the PyAEDT Client Library.
PyMAPDL Cheat Sheet
This cheat sheet for PyMAPDL provides quick references for some of the most used and helpful commands for PyMAPDL users.
PyAnsys
Generating CFD Domain Primitives in PyPrimeMesh Using Custom PyAnsys Geometry Functions
Geometric primitives — boxes, cylinders, spheres, hemispheres, and pill capsules — are the building blocks of CFD domain setup. The same five shapes serve three distinct purposes depending on how they are sized relative to the geometry.
06. PyRocky as an Execution Layer for Agentic AI
Agentic AI represents a further evolution of AI-assisted engineering.
05. Foundation for AI-Enabled DEM Workflows
PyRocky can provide a strong foundation for applying Artificial Intelligence (AI) to DEM simulation workflows.
04. PyRocky vs Ansys Rocky PrePost Scripting
A common question from Ansys Rocky users is:
03. How to Get Started with PyRocky
Before using PyRocky , users should have:
02. Ansys Developer Portal: A Central Resource for Simulation Developers
The Ansys Developer Portal is the central hub for developers, engineers, and simulation users who want to extend, automate, customize, or integrate Ansys te
01. Introduction: What are PyAnsys and PyRocky?
Engineering simulation is rapidly moving toward automated, repeatable, data-driven workflows.
Importing Grouped OBJ Files into PyPrimeMesh
This article describes a pre-processing workflow that allows users to import grouped OBJ files into the CAD reader in PyPrimeMesh.
Is your scripting up to scratch? Results & Highlights!
When we sought user scripting tips and tricks for PyAnsys our customers, partners, and users responded with some excellent work. This article covers two stand-out examples.
PyFluent: Evolving Towards an Intuitive CFD Experience
The PyFluent project is evolving to meet the expectations of today’s developers: intuitive, object-oriented interfaces that are powerful, discoverable, and consistent. Read about the evolution of PyFluent, the design principles driving change, and the immediate user impacts.
All you need to know about PyFluent's Settings APIs and objects
PyFluent is a Python library of remotable APIs for interacting with Ansys Fluent. PyFluent provides an interface for automating, customizing, and streamlining CFD workflows using the flexibility and power of Python.
How to debug your own Ansys Rocky Custom Modules -- [Solver SDK]
Efficient debugging is essential to ensure your module works as intended when developing your Ansys Rocky Custom Modules using the Rocky Solver SDK. This article provides a step-by-step approach to debugging your own custom modules.
PyWorkbench Unleashed: Transforming Your Ansys Workbench End-to-End Simulation Experience
PyWorkbench is a powerful client library that enhances the Ansys Workbench platform for engineering simulations. This guide introduces key concepts and practical strategies for using PyWorkbench, making your engineering simulations more efficient and effective.
Getting started with classes in Python
Understand the basics of programming in Python but heard a lot about “classes” without being sure what they are or how they’d be useful to you? This article series is for you.
PyAnsys Sound is now available!
Introducing PyAnsys Sound! A python library for Ansys Sound users.
Using Machine Learning to predict analysis solve times from local data: Part 1
In part one of this two-part series we provide an example to show how to gather your local data using a parser. Part two will focus on how to use scikit-learn to create a ML system to create a method to estimate times to solve for your FE models.
How to manipulate report HTML: a user example
Learn to combine two of the least-known report templates in Ansys Dynamic Reporting to allow you to manipulate the HTML of the report.
An analysis of NASA's fan-bladed disk with PyAnsys
A comprehensive inverse-solving (hot-to-cold) simulation workflow using PyAnsys libraries to analyze the NASA Rotor 67 fan-bladed disk.
PyAEDT 0.7.11 Released!
This week has seen the latest release of PyAEDT with version 0.7.11.
Introduction to PyAEDT
PyAEDT is a natural evolution of the AEDT scripting tools that supports Python. By wrapping the proprietary AEDT scripting interface in Python commands, and packaging the result as a Python library that can be easily used by Python developers, PyAEDT allows the use of AEDT from Python directly.
Biomedical Catheter Design Analysis
In this article, we explore the mechanical behavior of a flexible, biomedical catheter under large deformation. Using the scripting capabilities of PyMAPDL, we perform an iterative analysis to evaluate the apparent flexural rigidity of the catheter under different design configurations.
Introducing PyMeilisearch
We are excited to announce the release of our Meilisearch companion tool, PyMeilisearch. As Ansys continues to expand our adoption of open-source we are working on projects related to many of the tools our OSS projects are using.
Postprocessing of simplified bolted connections with the help of PyAnsys
This article demonstrates GUI application possibilities in calculating pre-tensioned bolted connections using PyMAPDL. The application uses widely recognised standards for bolted connections such as EN 1993-1-8 and VDI 2230.
PathAnalysis package for pressure vessel licensing procedures in Ansys Mechanical
Tiago Pomella Lobo of Karlsruhe Institute of Technology presents his PathAnalysis package for use with ACT in Ansys Mechanical. “This Ansys Mechanical extension that can be installed by anyone, adding a custom toolbar menu that can automatically find and create the shortest path between a pair of named Node and Surface, compute linearized (stress and temperature) solutions along those paths, and also export and delete those results. ”
Embedding PyDynamicReporting into applications
Ansys Dynamic Reporting provides interactive and dynamic reports that can be embedded in any application, and the pydynamicreporting library allows easy access and control over the application. This quick guide provides steps to easily embed ADR into your application, allowing you to add powerful and modern looking reports to your application.
Tips & Tricks
Scripting in Mechanical: going further — learning resources and the ACT toolkit
This deck deliberately stops after surpassing the beginner stage — its own stated scope excludes ACT extensions, PyAnsys, advanced Python, and MAPDL scripting.
Scripting in Mechanical: best practices
Writing a script that works once is one milestone.
Scripting in Mechanical: scripting tips that will save you time
Knowing the addressing rules is one thing; scripting quickly and without constant trial-and-error is another.
Scripting in Mechanical: understanding the Mechanical tree
Once you’ve seen one script work end to end, the natural next question is: how do I know how to reach any object in the tree, not just the ones from the example?
Scripting in Mechanical: your first script — "Hello, Mechanical!" in 10 minutes
This article is the payoff of the “for beginners” promise: a complete, working script you can read line by line, understand, and adapt to your own models — built and explained in roughly ten
Scripting in Mechanical: getting started — what scripting in Ansys Mechanical actually is
If you’ve ever thought “scripting looks useful, but it’s not for me,” this guide — and this article in particular — is aimed squarely at you.
Scripting in Mechanical for beginners! The full series
This series introduces in-product scripting in Ansys Mechanical, from first scripts and tree navigation through practical working habits, maintainability guidance, and further learning resou
Automate FEA Simulations with PyMechanical
Use the scripting capabilities of PyMechanical for workflows that extend beyond a single run: parametric studies with dozens of variants, results feeding into a CI/CD pipeline, overnight batch solves, or shared setups that a teammate can reproduce without a walkthrough.
Automating Ansys SCADE Suite workflows with GitHub Actions
This article explores using open-source Ansys SCADE Actions for GitHub. We set up and run a GitHub Actions pipeline on the Cruise Control example model provided with the SCADE Suite product, using a self-hosted runner to perform automated actions.
Setting up Continuous Integration / Continuous Delivery (CI/CD) with SCADE
This article walks through implementing CI/CD (Continuous Integration / Continuous Delivery) practice on software developed with SCADE Suite.
Getting started with classes in Python Part 10: Inheritance
This article concludes a ten-part series on classes in python. The final topic covers inheritance, focusing on ‘subclassing’ and inheriting.
Getting started with classes in Python Part 9: __str__ vs __repr__
As our series on python classes continues we will delve into a simple example of how to leverage two dunder methods covered in the previous article, which are used “under the hood” to perform much of the day-to-day business logic in Python.
Getting started with classes in Python Part 8: "dunder"
This series on classes in Python continues. This article introduces “dunder” methods and how they might apply to classes.
Getting started with classes in Python Part 7: getters and setters
Here we are with Part 7 in this series on classes in Python. This article covers setters (the method on a class that sets a property) and getters (which gets the property).
Getting started with classes in Python Part 6: Public, Private and Super-Private Naming
Part six of ten in this series on classes in Python covers the levels of obfuscation available in Python: private and super-private.
Using Python to translate NASTRAN .brd inputs to APDL inputs
Python is quite good at reading, writing and finding things in text files. This allows us to develop tools that can be used to find data in NASTRAN inputs files and create the ANSYS APDL equivalent.
Getting started with classes in Python Part 5: classmethod and staticmethod
This series continues by exploring two notable exceptions to the self parameter for methods, classmethod and staticmethod .
Getting started with classes in Python Part 4: Hashing & Mutability
Part-four of this series sees us move from the “basic” knowledge required to understand classes and into more “intermediate” topics - starting with mutability of dataclasses.
Getting started with classes in Python Part 1: Anatomy of a Class
In Python you may hear this phrase said a lot “everything is an object”, which they are! Objects, that is.
Ansys Dynamic Reporting: generate a custom number of plots with any number of variables
Looking to combine multiple tables in a non-structured way using Ansys Dynamic Reporting? This tutorial walks you through addressing this problem using Python.
Scripting for Mechanical Engineers
This article aims to clarify and to make you feel more confident about getting started with automation, customization, PyAnsys, ACT, DPF, Python Objects, and other scripting features in Ansys.
Create a report from a saved Mechanical session (.mechdb or .mechdat)
This demo shows you how to create a report from a saved Mechanical session using Python in Ansys v2024R1.
A Guide to Streamlining CFD Simulations and Reporting
How can you turn raw data into a useful format for obtaining valuable insights? Tools like Ansys Dynamic Reporting help make this a reality. This article covers ways to utilize the PyAnsys ecosystem to streamline CFD simulations and generate comprehensive reports using PyFluent and PyDynamicReporting. It demonstrates access and integration of generated reports with modern tech stacks, for use within an end-to-end workflow as a web application.
venv and Virtual Environments
Developers often turn to GUI-based environment managers to avoid working with virtual environments on the command line. It is useful to know about what’s going on “under the hood” when using these tools, and they may not always be available to you in the future. So long as you have a computer and an installation of Python you’ll have a command line/terminal and the power to make virtual environments. This article provides a guide to using this functionality.
Working with text files in Python - Quick start
One of the most important skills in any programming language is knowing how to open text files and extract the data/information for your program. This is usually quite straightforward, but there are various aspects that may make it trickier than you initially suspect. This guide gives readers recipes they can build on, covering common situations and pointing out some common pitfalls.
Transforming Simulation Data into Web-Ready Visuals
Effortless Visualization of Simulation Data and embed it with Modern Web Apps. The Ansys Fluent Visualization Python Module is a dynamic client library that allows you to produce visually captivating depictions of fluid dynamics simulations using Ansys Fluent.
Script Tip Friday - Examples of Python Results for Mechanical (Part 2)
This script tip is the second of a two part series that covers four examples of Python results for Ansys Mechanical by executing an Iron-python script based on the Data Processing Framework (DPF) post-processing toolbox.
Script Tip Friday - Examples of Python Results for Mechanical (Part 1)
In this post, we cover two examples of Python Results: (1) get the maximum over time of the total deformation; and, (2) get the average total deformation on all time steps.
Script Tip Friday - Plot Design Point (DP) Results
This PyDPF example shows a simple way to plot a deformation result for four design points (DP) in the same window.
Script Tip Friday - Efficiently Combining MAPDL and Mechanical Scripting
Learn to efficiently combine Mechanical automation scripting and MAPDL scripting for a better post-processing workflow.
Script Tip Friday - How to Plot Stress Gradient Using PyDPF
This Script Tip Friday is brought to you by Ayush Kumar who is a Senior Application Engineer here at Ansys. Ayush will cover how to plot Stress Gradient on a path normal to the selected face at the selected node using PyDPF.
Script Tip Friday - Determining an Optimal Location for Components on a PCB
What is the optimal location to place a component on a Printed Circuit Board (PCB), in terms of its reliability under shock, vibration, and other environmental conditions?
Numbers and "numbers" in Python
Numbers in Python are quite simple, there are only 3 base numeric types and they can all be combined freely without (inherent) errors. In this post I go over some information you’ll probably know and some you might not. Read on for info about numbers!
Python Standard Library Diving: copy
One of the first things you learn in Python is that it passes references around when assigning things. It does not copy things in memory. So, how do you actually do copying? Well there’s a built-in library to do it! copy .
The Python Standard Library: getpass
In this article I want to shine a light on one of the smaller and more useful packages in the Python standard library. Hopefully you know it already, but if you’re coming across it for the first time, read on! This is all about getpass …
Converting Nodal Coordinates Field to Local Coordinate System
We cover the steps for converting the Nodal Coordinates Field to Local Coordinate System using PyDPF.
How to make peace with argparse
A huge part of any Python developer’s arsenal is the ability to link your Python program with “other stuff”.
Script Tip Friday: Getting it right the first time for Mould Compensation
For this week’s Script Tip Friday, Fabio Pavia, discusses how you can design for an optimal mould shape in 3 steps using partner tools for composites connected to Ansys Mechanical.
Integrating images and plots using a Python Code object (Cpython)
Python Code objects in Ansys 2022R2 allow the user to change the engine to Cypthon. This opens the door to using more modern python libraries and modules.
Find the time-varying center of gravity location of a deforming model
We cover the steps to find the time-varying center of gravity location of a deforming model using DPF in mechanical.
Reconstructing specific APDL results with DPF
SDSG is an element quantity that is the maximum difference between the nodal average value and the elemental nodal value for all nodes of the element (for all components of stress). Here we look at the ability to display SDSG results in Mechanical.
Filter The Results of a dir Command
To check all available methods and properties of an object we often use the dir() command. Sometimes it is useful to filter it by keywords, and for this the filter() method can be used.
Script Tip Friday - From ODB++ to Modal Analysis
Enrico Bedogni shares his 4-step process to go from ODB++ To Modal Analysis.
Script Tip Friday- "Python Code" object in Mechanical
What if you could easily export all your results in Mechanical as images using simple scripts when running several design variations from Workbench automatically?
Script Tip Friday- Automate Imported Loads Set up with WB Scripting
This week’s Script Tip walks us through automating imported loads set up with Workbench scripting.
Script Tip Friday - Connecting Mechanical and Excel
This script tip covers Iron Python scripts for data export from Ansys Mechanical to MS Excel.
Script Tip Friday - Named Tuples
When writing scripts of any kind you will often come across data collections, or groupings that could really do with being stored in some sort of structure. Now, you can always go away and make a class, with a constructor and properties and so on and so forth… but this is scripting and that might feel a bit too much like hard work. Instead I ask if you have heard of namedtuple() .
Script Tip Friday - Displaying txt, PDF or browser contents in your worksheet
Our Script Tip this week comes from our Senior Application Engineer here at Ansys, Vishnu Venkataraman. Have you ever wondered the best way to display text, PDF or browser contents in your worksheet? Well thank goodness we have Vishnu here to help!
Script Tip Friday- Adding contact tools to the solution branch for all contacts
This script tip demonstrates how to add contact tools to the solution brand for all contacts.
Script Tip Friday- Create and export contact tool results for all time steps
This script tip covers how to create and export contact tool results for all time steps using ACT.
Script Tip Friday- Communicate with the Project Page from within Mechanical
In this script tip Landon Kanner helps answer a question we get all the time- how to communicate with the Project Page from within Mechanical.
Script Tip Friday- How to navigate scripting in SCDM
This script tip covers navigating Ansys SpaceClaim Direct Modeler for scripting, and then accessing the different objects in SCDM by scripting (Solid, Faces, Edge etc.).
Script Tip Friday- Bolt Pretension
What if you could easily create your own parameters in Mechanical using simple scripts to run design variations and optimization? Well, parametric variations are part of Ansys Mechanical’s DNA.
Script Tip Friday - How to Sum Damage Results
This article tackles the task of summing damage results by creating your own field using DPF. You can use the similar method to sum or manipulate contour results from multiple result objects.
Script Tip Friday- Node Connectivity using DPF
This script tip covers how to find the IDs and position of the nodes of a named selection using DPF in Mechanical, and also how to know which elements this node is attached to (node connectivity).
Installing PyAnsys modules in a Virtual Environment
We cover the importance of installation PyAnsys packages inside a virtual environment.
Introducing PyAnsys
Senior Principal R&D Engineer, Pierre Thieffry, introduces PyAnsys in the premiere edition of our script tips series.
Case Studies
Portal Paradox Part 4: Simulation Results
In this final installment in our series on the Portal Paradox we look at simulation results.
Portal Paradox Part 3: The Portal Paradox Theory
We are on to the fourth installment (of five) in this series on the Portal Paradox. This article discusses the theory behind the paradox, and sets up a simulation using Python.
The Portal Paradox Part 2: How Portals Might Actually Look
The third installment in this five-part series asks “what might a portal actually look like?” Obviously, we have a clear and concise answer to this question covered in this article.
The Portal Paradox Part 1: Portals as a Concept
In part two of a five-part series, this article explores the concepts behind portals. Here, James covers media depictions, the seeming properties that portals may have, what happens at their edges, and other important issues to clarify before getting into the physics of this series.
The Portal Paradox: An Investigation
What is the portal paradox? The first in a five-part series, this article introduces the Portal Paradox, and explains how the rest of the series will work through the problem.
Open Source
Product Announcement: VISOR is Now Open Source
VISOR is now publicly available as an open-source library for adding interactive 3D visualisation to engineering applications.
Product Announcement: Solution Application Framework (SAF)
We are announcing the public availability of the Solution Application Framework (SAF), an open-source framework that enables customers, partners, and Synopsys teams to develop, deploy, and maintain simulation web applications built on Synopsys simulation technologies.
Introduction to MCPs for Engineers
What is an “MCP”? What are “Tools”, “Prompts” and “Resources”? The AI interface has become the talk of the tech world, but what is it really?
Open source: enough is enough
Defining the measurable impact of Open-Source creation.
Open source: You say you want a revolution?
Thinking about open source? Sit down here and take a read.
News
Advent of Code 2025, Day 12 – a.k.a. packing problem
Each December, Advent of Code issues a series of coding challenges for programmers to solve. This article looks at the twelfth (and final) problem for 2025, and a suggestion for solving from Andreas Hiltebrand.
Enhancing Ansys Store: Introducing verified apps
Ansys is diligently advancing efforts to revamp the Store to deliver a more personalized experience, while improving the quality and scope of what is published.
Providing Open-Source Access to Ansys Fluent with PyFluent
When you think of commercial engineering simulation software, you usually think of the software you are familiar with and all the workflows supported within it.
Ansys Gets Into Open Source With GitHub
For the first time in our history, Ansys is releasing software into the open source.
Articles
Automatic support generation for Additive Manufacturing with LPBF in Ansys Mechanical
This article shows you how to automate support generation for Additive Manufacturing using Laser Powder Bed Fusion (LPBF) in Ansys Mechanical by leveraging a Python Code Object.
SCADE API-tools Companion Article
This article introduces Ansys SCADE API Tools, designed to simplify usage of the SCADE Python APIs.
Getting started with classes in Python Part 3: Methods and properties
Part-three in a ten-part series, this article introduces adding methods to your data classes.
Getting started with classes in Python Part 2: dataclasses
Part-two of this series covers constructing one of the simplest and most useful types of class, data classes and the reasons you may want to do this in the first place.
Using Machine Learning to predict analysis solve times from local data: Part 2
Part two (of two) in Mark’s series on using machine learning to predict analysis solve times focuses on using scikit-learn to estimate your solve times.
How to install and use PySherlock: Guides for beginners and experts
Looking to get started with PySherlock? We have two videos to guide you through the process - one for beginners, and one for users with a little more experience.
Data Visualisation is Very Important and you should care about it: Part 4
In the final installment of this four-part series, we look at solutions for data visualization.
Data Visualisation is Very Important and you should care about it: Part 3
In part three of this four-part series we look at data viz solutions for line, bar, pie charts, and so on…
Data Visualisation is Very Important and you should care about it: Part 2
This is Part two of a four-part series covering the importance of data visualization. This articles covers some of the additional factors and contexts to account for when deciding how to present data.
Data Visualisation is Very Important and you should care about it: Part 1
The first part in this four-part series, James Derrick explores the importance of data visualization in simulation.
Introducing PyConceptEV
Unlock the full potential of Ansys’ ConceptEV service with PyConceptEV. Designed to seamlessly integrate with the ConceptEV API, this Python client enables developers and engineers to effortlessly access and utilize ConceptEV’s advanced simulation-driven design capabilities.
"How 2 win at PyBake"/"Ansys codefests the EZ way" Part 3
In this final article in our three-part series on approaching the mechanical/structural “bridge builder” challenge at Ansys codefests or PyBake we cover refining and developing optimal designs.
"How 2 win at PyBake"/"Ansys codefests the EZ way" Part 2
This is Part 2 of a series on strategies to approach our mechanical/structural “bridge builder” challenge. Today’s topic: selecting materials and cross-section options for the best results.
"How 2 win at PyBake"/"Ansys codefests the EZ way" Part 1
Have you participated in an Ansys codefest at your institution, or one of our PyBake events at PyCon? This article series makes some suggestions on how to approach our mechanical/structural “bridge builder” challenge for a result with the lowest cost.
Ansys Python Manager 0.3: Now Available on Linux
Ansys Python Manager is an efficient Python QT app for streamlining Python usage, simplifying virtual environment management, and facilitating PyAnsys package administration.
PyEnsight Cheat Sheet
This is a quick-reference guide for PyEnSight.
Advent of Code 2023 survivors and results
Advent of code 2023 is complete! Here is a round-up of this year’s event.
Library Lover’s Day
An ode to the library, or, why language matters a lot when you’re talking to developers.
Podcast: Simulation and Community Building at Ansys
Ansys Developer’s own Chris Harrold sat down with Pronovix’s Developer Success podcast to discuss simulation and community building at Ansys.
Exploring PyMechanical access methods: A brief overview
Ansys Mechanical’s powerful scripting capability plays a crucial role in enabling task automation. This articles explores how Mechanical Scripting and PyMechanical can be used to streamline simulations, control input deck, perform proof-of-concept studies, and integrate with other Python modules.
Access the Power of Ansys from the Python World
Python is the world’s most popular programming language, and the Python ecosystem contains an abundance of open source code libraries that developers can freely use to create new solutions.
How To Plot Spring Force as a Contour Plot Using DPF
Using the scoping.on_mesh_property operator to extract the COMBIN14 (spring element) mesh, users can extract the MAPDL smisc results for spring forces with the mapdl.smisc operator.