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 April 15, 2009, 11:07:54 am



Title: Ejs Open Source Roller Coaster Physics Model Java Applet
Post by: lookang on April 15, 2009, 11:07:54 am
This applet simulates motion along a constrained path, such as a roller coaster would take (assuming it has safety wheels to keep it on the track in “up-side-down” situations, of course). The simulation offers a chance to explore a number of concepts associated with roller coaster physics, including conservation of energy, reaction forces and motion in a vertical plane. There are a number of example tracks which can be accessed via the drop down menu on the bottom right. The speed of the simulation can be modified by changing the calculation time step dt. recommended dt = 0.01 for accuracy results, dt = 0.05 is faster but may have computational error.

http://www.compadre.org/OSP/document/ServeFile.cfm?ID=8228&DocID=873

my source with the other files for the graphics are attached as the 2nd attachment, cos download the source file alone is not able to recreate the graphics of the roller coaster so use the zip for remixing, saved it into your EJS source folder
Michael Gallis is the original creator, i only remixed it, refined it and fixed some bugs in the drop down menu


Title: Re: Roller Coaster Physics by Professor Micheal Gallis edited by Wolfgang Christian
Post by: lookang on April 15, 2009, 11:38:05 am
this is a very good applet that is from
http://www.compadre.org/OSP/items/detail.cfm?ID=8228
Access Rights:      Free access
License:    This material is released under the GNU General Public License Version 3.
Rights Holder:    Michael Gallis
Record Cloner:    Cloned from ComPADRE Item 8227 October 27, 2008 by Wolfgang Christian
Record Updated:    Feb 25, 2009 by David Winch

Suppose it will help others in the other forums like this one
http://iresearch.edumall.sg/cos/o.x?ptid=80&c=/iresearch/forum&func=showthread&t=223
acceleration along a curved ramp


Title: Re: Roller Coaster Physics by Professor Micheal Gallis edited by Wolfgang Christian
Post by: lookang on April 15, 2009, 12:50:00 pm
I remixed just now to include

timer
1. t = t + dt; // because students want to verify that a curved track, time is shorter and straight track time is longer.
2. change color scheme to suit blue=displacement , magneta=velocity, red=acceleration no particular reason, just consistent with my other applets i guess.
3. added sliders and numbers to be display like TE PE KE v instead of just bars
4. added the graphical panels on the right to aid visualization of velocity & energy vs time
5. change back to the evolution differentiation page with Runge Kutta 4th solver method ( to reduce carry forward errors under euler solver method ) instead of the incremental evolution page
6. added drag force to the equation  d(coaster_sv)/dt = sdd(coaster_s,coaster_sv) -b/m*coaster_sv // http://www.myphysicslab.com/RollerSimple.html
15 june 2010
7 remove the PE KE and TE from main panel and made bars display on the left which made the display nicer i thought
8 width = 600 http://sgeducation.blogspot.com/2010/06/ejs-open-source-roller-coaster-physics.html
15 june 2011
added circular loop to the drop down menu
remove stuff to debug a web deploy problem that is fixed i think after removing the closest =true in some sliders.
revert to older ODE that has codes to account for KE+PE = TE conserved


Feedback are welcome!
credits to Michael Gallis and Wolfgang Christian.
I only remixed it, i did not make this! :)


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on April 27, 2009, 11:19:14 am
from mrg3@psu.edu Michael R. Gallis roller_coaster_dynamics.pdf

My thoughts:
this is getting very collaborative like 21st century interconnected world.


Greeting!
by the way everyone,

i am stuck trying to rectify programming "bug", trying to make the applet remember the  presets_combo drop down list.

I notice the list does not change after the reset button is pressed meaning i want to show the correct "option" dynamically.

My latest xml is here if you want to help remix ;D


 YouTube. Was stuck at Portland airport from 11pm to 4am, decided to use the time to make some promotional video on the applets shared during 2010 AAPT Summer Meeting in Portland, Oregon


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: Fu-Kwun Hwang on April 27, 2009, 06:22:17 pm
Add _view.presets_combo.setSelectedIndex(0); to your initialization page should fix the problem.
Sorry! it is not working. There is another problem!

What you should do is add _view.presets_combo.setSelectedIndex(0); in action property for reset button
change the reset button from
Code:
_reset();
to
Code:
_reset();
_view.presets_combo.setSelectedIndex(0);

You will find all the available functions when you type in _view.presets_combo.
That is the way I found the above solution!

By the way, you programming skill is getting better and better.


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on April 28, 2009, 08:33:56 am
Add _view.presets_combo.setSelectedIndex(0); to your initialization page should fix the problem.
Sorry! it is not working. There is another problem!

What you should do is add _view.presets_combo.setSelectedIndex(0); in action property for reset button
change the reset button from
Code:
_reset();
to
Code:
_reset();
_view.presets_combo.setSelectedIndex(0);

World best tips, so simple and elegant advise. Thanks Prof Hwang ;D


You will find all the available functions when you type in _view.presets_combo.
That is the way I found the above solution!
Yes! i just realized about this year of these special functions syntax, after tinkering with Christian Wolfgang's codes in the default Ejs installations examples.

But i don't see any documentation on this on http://www.um.es/fem/EjsWiki/index.php/Main/HomePage. Maybe it is too new?


By the way, you programming skill is getting better and better.

Nah, those codes are Michael's and Wolfgang's, i still beginner level! LOL ;)


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on May 02, 2009, 06:39:34 pm
i being uploading the latest version of the remix jar but it seems stuck at this version ejs_users_sgeducation_lookang_ejs_gallis_mech_RollerCoaster_RollerCoaster.jar

could it be a bug?

maybe the name string is too long?

for your info :D


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on May 04, 2009, 08:27:22 am
i deleted the old jar,

uploaded a new one but it is not showing up. ???

for your info 


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on May 05, 2009, 08:47:03 pm
bug!
seems to be ok shows everything but


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: Fu-Kwun Hwang on May 05, 2009, 09:10:16 pm
I might have found the problem. I was assuming that there is only one xml file in the jar file. However, you have several version xml files in the uploaded jar. The program did not know which one is the source and the program can not find the width,height and other parameter to generate the applet tag.
I just modified so that it might be able to find out the correct one.
Please tried it again!


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on May 05, 2009, 09:29:24 pm
wonderful! it is working now.

i don't remember Ejs to pack the xml work in process files, seems to be a new feature in Ejs April 2009 or so check box i didn't uncheck so it packs everything?

by the way, upload to NTNU is super broadband, but downloading is crawling like 5 Kbs, did someone limit the download bandwidth? Just wondering :o


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: Fu-Kwun Hwang on May 05, 2009, 10:06:02 pm
I can download your jar file in less than 5 second when I am at home (with a woreless connection).
Is it possible that it is something at your side which limit the bank width?


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: lookang on May 05, 2009, 10:27:57 pm
maybe u r rite, i did subscribe to a lower HOME Broad Band plan of 8MBps instead of the 12MBps recently

http://www.starhub.com/portal/site/Online/menuitem.935dac8c897c3fb7eaaf3b608324a5a0/?vgnextoid=333928043c6ef010VgnVCM100000464114acRCRD

(http://www.starhub.com/online/maxonline/images/p_mol_priceplan07.jpg)

maybe it is distance dependent.


Title: Re: Roller Coaster Physics by Michael Gallis & Wolfgang Christian remix by lookang
Post by: Fu-Kwun Hwang on May 05, 2009, 11:05:03 pm
I only have 3M at home. The main reason might be due to distance. You are much far away.
However, I did not problem when I connected to most of the web sites at Europe or U.S.
May be the connection between Taiwan and Singapore is not good enough.


Title: Re: Ejs Open Source Roller Coaster Physics Model Java Applet
Post by: lookang on June 14, 2011, 04:41:31 pm
strange it doesn't web load.

going to remove some of the controls to test


Title: Re: Ejs Open Source Roller Coaster Physics Model Java Applet
Post by: lookang on June 15, 2011, 03:45:49 pm
15 june 2011
added circular loop to the drop down menu
remove stuff to debug a web deploy problem that is fixed i think after removing the closest =true in some sliders.
revert to older ODE that has codes to account for KE+PE = TE conserved

enjoy!