# MyPhysicsLab – 2-Dimensional Spring

This simulation shows a single mass on a spring, which is connected to the ceiling. The mass is able to move in 2 dimensions, and gravity operates. Does the motion look random to you? Watch the graph for a while and you'll see its actually an intricate pattern.
You can change parameters in the simulation such as gravity, mass, spring stiffness, and friction (damping). You can drag the mass with your mouse to change the starting position.

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

## Physics of the 2-Dimensional Spring

2D spring variables

An immoveable (but draggable) anchor point has a spring and bob hanging below and swinging in two dimensions. Regard the bob as a point mass. Define the following variables:

• θ = angle (0 = vertical, increases counter-clockwise)

• S = spring stretch (displacement from rest length)

• L = length of spring

• u = position of bob

• v = u'= velocity of bob

• a = u''= acceleration of bob

Define some constants:

• R = rest length of spring

• T = position of anchor point

• m = mass of bob

• k = spring constant

• b = damping constant

• g = gravitational constant

i & j unit vectors

Note that for this simulation the vertical dimension increases downwards. We'll need the standard unit vectors i, j. We use bold and overline to indicate a vector.

• i = unit vector in horizontal direction

• j = unit vector in vertical (down) direction

There are three vector forces acting on the bob:

• Fgravity = m g j = gravity acting straight down

• Fspring = −k S (sin θ i + cos θ j) = the spring pulling (or pushing) along the line from bob to anchor point.

• Fdamping = −b (vx i + vy j) = damping (friction) acting opposite to the direction of motion of the bob, ie. opposite to its velocity vector.

Summing these forces and using Newton's second law we get: m a = Fgravity + Fspring + Fdamping m (ax i + ay j) = m g jk S (sin θ i + cos θ j)b (vx i + vy j) We can write the horizontal and vertical components of the above as separate equations. This gives us two simultaneous equations. We also divide each side by m.

 ax = − k⁄m S sin θ − b⁄m vx (1a)
 ay = g − k⁄m S cos θ − b⁄m vy (1b)

These are the equations of motion. It only remains to show how S sin θ and S cos θ are functions of the position of the bob. The displacement of the spring S is the current length of the spring minus the rest length.

 S = L − R (2)

From the pythagorean theorem we can get the length of the spring L in terms of from the position of the bob, u, and the position of the anchor point, T.

 (3)

The sine and cosine of the angle θ are:

 sin θ = (ux − Tx)/L (4a)
 cos θ = (uy − Ty)/L (4b)

## Numerical Solution of the 2-Dimensional Spring

To solve the equations of motion numerically, so that we can drive the simulation, we use the Runge-Kutta method for solving sets of ordinary differential equations. Since the Runge-Kutta method only works with first-order differential equations, we convert the two second-order equations (1) to the following four first-order equations. ux' = vx uy' = vy vx' = − km S sin θbm vx vy' = gkm S cos θbm vy Keep in mind that S sin θ and S cos θ are functions of the position of the bob, ux, uy, as given in equations (2-4).

# 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. นิวเคลียร์

ครั้งที่

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