Python Primer for Ansys
Foundation for Ansys Scripting Trainings and PyAnsys

In this training, you will learn the basics of Python programming for using PyAnsys and automating your Ansys simulations. This training is offered as a self-paced eLearning course.
Duration
1 day
Software used
Software-independent
- Introduction to Python using simulation-relevant exercises
- Generate black-box applications with Python and PyAnsys
- Make simple applications available on servers or in the cloud
- Automate Ansys products: the basis for all further scripting courses
Description
Python is the basis for both scripting within Ansys products and PyAnsys (APIs around Ansys products), which help you automate and couple your simulation workflows to many different in-house or third-party applications. This helps in terms of process standardization and multi-product automation.
Thanks to its simple syntax, Python is an easy-to-learn programming language. In this course, the language Python and its fundamentals are the focus, keeping in mind that the user would eventually like to automate Ansys Products using PyAnsys APIs. You will learn how to use Python and PyAnsys to easily create black box applications, which can be used by non-experts, reducing the burden on experts. Furthermore, you will learn how to easily create and launch simple application on servers or cloud.
The course is aimed at both Ansys users and programmers wishing to automate Ansys products using Python and PyAnsys.
Get a first impression and test the first eLearning module of this training course without any obligation. No costs, no notice period.
Detailed Agenda for This Training
Day 1
01 Python: Introduction for Non-Programmers
- Basics of Python programming language
- Setting up the development environment
- Understanding data types, variables, and operators
- Control flow and looping structures
- Input/output operations in Python
- Exercise: Average elemental results at nodes and export to file
02 Avoid Chaos: How to Structure the Code
- Understanding Function
- Creating and Using Functions
- Understanding Object-Oriented Programming (OOP)
- Creating and Using Classes
- Best Practices
- Exercise: Create classes and functions
03 Python Packages: Turbocharging the Code
- Exploring the benefits of leveraging pre-built functionality
- Python package managers (pip, conda)
- Data Manipulation using numpy, pandas
- Data Visualization using plotly, matplotlib, pyvista.
- Exercise: Making use of public libraries
04 PyAnsys: Start Automating Simulations
- Basics of PyAnsys
- Use PyPrime meshing to create consistent meshing
- Create a simple simulation using PyMAPDL
- Access Result data and create plots.
- Outlook: from producing a script to creating your own app using python
- Exercise: Use PyDPF for postprocessing
Your Trainers

Kanchan Mahajan
Placement in the CADFEM Learning Pathway
Participant data
Additional information
Commentary
Get a first impression and test the first eLearning module of this training course without any obligation. No costs, no notice period.
Whether eLearning, classroom courses, live online training or customized workshops - together we identify the best option for you.
Do You Have Questions on the eLearning Course?
If you book through your university, you will receive a 50% discount on the stated fee on training courses and eLearning courses.
For more information on the validity and how booking with the code ACADEMIC50 works, please visit our page on training for academic users.
To get a clear impression of our online learning format, we offer you a trial allowing you access to the starting module of an eLearning course of your choice. No costs, no cancellation period or anything similar. Moreover, with this free test access you can check all the technical requirements for a smooth learning process as well as ensuring version compatibility for any local workshop processing. You can easily request the free module from any eLearning course.
Each online course day comprises four eLearning modules. You should ideally allow 90 to 120 minutes of uninterrupted learning time for each module. This will allow you to acquire the knowledge provided by a module and to consolidate it through quiz questions and Ansys exercises. By dividing each module into micro learning units, you can also make good use of smaller time windows, such as on your commute.
Prerequisite for the use of the eLearning courses is the use of a personalized access to the CADFEM learning platform.
When purchasing an eLearning course, access to the learning platform is 365 days.
As a subscription user, access to the learning platform starts and ends with the start and end of the subscription.
With the purchase of a further learning product (learning subscription, training, eLearning), you will receive renewed access to all previously booked content for 365 days, starting from the start date of the new learning product.



