Ball and Spring Model: Difference between revisions

From Physics Book
Jump to navigation Jump to search
<h2>2. Hooke's Law</h2>
Line 80: Line 80:
""")
""")


==Connectedness==
= Mass-Spring System Simulation =
1. How is this topic connected to something that you are interested in?


One of my favorite hobbies is baking. I bake something just about every day and will make anything from snickerdoodles to lemon bars to banana bread. An important factor that often determines the success of the final product is its consistency. A brownie that is too soft won't support its own geometry, yet one too hard will be difficult to chew. The stiffness and consistency of a baked good is determined by its Young's modulus, which is a function of the applied stress and the resulting strain of the material.
== Overview ==


This project models the motion of a ball attached to a vertical spring. The top of the spring is fixed to a support, while the ball hangs from the lower end. When the ball is pulled downward and released, it oscillates because the spring pulls upward while gravity pulls downward.


The simulation uses numerical integration to update the ball’s momentum and position over small time intervals. Instead of solving the motion analytically, the computer repeatedly applies Newton’s Second Law to predict the next state of the system.


2. How is it connected to your major?
This model demonstrates how forces create acceleration, how springs store energy, and how oscillatory motion can be represented computationally.


I am majoring in Biomedical Engineering, a major in which we use different biomaterials. When developing devices for medical purposes (crutches, prosthetics, wheelchairs, etc.) from biomaterials or using biomaterials to replace parts of the body (i.e. bone structure replacement), there are many factors to take in to consideration. One of these factors deals with Young's modulus, stress, and strain. Understanding the ball-and-spring model and subsequently Young's modulus is important to ensure that the proper materials are used for the appropriate devices and won't degrade, break, or deform when in use.
== Physical Setup ==


The system contains three visible objects:


* '''Holder''' – a fixed support at the top.
* '''Spring''' – connects the holder to the ball.
* '''Ball''' – the moving mass.


3. Is there an interesting industrial application?
The values used in the simulation are:


Yes! As mentioned before, one of the ways that the ball and spring model of a solid (and specifically Young's modulus, stress, and strain that stem from the model) related to the biomedical industry is through bone structure replacement. Using this model, it can be determined whether or not the biomaterial has similar deformable properties with the material it will replace. Typically, these materials need high Young's modulus' because they bear a high amount of force. Therefore, a selected biomaterial can be determined a good fit for replacement if it's Young's modulus is similar to bone.
* Unstretched spring length: <math>L_0 = 0.10 \text{ m}</math>
* Spring constant: <math>k = 15 \text{ N/m}</math>
* Ball mass: <math>m = 0.10 \text{ kg}</math>
* Gravitational field: <math>\vec{g} = \langle 0,-9.8,0\rangle \text{ m/s}^2</math>
 
The ball begins slightly below equilibrium so the spring is stretched at the start.
 
== Coordinate System ==
 
The simulation uses a 3D coordinate system:
 
* Positive x-direction = horizontal right
* Positive y-direction = upward
* Positive z-direction = outward/inward depth
 
Since the motion is vertical, most changes occur only in the y-direction.
 
== Model 1: Position Vector ==
 
The position of the ball is tracked using a vector:
 
<math>\vec{r}_{ball}</math>
 
The holder also has a fixed position:
 
<math>\vec{r}_{holder}</math>
 
The spring vector is the displacement from the holder to the ball:
 
<math>\vec{L} = \vec{r}_{ball} - \vec{r}_{holder}</math>
 
This gives both the direction and length of the spring at every moment.
 
== Model 2: Spring Length ==
 
The current spring length is the magnitude of the spring vector:
 
<math>|\vec{L}| = \sqrt{L_x^2 + L_y^2 + L_z^2}</math>
 
If the spring length equals <math>L_0</math>, the spring is unstretched.
 
If:
 
<math>|\vec{L}| > L_0</math>
 
the spring is stretched.
 
If:
 
<math>|\vec{L}| < L_0</math>
 
the spring is compressed.
 
== Model 3: Hooke's Law ==
 
The spring exerts a restoring force that tries to return the spring to its natural length.
 
The force is:
 
<math>\vec{F}_s = -k(|\vec{L}| - L_0)\hat{L}</math>
 
where:
 
<math>\hat{L} = \frac{\vec{L}}{|\vec{L}|}</math>
 
Explanation:
 
* <math>k</math> determines spring stiffness.
* <math>(|\vec{L}| - L_0)</math> is the stretch/compression amount.
* <math>\hat{L}</math> gives the direction.
* The negative sign means the force acts opposite displacement.
 
If the ball is pulled downward, the spring force points upward.
 
== Model 4: Gravity ==
 
Gravity constantly pulls the ball downward.
 
The gravitational force is:
 
<math>\vec{F}_g = m\vec{g}</math>
 
Substituting values:
 
<math>\vec{F}_g = (0.10)\langle0,-9.8,0\rangle</math>
 
<math>\vec{F}_g = \langle0,-0.98,0\rangle \text{ N}</math>
 
This force remains constant throughout the simulation.
 
== Model 5: Net Force ==
 
The total force on the ball is the sum of spring force and gravity:
 
<math>\vec{F}_{net} = \vec{F}_s + \vec{F}_g</math>
 
This determines how the ball accelerates.
 
Cases:
 
* If spring force is larger than gravity, the ball accelerates upward.
* If gravity is larger, the ball accelerates downward.
* If forces balance, acceleration is zero.
 
== Model 6: Newton's Second Law ==
 
Newton’s Second Law states:
 
<math>\vec{F}_{net} = m\vec{a}</math>
 
So acceleration is:
 
<math>\vec{a} = \frac{\vec{F}_{net}}{m}</math>
 
Rather than directly solving for acceleration each time, the program updates momentum.
 
== Model 7: Momentum Principle ==
 
Momentum is:
 
<math>\vec{p} = m\vec{v}</math>
 
The Momentum Principle gives:
 
<math>\Delta \vec{p} = \vec{F}_{net}\Delta t</math>
 
So each loop:
 
<math>\vec{p}_{new} = \vec{p}_{old} + \vec{F}_{net}\Delta t</math>
 
This is the main physics engine of the simulation.
 
== Model 8: Position Update ==
 
Velocity is found from momentum:
 
<math>\vec{v} = \frac{\vec{p}}{m}</math>
 
Then position updates as:
 
<math>\vec{r}_{new} = \vec{r}_{old} + \vec{v}\Delta t</math>
 
Substituting velocity:
 
<math>\vec{r}_{new} = \vec{r}_{old} + \left(\frac{\vec{p}}{m}\right)\Delta t</math>
 
This allows the ball to move frame by frame.
 
== Model 9: Numerical Integration ==
 
The simulation does not solve one large equation for all time. Instead, it uses many tiny time steps:
 
<math>\Delta t = 0.01 \text{ s}</math>
 
For each step:
 
# Calculate spring vector
# Calculate spring force
# Calculate gravity
# Find net force
# Update momentum
# Update position
# Redraw spring
 
This method is called Euler-Cromer style numerical integration.
 
Smaller time steps improve accuracy.
 
== Model 10: Oscillatory Motion ==
 
Because the spring force always points toward equilibrium, the ball repeatedly moves up and down.
 
Sequence:
 
# Ball released downward
# Spring pulls upward
# Ball speeds upward
# Ball passes equilibrium
# Gravity and spring slow it
# Ball reverses
# Motion repeats
 
This creates periodic motion.
 
== Model 11: Equilibrium Position ==
 
Equilibrium occurs when:
 
<math>\vec{F}_s + \vec{F}_g = 0</math>
 
In magnitude form:
 
<math>k\Delta L = mg</math>
 
So:
 
<math>\Delta L = \frac{mg}{k}</math>
 
Substitute values:
 
<math>\Delta L = \frac{0.10(9.8)}{15}</math>
 
<math>\Delta L = 0.0653 \text{ m}</math>
 
So the ball hangs about 6.53 cm below the unstretched position at equilibrium.
 
== Model 12: Energy in the System ==
 
Energy shifts between gravitational, elastic, and kinetic forms.
 
Spring potential energy:
 
<math>U_s = \frac{1}{2}k(\Delta L)^2</math>
 
Gravitational potential energy:
 
<math>U_g = mgy</math>
 
Kinetic energy:
 
<math>K = \frac{1}{2}mv^2</math>
 
As the ball moves:
 
* At highest point: mostly potential energy
* At equilibrium: maximum speed
* At lowest point: spring energy largest
 
== Model 13: Why the Motion Continues ==
 
The ball has inertia. Even when it reaches equilibrium, it does not stop instantly because it still has momentum.
 
That momentum carries it past equilibrium, stretching/compressing the spring in the opposite direction. Then the restoring force reverses the motion.
 
This repeated exchange creates oscillation.
 
== Model 14: Code Connection ==
 
Each major equation appears directly in the code:
 
Spring vector:
 
<pre>
L = ball.pos - holder.pos
</pre>
 
Spring force:
 
<pre>
Fs = -k * (mag(L) - L0) * norm(L)
</pre>
 
Gravity:
 
<pre>
Fg = ball.m * g
</pre>
 
Net force:
 
<pre>
Fnet = Fs + Fg
</pre>
 
Momentum update:
 
<pre>
ball.p = ball.p + Fnet * dt
</pre>
 
Position update:
 
<pre>
ball.pos = ball.pos + (ball.p / ball.m) * dt
</pre>
 
Spring redraw:
 
<pre>
spring.axis = ball.pos - holder.pos
</pre>
 
== Real-World Applications ==
 
Mass-spring systems appear in many engineering designs:
 
* Vehicle suspension systems
* Building vibration control
* Shock absorbers
* Scales
* Seismographs
* Robotics
* Mechanical sensors
 
The same principles also apply to atoms vibrating in solids.
 
== Conclusion ==
 
This simulation combines physics and computation to model oscillatory motion. By applying Hooke’s Law, gravity, Newton’s Second Law, and momentum updates repeatedly, the program predicts realistic spring motion over time.
 
The project shows that complex motion can be understood by breaking it into small force-based updates, making numerical modeling a powerful tool in science and engineering.


==History==
==History==

Revision as of 20:33, 26 April 2026

Page created by Ashley Fleck.

The interactions of atoms can be modeled using balls to represent the atoms and a spring to represent the chemical bond between them.

scene.title = "Ball and Spring Model of Matter\n" scene.width = 900 scene.height = 600 scene.background = color.white

scene.append_to_caption("""

Ball and Spring Model of Matter

Jayani Mannam — Spring 2026


1. Introduction

The ball and spring model of matter is a simplified model used to understand how atoms in a solid interact with each other. In this model, atoms are represented as balls, and the bonds between atoms are represented as springs.

Although real atoms are not literally connected by tiny mechanical springs, this model is useful because it captures an important physical idea: when atoms are displaced from their equilibrium positions, forces act to restore them.

This model is especially helpful for understanding vibration, elasticity, wave motion, and energy storage in matter. It also connects microscopic motion to macroscopic material properties.

At the microscopic level, atoms in solids vibrate around stable positions. At the macroscopic level, those vibrations help explain material stiffness, sound propagation, heat transfer, and elastic deformation.



scene.append_to_caption("""

2. Hooke's Law

The main equation behind the model is:



F_spring = -k Δs

where:

  • F_spring = restoring force
  • k = spring constant
  • Δs = displacement from equilibrium

The negative sign means the force acts opposite the displacement.

If the atom moves right, the spring pulls left. If the atom moves downward, the spring pulls upward.

For a vertical spring:



F_spring = -k(L - L0)L_hat

where:

  • L = current spring length
  • L0 = natural spring length
  • L_hat = unit vector along spring

3. Harmonic Approximation

The model works best for small displacements.

Real atomic forces are more complex, but near equilibrium the potential energy curve behaves like a parabola.

That is why Hooke's Law gives a good approximation for vibrating atoms.


""")

Mass-Spring System Simulation

Overview

This project models the motion of a ball attached to a vertical spring. The top of the spring is fixed to a support, while the ball hangs from the lower end. When the ball is pulled downward and released, it oscillates because the spring pulls upward while gravity pulls downward.

The simulation uses numerical integration to update the ball’s momentum and position over small time intervals. Instead of solving the motion analytically, the computer repeatedly applies Newton’s Second Law to predict the next state of the system.

This model demonstrates how forces create acceleration, how springs store energy, and how oscillatory motion can be represented computationally.

Physical Setup

The system contains three visible objects:

  • Holder – a fixed support at the top.
  • Spring – connects the holder to the ball.
  • Ball – the moving mass.

The values used in the simulation are:

  • Unstretched spring length: [math]\displaystyle{ L_0 = 0.10 \text{ m} }[/math]
  • Spring constant: [math]\displaystyle{ k = 15 \text{ N/m} }[/math]
  • Ball mass: [math]\displaystyle{ m = 0.10 \text{ kg} }[/math]
  • Gravitational field: [math]\displaystyle{ \vec{g} = \langle 0,-9.8,0\rangle \text{ m/s}^2 }[/math]

The ball begins slightly below equilibrium so the spring is stretched at the start.

Coordinate System

The simulation uses a 3D coordinate system:

  • Positive x-direction = horizontal right
  • Positive y-direction = upward
  • Positive z-direction = outward/inward depth

Since the motion is vertical, most changes occur only in the y-direction.

Model 1: Position Vector

The position of the ball is tracked using a vector:

[math]\displaystyle{ \vec{r}_{ball} }[/math]

The holder also has a fixed position:

[math]\displaystyle{ \vec{r}_{holder} }[/math]

The spring vector is the displacement from the holder to the ball:

[math]\displaystyle{ \vec{L} = \vec{r}_{ball} - \vec{r}_{holder} }[/math]

This gives both the direction and length of the spring at every moment.

Model 2: Spring Length

The current spring length is the magnitude of the spring vector:

[math]\displaystyle{ |\vec{L}| = \sqrt{L_x^2 + L_y^2 + L_z^2} }[/math]

If the spring length equals [math]\displaystyle{ L_0 }[/math], the spring is unstretched.

If:

[math]\displaystyle{ |\vec{L}| \gt L_0 }[/math]

the spring is stretched.

If:

[math]\displaystyle{ |\vec{L}| \lt L_0 }[/math]

the spring is compressed.

Model 3: Hooke's Law

The spring exerts a restoring force that tries to return the spring to its natural length.

The force is:

[math]\displaystyle{ \vec{F}_s = -k(|\vec{L}| - L_0)\hat{L} }[/math]

where:

[math]\displaystyle{ \hat{L} = \frac{\vec{L}}{|\vec{L}|} }[/math]

Explanation:

  • [math]\displaystyle{ k }[/math] determines spring stiffness.
  • [math]\displaystyle{ (|\vec{L}| - L_0) }[/math] is the stretch/compression amount.
  • [math]\displaystyle{ \hat{L} }[/math] gives the direction.
  • The negative sign means the force acts opposite displacement.

If the ball is pulled downward, the spring force points upward.

Model 4: Gravity

Gravity constantly pulls the ball downward.

The gravitational force is:

[math]\displaystyle{ \vec{F}_g = m\vec{g} }[/math]

Substituting values:

[math]\displaystyle{ \vec{F}_g = (0.10)\langle0,-9.8,0\rangle }[/math]

[math]\displaystyle{ \vec{F}_g = \langle0,-0.98,0\rangle \text{ N} }[/math]

This force remains constant throughout the simulation.

Model 5: Net Force

The total force on the ball is the sum of spring force and gravity:

[math]\displaystyle{ \vec{F}_{net} = \vec{F}_s + \vec{F}_g }[/math]

This determines how the ball accelerates.

Cases:

  • If spring force is larger than gravity, the ball accelerates upward.
  • If gravity is larger, the ball accelerates downward.
  • If forces balance, acceleration is zero.

Model 6: Newton's Second Law

Newton’s Second Law states:

[math]\displaystyle{ \vec{F}_{net} = m\vec{a} }[/math]

So acceleration is:

[math]\displaystyle{ \vec{a} = \frac{\vec{F}_{net}}{m} }[/math]

Rather than directly solving for acceleration each time, the program updates momentum.

Model 7: Momentum Principle

Momentum is:

[math]\displaystyle{ \vec{p} = m\vec{v} }[/math]

The Momentum Principle gives:

[math]\displaystyle{ \Delta \vec{p} = \vec{F}_{net}\Delta t }[/math]

So each loop:

[math]\displaystyle{ \vec{p}_{new} = \vec{p}_{old} + \vec{F}_{net}\Delta t }[/math]

This is the main physics engine of the simulation.

Model 8: Position Update

Velocity is found from momentum:

[math]\displaystyle{ \vec{v} = \frac{\vec{p}}{m} }[/math]

Then position updates as:

[math]\displaystyle{ \vec{r}_{new} = \vec{r}_{old} + \vec{v}\Delta t }[/math]

Substituting velocity:

[math]\displaystyle{ \vec{r}_{new} = \vec{r}_{old} + \left(\frac{\vec{p}}{m}\right)\Delta t }[/math]

This allows the ball to move frame by frame.

Model 9: Numerical Integration

The simulation does not solve one large equation for all time. Instead, it uses many tiny time steps:

[math]\displaystyle{ \Delta t = 0.01 \text{ s} }[/math]

For each step:

  1. Calculate spring vector
  2. Calculate spring force
  3. Calculate gravity
  4. Find net force
  5. Update momentum
  6. Update position
  7. Redraw spring

This method is called Euler-Cromer style numerical integration.

Smaller time steps improve accuracy.

Model 10: Oscillatory Motion

Because the spring force always points toward equilibrium, the ball repeatedly moves up and down.

Sequence:

  1. Ball released downward
  2. Spring pulls upward
  3. Ball speeds upward
  4. Ball passes equilibrium
  5. Gravity and spring slow it
  6. Ball reverses
  7. Motion repeats

This creates periodic motion.

Model 11: Equilibrium Position

Equilibrium occurs when:

[math]\displaystyle{ \vec{F}_s + \vec{F}_g = 0 }[/math]

In magnitude form:

[math]\displaystyle{ k\Delta L = mg }[/math]

So:

[math]\displaystyle{ \Delta L = \frac{mg}{k} }[/math]

Substitute values:

[math]\displaystyle{ \Delta L = \frac{0.10(9.8)}{15} }[/math]

[math]\displaystyle{ \Delta L = 0.0653 \text{ m} }[/math]

So the ball hangs about 6.53 cm below the unstretched position at equilibrium.

Model 12: Energy in the System

Energy shifts between gravitational, elastic, and kinetic forms.

Spring potential energy:

[math]\displaystyle{ U_s = \frac{1}{2}k(\Delta L)^2 }[/math]

Gravitational potential energy:

[math]\displaystyle{ U_g = mgy }[/math]

Kinetic energy:

[math]\displaystyle{ K = \frac{1}{2}mv^2 }[/math]

As the ball moves:

  • At highest point: mostly potential energy
  • At equilibrium: maximum speed
  • At lowest point: spring energy largest

Model 13: Why the Motion Continues

The ball has inertia. Even when it reaches equilibrium, it does not stop instantly because it still has momentum.

That momentum carries it past equilibrium, stretching/compressing the spring in the opposite direction. Then the restoring force reverses the motion.

This repeated exchange creates oscillation.

Model 14: Code Connection

Each major equation appears directly in the code:

Spring vector:

L = ball.pos - holder.pos

Spring force:

Fs = -k * (mag(L) - L0) * norm(L)

Gravity:

Fg = ball.m * g

Net force:

Fnet = Fs + Fg

Momentum update:

ball.p = ball.p + Fnet * dt

Position update:

ball.pos = ball.pos + (ball.p / ball.m) * dt

Spring redraw:

spring.axis = ball.pos - holder.pos

Real-World Applications

Mass-spring systems appear in many engineering designs:

  • Vehicle suspension systems
  • Building vibration control
  • Shock absorbers
  • Scales
  • Seismographs
  • Robotics
  • Mechanical sensors

The same principles also apply to atoms vibrating in solids.

Conclusion

This simulation combines physics and computation to model oscillatory motion. By applying Hooke’s Law, gravity, Newton’s Second Law, and momentum updates repeatedly, the program predicts realistic spring motion over time.

The project shows that complex motion can be understood by breaking it into small force-based updates, making numerical modeling a powerful tool in science and engineering.

History

In the 1600's, Robert Hooke developed the idea of Hooke's Law, which states that for relatively small deformations of an object, the deformation is proportional to the force that deformed it. This lead to the development of the equation to calculate force of the spring; where it is equal to the spring stiffness multiplied by the change in length. This fundamental concept lead to other developments in Molecular Mechanics. However, the specific history for the ball-and-spring model is unknown, although the major developments in this area were accomplished in and around the 1930s and 1940s (including developments by T.L. Hill, I. Dostrovsky, and F. H. Westheimer) (6).

See also

The Ball-and-Spring model deals primarily with Kinds of Matter, Young's Modulus, Hooke's Law, and the Length and Stiffness of an Interatomic Bond.

Further reading

The Kinetics of materials is a book written by Robert W. Balluffi that goes in-depth about many different concepts, including the ball-and-spring model and Young's modulus.

The Molecular Dynamics and Spectroscopy by Stimulated Emission Pumping, written by Hai-Lung Dai and Robert W. Field, looks at a different aspect of the ball-and-spring model and determines its role in quantum eigenstate spectra.

External links

  1. http://www.nuffieldfoundation.org/practical-physics/model-vibrating-atoms-solid
  2. https://www.physics.ncsu.edu/clarke/teaching/class.html
  3. http://umdberg.pbworks.com/w/page/46030513/A%20simple%20model%20of%20solid%20matter

References

  1. http://p3server.pa.msu.edu/coursewiki/doku.php?id=183_notes:model_of_solids
  2. http://webs.morningside.edu/slaven/Physics/atom/atom7.html
  3. http://bulldog2.redlands.edu/facultyfolder/eric_hill/Phys231/Lecture/Lect%209.pdf
  4. http://www.matterandinteractions.org/Content/Materials/materials.html
  5. Chabay, Ruth W., and Bruce A. Sherwood. Matter & Interactions. 3rd ed.
  6. http://www.sdsc.edu/~kimb/history.html