Skip to main content

Timeline for Animating a 2D MDOF system

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
Jul 3, 2021 at 8:16 comment added Martin Trcek Now the animation runs smoothly. Again thanks for all your help
Jul 2, 2021 at 17:54 comment added Domen You can precompute the frames: frames = Table[Evaluate@Show[...], {t, 0, 10, .1}] and then use ListAnimate[frames]. You can also export the animation to a .gif or a movie file with Export["animation.gif", frames].
Jul 2, 2021 at 14:41 comment added Martin Trcek Oh okay then thats about everything. This is the exact model I've been looking for. Thank you you've been a massive help. I do have one final question though. When i run the code on my computer the program mathematica becomes extremely laggy. Would it be possible to smooth out the animation?
Jul 2, 2021 at 14:39 comment added Domen As you can see in the code (and in the animation), the left end of the first beam has fixed coordinates $(x_0, y_0) = (0,0)$. This means that the first beam is rotating around the support on the left.
Jul 2, 2021 at 14:28 comment added Martin Trcek Okay now almost everything is as I have imagined it. However have you drawn the first beam to revolve around its mass centre aswell? Because it should revolve around The support on the left.
Jul 2, 2021 at 13:03 comment added Domen I haven't explicitly mentioned this before: as you can see, I draw the beams by providing their endpoints. That is why there is no $1/2$ in my coordinates. Your coordinates provide the positions of beam midpoints. As for the angle: if angles are measured in absolute frame (from the horizontal) as sketched in your drawing, then I think my derivation is correct. The $y$-component of the last beam has to be 0 (at the same height as the left support): $y_1+y_2+y_3=0 \implies L_1 \sin\varphi_1 + L_2 \sin\varphi_2 + L_3 \sin\varphi_3 = 0$.
Jul 2, 2021 at 11:34 comment added Martin Trcek This is how the animation should look, however the coordinates are still not correct. The correct coordinates definitions are: X2 = X1 + (L2 Cos[[Phi]2[t]])/2; Y2 = Y1 + (L2 Sin[[Phi]2[t]])/2, X3 = X1+L2 Cos[[Phi]2[t]] + ((L3 Cos[[Phi]3[t]]))/2, Y3 = Y1+L2 Sin[[Phi]2[t]]+ (L3 Sin[[Phi]3[t]]))/2. Also the definition of [Phi]3 is somewhat strange to me.
Jul 2, 2021 at 9:35 comment added Domen I think I have found the correct definition of $\varphi_3$ and the coordinates, so I have edited my first answer. Let me know if this is what you have been looking for.
Jul 2, 2021 at 9:34 history edited Domen CC BY-SA 4.0
Corrected the answer.
Jul 1, 2021 at 16:45 comment added Martin Trcek The rotation of second and the third beam is revolving around the centre of mass of each beam so the coordinates change to X2 = X1 + (L2 Cos[[Phi]2[t]])/2; X3 = X2 + (L3 Cos[[Phi]3[t]])/2. This is likely the coordinate problem as im fairly certain the DE's are correct.
Jul 1, 2021 at 16:35 comment added Domen This is the same way as I have defined the coordinates in my attempt. But as you can see, the right end of the third beam also has some vertical ($y$) movement. According to your drawing, this should not be happening, because it is constrained to horizontal movement. So, there is probably a mistake somewhere, either in the differential equations or in the definition of coordinates ...
Jul 1, 2021 at 16:17 comment added Martin Trcek These are the coordinates in XY expressed with angles. They are placed where the torsion springs are. [X1(Kt1)=L1*Cos(φ1), Y1Kt1)=L1*Sin(φ1), X2(Kt2)=L1*Cos(φ1)+L2*Cos(φ2), Y2Kt1)=L1*Sin(φ1)+L2*Sin(φ2)].
Jul 1, 2021 at 16:09 comment added Domen Sure, but can you just write down first how the $x$ and $y$ coordinates of the joints are expressed by the angles $\varphi$?
Jul 1, 2021 at 15:57 comment added Martin Trcek thank you this solution is very helpful. Would it also be possible to add a roller support on the right side that allows motion in X dimension olny?
Jul 1, 2021 at 15:51 history answered Domen CC BY-SA 4.0