1 Pages (9 items)
Single pendulum with elastic spring (k) and friction (f) - Why I have an error (???) - Messages
#1 Posted: 11/1/2025 3:14:26 AM
Edited 11/1/2025 3:15:46 AM
#2 Posted: 11/1/2025 6:04:33 AM
Hi. With a spring pendulum you have 2 degrees of freedom, thus you need two generalized coords. Using this post: https://smath.com/en-US/forum/topic/AeeMSM/Using-differentials:



Spring_Pendulum_lagrangian.sm (120.05 KiB) downloaded 24 time(s).
Best regards.
Alvaro.



Spring_Pendulum_lagrangian.sm (120.05 KiB) downloaded 24 time(s).
Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 11/1/2025 7:22:30 AM
#3 Posted: 11/1/2025 7:22:14 AM
Is it not correct?
We have 2 degrees of freedom, but can use only one!
Pend-1-Hook.sm (16.68 KiB) downloaded 26 time(s).

We have 2 degrees of freedom, but can use only one!
Pend-1-Hook.sm (16.68 KiB) downloaded 26 time(s).

Edited 11/1/2025 8:38:01 AM
#4 Posted: 11/1/2025 8:39:40 AM
WroteIs it not correct?
It isn't. You can not determine the variable length only with the angle. You need another differential equation for the length. For example, see https://www.maplesoft.com/applications/Preview.aspx?id=4897

with this result:

The Viacheslav's ode solver It can't handle those types of equations with that degree of coupling yet. For that, you should use the dsol I created, which should be somewhere in the forum, or use al_nleqsolve within the D function as in the other examples, or some other technique for decoupling the system.
In this case, the Lagrangian is uncoupled, so it can be solved directly.
Also, remember that the total energy is the Hamiltonian, so this is probably the correct method for solving problems when the Lagrangian is coupled.
Best regards.
Alvaro.
1 users liked this post
Valery Ochkov 11/1/2025 10:47:16 AM
#5 Posted: 11/1/2025 9:17:26 AM
#6 Posted: 11/1/2025 3:47:34 PM
WroteI do not stretch or compress the spring before starting.
My case is one partical case of moution. Correct?

From your first file. In this example, you know the time law of Longitude, as in the first Maple example. While specifically here it's stationary (it doesn't depend directly on time, but on the angle, which does depend on time), the result is the same: you introduce a constraint, so the system's degrees of freedom are 1 instead of 2. This constraint on motion is imposed by an external force, which causes energy to flow into and out of the system, making the system's energy variable, which I understand is the original question.
However, for the system to be realistic, you need a way to control the length of the bar so that it shortens or lengthens according to the angle it forms with the vertical, which, by the way, is perfectly possible. But that system is precisely what will be modifying the total energy of the system.
Best regards.
Alvaro.
Edited 11/1/2025 3:48:43 PM
1 users liked this post
Valery Ochkov 11/1/2025 5:57:58 PM
#7 Posted: 11/1/2025 7:19:31 PM
Hi. Using the RKA file ( https://smath.com/en-US/files/Download/dZeevW/RKA.sm ) from https://smath.com/en-US/forum/topic/QWpkkQ/Mathcad-Toolbox both methods (Newton and Lagrange) for the spring pendulum. The code in RKA is, like the other one, just only in SMath, this is, it does not use maple nor maxima.


Spring_Pendulum_lagrangian.pdf (395.32 KiB) downloaded 22 time(s).
Spring_Pendulum_lagrangian.sm (271.1 KiB) downloaded 19 time(s).
Best regards.
Alvaro.


Spring_Pendulum_lagrangian.pdf (395.32 KiB) downloaded 22 time(s).
Spring_Pendulum_lagrangian.sm (271.1 KiB) downloaded 19 time(s).
Best regards.
Alvaro.
Edited 11/1/2025 7:21:12 PM
1 users liked this post
Valery Ochkov 11/4/2025 10:25:21 AM
#8 Posted: 11/2/2025 2:49:34 AM
Hi. Friction added, Newton and Lagrange parametrized methods.

Spring_Pendulum_with_friction.sm (275.88 KiB) downloaded 23 time(s).
Best regards.
Alvaro.

Spring_Pendulum_with_friction.sm (275.88 KiB) downloaded 23 time(s).
Best regards.
Alvaro.
1 users liked this post
sergio 11/2/2025 4:40:15 PM
#9 Posted: 11/3/2025 5:06:46 AM
1 Pages (9 items)
- New Posts
- No New Posts

