Examples#
Here are a series of examples using MAPDL with the ansysmapdlcore
library.
Full examples using PyMAPDL#
These examples demonstrate full examples using the PyMAPDL module.
MAPDL 2D Plane Stress Concentration Analysis
3D Stress Concentration Analysis for a Notched Plate
Basic Thermal Analysis with pyMAPDL
Basic DPFCore Usage with PyMAPDL
Static simulation of double cantilever beam test via cohesive elements
Thermalstructural analysis of exhaust manifold
Structural Analysis of a Lathe Cutter
Path Operations within pyMAPDL and MAPDL
CFX pressure data mapping to structural blade
Example Thermal Transient Analysis
PyMAPDL math examples#
These examples demonstrate using APDL Math from the PyMAPDL library.
PyMAPDL APDLMath Basic Operations
Using APDLMath to solve Eigenproblems
Compute Eigenvalues using MAPDL or SciPy
APDLMath Sparse Matrices and SciPy Sparse Matrices
Use APDLMath to Solve a Dense Matrix Linear System
Performing Sparse Factorization and Solve Operations
Manipulate APDLMath vectors or dense matrices as NumPy Arrays
Geometry examples#
These examples demonstrate using PyMAPDL to create basic geometry.
Miscellaneous examples#
These examples demonstrate miscellaneous tips and tricks for using PyMAPDL.
MAPDL Element Size Transition Example
Using Inline Functions (Query)
Generating and Extracting Rotational Displacement
Academic finite element examples#
These examples demonstrate finite element method as applicable to Python and MAPDL while emphasising Python libraries such as matplotlib
Gallery generated by SphinxGallery
PyMAPDL examples repository#
The Verification Manual examples and the Technology Showcase examples are hosted in the PyMAPDL Examples repository.
The documentation to these examples can be found in the PyMAPDL Examples documentation.
Verification manual examples#
The Verification Manual examples demonstrate a range of Mechanical APDL elements and capabilities in straightforward problems which have “classical” or readily obtainable theoretical solutions using PyMAPDL.
These problems may then serve as the basis for additional validation and qualification of Mechanical APDL capabilities for specific applications that may be of interest.
The documentation to these examples can be found in the Verification Manual section.
Technology showcase examples#
The PyMAPDL technology showcase examples are more complex test cases than the ones preceding. They demonstrate how to use PyMAPDL to effectively and accurately solve interdisciplinary problems from a variety of industries and engineering fields.
The examples initially come from the APDL Technology Showcase Manual and are modeled with MAPDL files. Some of them have been
reproduced in Python files using PyMAPDL with the ansysmapdlcore
library.
The documentation to these examples can be found in the Technology Showcases section.
Extended examples#
These extended examples explain other concepts such as interoperability with other programs, libraries, and features in development.
Name 
Description 
Demonstrates a reinforcement machine learning example using MAPDL through PyMAPDL. 

Demonstrates the interoperability between PyMAPDL and the gmsh meshing library. 

Demonstrates the interoperability between userprogrammable functions in MAPDL and Python. 

Demonstrates the usage of the Krylov method for solving a customized harmonic analysis. 

Demonstrates the use of PyMAPDL with Dash. 

Create your own Python app with a commandline interface. 
Download example files#
Each example should contain all the necessary resources to run the example. However in some cases, external files are needed. A link to those files is available at each example page. These links refers to the following GitHub repository where you can find all of them:
GitHub Example Data Repository
If you find a missing or broken link, open an issue in GitHub (PyMAPDL Issues) or send an email to PyAnsys Support.