# MyPhysicsLab – Single Spring

This simulation shows a single mass on a spring, which is connected to a wall. This is an example of a simple linear oscillator.
You can change parameters in the simulation such as mass, spring stiffness, and friction (damping). You can drag the mass with your mouse to change the starting position.

คลิกเข้าไปทดลอง  คลิกค่ะ

## Puzzles

Try using the graph and changing parameters like mass or spring stiffness to answer these questions about the spring simulation:

• What is the relationship between acceleration and position?

• How do mass or spring stiffness affect the relationship between acceleration and position?

• How do mass or spring stiffness affect the period or frequency of the oscillation?

To show the graph and parameters, click on the "show graph+controls" button above. You can set what variables are shown on the vertical or horizontal axis by selecting from the pop-up menu above. To change a parameter, click on it, type the new value and hit the enter key.

## Physics

Define the following variables and constants

• x = position of the block

• v = x' = velocity of the block

• m = mass of the block

• R = rest length of the spring

• k = spring stiffness

• b = damping constant (friction)

A spring generates a force proportional to how far it is stretched (and acting in the opposite direction to the stretch) Fspring = −k × stretch If we adjust the coordinate system so that x = 0 corresponds to the spring being unstretched, then the stretch of the spring is simply equal to x. The spring force becomes Fspring = − k x In addition, there is a damping (friction) force that resists the motion. It is proportional to the velocity. So we add Fdamping = −b v to get the total force F = Fspring + Fdamping = − k xb v Combining this with Newton's law of motion F = m a, and the definition of acceleration as the second derivative of position a = x'' we have the differential equation: m x'' = −k xb v or equivalently:

 x'' = − k⁄m x − b⁄m x' (1)

Equation (1) is the equation of motion for the spring, defining exactly what happens over time.

You can actually see equation (1) visually if you turn on the graph in the simulation. Suppose there is no damping (set damping to zero). Then if you set the graph on the simulation to plot acceleration against position, you will get a straight line, with slope = −k/m. So if you increase the stiffness of the spring, the line becomes steeper. If you increase the mass, the line becomes less steep.

## Numerical Solution

To solve this equation numerically (ie. by computer) we use the Runge-Kutta method. To do so we need to convert the second order differential equation (1) into a set of first order differential equations. Note that we can write the acceleration as the first derivative of velocity: x'' = v'. Therefore we can express equation (1) as a system of two first order differential equations: x' = v v' = − km xbm v This is the form that we need in order to use the Runge-Kutta method for numerically solving the differential equation.

To begin the simulation, we initialize the two variables x,v for their value at time t=0. Then we use the Runge-Kutta algorithm to calculate the values of x,v after a short time interval, and this continues indefinitely.

## Analytic Solution

An analytic solution uses mathematics to find the solution instead of the brute force of the computer. The advantage is that we can get some more insight from the analytic solution, instead of having to analyze zillions of numbers that come from a numerical solution.

With no damping (b = 0) and the block initially not moving, the analytic solution is given by where x0 = initial position of the block and t = time. The period of the oscillation is the time it takes to repeat. From the solution we see that the oscillation repeats when , and so the period is
The frequency is the inverse of the period: frequency = So we predict that

• increasing mass by 4 times doubles the period and halves the frequency;

• increasing spring stiffness by 4 times halves the period and doubles the frequency;

You can check these predictions by modifying the parameters on the simulation (you'll need a stopwatch to time the frequency).

What is the relationship between acceleration and position?

Answer: It is a linear relationship as given by the equation x'' = − km x where x = position, x'' = acceleration, m = mass, and k = spring stiffness.

How do mass or spring stiffness affect the relationship between acceleration and position?

Answer: From the equation x'' = − km x we know that there is a simple linear relationship between acceleration and position. The mass and spring stiffness affect the slope of this line.

• Increasing mass makes the line less steep.

• Increasing spring stiffness makes the line steeper.

How do mass or spring stiffness affect the period or frequency of the oscillation?

Answer: The analytic solution is and the frequency is given by frequency = So we predict that

• increasing mass by 4 times doubles the period and halves the frequency;

• increasing spring stiffness by 4 times halves the period and doubles the frequency;

# MyPhysicsLab – Physics Simulation with Java

Click on one of the physics simulations below... you'll see them animating in real time, and be able to interact with them by dragging objects or changing parameters like gravity. Get Java software if you don't already have it.
 single spring double spring pendulum chaotic pendulum double pendulum 2D spring double 2D spring colliding blocks cart with pendulum dangling stick rigid bodycollisions sumo wrestlinggame roller coaster roller coasterwith spring roller coasterwith 2 balls roller coasterwith flight molecule 2 molecule 3 molecule 4 molecule 5 molecule 6

ศัพท์วิทยาศาสตร์ ฉบับราชบัณฑิตสถาน

A  B  D  F  G  H  I  J  K  L  M  N  O  Q  R  S  T  U  V  W  X  Y

ถ                                       อ

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

 หมวด : ก | ข | ค | ซ | ฐ | ด | ต | ท | น | ป | ผ | พ | ฟ | ภ | ม | ย | ร | ล | ว | ศ | ส | ห | อ | ฮ |

พจนานุกรมเสียง 1   แมว    วัว 1    วัว 2    วัว 3    เหมียว   แกะ     พจนานุกรมภาพการ์ตูน

 การเรียนการสอนฟิสิกส์ 1  ผ่านทางอินเตอร์เน็ต 1. การวัด 2. เวกเตอร์ 9.  การหมุน 12. ความยืดหยุ่น 17.  คลื่น การเรียนการสอนฟิสิกส์ 2  ผ่านทางอินเตอร์เน็ต 10. ทรานซิสเตอร์ 16. นิวเคลียร์

ครั้งที่

ภาพประจำสัปดาห์