Mass on Spring Resonance

Post Reply
User avatar
Dutchman
Posts: 881
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Mass on Spring Resonance

Post by Dutchman »

A mass on or attached to a spring enters resonance upon being excited. Unlike a pendulum, its frequency does not depend on gravity. See http://hyperphysics.phy-astr.gsu.edu/hbase/shm2.html
The accompanying program provides a simulation of such a resonance. The program is suitable for iPad and iPhone. The following screenshots show, successively, the normal view on an iPad and, next to it, the view during the simulation of an iPhone.
iPad and simulated iPhone.jpg
iPad and simulated iPhone.jpg (46.81 KiB) Viewed 69 times
The iPhone simulation can optionally be activated by setting iPhoneTest=1 in the Presets.
Another option in the Presets is 'DoubleQuit'. If this is set to 1, the 'Quit' button will need to be pressed twice to end the program. In the meantime, you have the option to take a screenshot.
Mass on spring resonance .txt
(2.64 KiB) Downloaded 8 times

Henko
Posts: 847
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Mass on Spring Resonance

Post by Henko »

Nice graphics!
It would be really interesting to have a simulation of a system with two balls and two springs, the second spring “piggybacked* to the other.
If the spring constants and the ball masses could be set by sliders, interesting ball movements could be investigated.
The math of the two ball system is far more difficult, but it is not needed as the simulation uses very small time steps.
One can simply apply Newtons law F=m.a (or a=F/m) in this case) twice in each time step.

User avatar
Dutchman
Posts: 881
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Mass on Spring Resonance

Post by Dutchman »

That is too difficult for me ;)

davey110
Posts: 104
Joined: Mon Dec 26, 2016 11:01 pm
My devices: iPhone SE 2020
iPad mini 2
Flag: Canada

Re: Mass on Spring Resonance

Post by davey110 »

Sounds like a challenge. I may attempt it.

I did write a program of 1 or 2 satellites orbiting the earth using the same principle of small increments. It only uses the well known gravitational equations like F=g*M1*M2/d^2 and a=F/M to calculate a new position of the satellites at each moment in time with chosen starting parameters. I'll let you know if I do. For some reason I enjoy writing simulation programs.

User avatar
Dutchman
Posts: 881
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: Mass on Spring Resonance

Post by Dutchman »

davey110 wrote:
Fri Aug 28, 2026 4:17 am
Sounds like a challenge. I may attempt it.
I am very interested in your approach and the result. ;)

Post Reply