Registry / data / ansys-mapdl-reader

ansys-mapdl-reader

JSON →
library0.56.0pypypi✓ verified 84d ago

Pythonic interface to read binary and ASCII result files (RST, RTH, etc.) generated by Ansys MAPDL. Version 0.55.2 supports Python 3.10+ and integrates with PyVista for 3D visualization. Active development under the PyAnsys project, with monthly releases.

pip install ansys-mapdl-reader
INSTALL
IMPORT
SIG · ANSYS-MAPDL-READER
A
ansys-mapdl-reader
datapythonv0.56.0
Install
15.3s avg
Import
4290ms
Disk
820MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.56.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 15.3s · import 3.432s · 858MB
820MB installed
● package 820MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Archive
from ansys.mapdl.reader import Archive
Direct import path
ResultFile
from ansys.mapdl.reader import ResultFile
Main class for reading RST files

Open a MAPDL result file and inspect basic properties.

from ansys.mapdl.reader import ResultFile # Replace with your MAPDL result file path rst = ResultFile('file.rst') print(rst) print('Number of results:', rst.n_results) # Get mesh and solution at a specific result set mesh = rst.mesh result = rst.result(0) # first set print('Nodal displacements shape:', result.nodal_displacement.shape)
ansys-mapdl-reader --version
Debug
Known issues
gotchaReading files generated by MAPDL versions prior to 2021 R1 may require explicit encoding or handling of legacy binary formats. Use `ResultFile('file.rst', read_mesh=True)` to force mesh reading.
fix
Pass `read_mesh=True` to constructor for older files.
affects: >=0.50.0
deprecatedThe `save_as_vtk` method is deprecated in favor of using PyVista's `save` functionality. Direct VTK file export via this method may be removed in future releases.
fix
Use `rst.plot()` or `rst.to_pyvista().save('output.vtk')` instead.
affects: >=0.52.18
gotchaPlotting with Trame (web-based) requires additional setup. Ensure you have `trame` and `trame-vtk` installed, and set `PV_PLOT_USE_TRAME=true` or use the `use_trame` parameter.
fix
Install with `pip install trame trame-vtk` and either set environment variable or pass `use_trame=True` to plotting functions.
affects: >=0.53.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'ansys.mapdl'
Library not installed or conflicting with old 'pymapdl-reader' package.
fix
Run `pip install ansys-mapdl-reader`. If you had the old `pymapdl-reader`, uninstall first: `pip uninstall pymapdl-reader`.
AttributeError: 'NoneType' object has no attribute 'nodal_displacement'
Trying to access results on an unread or empty result set.
fix
Ensure the file exists and is not corrupted. Check `rst.n_results > 0` before accessing results.
ValueError: could not convert string to float: '...'
Incorrect file format or corrupted header in ASCII result files (e.g., .rst converted incorrectly).
fix
Verify the file is a valid MAPDL binary result file. If it's ASCII, use `ResultFile('file.rst', mode='ascii')`.
Upgrade
Version history
0.56.0latest on PyPI · released May 19, 2026
Audit
Dependencies
pyvistarequiredPrimary 3D visualization backend
vtkrequiredVTK is required for many operations
numpyrequiredArray handling
trameoptionalWeb-based plotting (optional)
Agent activity
56 hits · last 30 days
node
48
OpenAI (training)
1
Resources