virtual laboratory simulation for One Dimension collision of two carts allowing inquiry learning for elastic and inelastic studies.Thanks To Professor Fu-Kwun Hwang for guidance and Professor Francisco Esquembre for EJS and the open source digital library source codes.Ejs open source, the web applet is from C:\EasyJavaSimulation\EJS_4.1_090609\EJS_4.1\workspace\export\ejs_Collision1Dwee15workingweb.jarthe refined Ejs copy is not deploying correctly in web applet but available as a direct download jar for classroom intervention.License:http://creativecommons.org/licenses/by-sa/3.0/sg/

Original code from by Prof. PacoF:\EasyJavaSimulation\EJS_4.1_081216\EJS_4.1\workspace\source\users\murcia\fem\physics\mechanics\Collision1D.xml

The motion of a body of mass m and velocity v is described by a vector quantity known as momentum p where

p = m v

When objects collide, whether trains, cars, billiard balls, shopping carts, or your foot and the sidewalk, the results can be complicated. Yet even in the most chaotic of collisions, as long as there are no net external forces acting on the colliding objects, one principle always holds and provides an excellent tool for understanding the collision. That principle is called the conservation of linear momentum which states that

The total momentum of a system remains constant provided that no external resultant force acts on the system

For two bodies colliding linearly, it is written mathematically as a vector equation

Total initial momentum = total final momentum

m1.u1 + m2.u2 = m1.v1 + m2.v2

If external forces (such as friction) are ignored, the total momentum of two carts prior to a collision (left side of equation) is the same as the total momentum of the carts after the collision (right side of equation).

Radio ButtonsAllows for selecting what kind of collision is simulated.

A Perfectly elastic collision is defined as one in which both conservation of momentum and conservation of kinetic energy are observedA Perfectly Inelastic collision is defined as one in which conservation of momentum is observed but the colliding carts stick together after collision with kinetic energy loss

Checkboxesshow: velocity, for visualizing the velocity vectorplot momentum vs time graph, for different representation of data for momentum of cart 1, 2 and both.plot kinetic energy vs time graph, for different representation of data for kinetic energy of cart 1, 2 and both.paused when collide, for visualizing the change in the velocity u1 and u2 to v1 and v2fast simulation, for cases where the velocity are low and repeat learners can spend time more usefully collecting and analysing data.hint: COM, for the equation of conservation of momentumhint: COKE, or the equation of conservation of kinetic energy

ButtonsPlayStep BackStep ForwardInitializeResethave their usual meaning.known bug is the Step Back button implementation, please fix it if you can and email me the improved source XML.

Credits: The Momentum 1D Collision model was created by created by lookang using the Easy Java Simulations (EJS) version 4.2 authoring and modeling tool. An applet version of this model is available on the NTNU website . Shout our thanks to the Ejs community namely, Francisco Esquembre , Fu-Kwun Hwang and Wolfgang Christian for their professional learning community support. You can examine and modify this 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, of course, have EJS installed on your computer. Information about EJS is available at: http://www.um.es/fem/Ejs/ and in the OSP comPADRE collection http://www.compadre.org/OSP/.

virtual laboratory simulation for One Dimension collision of two carts allowing inquiry learning for elastic and inelastic studies.Thanks To Professor Fu-Kwun Hwang for guidance and Professor Francisco Esquembre for EJS and the open source digital library source codes.

Original code from by Prof. PacoF:\EasyJavaSimulation\EJS_4.1_081216\EJS_4.1\workspace\source\users\murcia\fem\physics\mechanics\Collision1D.xml

1 D collision for analysis with Elastic and Inelastic Collision by lookangCollision 1DThis is a simulation of a one-dimensional collision of two rigid disks.

It is a simple example of the event-handling features of the ODE solvers in Easy Java Simulations.source codedownload the *.jar for using the applet on standalone without internet connection.if you want to recompile without errors with the worksheet graphics, download the 1.4MB jar, expand it, copy the folder Collision1Dwee01 into the source folder location, it should recompile nicely with all graphics available!

Modifications done are:1. rigid rectangles 2. added wheels3. added floor4. added panel for inputs5. added coefficient of restitution e, http://en.wikipedia.org/wiki/Inelastic_collision6. added plot of KE vs t and Momentum vs t7. change look for object 1 is RED and object 2 is blue8. added checkbox for view of plot9. added buttons of elastic and inelastic selection10. change buttons to open-source physics.org default ones11. added deterministic equations C.O.K.E. and C.O.M.12. added view zoom slider13. added color change easy14. added enable buttons only at start of simulation15. added slider for m1 m2 v1 v2 with closest ticker for inquiry learning16. added calculation for tcollision and tmaxleft and tmaxright17. added enable play button only if collision occurs in the view max18. added stepback() function by using dt = -dt with if else statement19. added stepforward() function to replace _step() as need a way to remember dt20. added wheelAngle to rotate the wheel21. added mass1 and mass2 stored values after reset through a work around after considering initialise method but i decide to do the reset method.22. added bigger arrows and texts before and after tcollision to alert learners to difference in u1, u2 and v1 ,v223. added before hint is shown for t < tcollision24. added physical detection when press cart1 and cart2, to prevent overlap of carts25. fix some bugs on enable play button for detecting collision in screen26. known bug of u1 =0.5 and u2 = 0.5, the play button is still allow........ strange?27. rearrange the codes for housekeeping less messyMarch 11 2009 28. redesign to make look wheel more circle29. remove hints to suit request to try without from school30. rearrange bottom panel31. make graphs to show by defaultMarch 19 2009 32. added graphics of springs and velcro for elastic and inelastic collision33. added checkbox for values of m1u1=, m2u2= m1u1+ m2u2=, m1v1=, m2v2= m1v1+ m2v2=, 0.5m1u12= and so on to aid data analysis in worksheet activity, for pattern recognitionMarch 20 2009 34. added magnets for elastic and velcro for inelastic now with tooltips!March 21 200935. changed to spring for elastic36. redesign the table for valuesJanuary 21 201037 fixed a bug of the velcro and springs not draggable and dislocate the carts, now it is activated by on press and on exit, sensitivity at 10 to make it easily to mouse over the velcro TT and springJanuary 24 2010 only Available on the standalone jar file http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=831.0;attach=162838 modify the codes to show partial inelastic collision with an input field of e = 039 modify partial to Math.random() 40 remove the number of ticks and closest "false" in order to deploy as a web applet41 added input field for velocity u1 and u242 the appears to be an issue of stability after using Ejs 4.2.7 to compile the source codes, i will investigate and try Ejs 4.2 to test out the codesMarch 6 201043 made the text for graph click-able as the check-box44 set x max to tmax as requested by leongster, improving the visual learning of interpretation of the graphs instead of auto-scale immediatelyMarch10 201045 added centre of mass as inspired by tatlee08 and http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=5.msg5482;topicseen#msg548215 April 201046 Fixed an input field of e to be allow to take values from user to allow exploration of e, technique used is assign es to the field47 made the bottom smaller to fit into the view of width = 750 when web deployedrealized guest accounts canot see attachment which makes my *.jar almost difficult to find by interested learners.April23 201048 increased the sensitivity of cart1 and 2 for ease of drag of carts instead of the exact center49 added codes to prevent the applet from jamming when the carts are placed at extreme left and right by inserting +0.001 and -0.001 into the x positions of the carts thanks to HY LEE for finding the bug.50 fixed a calculation of tcollision, remove from evolution page, only in initialization page now because the calculation is deterministic.18May201051 fixed a bug with the time due to the introduction of 49, added -0.001 and +0.001 to the left and right side of the extremeif (x1>=(max-radius1-0.001) || x1<=(-max+radius1+0.001) || x2>=(max-radius2-0.001)|| x2<=(-max+radius1+0.001)){_pause();}52 added the worksheets and suggested answer key into the jar file for ease of scaling to other classrooms in the world53 added portuguese language translated by ahmedelshfie, thanks!26May201054 added game like assessment of learning input fields for students to check for understanding thanks to student feedback from rvhs http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=831.msg6291#msg629155 made color background of last column uniform 29May201056 finer customization of assessment for learning game feedback now recognize elastic and inelastic and partial57 added sound effect for collision for partial and inelastic, elastic has no sound because real life use like poles of a magnet to repel simulate collision refer to http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=824.0 for sound adding58 added data analysis tool for graphs data like tracker59 worksheets and suggested answer all packed inside the jar, 1.6 mb file now.15 June 201060 remove the "pause when collide" checkbox since it seems to not work anymore61 width = 600 resized31 March 2011made all the vectors point to the right by adding Math.abs() for consistent pen paper discussionmade the table editable for clearer values though it cannot be edited, for journal paper graphics

i started doing html again in EJS4.1 16 dec 2008 version

this is another world class applet in my view, built on the strengths of open source, and contribution by great man like prof paco and prof hwang.

addition improved in next version:a prediction of collision before showing the 2 equations of MOM and COKE because it did not collide and the equations shown are for assumed the is a collision.

You did not change the transformation as I indicated above.You set it to ro:wheelAngledHowever: no variable defined as wheelAngled available.Change the above towheelAngle(Yes. Without ro:)And it should work (for wheel01 and wheel012).

Look thru your work sheet. It would be interesting if the students also have a hands-on to compare theory and practice. Can we:1) Split class in half - one use the applet another using the collision carts but with similar worksheet. Then get them together to compare their solution.2) Do the same task using applet and collision carts. However this will not generate much discussion

Look thru your work sheet. It would be interesting if the students also have a hands-on to compare theory and practice. Can we:1) Split class in half - one use the applet another using the collision carts but with similar worksheet. Then get them together to compare their solution.

.

My thoughts:Actually my previous school did the real lab in 2007, it is very difficult to setup with data loggers and can't vary mass easily, the range of space for collision also need about >0.5m for data logger to read distance of the carts. But if you sure you want a side by side intervention, just be ready for chaos in the real lab and lots of time for trouble shooting.

My position:I am okay with both as long as you are Let's discuss more what is our research question.

My take on EJS vs Real Data logger labMy experience tells me both (real and virtual) will have advantages and disadvantages over the other method.

A great teacher (CHEE YS) once enlightened us:It is not about which is better, black vs white paradigm, it is about bringing the best of both the virtual world and real world to achieve meaningful learning for students, the degree of both as to speak "blended learning"?

My original idea:Let me go find the research that just record their journey, I hope it is more impactful & meaningful. research less, students learn more & teach less, learn more.

The center of mass is not at the same position before/after the collision.It is fine, if you change the velocity to 2.6 and -2.6But you will not be able to set velocity to 2.5 or -2.5 again if you have dragged the slider.It is a minus bug in the code.You can ask students: what is wrong in the simulation! May be they can find out more. This is another way of learning. (Could be fun,too!).

You are welcomed to find out if there is anything wrong in my simulations,too!We all make mistakes! At least, I do!

public void drag () {//double aaa =Math.abs(x1-x2);/ x1 is position centre of cart1 //x2 is position of cart2//radius1 is length centre to edge of cart1//radius1 is length centre to edge of cart2

if ( Math.abs(x1-x2){ x2 = x1+(radius2+radius1);// i used the idea of function to make cart1 on drag to make x2 some equal distance from x1 to give the appearance of push together due to physical constraint touching together if Math.abs(x1-x2)}// x1 = -2*radius1+x2+2*radius1;// x2 = x1+2*radius1-2*radius1;

}could it be the i have codes is causing the codes not to work?it look correct but don't know why nothing happens like i intended with the codes.

1. You can write code directly inside the action property field.I define custom function when it is used more than one places.2. What you did seem to be correct. May be there are something wrong at other places. Please upload your xml file so that I can check it.

sorry i got a lot of tabs in the xml, short codes so that i can follow myself, and do simple copy and paste if i need to remixed into other xml, it looks messy but i prefer this to a one tab with many sections of codes.

It works when I add the following code to the end of "Fixed relation" page.

Code:

if ( Math.abs(x1-x2){ x2 = x1+(radius2+radius1);}

It means you have a command set x2=0.0 in one of your tabbed pages (either _initialize pages or Fixed relation pages) orYou have so many pages, I can not find it. (I would suggest you find a better way to organize your pages!

will do some real student learning on 23 25 26 / march 2009. thanks to LeeTl

it will be based on virtual laboratory type of worksheet.

i doubt the school education system encourage student construct and modify EJS codes constructionism type of learning. Maybe i can explore more along this direction when i go back to teach in class in 2010 July.

There are a lot of image files in your xml source.It will take time to read all the images into EJS and eat up memory quickly.If the image files are only needed in the intorduction page. You can write those information into a html file and include html into EJS. This might help (However, I have never tried it before. So I really do not know.).