This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
rotationaxis [2020/06/05 17:26] marijn.nijenhuis |
rotationaxis [2020/06/05 18:14] (current) marijn.nijenhuis |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Example: Visualizing the effective rotation axis of a rigid body in an eigenmode ===== | ===== Example: Visualizing the effective rotation axis of a rigid body in an eigenmode ===== | ||
- | When a rigid body is rotating, there will be an effective axis around which that rotation is taking place. This axis may pass through the rigid body, but it could also be located entirely outside the body. | + | When a rigid body is rotating, there is an effective axis around which that rotation is taking place. This axis may pass through the rigid body, but it could also be located entirely outside the body. |
When analyzing the eigenmodes of a system, some modes may show significant motion of rigid bodies. Other modes may show mostly flexible deformation, | When analyzing the eigenmodes of a system, some modes may show significant motion of rigid bodies. Other modes may show mostly flexible deformation, | ||
- | [{{:: | + | [{{:: |
- | [{{:: | + | [{{:: |
- | For the interpretation of the rigid body motion in an eigenmode, it can be helpful to visualize the effective axis of rotation. This can be done in a post-processing step, following a SPACAR Light simulation, using standard MATLAB plotting commands and a custom script: {{ : | + | For the interpretation of the rigid body motion in an eigenmode, it can be helpful to visualize the effective axis of rotation. This can be done in a post-processing step, following a SPACAR Light simulation, using standard MATLAB plotting commands and a custom script: {{ : |
- | In the MATLAB | + | In the main model script, after '' |
<code matlab> | <code matlab> | ||
Line 33: | Line 33: | ||
For plotting, the following lines of code can be used: | For plotting, the following lines of code can be used: | ||
<code matlab> | <code matlab> | ||
- | %mark the node that was provided using a black dot | + | %mark the node that was provided, using a black dot |
plot3(ah, | plot3(ah, | ||
Line 45: | Line 45: | ||
</ | </ | ||
- | Here, we're using the standard MATLAB plotting command '' | + | Here, we're using the standard MATLAB plotting command '' |
+ | The results for two eigenmodes are shown in the figures below. Node 3 was used, which is one of the nodes connected to the dark blue rigid body stage of the cross-hinge mechanism, and indicated by the black dot. | ||
+ | |||
+ | [{{:: | ||
+ | [{{:: | ||
+ | |||
+ | |||
+ | A few remarks: | ||
+ | * This visualization code is rather crude, in the sense that it's a direct overlay on top of the Spavisual window. We're just computing the coordinates of a line and inserting it into an existing figure. There is no interaction with the Spavisual buttons. So, make sure that the eigenmode you're viewing in Spavisual is the same as the mode that you plotted the rotation axis for. | ||
+ | * If the specified node does not actually rotate in the specified eigenmode, there is no rotation and there will be no effective axis. Calls to '' | ||
+ | * Simulation results in general may be displayed in various load steps (e.g. if a command like '' | ||
+ | * It is possible that the motion of a rigid body consists of //both// a rotation about an effective axis //and// a simultaneous translation along that same axis: the rigid body then makes a screw motion. In this case, the script //will return// the effective axis. | ||
+ | |||
<code matlab rotaxis_example.m> | <code matlab rotaxis_example.m> | ||
Line 129: | Line 141: | ||
[screwaxis, | [screwaxis, | ||
- | %mark the node that was provided using a black dot | + | %mark the node that was provided, using a black dot |
plot3(ah, | plot3(ah, | ||