Single pendulum with elastic spring (k) and friction (f)

Single pendulum with elastic spring (k) and friction (f) - Why I have an error (???) - Messages

#1 Posted: 11/1/2025 3:14:26 AM
Valery Ochkov

Valery Ochkov

62 likes in 652 posts.

Group: User

Why I have an error (???) in the sum energy?
Pendulum-PE-KE-SE.sm (71.29 KiB) downloaded 24 time(s).
Pendulum-PE-KE-SE.gif
Edited 11/1/2025 3:15:46 AM
#2 Posted: 11/1/2025 6:04:33 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,072 likes in 1,733 posts.

Group: User

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:

image.png

image.png

sp.gif

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
Valery Ochkov

Valery Ochkov

62 likes in 652 posts.

Group: User

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).
Pend-1-Hook.gif
Edited 11/1/2025 8:38:01 AM
#4 Posted: 11/1/2025 8:39:40 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,072 likes in 1,733 posts.

Group: User

Wrote

Is 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

image.png

with this result:

image.png

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
Valery Ochkov

Valery Ochkov

62 likes in 652 posts.

Group: User

I do not stretch or compress the spring before starting.
My case is one partical case of moution. Correct?
Start-Spring.png


Edited 11/1/2025 9:18:33 AM
#6 Posted: 11/1/2025 3:47:34 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,072 likes in 1,733 posts.

Group: User

Wrote

I do not stretch or compress the spring before starting.
My case is one partical case of moution. Correct?



image.png

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
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,072 likes in 1,733 posts.

Group: User

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.

image.png

image.png

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
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1,072 likes in 1,733 posts.

Group: User

Hi. Friction added, Newton and Lagrange parametrized methods.

image.png

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
  • New Posts
  • No New Posts