Ejemplo n.º 1
0
HAS_FFMPEG = True
try:
    import imageio_ffmpeg
except:
    HAS_FFMPEG = False


path = os.path.dirname(os.path.abspath(__file__))
testfiles_path = os.path.join(path, 'testfiles')
cyclic_testfiles_path = os.path.join(path, 'cyclic_reader')
cys12_path = os.path.join(testfiles_path, 'cyc12')
academic_path = os.path.join(cyclic_testfiles_path, 'academic_rotor')

# modal result z axis
try:
    result_z = pyansys.download_sector_modal()
    result_z.positive_cyclic_dir = True
except:
    result_z = None

skip_with_no_xserver = pytest.mark.skipif(not system_supports_plotting(),
                                          reason="Requires active X Server")


# static result x axis
@pytest.fixture(scope='module')
def academic_rotor():
    from pyansys.cyclic_reader import CyclicResult
    filename = os.path.join(academic_path, 'academic_rotor.rst')
    return CyclicResult(filename)
Ejemplo n.º 2
0
"""
.. _ref_sector_model:

Cyclic Model Visualization
~~~~~~~~~~~~~~~~~~~~~~~~~~

Visualize a full cyclic model

"""
# sphinx_gallery_thumbnail_number = 2

import pyansys

###############################################################################
# load a sector modal analysis file
rotor = pyansys.download_sector_modal()
rotor._positive_cyclic_dir = True  # necessary for this example
print(rotor)

###############################################################################
# plot the rotor
rotor.plot(smooth_shading=False)


###############################################################################
# plot nodal displacement for result 10
rotor.plot_nodal_displacement(9)


###############################################################################
# animate mode 11