- #1
ultrapowerpie
- 58
- 0
Homework Statement
Create a Virtual Slinky with Python (or Excel)
Homework Equations
F=-k*deltaT
F= MA
a whole bunch of other stuff (below)
The Attempt at a Solution
So, essentially, for a "grandiose math modeling/applied physics project I need to complete a seminar course, I have been tasked with making a pseudo-slinky with a mass-spring system instead!
http://ars.els-cdn.com/content/image/1-s2.0-S0045794910002968-gr1.jpg
See A? That's essentially what it's supposed to be like, except the wall points are just more masses instead.
To keep things simple, all masses are uniform and we're only concerned with 2D motion (x and y dirction)
SO, I need help essentially constructing said virtual psuedo-slink. Technically I only need for output the magical S (position) function, which essentially is S(x,y,t,N), where x and y are coordinate positions, t is time and N is the mass block (N1, N2, too Nk).
So the program is essentially a bunch of recursive functions that simulate the movement of the mass blocks based on an external force applied to the system (one push/pull)
So, essentially, to start out the program will ask the following user input:
Number of Mass Blocks:
K-value of springs:
Length of Spring:
How long do you want the simulation to run (Max T value):
(Number of springs is Number of Blocks-1)
For output would be the position of the blocks, but if it could actually visually display the stuff that'd be fantastic.
Now one problem is that I'm a newbie when it comes to Python, but this is the Physics Help forum, so I've come here asking for help/guidance on generating said slinky with recurssive programs/loops and whanot. IE, what formula to use, what to reference where, etc.
And if anyone actually knows Python that's a bonus but I'm mainly here to get the actual math/physics of it right before I even begin trying to play with a new language/excel spreadsheets.
So thanks for any help!