petrobras / ross

ROSS is a library written in Python for rotordynamic analysis.
https://ross.readthedocs.io
Apache License 2.0
131 stars 102 forks source link

Plot Mode 2D #1097

Open hserdogan94 opened 2 months ago

hserdogan94 commented 2 months ago

I found out in the plot_mode_2d function, the mode shapes didn't show the negative displacements, it would be more clear if there is possibility to add it. If I am not mistaken.

image image

Thank you again for the excellent software.

Best regards,

Hasan

ViniciusTxc3 commented 1 month ago

Hi @hserdogan94, currently in the plot_mode_2d function the orientation in default is "major", where the orbit is considered positive. It is also possible to change this orientation to "x" or "y". This way it is possible to see the plot in other projections. I believe this can solve your case.

Example:

import ross as rs

rotor = rs.compressor_example()
rotor_speed = 1000.0 # rad/s
modal = rotor.run_modal(rotor_speed)
mode = 1
modal.plot_mode_2d(mode).show()
modal.plot_mode_2d(mode, orientation='x').show()
modal.plot_mode_3d(mode).show()

In future versions, we may change the plotting format to "major" to accommodate this visualization.