Examples#
Here is a series of examples using Mechanical with the PyMechanical. Examples are organized by the mode they use:
Embedding mode examples use the
Appclass for direct object model access.Remote session mode examples use the
launch_mechanical()andrun_python_script()methods.
If you are not sure which mode to use, see Choose your mode.
Important
Some examples use Mechanical features that require a specific license level. For example, harmonic acoustics is not available with an Ansys Mechanical Pro license. If an example fails, verify that your Mechanical license supports all analyses and features used by the example. A license-related failure does not necessarily indicate a problem with your PyMechanical setup. For information on inspecting and selecting licenses, see License management.
Basic examples: Embedding mode#
This section demonstrates the basic simulation capabilities of PyMechanical.
Steady State Thermal Analysis of cooling holes on a representative model
Gallery generated by Sphinx-Gallery
Advanced examples: embedding mode#
This section contains examples that demonstrate advanced capabilities of Mechanical
using PyMechanical in embedding mode (App class).
For more information, see Advanced examples: embedding mode.
Basic examples: Remote session mode#
Remote session examples demonstrate the simulation capabilities of Mechanical using
remote session mode. This consists of using either the launch_mechanical() or run_python_script() methods.
For more information, see Remote sessions examples.