## Sliding Block and Spring Model by Wolfgang Christian

http://www.compadre.org/osp/items/detail.cfm?ID=10081this version on the blog is only slightly edited by lookang.

versionSliding Block and Spring Model with remixed for simple harmonic motionhttp://weelookang.blogspot.sg/2013/12/sliding-block-and-spring-model-by.html https://dl.dropboxusercontent.com/u/44365627/lookangEJSS/export/ejs_model_BlockAndSpringOnInclinedPlanewee.jar https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_model_BlockAndSpringOnInclinedPlanewee.jar original http://www.compadre.org/osp/items/detail.cfm?ID=10081&S=7 author: Wolfgang Christian and lookang |

## Block and Spring on an Inclined Plane

The Block and Spring on an Inclined Plane model displays the dynamics of a mass-spring system sliding on an inclined plane with static and kinetic friction. The model shows the asymmetry caused by the change in direction of the frictional force when sliding up and down the incline and the importance of friction in establishing equilibrium. When the block is sliding, Newton's law for motion for a mass m moving along the incline of length L can be written as

$m\frac{d^{2}x}{dt^{2}} = - k ( x - \frac{L}{2} ) - mgsin \theta \mp \mu_{k}mgcos \theta $

the following equations are used to help run the model

$\ springForce = - k ( x - \frac{L}{2} ) $

$\ weightX = -mgsin \theta $

$\ weightY = -mgcos \theta $

where k is the spring constant in N/m, $\mu_{k}$ is the kinetic (sliding) coefficient of friction, θ is the angle of the incline, and g is the acceleration of gravity in m/s^2. We use the - sign when the block is moving to the right and + sign when the block is moving to the left. Note that the model uses a unit mass block m= 1kg and a natural spring length of $\frac{L}{2}$ in order to limit the number of input parameters.

The static friction force prevents motion until some limit where motion occurs. It is characterized by a static coefficient of friction $\mu_{s}$ and is equal and opposite to the net applied force less than a maximum value

$\ f_{max} = \mu_{s} N = \mu_{s} mgcos \theta $

the following equations are used to help run the model

slipping occurs when

$\ | weightX+springForce | > | \mu_{s}weightY |$

$\ direction = -1 if weightX+springForce > 0 //going RIGHT $

$\ direction = +1 if weightX+springForce < 0 //going LEFT $

$\ direction = 0 //stationary $

$\ frictionForce = Math.signum(v) \mu_{k}weightY $

for no slipping

$\ frictionForce = - weightX - springForce $

$\ direction = 0 //stationary $

where the normal force N is that component of the gravitational force that presses the block into the plane. The static coefficient of friction is harder to quantify than the kinetic coefficient but is generally larger than the kinetic coefficient and may arise from surface irregularities and surface contaminants.

The Block and Spring on an Inclined Plane model displays the numerical solution to this equation and shows how the forces change as the mass slides. The scale of the force vectors is arbitrary and that the image is rescaled as the incline plane length is varied from 0.1 to 10 m or the incline angle is changed. Users can set the coefficients of friction and the spring constant. The model plots the position, velocity, and net force on the mass as a function of time as the system evolves.

You can examine and modify a compiled EJS model if you run the model (double click on the model's jar file), right-click within a plot, and select "Open EJS Model" from the pop-up menu. You must, of course, have EJS installed on your computer. Information about EJS is available at: <http://www.um.es/fem/Ejs/> and in the OSP ComPADRE collection <http://www.compadre.org/OSP/>.

changes by lookang include:

The Block and Spring on an Inclined Plane model displays the numerical solution to this equation and shows how the forces change as the mass slides. The scale of the force vectors is arbitrary and that the image is rescaled as the incline plane length is varied from 0.1 to 10 m or the incline angle is changed. Users can set the coefficients of friction and the spring constant. The model plots the position, velocity, and net force on the mass as a function of time as the system evolves.

## References:

"Damped oscillations and equilibrium of a mass-spring system subjected to sliding friction forces: integrating experimental and theoretical analysis," P. Onorato, D. Mascoli, and A. DeAmbrosis, American Journal of Physics, (in press).## Credits:

The Block and Spring on an Inclined Plane model was created by Wolfgang Christian using the Easy Java Simulations (EJS) version 4.3 authoring and modeling tool.You can examine and modify a compiled EJS model if you run the model (double click on the model's jar file), right-click within a plot, and select "Open EJS Model" from the pop-up menu. You must, of course, have EJS installed on your computer. Information about EJS is available at: <http://www.um.es/fem/Ejs/> and in the OSP ComPADRE collection <http://www.compadre.org/OSP/>.

changes by lookang include:

- relayout and customize to simple harmonic motion model on a horizontal plane.
- _view.drawingPanel.setAntialiasShapeOn(true);
- _view.drawingPanel.setAntialiasTextOn(true);
- if(v > 0) direction=-1; // bug removed by lookang
- else if (v < 0) direction =1; // bug removed by lookang