Tuesday, March 11, 2014

EJS Particle Motion On A Curve Model

EJS Particle Motion On A Curve Model by Wolfgang Christian

original source:
http://www.compadre.org/osp/items/detail.cfm?ID=11235 by Wolfgang Christian

EJS Particle Motion On A Curve Model by Wolfgang Christian
author: Wolfgang Christian, slightly edited this version by lookang

Particle Motion On A Curve by Wolfgang 

The Particle Motion On A Curve model simulates the dynamics of a particle sliding on a curve $ y = f(x) $ with friction $ \mu $. The model displays the particle trajectory, the normal contact, perpendicular contact friction , and always vertically downwards gravitational force vectors, and the local radius of curvature. Units are chosen such that mass $ m = 1 $ and acceleration of gravity $ g = 1 $.

The Particle Motion On A Curve model computes the particle's xy-trajectory by integrating the dynamical equations of motion. The particle is acted on by three forces and has no direct knowledge of its global spatial path. The gravitational force mg acts in the -y direction and the friction force $ |f|= \mu |N| $ acts opposite to the direction of travel where $ \mu $ is the coefficient of sliding friction and $ N $ is the normal force. The normal contact force $ N $ keeps the particle on the curve and varies depending on the particle's location and speed.

The normal force is calculated as the particle moves using the normal component of the gravitational force and the particle's speed $ v $ together with the trajectory's local radius of the curvature $ R $.

$ N = \frac {mv^{2}}{R}+mg_{\perp} $ 


$ R = \frac {(1+y'^{2})^\frac{3}{2}}{y''} $ 

The first derivate y' and second derivative y" are evaluated numerically using the following finite difference approximations.

$ y' = \frac {\delta f(x)}{\delta x} \approx \frac {f(x+h)-f(x-h)}{2h}$

$ y'' = \frac {\delta^{2} f(x)}{\delta x^{2}} \approx \frac {f(x+h)-2f(x) +f(x-h)}{h^2}$ 


  1. Waldemar Klobus, "Motion on a vertical loop with friction," Am. J. Phys., (in press). 
  2. Lloyd P. Franklin and Paul I. Kimmel, "Dynamics of circular motion with friction," Am. J. Phys. 48 (3), 207-210, (1980). 


The Particle Motion On A Curve model was developed by Wolfgang Christian using the Easy Java Simulations (EJS) version 4.3.3 authoring and modeling tool.

You can examine and modify the 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 have EJS installed on your computer. Information about EJS is available at: <http://www.um.es/fem/Ejs/> and in the ComPADRE OSP Collection <http://www.compadre.org/OSP/>.

Changes made  by lookang

  1. re layout 
  2. color code
  3. added dropdown menu to include sin(x), cos(x) , 0+sqrt(25-(x-0)^2), 0-sqrt(25-(x-0)^2). note it does not work well for circles, with remove circle equations soon
  4. fix bug or made v slider work
  5. added slider for visualization of forces vectors