Note
Go to the end to download the full example code.
Thermal Analysis#
Visualize the result of verification manual test 33.
from ansys.mapdl.reader import examples
Download the result file from verification manual test case 33
vm33 = examples.download_verification_result(33)
# get nodal thermal strain for result set 1
nnum, tstrain = vm33.nodal_thermal_strain(0)
# plot nodal thermal strain for result set 11 in the X direction
vm33.plot_nodal_thermal_strain(
10, "X", show_edges=True, lighting=True, cmap="bwr", show_axes=True
)

/home/runner/work/pymapdl-reader/pymapdl-reader/.venv/lib/python3.13/site-packages/ansys/mapdl/reader/rst.py:3044: PyVistaFutureWarning: The default value of `algorithm` for the filter
`UnstructuredGrid.extract_surface` will change in the future. It currently defaults to
`'dataset_surface'`, but will change to `None`. Explicitly set the `algorithm` keyword to
silence this warning.
mesh = grid.extract_surface()
Plot with contours
# Disable lighting and set number of colors to 10 to make an MAPDL-like plot
vm33.plot_nodal_thermal_strain(
10,
"X",
show_edges=True,
n_colors=10,
interpolate_before_map=True,
lighting=False,
show_axes=True,
)

/home/runner/work/pymapdl-reader/pymapdl-reader/.venv/lib/python3.13/site-packages/ansys/mapdl/reader/rst.py:3044: PyVistaFutureWarning: The default value of `algorithm` for the filter
`UnstructuredGrid.extract_surface` will change in the future. It currently defaults to
`'dataset_surface'`, but will change to `None`. Explicitly set the `algorithm` keyword to
silence this warning.
mesh = grid.extract_surface()
Total running time of the script: (0 minutes 0.551 seconds)