Tutorial - Static and Modal Analyses#

This is the second part of a basic tutorial on how to use ROSS (rotordynamics open-source software), a Python library for rotordynamic analysis. In this tutorial, you will learn how to run several rotordynamic analyzes with your rotor model.

To get results, we always have to use one of the .run_ methods available for a rotor object. These methods will return objects that store the analysis results and that also have plot methods available. These methods will use the plotly library to make graphs common to a rotordynamic analysis.

Rotor model#

First, let’s recover the rotor model built in the previous tutorial.

import ross as rs
import numpy as np

# Make sure the default renderer is set to 'notebook' for inline plots in Jupyter
import plotly.io as pio
import plotly.graph_objects as go

pio.renderers.default = "notebook"
c:\Users\vinic\OneDrive\Desktop\Digital_Twin\Github\ross\venv\Lib\site-packages\tqdm\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
rotor3 = rs.compressor_example()
node_increment = 5
rotor3.plot_rotor(nodes=node_increment)
C:\Users\vinic\OneDrive\Desktop\Digital_Twin\Github\ross\ross\rotor_assembly.py:4244: UserWarning:

File was created with ROSS 2.0.0, but current version is 2.1.0. This may lead to incompatibilities.

Rotor Analyses#

In the last tutorial we have learnt how to create a rotor model with Rotor class. Now, we’ll use the same class to run the simulation. There are some methods, most of them with the prefix run_ you can use to run the rotordynamics analyses.

For most of the methods, you can use the command .plot() to display a graphical visualization of the results (e.g run_campbel().plot(), run_modal().plot_mode_3d(mode)).

ROSS offers the following analyses:

  • Static analysis

  • Modal analysis

  • Campbell Diagram

Plotly library#

ROSS uses Plotly for plotting results. All the figures can be stored and manipulated following Plotly API.

The following sections present the results and how to return the Plotly Figures.

1.1 Static Analysis#

This method runs the static analysis for the rotor. It calculates the static deformation due to the gravity effects (shaft and disks weight). It also returns the bending moment and shearing force on each node, and you can return a free-body-diagram representation for the rotor, with the self weight, disks weight and reaction forces on bearings displayed.

1.1.1 Running static analysis#

To run the simulation, use the .run_static() method. You can define a variable to store the results.

Storing the results, it’s possible to return the following arrays:

  • disk_forces_nodal

  • disk_forces_tag

  • bearing_forces_nodal

  • bearing_forces_tag

  • disp_y

  • Vx

  • Bm

static = rotor3.run_static()

Returning forces#

Disk forces#

  • .disk_forces_nodal: Returns a dictionary specifying the node where the disk is located and the force value.

  • .disk_forces_tag: Returns a dictionary mapping each disk tag to its force value and the force value.

Bearing forces#

  • .bearing_forces_nodal: Returns a dictionary specifying the node where the bearing is located and the force value.

  • .bearing_forces_tag: Returns a dictionary mapping each bearing tag to its force value and the force value.

print("Disk forces - nodes")
print(rotor3.disk_forces_nodal)
print("")
print("Disk forces - tags")
print(rotor3.disk_forces_tag)

print("")
print("Bearing forces - nodes")
print(rotor3.bearing_forces_nodal)
print("")
print("Bearing forces - tags")
print(rotor3.bearing_forces_tag)
Disk forces - nodes
{'node_3': 148.2741036647235, 'node_20': 67.76283441291268, 'node_23': 67.95896417966495, 'node_26': 68.15509394641724, 'node_29': 68.44928859654566, 'node_32': 68.0570290630411, 'node_35': 68.25315882979338}

Disk forces - tags
{'Disk 0': 148.2741036647235, 'Disk 1': 67.76283441291268, 'Disk 2': 67.95896417966495, 'Disk 3': 68.15509394641724, 'Disk 4': 68.44928859654566, 'Disk 5': 68.0570290630411, 'Disk 6': 68.25315882979338}

Bearing forces - nodes
{'node_7': np.float64(1216.2827567757274), 'node_48': np.float64(1204.6514712823341)}

Bearing forces - tags
{'Bearing 0': np.float64(1216.2827567757274), 'Bearing 1': np.float64(1204.6514712823341)}

Other attributes from static analysis#

  • .Vx: Shearing force array

  • .Bm: Bending moment array

  • .deformation Displacement in Y direction

1.1.2 Plotting results#

With results stored, you can use some methods to plot the results. Currently, there’re four plots you can retrieve from static analysis:

  • .plot_free_body_diagram()

  • .plot_deformation()

  • .plot_shearing_force()

  • .plot_bending_moment()

Plotting free-body-diagram#

static.plot_free_body_diagram()

Plotting deformation#

static.plot_deformation()

Plotting shearing force diagram#

static.plot_shearing_force()

Plotting bending moment diagram#

static.plot_bending_moment()

1.3 Campbell Diagram#

Also called “whirl speed map” in rotordynamics, ROSS calculate and plots the modes’ damped eigenvalues and the logarithmic decrement as a function of rotor speed.

To run the Campbell Diagram, use the command .run_campbell(). The user must input an array of speeds, which will be iterated to calculate each point on the graph.

This method returns the damped natural frequencies, logarithmic decrement and the whirl values (values indicating the whirl direction: backward or forward).

1.3.1 Running campbell diagram#

In this example the whirl speed map is calculated for a speed range from 0 to 1000 rad/s (~9550 RPM).

Storing the results, it’s possible to return the following arrays:

  • wd

  • log_dec

  • whirl_values

Each value in these arrays is calculated for each speed value in speed_range

samples = 31
speed_range = np.linspace(315, 1150, samples)

campbell = rotor3.run_campbell(speed_range)
C:\Users\vinic\OneDrive\Desktop\Digital_Twin\Github\ross\ross\rotor_assembly.py:1349: UserWarning:

Extrapolating bearing coefficients. Be careful when post-processing the results.
# results for each frequency
frequency_index = 0
print(campbell.wd[:, frequency_index])
[0.00000000e+00 0.00000000e+00 0.00000000e+00 1.97079679e-01
 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
 0.00000000e+00 5.87933521e+02 8.00716372e+02 9.47503694e+02
 1.06026595e+03 1.15159909e+03 1.22805252e+03 1.29358503e+03
 1.35078774e+03 1.40142252e+03 1.44674232e+03 1.48766816e+03
 1.52489883e+03 1.55898864e+03 1.59038668e+03 1.61946274e+03
 1.64651178e+03 1.67176719e+03 1.69542610e+03 1.71765669e+03
 1.73860329e+03 1.75839043e+03 1.77712618e+03]
# results for each frequency
frequency_index = 1
print(campbell.log_dec[:, frequency_index])
[        inf         inf         inf         inf         inf         inf
         inf         inf 29.36930085 16.14606433 12.335636   10.335638
  9.05328079  8.14072907  7.44791766  6.89802863  6.44720605  6.06837731
  5.74376626  5.46114069  5.21184409  4.98966805  4.78997262  4.60919628
  4.44454196  4.29376948  4.15505682  4.02690007  3.90804208  3.79742041
  3.69412849]

1.3.2 Plotting results#

Now that the results are stored, use .plot() method to display the Campbell Diagram plot.

For the Campbell Diagram, you can plot more than one harmonic. As default, the plot display only the 1x speed option. Input a list with more harmonics to display it at the graph.

campbell.plot(harmonics=[0.5, 1])