Ejs open source java applet 1D collision carts with realistic collision!

based on an earlier work by Paco and lookang

Thanks To Professor Fu-Kwun Hwang for guidance and Professor Francisco Esquembre for EJS and the open source digital library source codes.

special mention to engrg1 for the research done on the spring force model for all cases of e.

/htdocs/ntnujava/ejsuser/14019/users/sgeducation/lookang/Momentum1DForceModel01_pkg/Momentum1DForceModel01.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1732.7kB):double click downloaded file to run it. (17 times by 10 users) , Download EJS source (5 times by 5 users) View EJS source

the codes by engrg1 was especially useful for this final version :)
public double impactForce (double xa,double xb, double va ,double vb){
    double f;
    double y;
    double x;
    double z;
    double a;
// using the impact force equaion provided by Objalvo and Cohen ,1 1997
// Damping coefficient based on Brach, 1991a
// Formula can be found Pg 3 of http://www.brachengineering.com/publications/SAE%202003-01-0491.pdf
// this equation is not perfect and can only give a good estimate of the coefficient of resistution

if (es>0.05) {
 x =Math.log(es)*Math.log(es);
 z = Math.sqrt( x/( Math.PI* Math.PI+x));
 } else z=1;
 if(xa    f= klinear*((xb-xa)-L); // change to 2*L by lookang
   f = klinear*(L-(xa-xb)); // change to 2*L by lookang
  y = mass1*mass2/(mass1+mass2);
 if(Math.abs(xa-xb)     a= -2*z*(Math.sqrt(klinear*y))*(va-vb) + f;
 s_z = "a= " + double2String(a,1000) +"size= " + double2String(2*radius1,1000) ;
 return a;