Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion docs/user_guide/tutorial_analyses_part_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4663,7 +4663,47 @@
"\n",
"- `.plot_2d()`: plot orbit of a selected node of a rotor system.\n",
"\n",
"- `.plot_3d()`: plot orbits for each node on the rotor system in a 3D view."
"- `.plot_3d()`: plot orbits for each node on the rotor system in a 3D view.\n",
"\n",
"The plotting methods can also select a time window without rerunning the simulation. The limits are given in seconds and are applied to the stored response after `run_time_response()` finishes.\n",
"\n",
"For a regular time window, provide both `t_initial` and `t_final`:\n",
"\n",
"```python\n",
"response3.plot_1d(\n",
" probe=[probe1, probe2],\n",
" t_initial=4.0,\n",
" t_final=8.0,\n",
")\n",
"\n",
"response3.plot_2d(\n",
" node=26,\n",
" t_initial=4.0,\n",
" t_final=8.0,\n",
")\n",
"\n",
"response3.plot_3d(t_initial=4.0, t_final=8.0)\n",
"```\n",
"\n",
"Time limits can also be passed with units, for example `Q_(500, \"ms\")`.\n",
"\n",
"To select one complete cycle, use `one_cycle=True`. Because the scalar `speed` supplied to `run_time_response()` is stored in the result, the known rotor speed is used to determine the period:\n",
"\n",
"```python\n",
"# Last complete cycle of the response\n",
"response3.plot_1d(probe=[probe1, probe2], one_cycle=True)\n",
"response3.plot_2d(node=26, one_cycle=True)\n",
"response3.plot_3d(one_cycle=True)\n",
"```\n",
"\n",
"A cycle can be anchored by providing only one boundary. With `t_initial`, the cycle starts at that time; with `t_final`, the cycle ends at that time:\n",
"\n",
"```python\n",
"response3.plot_2d(node=26, one_cycle=True, t_initial=8.0)\n",
"response3.plot_3d(one_cycle=True, t_final=12.0)\n",
"```\n",
"\n",
"Do not provide both `t_initial` and `t_final` together with `one_cycle=True`. Use a regular time window when both boundaries must be fixed explicitly."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion ross/multi_rotor/multi_rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ def run_time_response(self, speed, F, t, method="default", **kwargs):
"""
if self.mesh.backlash:
t_, yout, xout = self.time_response(speed, F, t, method=method, **kwargs)
results = BacklashResults(self, t, yout, xout)
results = BacklashResults(self, t, yout, xout, speed=speed)
else:
results = super().run_time_response(speed, F, t, method=method, **kwargs)

Expand Down
6 changes: 4 additions & 2 deletions ross/multi_rotor/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class BacklashResults(TimeResponseResults):
System response.
xout : array
Time evolution of the state vector.
speed : float or array_like, optional
Rotor speed used to calculate the response, in rad/s.

Attributes
----------
Expand Down Expand Up @@ -103,8 +105,8 @@ class BacklashResults(TimeResponseResults):
},
}

def __init__(self, rotor, t, yout, xout):
super().__init__(rotor, t, yout, xout)
def __init__(self, rotor, t, yout, xout, speed=None):
super().__init__(rotor, t, yout, xout, speed=speed)

min_dt = np.diff(self.t).min()

Expand Down
Loading
Loading