NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
May 28, 2020, 06:25:06 am

Know yourself. Questioning. ...Socrates (469-399 BC)

 Pages: [1]   Go Down
 Author Topic: Free Fall Cartesian by Wolfgang Christian and Francisco Esquembre  (Read 9050 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: November 27, 2008, 02:05:21 pm » posted from:Singapore,,Singapore

Free Fall Cartesian extends the Free Fall model of a ball bouncing on a table top to include motion in the x (horizontal) direction.

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• 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!
 freefallcartesian.PNG (15.4 KB, 378x367 - viewed 555 times.) « Last Edit: August 03, 2009, 10:22:48 am by lookang » Logged
minstor
Newbie

Offline

Posts: 1

 « Embed this message Reply #1 on: January 30, 2009, 10:28:48 pm »

Very interesting post!

M.Minstor,-*-
 Logged
lookang
Moderator
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: August 03, 2009, 11:21:23 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

The model includes a trace that shows the ball's trajectory as well as a more sophisticated collision algorithm that takes into account the finite width of the table top.  Newton's second law F = ma  is a vector equation and  it must be satisfied in both the horizontal and vertical direction.
Fx = max Fy = may .
Because the force in the x (horizontal) direction is zero, the associated acceleration ax is also zero and the velocity vx is constant.  As in the Free Fall model, an impulsive normal force acting perpendicular to the table top reverses the ball's velocity upon collision.  The table top corner is treated as a special case.  The impulsive force from a corner collision is applied along a line from the corner toward the ball center.
References:
The Free Fall in Cartesian Coordinates model is designed to teach Ejs modeling.  Right click within the simulation to examine this model in the Ejs modeling and authoring tool.  See:
"Modeling Physics with Easy Java Simulations" by Wolfgang Christian and Francisco Esquembre, The Physics Teacher, November 2007, 45 (, pp. 475-480.
The Easy Java Simulations (EJS) documentation can be downloaded from the ComPADRE Open Source Physics collection and from the Ejs website.
Note:
This simulation was created 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: .

Because the Free Fall 2D model uses 9 variables we have chosen to create two variable tables in Ejs.  The table of dynamic variables contains values that evolve in time while the table of constant parameters contains values that remain fixed.  Creating separate tables to group variables is an effective way to organize data in Ejs models.
Horizontal motion adds a third differential equation to the Ejs evolution page.  We do not include a differential equation for vx because there is no force in the x direction.

Modeling the bounce on a finite table requires that we modify the previous Ejs collision event so that it occurs only when the the ball's x-position is between the table top corners.  As in the Free Fall event, a collision occurs only if the ball is moving downward.

Ejs supports multiple events and we have added a corner collision event (Event 2 is not shown here) to the model.  If the time evolution produces one or more event triggers, Ejs automatically attempts a smaller time step until it finds a time when the zero condition is satisfied for all events.  It is therefore very important that Ejs models be initialized in such a way that all events return positive values when testing the zero condition.  Otherwise, Ejs cannot find a valid starting time and the time evolution algorithm will fail.
Tip: You can temporarily disable an event by right clicking on the tab near the top of the events page.  Right-clicking within the coding text areas provides context-sensitive help.

My contributions are
1. comment lines on the events codes.
Event1:
Code:
if(vy>=0) return 1;  // ball is moving up so collision has occured
if(Math.abs(x)>floor_size/2) return 1; // ball center is past right table edge, do nothing
// starting ball x = -0.5 centre x =0, right x =0.5, so programming is floor_size/2 since floor_size=1.0 declared
return y-ball_radius;  // displacement of ball center above floor, return back to y-ball_radius
Action1:
Code:
// action if particle is falling and below the floor
vy = Math.abs(vy)*coef_of_restitution;
Event2:
Code:
if(vy>=0) return 1;  // ball is moving up so collision has occured
double dx=Math.abs(x)-floor_size/2; // distance of ball past corner
if(dx<=0) return 1;  // ball is on table
if(dx-ball_radius>=0) return 1;  // ball is past corner
return y-Math.sqrt(r*r-dx*dx);  // displacement of ball center above edge
Action2:
Code:
// action if particle is hitting corner of table
//double sin -> declares a variable of the numerical data type "double", allowing it to have decimal spaces
// if the x is lesser than 0
//it will evalulate the formula behind it and set the value of "sin" to its result
// it helps to visualise the angle made inside the circle one side is r the other is y.between

//rotate system
//to along surface of collison and perpendicular to surface of collision
double vx2= cos*vx-sin*vy; // vx2 is the velocity along the surface of collision
double vy2= sin*vx+cos*vy; // vy2 is the velocity pendicular the surface of collision

// do corner collision
vy2 = Math.abs(vy2)*coef_of_restitution;
//rotate back
// to the x and y coordinate system
vx= cos*vx2+sin*vy2; // actually it is cos vx2 + cos(90-teta)vy2
vy=-sin*vx2+cos*vy2; //actually it is -sin vx2 + sin(90-teta)vy2

2. panel for inputs of variables like vx and vy so that students can explore when if scenarios

source code
download the *.jar for using the applet on standalone without internet connection.

This is starting to get difficult for me
 Logged
 Pages: [1]   Go Up
Know yourself. Questioning. ...Socrates (469-399 BC)