Examples#

Here is a series of examples using Mechanical with the ansys-mechanical-core library.

Simulation Examples#

These examples show how you can use Mechanical capabilities from Python to perform Mechanical simulations. This includes importing the geometry, meshing, setting up and running the solver, and reviewing the results.

Static structural analysis

Static structural analysis

Capture images after a solve

Capture images after a solve

Display properties for an object

Display properties for an object

Miscellaneous examples#

These examples demonstrate miscellaneous tips and tricks for using PyMechanical.

Output to different formats and handle an error

Output to different formats and handle an error

Test variable and function scope

Test variable and function scope

Gallery generated by Sphinx-Gallery

PyMechanical remote session examples repository#

Remote session examples are hosted in the PyMechanical Examples repository.

The documentation for these examples can be found in the PyMechanical Examples documentation.

Remote session examples#

Remote session examples demonstrate the basic simulation capabilities of Mechanical using remote sessions.

For more information, see Remote sessions examples.

PyMechanical embedding examples repository#

Embedding examples are hosted in the PyMechanical Embedding Examples repository.

The documentation for these examples can be found in the PyMechanical Embedding Examples documentation.

Basic examples#

Basic examples demonstrate basic functionality of Mechanical.

The documentation to these examples can be found in the Basic examples section.