find_mapdl#

ansys.tools.path.find_mapdl(version=None, supported_versions={191: '19.1', 192: '19.2', 193: '19.3', 194: '19.4', 195: '19.5', 201: '2020R1', 202: '2020R2', 211: '2021R1', 212: '2021R2', 221: '2022R1', 222: '2022R2', 231: '2023R1', 232: '2023R2', 241: '2024R1', 242: '2024R2', 251: '2025R1', 252: '2025R2'})#

Searches for Ansys MAPDL path within the standard install location and returns the path of the latest version.

Parameters:
versionint, float, optional

Version of Ansys MAPDL to search for. If using int, it should follow the convention XXY, where XX is the major version, and Y is the minor. If using float, it should follow the convention XX.Y, where XX is the major version, and Y is the minor. If None, use latest available version on the machine.

Returns:
ansys_pathstr

Full path to ANSYS executable.

versionfloat

Version float. For example, 21.1 corresponds to 2021R1.

Return type:

Union[Tuple[str, float], Tuple[Literal[''], Literal['']]]

Examples

Within Windows

>>> from ansys.tools.path import find_mapdl
>>> find_mapdl()
'C:/Program Files/ANSYS Inc/v211/ANSYS/bin/winx64/ansys211.exe', 21.1

Within Linux

>>> find_mapdl()
(/usr/ansys_inc/v211/ansys/bin/ansys211, 21.1)