ross.Rotor.run_harmonic_balance_response
Contents
ross.Rotor.run_harmonic_balance_response#
- Rotor.run_harmonic_balance_response(speed, t, harmonic_forces, gravity=False, n_harmonics=1)#
Compute the steady-state response of the rotor using the Harmonic Balance method.
- Parameters:
- speedfloat, pint.Quantity
Rotational speed of the rotor (rad/s).
- tarray_like
Time vector (s).
- harmonic_forceslist of dict
List of harmonic force definitions. Each dictionary should contain the following keys:
- ‘node’: int
Node index where the force is applied.
- ‘magnitudes’: list, float
List of excitation magnitudes. Interpretation depends on the type of excitation:
For direct harmonic forces: force amplitudes (N).
For unbalance-type excitations:
m * e * speed**2(N),
where
mis the unbalance mass (kg) andeis the eccentricity (m).
- ‘phases’: list of float
List of phase angles (rad).
- ‘harmonics’: list of int
List of harmonic orders (1 for fundamental, 2 for second, etc.).
- gravitybool, optional
If True, include the effect of gravity in the response. Default is False.
- n_harmonicsint, optional
Number of harmonics to consider in the Harmonic Balance solution. Default is 1 (only fundamental harmonic is considered).
- Returns:
- resultsross.results.HarmonicBalanceResponse
Object containing the steady-state response.
Examples
>>> import ross as rs >>> from ross.probe import Probe >>> rotor = rs.rotor_example() >>> speed = 200.0 >>> unb_node = 3 >>> unb_mag = 0.05 * speed**2 >>> unb_phase = 0.0 >>> unb_harmonic = 1 # For unbalance, always 1x >>> results = rotor.run_harmonic_balance_response( ... speed=200.0, ... t=np.linspace(0, 0.5, 1001), ... harmonic_forces=[{ ... "node": unb_node, ... "magnitudes": [unb_mag], ... "phases": [unb_phase], ... "harmonics": [unb_harmonic], ... }], ... gravity=False, ... n_harmonics=1, ... ) >>> time_resp = results.get_time_response() >>> probe1 = Probe(3, 0) >>> # plot time response for a given probe: >>> fig1 = time_resp.plot_1d(probe=[probe1]) >>> # plot dfft: >>> fig2 = time_resp.plot_dfft(probe=[probe1])