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

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

#1 Publicado: 1/11/2025 3:14:26
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Why I have an error (???) in the sum energy?
Pendulum-PE-KE-SE.sm (71,29 KiB) descargado 1075 vez(es).
Pendulum-PE-KE-SE.gif
Editado 1/11/2025 3:15:46
#2 Publicado: 1/11/2025 6:04:33
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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) descargado 1088 vez(es).

Best regards.
Alvaro.
A 1 usuarios les gustó este mensaje
Valery Ochkov 1/11/2025 7:22:30
#3 Publicado: 1/11/2025 7:22:14
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Is it not correct?
We have 2 degrees of freedom, but can use only one!
Pend-1-Hook.sm (16,68 KiB) descargado 1045 vez(es).
Pend-1-Hook.gif
Editado 1/11/2025 8:38:01
#4 Publicado: 1/11/2025 8:39:40
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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.
A 1 usuarios les gustó este mensaje
Valery Ochkov 1/11/2025 10:47:16
#5 Publicado: 1/11/2025 9:17:26
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

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


Editado 1/11/2025 9:18:33
#6 Publicado: 1/11/2025 15:47:34
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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.

Editado 1/11/2025 15:48:43
A 1 usuarios les gustó este mensaje
Valery Ochkov 1/11/2025 17:57:58
#7 Publicado: 1/11/2025 19:19:31
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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) descargado 628 vez(es).

Spring_Pendulum_lagrangian.sm (271,1 KiB) descargado 1123 vez(es).

Best regards.
Alvaro.
Editado 1/11/2025 19:21:12
A 1 usuarios les gustó este mensaje
Valery Ochkov 4/11/2025 10:25:21
#8 Publicado: 2/11/2025 2:49:34
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Hi. Friction added, Newton and Lagrange parametrized methods.

image.png

Spring_Pendulum_with_friction.sm (275,88 KiB) descargado 1113 vez(es).

Best regards.
Alvaro.
A 1 usuarios les gustó este mensaje
sergio 2/11/2025 16:40:15
#9 Publicado: 3/11/2025 5:06:46
  • Nuevos mensajes
  • Sin mensajes nuevos