ROSS-Rotordynamic Open Source Software

1 Petrobras Petróleo Brasileiro S.A. 2 Universidade Federal do Rio de Janeiro, Department of Mechanical Engineering, Rio de Janeiro, Brazil 3 Universidade Federal do Rio de Janeiro, Graduate Program in Informatics, Rio de Janeiro, Brazil 4 Universidade Federal do Rio de Janeiro, Department of Electrical Engineering, Rio de Janeiro, Brazil 5 Universidade Federal do Rio de Janeiro, Department of Computer Science, Rio de Janeiro, Brazil DOI: 10.21105/joss.02120


Summary
There are several categories of critical rotating equipment crucial to industry, such as compressors, pumps, and turbines. Computational mechanical models aim to simulate the behavior of such mechanical systems and these models are used to support research and decision making. To this purpose, we present ROSS, an open source library written in Python for rotordynamic analysis.
Existing tools that have rotordynamic functionalities include commercial finite element software with rotordynamic modules ("ANSYS -Mechanical Rotordynamics," 2019; "COMSOL -Rotordynamics Module," 2019), packages based on proprietary runtimes (MATLAB) ("Dynamics of Rotating Machines," 2019; "MADYN 2000," 2019), and some standalone tools ("ROTORINSA," 2019; "XLTRC2," 2019). To use all of these options however requires the purchase of a license and they are not intended to be developed in an open, collaborative manner. Additionally for some of these commercial packages, the user is 'locked in' to the environment, interacting with the software only through a graphical user interface, which makes it harder (impossible sometimes) to automate analysis.
To our knowledge, ROSS is the first software being developed using the open source paradigm in rotordynamic field, with the code being clearly licensed and fully available on code hosting platforms, issues tracked online, and the possibility of direct contribution by the community.
ROSS allows the construction of rotor models and their numerical simulation. Shaft elements, as a default, are modeled with the Timoshenko beam theory (Hutchinson, 2001), which considers shear and rotary inertia effects, and discretized by means of the Finite Element Method (Friswell, Penny, Garvey, & Lees, 2010). Disks (impellers, blades, or other equipment attached to the rotor) are assumed to be rigid bodies, thus their strain energy is not taken into account and only the kinetic energy due translation and rotation is calculated. We can obtain the mass and gyroscopic matrices by applying Lagrange's equations to the total kinetic energy.
The mass matrix is given by: 1 The gyroscopic matrix is given by: Where: • m d is the disk mass; • I d is the diametral moment of inertia; • I p is the polar moment of inertia.
For most types of bearing, the load-deflection relationship is nonlinear. Furthermore, loaddeflection relationships are often a function of shaft speed (i.e K e = K e (ω) and C e = C e (ω)).
To simplify dynamic analysis, one widely used approach is to assume that the bearing has a linear load-deflection relationship. This assumption is reasonably valid, provided that the dynamic displacements are small (Friswell et al., 2010). Thus, the relationship between the forces acting on the shaft due to the bearing and the resultant velocities and displacements of the shaft may be approximated by: where f x and f y are the dynamic forces in the x and y directions, and u and v are the dynamic displacements of the shaft journal relative to the bearing housing in the x and y directions.
After defining the element matrices, ROSS performs the assembling of the global matrices and the general form of the equation of the system is

Mq(t) + C(Ω)q(t) + ωGq(t) + K(Ω)q(t)
where: • q is the generalized coordinates of the system (displacements and rotations); • M is the mass matrix; • K is the stiffness matrix; • C is the damping matrix; • G is the gyroscopic matrix; • Ω is the excitation frequency; • ω is the rotor whirl speed; • f is the generalized force vector.
After building a model with ROSS, the user can plot the rotor geometry, run simulations, and obtain results in the form of graphics. ROSS can perform several analyses, such as static analysis, whirl speed map, mode shapes, frequency response, and time response.
ROSS is extensible and new elements, such as different types of bearings or seals, can be added to the code. As an example, one can add a class for a tapered roller bearing by inheriting from BearingElement. The implementation of the BallBearingElement in our code uses this strategy.
Other elements that require more customization can be added by inheriting directly from Element, in this case it is necessary to implement the required methods that should return the element's mass, stiffness, damping, and gyroscopic matrices.
We have built the package using main Python packages such as NumPy (Walt, Colbert, & Varoquaux, 2011) for multi-dimensional arrays, SciPy (Virtanen et al., 2020) for linear algebra, optimization, interpolation and other tasks and Bokeh (Bokeh Development Team, 2019) for creating interactive plots. Developing the software using Python and its scientific ecosystem enables the user to also make use of this ecosystem, making it easier to run rotordynamics analysis. It is also easier to integrate the code into other programs, since we only use open source packages and do not depend on proprietary commercial platforms.
Besides the documentation, a set of Jupyter Notebooks are available for the tutorial and some examples. Users can also access these notebooks through a Binder server.
As an example, Figure 1 shows a centrifugal compressor modeled with ROSS. The shaft elements are in gray, the impellers represented as disks are in blue and the bearings are displayed as springs and dampers. This plot is generated with Bokeh, and we can use the hover tool to get additional information for each element.
One analysis that can be carried out is the modal analysis. Figure 2 shows the whirl speed map (Campbell Diagram) generated for this compressor; the natural frequencies and the log dec vary with the machine rotation speed. The whirl speed map is one of the results that can be obtained from the model, other types of analyses can be found in the documentation.
ROSS has been used to evaluate the impact of damper seal coefficients uncertainties in a compressor rotordynamics (Timbó & Ritto, 2019). Other projects are also using ROSS to test machine learning algorithms that can diagnose machine failure. Here we can create a model with some problem such as unbalance or misalignment and then use the output data from this model to test the learning algorithm and check the accuracy of this algorithm in diagnosing the problem.