NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Collaborative Community of EJS => Topic started by: lookang on March 15, 2012, 09:34:17 am



Title: Ejs open source java applet 1D collision force model
Post by: lookang on March 15, 2012, 09:34:17 am
Ejs open source java applet 1D collision force model by Fu-Kwun Hwang
a remix here is by lookang

reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=193.0
thanks to Fu-Kwun Hwang for this awesome model :)


Title: Re: Ejs open source java applet 1D collision force model
Post by: lookang on March 15, 2012, 09:37:51 am
changes:

added m_A and m_B sliders
added Force vs time graph
add floor
add forces vectors
add force equations which is already provided by F1= getA(x1,x2,m1) and F2 = getA(x2,x1,m2)
by Fu Kwun: // awesome codes
public double getA (double xa,double xb,double m) {
  if(Math.abs(xa-xb)     if(xa     else return k*(L-(xa-xb))/m;
  }
  return 0.;
}


Title: Re: Ejs open source java applet 1D collision force model
Post by: babyparty on March 17, 2012, 06:12:20 pm
Thanks...for...sharing...


Title: Re: Ejs open source java applet 1D collision force model
Post by: engrg1 on March 23, 2012, 10:34:47 pm
Hi, all.
Thanks  to Prof Huang and Loo Kang for the codes.
I have edited the codes so that you can show a range of collision type (0: elastic to 1 perfectly inelastic)
Have used the equation provided by Ojalvo and Cohen, 1977). You can find the formula @ http://www.brachengineering.com/publications/SAE%202003-01-0491.pdf  (Pg 3)

Feel free to give comments.




Title: Re: Ejs open source java applet 1D collision force model
Post by: engrg1 on March 24, 2012, 09:41:41 am
Hi, all.

There is some mistake in the formula in the earlier post. I have corrected in this version.

It seems that I can't get a perfect value of final velocity based on the coefficient of restitution. I suspect this is due to the modelling equation.

Thank to Prof Hwang and Loo Kang again for the codes.


Title: Re: Ejs open source java applet 1D collision force model
Post by: engrg1 on March 25, 2012, 10:46:30 pm
Have modified my previous version with more features (from Loo Kang's initial 1-d collision cart)
feel free to give comments!
I am still searching for some better equation to model the impact force.
Best to run the applet full screen


Title: Re: Ejs open source java applet 1D collision force model
Post by: engrg1 on March 26, 2012, 08:30:45 am
Just realize that this equation is rather correct. The calculation of coefficient of restitution is accurate. I have the wrong idea in the previous post as the e that is displayed is to 1 d.p.  The actual e is very close to the given e.

Sorry for the mistake..


Title: Re: Ejs open source java applet 1D collision force model
Post by: lookang on March 26, 2012, 09:34:54 am
simply awesome remix :)

i not sure why it lag


Title: Re: Ejs open source java applet 1D collision force model
Post by: engrg1 on March 26, 2012, 01:36:57 pm
just need to set the frame rate to 100. It should work fine.