.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/01-cyclic_results/sector_model.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_01-cyclic_results_sector_model.py: .. _ref_sector_model: Cyclic Model Visualization ~~~~~~~~~~~~~~~~~~~~~~~~~~ Visualize and animate a full cyclic model. This model is based on the jetcat rotor. First, load the rotor. Notice how printing the rotor class reveals the details of the rotor result file. .. GENERATED FROM PYTHON SOURCE LINES 12-19 .. code-block:: Python # sphinx_gallery_thumbnail_number = 2 from ansys.mapdl.reader import examples rotor = examples.download_sector_modal() print(rotor) .. rst-class:: sphx-glr-script-out .. code-block:: none PyMAPDL Result Units : User Defined Version : 15.0 Cyclic : True Result Sets : 48 Nodes : 460 Elements : 210 Available Results: EMS : Miscellaneous summable items (normally includes face pressures) ENF : Nodal forces ENS : Nodal stresses ENG : Element energies and volume EEL : Nodal elastic strains ETH : Nodal thermal strains (includes swelling strains) EUL : Element euler angles EPT : Nodal temperatures NSL : Nodal displacements RF : Nodal reaction forces .. GENERATED FROM PYTHON SOURCE LINES 20-25 Plot the rotor and rotor sectors Note that additional keyword arguments can be passed to the plotting functions of ``pymapdl-reader``. See ``help(pyvista.plot`` for the documentation on all the keyword arguments. .. GENERATED FROM PYTHON SOURCE LINES 25-29 .. code-block:: Python rotor.plot_sectors(cpos="xy", smooth_shading=True) rotor.plot() .. rst-class:: sphx-glr-horizontal * .. image-sg:: /examples/01-cyclic_results/images/sphx_glr_sector_model_001.png :alt: sector model :srcset: /examples/01-cyclic_results/images/sphx_glr_sector_model_001.png :class: sphx-glr-multi-img * .. image-sg:: /examples/01-cyclic_results/images/sphx_glr_sector_model_002.png :alt: sector model :srcset: /examples/01-cyclic_results/images/sphx_glr_sector_model_002.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 30-34 Plot nodal displacement for result 21. Note that pymapdl-reader uses 0 based cumulative indexing. You could also use the (load step, sub step) ``(4, 3)``. .. GENERATED FROM PYTHON SOURCE LINES 34-39 .. code-block:: Python rotor.plot_nodal_displacement( 20, show_displacement=True, displacement_factor=0.001, overlay_wireframe=True ) # same as (2, 4) .. image-sg:: /examples/01-cyclic_results/images/sphx_glr_sector_model_003.png :alt: sector model :srcset: /examples/01-cyclic_results/images/sphx_glr_sector_model_003.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 40-43 Animate Mode 21 ~~~~~~~~~~~~~~~ Disable movie_filename and increase n_frames for a smoother plot .. GENERATED FROM PYTHON SOURCE LINES 43-52 .. code-block:: Python rotor.animate_nodal_solution( 20, loop=False, movie_filename="rotor_mode.gif", background="w", displacement_factor=0.001, add_text=False, n_frames=30, ) .. image-sg:: /examples/01-cyclic_results/images/sphx_glr_sector_model_004.gif :alt: sector model :srcset: /examples/01-cyclic_results/images/sphx_glr_sector_model_004.gif :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pyvista/plotting/plotter.py:4644: PyVistaDeprecationWarning: This method is deprecated and will be removed in a future version of PyVista. Directly modify the scalars of a mesh in-place instead. warnings.warn( [(5.52155060432921, 5.5214282518334326, 5.110814907184016), (3.164628201712816e-07, -0.00012203603295768417, -0.41073538068237303), (0.0, 0.0, 1.0)] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 6.613 seconds) .. _sphx_glr_download_examples_01-cyclic_results_sector_model.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: sector_model.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: sector_model.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: sector_model.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_