# ross.Orbit#

class ross.Orbit(*, node, node_pos, ru_e, rv_e)#

Class used to construct orbits for a node in a mode or deflected shape.

The matrix H contains information about the whirl direction, the orbit minor and major axis and the orbit inclination. The matrix is calculated by $$H = T.T^T$$ where the matrix T is constructed using the eigenvector corresponding to the natural frequency of interest:

$\begin{split}\begin{eqnarray} \begin{bmatrix} u(t)\\ v(t) \end{bmatrix} = \mathfrak{R}\Bigg( \begin{bmatrix} r_u e^{j\eta_u}\\ r_v e^{j\eta_v} \end{bmatrix}\Bigg) e^{j\omega_i t} = \begin{bmatrix} r_u cos(\eta_u + \omega_i t)\\ r_v cos(\eta_v + \omega_i t) \end{bmatrix} = {\bf T} \begin{bmatrix} cos(\omega_i t)\\ sin(\omega_i t) \end{bmatrix} \end{eqnarray}\end{split}$

Where $$r_u e^{j\eta_u}$$ e $$r_v e^{j\eta_v}$$ are the elements of the ith eigenvector, corresponding to the node and natural frequency of interest (mode).

$\begin{split}{\bf T} = \begin{bmatrix} r_u cos(\eta_u) & -r_u sin(\eta_u)\\ r_u cos(\eta_u) & -r_v sin(\eta_v) \end{bmatrix}\end{split}$
Parameters
nodeint

Orbit node in the rotor.

ru_ecomplex

Element in the vector corresponding to the x direction.

rv_ecomplex

Element in the vector corresponding to the y direction.

Methods

__init__(*, node, node_pos, ru_e, rv_e)#
calculate_amplitude(angle)#

Calculates the amplitude for a given angle of the orbit.

Parameters
anglefloat, str, pint.Quantity
Returns
amplitude, phasetuple

Tuple with (amplitude, phase) value. The amplitude units are the same as the ru_e and rv_e used to create the orbit.

Load results from a .toml file.

This function will load the simulation results from a .toml file. The file must have all the argument’s names and values that are needed to reinstantiate the class.

Parameters
filestr, pathlib.Path

The name of the file the results will be loaded from.

Examples

>>> # Example running a stochastic unbalance response
>>> from tempfile import tempdir
>>> from pathlib import Path
>>> import ross as rs
>>> # Running an example
>>> rotor = rs.rotor_example()
>>> freq_range = np.linspace(0, 500, 31)
>>> n = 3
>>> m = 0.01
>>> p = 0.0
>>> results = rotor.run_unbalance_response(n, m, p, freq_range)
>>> # create path for a temporary file
>>> file = Path(tempdir) / 'unb_resp.toml'
>>> results.save(file)
>>> abs(results2.forced_resp).all() == abs(results.forced_resp).all()
True

plot_orbit(fig=None)#

Read and parse data stored in a .toml file.

The data passed to this method needs to be according to the format saved in the .toml file by the .save() method.

Parameters

Returns
The result object.
save(file)#

Save results in a .toml file.

This function will save the simulation results to a .toml file. The file will have all the argument’s names and values that are needed to reinstantiate the class.

Parameters
filestr, pathlib.Path

The name of the file the results will be saved in.

Examples

>>> # Example running a unbalance response
>>> from tempfile import tempdir
>>> from pathlib import Path
>>> import ross as rs

>>> # Running an example
>>> rotor = rs.rotor_example()
>>> speed = np.linspace(0, 1000, 101)
>>> response = rotor.run_unbalance_response(node=3,
...                                         unbalance_magnitude=0.001,
...                                         unbalance_phase=0.0,
...                                         frequency=speed)

>>> # create path for a temporary file
>>> file = Path(tempdir) / 'unb_resp.toml'
>>> response.save(file)