NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Information about this web site => Request for physics Simulations => Topic started by: kostenzer on November 30, 2010, 04:31:48 am



Title: Request: looping with energy and normal force
Post by: kostenzer on November 30, 2010, 04:31:48 am
Request: looping with energy and normal force

For educational use I am looking for an applet like http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=693.0 (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=693.0)  Pity, I can see only the snapshot. The applet self stays black.

In the request applet I would like to see Gravity force, Normal force and centripetal force, changing during the motion in for example a perfect circular looping of a coaster.

Switch on/off the influence of energy: speed in relation to height. If speed gets to low mass leaves circular motion for a time to perform a ballistic curve.

Displayed  bars for actual kinetic and potential energy

Changes user can make: changes in mass, speed .
Radius may stay constant.

I searched Internet for it but did nothing find.

Who is willing to spent time to program this?

Thanks

         


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on November 30, 2010, 11:43:30 am
1. I can view simulation at http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=693.0 without any problem .
May be you can try it again. Or you can click "get file for offline use" button, download the jar file, double click it to run the simulation locally.
2. You are welcomed to check out related simulation: Circular motion in vertical plane  (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=190.0)



Title: Re: Request: looping with energy and normal force
Post by: kostenzer on November 30, 2010, 06:12:26 pm
Thanks for the link.

3 Re: Circular motion in vertical plane  from ahmedelshfie ( http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1887.0 (http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1887.0) ) is a good one to start with.

Most simulations I can view without problem.
Some stay black The mentioned one is playing now. I hope it will stay like this.
Thanks again




   
   


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on November 30, 2010, 07:18:21 pm
I just created a new simulation. I hope it is what you want.
Because the result did not depent on mass (m=1), so I did not add mass control.
User can change the height, and find out what is the maximum height for the object to be able to complete a circle.


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on December 05, 2010, 10:32:05 am
Quote
First of all, thanks for spending time in this.
I'm not a native English speaker (from the Netherlands) so I hope you understand what I write.
There are some things where must be paid attention to:
If using step, the black curve is not drawn.
If you take R between 1,5 and 1,7 there is something strange going on( ore a new physical law?  Wink)
The same happens between 2 and 2,5 while increasing the radius.
If the curve is good again and you decrease the radius it stays good fore a while.
Checking normal force doesn't change anything in displaying to me.
The above bugs are fixed now.

Quote
The first part could be a straight line. It mustn't be a curve.
If it is a straight, then there is a dis-continuity when it move into the second part.
Normally, coster are curve path, is not it?

Quote
The grey square, must it not be hidden if it has no meaning?
I added it to show components of gravity (tangential/normal components)

Quote
Further requests:
Could the speed of playing the applet made variable, even reverse the motion?
I added another slider to change fps(frame per second), reduce it to smalleer value will show down the motion.
Quote
Could be switched between play and step during the performing of the motion?
I do not understand what do you mean?
The step button should be useful when the simulation is in paused mode.

Quote
The kinetic and potential energy you display in the top of the screen, could it be represented as bars?
I don't know what would be better. 2 separate bars  or two bars connected. You can see than that the total amount of energy doesn't change.
I added two connected bars.
Quote
Could the radius be given in numbers? It is hard to give the exact radius with mouse. 2.00->1.99
I add marks, I hope it is better now.

Quote
Now the applet represents a not attached object in the looping as I asked. Could it be made to switch to ad attached mode, like a roller-coaster. It won't get a bullet curve if to less energy, but goes back.
If you can provide an image, I will add it as an option.
Quote
Could the buttons reset and init switched? I press automatic reset but want init.

I hope I'm not demand to much in this feedback.


It is updated! I hope you like the new version.


Title: Re: Request: looping with energy and normal force
Post by: kostenzer on December 07, 2010, 10:14:01 pm
YES!

This one is very nice!
Not really important, but with radius, lets say 2.3, the black curve crosses the blue one when descending. Actually it must follow the blue one again.
The bar is fine. Would it not be nice when the bar was as long as the height of the object is starting? Then it represents the "h" in E=m.g.h
The green bar is rounded at the top. Could it be made straight? Looks better to me.


The last request was: let stay the object in its curve with not changeable radius. It must stick to the curve. Now he will make it to go round, ore not.
It depends of the energy he has when he is going into the looping/curve
The first image shows what you have been accomplished now, WOW!
The second one is the second request. You -or a marble- has to stick to the curve and gets round or not...
I hope my explanation makes you understand what I mean.

Thanks

Rob


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on December 07, 2010, 11:03:45 pm
I add a velocity vector (red arrow). User can drag from the center of the ball to change the initial velocity.
In this case, user can change initial kinetic when it is in puased mode.

It is updated again.
Let me know if the latest version is better, or not?


Title: Re: Request: looping with energy and normal force
Post by: kostenzer on December 08, 2010, 05:44:54 am
If the ball reaches the bottom of the looping, the arrows sudden grow. In as well step as play modus.
It is nice to change initial velocity.

What are you? Student? Teacher? Employee?
Is it your job to make applets?
I think,your doing a good and quick job. Thanks.

I'm curious how the version with fixed radius will bee.
I know a very little bit of programing. I think I'll study the source file. May bee I understand a little bit of it.....

Is it due to my XP machine and firefox 3.6.12 java 6 update 22-b04?
The first time the applet is loaded I get only a black screen.
If I open a new tab there the applet is after a while as it must be.
Returning to the first tab and renew the page at last this is good to.
Are you familiar to this behavior. 

Regards

Rob



Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on December 08, 2010, 09:40:19 pm
Quote
What are you? Student? Teacher? Employee?
Is it your job to make applets?
I am a physics professor at Dept. of Physics, National Taiwan Normal University.
I love physics and I enjoy the fun of physics. I hope my applet can help others to enjoy the fun of physics,too! 

If you have installed EJS. Click right mouse and select "open EJS model" to open EJS,
and you will find what variables are defined, what kind of equations are being used in the simulation.
You can change the code and click green button to generate new simulation,too!
Welcomed to the world of EJS ;D

Quote
The first time the applet is loaded I get only a black screen.
I have similar problem if I open too many tabs, or browser use too much memory/resources.
And the size of EJS created jar are about 1.5M for fully function code (user can create animated gif or do curve fitting... etc when you run jar file locally) so it also take time to wait for broswer to download full size code from our server.



Title: Re: Request: looping with energy and normal force
Post by: ahmedelshfie on December 09, 2010, 12:02:56 am
I suggest if you already download the jar file in you PC will be more easy to no have this problem about loading
Because i believe the way prof Hwang explain about loading applets especially size of applet 1.5 M reason to happened it.
And it take some time to loading completely in page, happened with me too when loading applet still appear black screen.
Quote
I have similar problem if I open too many tabs, or browser use too much memory/resources.
And the size of EJS created jar are about 1.5M for fully function code (user can create animated gif or do curve fitting... etc when you run jar file locally) so it also take time to wait for broswer to download full size code from our server.
I believe this is the problem that meet every one happened with he it.


Title: Re: Request: looping with energy and normal force
Post by: kostenzer on January 13, 2011, 06:54:38 am
Hello Fu-Kwun Hwang

At last I found some time to check your applet.
Unfortunately there are still a few bugs.

If the mass reaches the bottom of the loop for the first time, the arrow of the centripetal force and normal force become suddenly twice the size they had one step before.

After the loop the normal force shrinks suddently

After the first 90 degrees the normal force suddenly shrinks almost to nothing.
From here 180 degrees later the opposite happens the normal force grow suddenly to the size of the centripetal force.


Regards


Rob


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on January 13, 2011, 10:15:34 am
Quote
If the mass reaches the bottom of the loop for the first time, the arrow of the centripetal force and normal force become suddenly twice the size they had one step before.
The curvature of the trajectory changed when the mass reaches the bottom of the loop,
 i.e. the radius r for the circular motion change to a small value so the needed centripetal force become larger. $F=m\frac{v^2}{r}$.  

Quote
After the loop the normal force shrinks suddenly
After the loop, the normal force equal to the weight mg of the object.
While in the loop, the normal force equal component of mass in the normal direction, plus centripetal force.
Quote
After the first 90 degrees the normal force suddenly shrinks almost to nothing.
From here 180 degrees later the opposite happens the normal force grow suddenly to the size of the centripetal force.
Yes. there seems to be a bug between 90-270 degree. The normal force should equal to component of mass in the normal direction, plus centripetal force. I will check it again and update it soon!


P.S. The simulation has been updated.


Title: Re: Request: looping with energy and normal force
Post by: lookang on September 19, 2011, 04:04:52 pm
Hi Prof,

i like the simulation above and wish to add an option for the simulation to start on a straight horizontal track.

i encounter a problem in introducing a new stage i called stage==4  

IN FIXED RELATIONSHIP i added
else if(stage==4){ // moving in straight motion on the start track by lookang
stagetext = "moving in straight line motion on the start track";
 omega=0;
 v=vx;
 cst = 0; // turn off gravity
// x=xmin + vx*t;
//y=ymin+size2;
 cf=0;
 nf=m*(g); // change by lookang
 cta=3*pi/2; //  -pi/2 ;possible bug identified by lookang as angle is not consistent as vertical to velocity vector counterclockwise +
 acentre = 0;
 atangent = 0;
 aresultant = Math.sqrt(acentre*acentre+atangent*atangent);
}


but i cannot figure out by myself the meaning of EVENT
what should i do to allow an option to start on a horizontal track, similar to the stage 2 exit horizontal track? :)

i tried to edit the EVENT Zero condition
//if(stage==4)return -cta-pi/2;
 if(stage==0||stage==4)return -cta-pi/2; // but this does not work
//  else if(stage==4)return -cta-pi/2;
else if(stage==1){
  if(cta>0 && cta<pi){
    return r2*omega*omega-g*Math.sin(cta);
  }
  return 1.5*pi-cta;
}
return 1.0;

the ACTION is also edited to reflect the resulting omega if it moves from stage 4 ( i introduced) to stage 1 ( circular track)
if(stage==0){
  stage=1;
  omega=omega*R2/r2;
}
if (stage==4){
    stage=1;
  omega=vx/r2;
  }


else if(stage==1){
 if(cta>0 && cta<pi){//free fall
  stage=3;
  v=r2*omega;
  x=xmin+R+r2*Math.cos(cta);
  y=ymin+r+r2*Math.sin(cta);
  vx=-v*Math.sin(cta);
  vy=v*Math.cos(cta);
  cst=-1;
 }else if(cta>4.5){//complete loop
  stage=2;
  vx=r2*omega;
  vy=0;
  y=ymin+size2;
  x=xmin+R;
 }
}

attached is my ejs for your understanding what i am trying to do.
i also attached the ejs simulation for quick testing
the picture shows the error i suspect it due to my lack of understanding the meaning of Events and the syntax of "return" and how to use it.  
to change stage, the right bottom has a field for manual input to '4' from '0' to activate the stage 4 //start on a straight horizontal track.

any chance you can modify your simulation so that i can observe the new source codes?
or some tips for me to work on :)

thanks!




Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on September 20, 2011, 05:11:54 pm
In the above simulation, the object is leaving when it is on the horizontal track.
It is always starts from stage==0, then move to stage==1, 2,3
Those are different stages in one complete trip.

What do you mean by "start on a straight horizontal track"?
Do you mean moving in from the right side (with velocity pointing to the left)?



Title: Re: Request: looping with energy and normal force
Post by: lookang on September 20, 2011, 06:16:23 pm
In the above simulation, the object is leaving when it is on the horizontal track.
It is always starts from stage==0, then move to stage==1, 2,3
Those are different stages in one complete trip.

What do you mean by "start on a straight horizontal track"?
Do you mean moving in from the right side (with velocity pointing to the left)?


I mean move to the right v = + and start on the left side x=xmin+size2
y=ymin+size2

I created an addon stage ==4 I was trying to remix into an additional option for exploring straight line
For which it if selected go stage 4,1,2 or 3
Everything is the same as your simulation in stage 0,1,2or3

Thanks!


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on September 20, 2011, 07:22:17 pm
In this case, you can add a new variable: e.g. horizontal_mode
then you only need to change the code for phase==1
if horizontal mode is true: set x to change with constant speed, y keep the same
if horizontal is false: keep the original code


Title: Re: Request: looping with energy and normal force
Post by: lookang on September 22, 2011, 09:59:22 am
Thank you for the tip, appreciate the reply even more from MPTL16  Idrija,Bohinj,Slovenia.

I still can't get it to work despite knowing the logic of the option 4.

I suspect I need to understand the event handler this syntax return.

Now, it just move from stage 4 (straight xmin,ymin, v =+ to stage 2 Xmax , ymin, v= +
I will try again when more free :)
Thanks !!


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on September 23, 2011, 04:36:03 pm
I added a checkbox at the left in the control bar.
Click the checkbox at the far left. and you will get what you want!
User can drag initial velocity,too!


Title: Re: Request: looping with energy and normal force
Post by: lookang on September 23, 2011, 04:40:51 pm
Thanks!
Will study the codes when time permits.
U can see why I am busy now in Facebook :)
2nd baby just born Tuesday !!
Cheers and thanks very much for your new features


Title: Re: Request: looping with energy and normal force
Post by: ahmedelshfie on September 23, 2011, 05:28:18 pm
Oh lookang, congratulation, i'm so happy for you  :D :D


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on September 23, 2011, 06:43:08 pm
Congratulation! You must be very happy! :D


Title: Re: Request: looping with energy and normal force
Post by: awais_x on October 18, 2011, 06:29:47 am
Whao!!!! great information about the topic i like to watch it when people need it more as a guider..
Keep it up guys...
-*-


Title: Re: Request: looping with energy and normal force
Post by: steve70 on December 09, 2011, 07:16:13 pm
I completely agree, great forum! I’m glad I stumbled across this website!


Title: Re: Request: looping with energy and normal force
Post by: lookang on March 09, 2014, 10:09:04 pm
dear prof,
i got a request from teacher
Quote
2. The trajectory mapped out for h<2.5r assumes that the track is imaginary. For a real track, it won't be like this, i.e. the object will be confined within the loop. Is it possible to simulate the real case?
(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=2009.0;attach=5272)
i not sure how to handle the collision condition elegantly.
do you have the time to code this inside your model so i can study your idea?

My request:
can add codes into your model that after free fall hits track and move in circular motion (assume e=0) to move off with velocity tangential to the circular track?

thanks!

my latest version is here
http://weelookang.blogspot.sg/2011/09/ejs-open-source-circular-loop-vertical.html
https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_model_coaster5wee.jar


Title: Re: Request: looping with energy and normal force
Post by: Fu-Kwun Hwang on March 15, 2014, 05:13:40 pm
Sorry for the late reply. I was busy recently and I  found your message today.

I just modified the code and it is updated.


Title: Re: Request: looping with energy and normal force
Post by: lookang on March 15, 2014, 09:51:05 pm
thank you!


Title: Re: Request: looping with energy and normal force
Post by: lookang on March 17, 2014, 12:55:06 pm
Sorry for the late reply. I was busy recently and I  found your message today.

I just modified the code and it is updated.

i have completed my customization!
enjoy!
https://dl.dropboxusercontent.com/u/44365627/lookangEJSworkspace/export/ejs_model_coaster96wee.jar



Title: Re: Request: looping with energy and normal force
Post by: varunmix on December 28, 2014, 10:44:25 pm
looping with engery and normal force is good thing ai telugu songs download (http://www.merryxchristmas.com/2014/12/aii-movie-telugu-songs-listen-online-free.html) do mention