15 june 2011 version with a circular loop, have not implemented the drag coefficient k yet. :)

http://weelookang.blogspot.sg/2010/06/ejs-open-source-roller-coaster-physics.html

https://dl.dropboxusercontent.com/u/44365627/lookangEJSS/export/ejs_model_rotateDiskwee.jar

https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_users_sgeducation_lookang_Roller_weeRollerCoaster07.jar

author: mike gallis, remixed by lookang

http://weelookang.blogspot.sg/2010/06/ejs-open-source-roller-coaster-physics.html

https://dl.dropboxusercontent.com/u/44365627/lookangEJSS/export/ejs_model_rotateDiskwee.jar

https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_users_sgeducation_lookang_Roller_weeRollerCoaster07.jar

author: mike gallis, remixed by lookang

« on: April 15, 2009, » posted from:Singapore,,Singapore

taken from Michael Gallis writeup

This applet simulates motion along a constrained path, such as what 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, motion in a vertical plane and friction. There are a number of example tracks which can be accessed via the drop down menu. Each of the tracks may be modified by dragging the control points which are visible when the simulation is paused. The user can also specify the coaster's initial speed (v

_{0}) which in turn affects the total energy of the coaster. The user can also input the strength of the aerodynamic friction force via the constant k. The friction force is given by**F**_{f}=-k**v**. The speed of the simulation can be modified by changing the calculation time step*dt*. The simulation tracks the roller coaster car's kinetic energy (KE), potential energy (PE) and mechanical energy (ME) which is the sum of KE and PE. If the car is subject to friction, thermal energy (TE) is also tracked to represent the "lost" mechanical energy.http://www.compadre.org/OSP/document/ServeFile.cfm?ID=8228&DocID=873

#### Compadre has strong curriculum worksheets download it and try it there Supplemental Documents (4)!

The user can also manipulate the tracks by means of control points when the simulation is paused. Select a track to edit from the drop down menu. For the custom track, the user can also specify the number of control points for the track in edit mode by changing N at the bottom of the window

Custom tracks can be saved by right-clicking on the window selecting

**Save State**. The custom track can be loaded by right clicking on the window and selecting**Read State**.Michael Gallis is the original creator, i only remixed it, refined it and fixed some bugs in the drop down menu

kindly hosted by NTNUJAVA Virtual Physics Laboratory by Professor Fu-Kwun Hwang

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1088.0

alternatively, go direct to http://www.phy.ntnu.edu.tw/ntnujava/index.php?board=28.0

Collaborative Community of EJS (Moderator: lookang) and register , login and download all of them for free :) This work is licensed under a Creative Commons Attribution 3.0 Singapore License

Author: Michael R. Gallis, Wolfgang Christian and lookang

Content: Barbara Christian, Anne Cox, and Mario Belloni

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

original writeup by Michael Gallis

A roller coaster traveling on a track under the influence of gravity. Bar graphs show the potential energy (PE), kinetic energy (KE) and total mechanical energy(E) of the car. You can drag the blue points on the track to new positions to change the shape of the track. Click on the document button to get an activity worksheet.

## Activities:

### Energy

The mechanical energy (ME) of the car is the sum of its kinetic energy (KE) and its potential energy (PE). The car's ME is determined by its initial height of the car and its initial speed (the initial speed defaults to zero). The initial potential energy (PE) is determined by the height of the start of the track, determined by the first control point of the track. Select the up and down example and then select edit track. Change the starting height of the track. What happens to the mechanical energy ME and the potential energy PE? Start the simulation by hitting the play button. How far up the other side of the track does the car get? How does the maximum height attained by the car on the right side of the track depend upon the initial height of the car? What happens to the mechanical energy when you change the initial speed?

Select the single loop example track and then select edit track. What happens to the total energy E and the potential energy PE as the initial height is changed? When the simulation is played, what happens to the motion of the car when the initial height is changed? Is there a relationship between the initial height of the car and the size of the loop when the car barely makes it around the loop?

Aerodynamic drag (friction) can be introduced by setting the drag coefficient to something other than zero. Values around .1 to .5 are good starting points. Pick one of the example tracks, set the friction coefficient to .20. What happens to the energy? When does it change the fastest? Where does the energy "go" in a real coaster? When the coaster is subject to friction, it "loses" mechanical energy ME, and the simulation tracks that loss as thermal energy TE.

You can set the coefficient in this simulation to a negative number. Try setting k to -.20 and run the simulation. Why is such a situation "unphysical"?

### Reaction Forces

Start with the "up and down" track and then select edit track. Move the control points to create a ramp that levels out, as shown above. Play the simulation and observe the reaction force at different parts of the track. This reaction force corresponds to “how heavy the rider feels”. Change the steepness of the left side of the track and observe the changes in reaction force. Is it possible to get the reaction force to be exactly zero? What would zero reaction force feel like in the “real world”?

Change your ramp track into a fairy symmetric U shape, as shown above. Play the simulation and observe the reaction forces.

Now make the bottom part of the track narrower by moving the bottom control points closer together (as below). What happens to the reaction force?

Select the loop example track and play the simulation. Where

__on the loop__is the reaction force greatest? Where is it the least? Now lower the starting height for the car so that the reaction force__at the top of the loop__is as small as you can make it. (This will have to be done by trial and error.) What would this feel like to a rider? Now adjust the starting height to be as low as possible and still have the car make it around the loop. What happens in this case to the reaction force at the top of the loop? What would this feel like to the rider, and is he glad he buckled his seat belt?- Play the simulation and watch what happens to the bar graphs. When is the kinetic energy (green) bar the maximum? When is the potential energy (purple) bar the maximum? How does the total energy (E) bar change? Does its height change? Explain.
- Stop the simulation. Use the "Steps the Simulation" button to step the simulation. Sketch the bar graph and position of car on the track to show maximum gravitational potential energy. Do the same to show maximum kinetic energy.
- Place the cross hairs on the car to find the height. Record the height and velocity of the cart at the maximum potential energy and maximum kinetic energy. Assume the car's mass is 1 kg. Calculate PE when velocity is zero. Calculate KE when height is zero. Do your answers make sense? Why?
- Select a new track from the drop down menu. Sketch the car on the track at various positions and use the heights of the graphs to show that mechanical energy is conserved.
- Advanced: Try the simulation where you add friction (click the Friction checkbox). What happens to the energy bar graphs? Why? Form a hypothesis about when mechanical energy is conserved.

Dynamics

Notes for Roller Coaster Applet

The coaster follows a path described by a parametric curve [x(s),y(s)], so that the coaster's position along the path can be described by the single variable s. Lagrangian mechanics can be used to determine the equations of motion. The kinetic energy is given by

KE = 1/2*m*v^2 = 1/2*m(x'^2+y'^2)

where primes indicate differentiation with respect to s and dots indicate differentiation with respect to time (t).

The potential energy is given by

PE = m*g*y

and the Lagrangian is given by

*L*=*KE*-*PE*.
Lagrange's equation

d/dt(dL)/ds dot - dL/ds = 0

yields

m(x'^2+y'^2)s'' + m(x'*x''+y'*y'')s'^2 + m*g*y' = 0

The dynamics are integrated numerically using Euler's Method:

?

To add frictionto the dynamics, Rayleigh's dissipation function

*F*is added (see Goldstein's Classical Mechanics, e.g.) where
?

The modified Lagrange Equation becomes

?

which yields

?

or

?

Because round off error in the numerical integration is significant, and because energy conservation is one of the principles being illustrated, kinetic energy is adjusted each iteration to ensure the total energy constant. At each iteration, the work done by friction is

so that for each iteration the total energy is "adjusted" by taking

*E*=*E*+*dW*. Finally, the "speed" of the particle is adjusted at the end of each iteration to ensure the energy is correct (_{f}*T + V = E*):
PE=g*ys(coaster_s);

E=Math.max(PE,E-k*(xsp(coaster_s)*xsp(coaster_s)+ysp(coaster_s)*ysp(coaster_s))*coaster_sv*coaster_sv*dt);

KE_est=E-PE;

if(KE_est>=1.0E-6) {

KE=.5*(xsp(coaster_s)*xsp(coaster_s)

+ysp(coaster_s)*ysp(coaster_s))*coaster_sv*coaster_sv;

coaster_sv=coaster_sv*Math.sqrt(KE_est/KE);

}

The reaction force is estimated from the acceleration of the coaster and the force of gravity. However, only the component of the reaction force estimate that is perpendicular top the track is shown in the simulation.

The friction force is shown, but it will generally be small in magnitude compared to the other forces. This may be a nuisance visual.

### Credits:

This simulation was created by Michael Gallis and modified by Wolfgang Christian using the Easy Java Simulations (EJS) modeling tool. You can examine and modify this simulation if you have Ejs installed by right-clicking within a plot and selecting "Open Ejs Model" from the pop-up menu. Information about Ejs is available at: <**http://www.um.es/fem/Ejs/**>.