Author Topic: Ejs Open Source Roller Coaster Physics Model Java Applet  (Read 47559 times)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Ejs Open Source Roller Coaster Physics Model Java Applet
« on: April 15, 2009, 12:07:54 pm »
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

Full 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
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: June 15, 2011, 04:41:32 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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
« Last Edit: December 08, 2009, 10:57:01 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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! :)
« Last Edit: June 15, 2011, 04:44:57 pm by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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
« Last Edit: July 26, 2010, 10:20:04 pm by lookang »

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
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
_reset();
to
_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.

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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
_reset();
to
_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 ;)
« Last Edit: April 28, 2009, 09:35:28 am by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
i deleted the old jar,

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

for your info 
« Last Edit: May 04, 2009, 09:28:54 am by lookang »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
bug!
seems to be ok shows everything but

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
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!

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
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?

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
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



maybe it is distance dependent.

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
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.

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Ejs Open Source Roller Coaster Physics Model Java Applet
« Reply #14 on: June 14, 2011, 05:41:31 pm »
strange it doesn't web load.

going to remove some of the controls to test