ross.Rotor.run_time_response

ross.Rotor.run_time_response#

Rotor.run_time_response(speed, F, t, method='default', **kwargs)#

Calculate the time response.

This function will take a rotor object and calculate its time response given a force and a time.

Available plotting methods:

.plot_1d() .plot_2d() .plot_3d()

Parameters:
speedfloat or array_like

Rotor speed. Automatically, the Newmark method is chosen if speed has an array_like type.

Farray

Force array (needs to have the same number of rows as time array). Each column corresponds to a dof and each row to a time.

tarray

Time array.

methodstr, optional

The Newmark method can be chosen by setting method=’newmark’.

**kwargsoptional

Additional keyword arguments can be passed to define the parameters of the Newmark method if it is used (e.g. gamma, beta, tol, …). See ross.utils.newmark for more details. Other keyword arguments can also be passed to be used in numerical integration (e.g. num_modes, add_to_RHS). See Rotor.integrate_system for more details.

Returns:
resultsross.TimeResponseResults

For more information on attributes and methods available see: ross.TimeResponseResults

Examples

>>> from ross.probe import Probe
>>> rotor = rotor_example()
>>> speed = 500.0
>>> size = 1000
>>> node = 3
>>> probe1 = Probe(3, 0)
>>> t = np.linspace(0, 10, size)
>>> F = np.zeros((size, rotor.ndof))
>>> F[:, rotor.number_dof * node + 0] = 10 * np.cos(2 * t)
>>> F[:, rotor.number_dof * node + 1] = 10 * np.sin(2 * t)
>>> response = rotor.run_time_response(speed, F, t)
>>> response.yout[:, rotor.number_dof * node + 1] 
array([ 0.00000000e+00,  1.86686693e-07,  8.39130663e-07, ...
>>> # plot time response for a given probe:
>>> fig1 = response.plot_1d(probe=[probe1])
>>> # plot orbit response - plotting 2D nodal orbit:
>>> fig2 = response.plot_2d(node=node)
>>> # plot orbit response - plotting 3D orbits - full rotor model:
>>> fig3 = response.plot_3d()