Spring Force: Difference between revisions

From Physics Book
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:
===A Computational Model===
===A Computational Model===


How do we visualize or predict using this topic. Consider embedding some vpython code here [https://trinket.io/glowscript/31d0f9ad9e Teach hands-on with GlowScript]
A GlowScript model of a spring that prints out the spring force vector: [https://trinket.io/glowscript/9c8718bb1a]
 
<code lang="py">
#GlowScript 1.1 VPython
L0 = 0.1 #the relaxed length of the spring
ks = 15 #spring constant
#plate holding spring end
plate= box(pos=vec(-.1,0,0), size=vec(.005,.1,.1))
# ball and spring objects
ball=sphere(pos=vec(-L0+.1,0,0), radius=0.02, color=color.red, make_trail=true)
spring=helix(pos=plate.pos, axis=ball.pos-plate.pos, radius=.02, coils=10)
ball.m = 0.1 #mass of the ball in kg
ball.p = ball.m * vec(0.5,0,0) #initial momentum
t = 0 #time
dt = 0.01 #size of the time step
#loops forever
while True:
    rate(10) #100 calculations per second
   
    #length of the spring
    L = ball.pos - plate.pos
   
    #spring force
    Fs = -ks * (mag(L) - L0) * norm(L)
   
    #update the momentum of the ball
    ball.p = ball.p + Fs * dt
   
    #update the position of the ball
    ball.pos= ball.pos + ball.p * dt / ball.m
   
    #update the spring
    spring.axis = ball.pos - plate.pos
   
    print(Fs)
</code >


==Examples==
==Examples==

Revision as of 22:08, 5 December 2015

Claimed by Arjun Chib

Spring Force is the non-constant, elastic force exerted by a spring upon a system.

The Main Idea

The spring force models the force in a system due to the presence of a stretched or compressed spring. This force is based upon two factors of the spring: the spring's stiffness and the distance the spring has been stretched. The spring's stiffness is a constant that represents how much force is required to stretch or compress a spring over a certain distance.


A Mathematical Model

The magnitude of the spring force is represented by the equation [math]\displaystyle{ \vert \vec{F}_{spring} \vert = k_s \vert s \vert }[/math], where [math]\displaystyle{ \vert s \vert }[/math] is the absolute value of the stretch of the spring [math]\displaystyle{ s = L - L_0 }[/math].


[math]\displaystyle{ L_0 }[/math] is the relaxed length of the spring, when the spring is neither stretched nor compressed.
[math]\displaystyle{ L }[/math] is the length that the spring after it has been stretched or compressed.
[math]\displaystyle{ k_s }[/math] is the spring stiffness, which is a constant inherent to the property of the spring.


The spring force can also be modeled as a vector by the equation [math]\displaystyle{ \vec{F}_{spring} = -k_s s \hat{L} }[/math], where [math]\displaystyle{ \hat{L} }[/math] is the direction that the spring is stretched or compressed.

A Computational Model

A GlowScript model of a spring that prints out the spring force vector: [1]

#GlowScript 1.1 VPython

L0 = 0.1 #the relaxed length of the spring
ks = 15 #spring constant

#plate holding spring end
plate= box(pos=vec(-.1,0,0), size=vec(.005,.1,.1))

# ball and spring objects
ball=sphere(pos=vec(-L0+.1,0,0), radius=0.02, color=color.red, make_trail=true)
spring=helix(pos=plate.pos, axis=ball.pos-plate.pos, radius=.02, coils=10)

ball.m = 0.1 #mass of the ball in kg
ball.p = ball.m * vec(0.5,0,0) #initial momentum

t = 0 #time
dt = 0.01 #size of the time step

#loops forever
while True: 
    rate(10) #100 calculations per second
    
    #length of the spring
    L = ball.pos - plate.pos
    
    #spring force
    Fs = -ks * (mag(L) - L0) * norm(L)
    
    #update the momentum of the ball
    ball.p = ball.p + Fs * dt
    
    #update the position of the ball
    ball.pos= ball.pos + ball.p * dt / ball.m
    
    #update the spring
    spring.axis = ball.pos - plate.pos
    
    print(Fs)

Examples

Be sure to show all steps in your solution and include diagrams whenever possible

Simple

Middling

Difficult

Connectedness

  1. How is this topic connected to something that you are interested in?
  2. How is it connected to your major?
  3. Is there an interesting industrial application?

History

Put this idea in historical context. Give the reader the Who, What, When, Where, and Why.

See also

Are there related topics or categories in this wiki resource for the curious reader to explore? How does this topic fit into that context?

Further reading

Books, Articles or other print media on this topic

External links

[2]


References

This section contains the the references you used while writing this page