NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 17, 2017, 08:55:27 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Progress is impossible without change; and those who cannot change their minds cannot change anything. ..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Torque on Pulley Due to the Tension of Two Strings/board:26-101-  (Read 7024 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
juro41
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
on: November 26, 2011, 08:46:09 pm » posted from:Bratislava,Bratislava,Slovakia

Pleas help me with this simulation. http://zamestnanci.fai.utb.cz/~schauer/contents/mechanics/rotations/ex10_4.htmlHow make this simulation. I never worked with ejs. Thanks.http://zamestnanci.fai.utb.cz/~schauer/contents/mechanics/rotations/ex10_4.html
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: November 27, 2011, 07:26:31 am » posted from:,,Satellite Provider

How can I help? What kind of help you need?
Logged
nobody_12
Newbie
*
Offline Offline

Posts: 6


«
Embed this message
Reply #2 on: November 27, 2011, 07:13:41 pm » posted from:-,-,CZECH REPUBLIC

to sis vybral pekne tezky applet  Smiley
Logged
juro41
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #3 on: November 28, 2011, 10:28:06 pm » posted from:ZLIN,ZLINSKY KRAJ,CZECH REPUBLIC

How can I help? What kind of help you need?


Which physics formula use? And how with him manipulate objects?
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #4 on: November 28, 2011, 11:36:17 pm » posted from:Idrija,Bohinj,Slovenia

Do you know how to calculate the net torque \vec{\tau}?
Then use \vec{\tau}=I \vec{\alpha} to calculate the angular acceleration \vec{\alpha}!
Logged
juro41
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #5 on: November 29, 2011, 03:49:42 am » posted from:Zlín,Zlinsky kraj,Czech Republic

pleas write me whole source code ... thanks
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #6 on: November 29, 2011, 07:37:42 am » posted from:Idrija,Bohinj,Slovenia

The simulation at http://zamestnanci.fai.utb.cz/~schauer/contents/mechanics/rotations/ex10_4.html was created with javascript calling physlet library. The source code for the physlet script is the following:
Code:
var timerID=0;
var loaded=false;

function initApplets(){
clearTimeout(timerID);
  loaded=true;
timerID=setTimeout("initApplet()",100);
}
 
function initApplet(){
  if(!loaded) return;
  timerID=0;
document.Massform.reset();

a=0;
alpha=0;
  document.Animator.setAutoRefresh(false);
  document.Animator.setDefault();
  document.Animator.setTimeDisplay(false);
  document.Animator.shiftPixOrigin(130,130);
  document.Animator.addObject("circle","r=20,x=0,y=0");
  id1=document.Animator.addObject("circle","r=19,x=0,y=0");
  document.Animator.setRGB(id1,255,0,0);
  document.Animator.addLine("2*cos("+alpha+"*0.5*0)","2*sin("+alpha+"*0.5*0)","0","0");
  idb=document.Animator.addObject("image","file=images/dpull.gif,x=0,y=0");
  document.Animator.setTrajectory(idb,"1.5","-14");
  document.Animator.addLine("0","-15-0.5*"+a+"*0","2","0");
  idc=document.Animator.addObject("image","file=images/lpull.gif,x=0,y=0");
  document.Animator.setTrajectory(idc,"-17","2.5");
  document.Animator.addLine("-15-0.5*"+a+"*t^2","0","0","2");
  document.Animator.addObject("circle","r=1,x=0,y=0");
idt=document.Animator.addObject("text","text=omega = ,calc="+alpha+"*t");
document.Animator.setDisplayOffset(idt,-130,-50);
document.Animator.setAnimationSlave(id1,idt);

  forcetext2=document.Animator.addObject("text","text=F");
document.Animator.setDisplayOffset(forcetext2,-20,-30);
forcetext2b=document.Animator.addObject("text","text=2");
document.Animator.setDisplayOffset(forcetext2b,-13,-35);
document.Animator.setAnimationSlave(idb,forcetext2);
document.Animator.setAnimationSlave(idb,forcetext2b);

forcetext1=document.Animator.addObject("text","text=F");
document.Animator.setDisplayOffset(forcetext1,0,-30);
forcetext1b=document.Animator.addObject("text","text=1");
document.Animator.setDisplayOffset(forcetext1b,7,-35);
document.Animator.setAnimationSlave(idc,forcetext1);
document.Animator.setAnimationSlave(idc,forcetext1b);


  document.Animator.addObject("circle","r=20,x=-18,y=-18");
  id1=document.Animator.addObject("circle","r=19,x=-18,y=-18");
  document.Animator.setRGB(id1,255,155,155);
  document.Animator.addObject("circle","r=2,x=-18,y=-18");
  document.Animator.addObject("arrow2","h=-10,v=0,x=-18,y=-16,thickness=2");
  document.Animator.addObject("arrow2","h=0,v=-5,x=-16,y=-18,thickness=2");
  document.Animator.addObject("arrow2","h=10,v=5,x=-18,y=-18,thickness=2");


 document.Animator.setAutoRefresh(true);
}


function cfn11_1(){
  if(!loaded) return;
  f1=document.Massform.force1.value;
  if( !checkRange(f1,0,10)){
  alert("F1 must be between 0 N and 10 N. Your value is "+f1+" N.");
  return;
  }
 
  f2=document.Massform.force2.value;
  if( !checkRange(f2,0,10)){
  alert("F2 must be between 0 N and 10 N. Your value is "+f2+" N.");
  return;
  }
 
  mass=document.Massform.mass.value;
  if( !checkRange(mass,0.1,4)){
  alert("The mass of the pulley must be between 0.1 kg and 4 kg. Your value is "+rad+" kg.");
  return;
  }
  rad=document.Massform.radius.value;
  if( !checkRange(rad,0.5,4)){
  alert("The radius of the pulley must be between 0.5 m and 4 m. Your value is "+rad+" m.");
  return;
  }
 
force1=eval(document.Massform.force1.value);
  force2=eval(document.Massform.force2.value);
  pulleymass=eval(document.Massform.mass.value);
  are=eval(document.Massform.radius.value);
hand1=eval(are-0.5);
hand2=eval(are+0.5);
  vector1=eval(are-18);
vector2=eval(-18+are);

arem=eval(are-0.1);
radius=eval(are*10);
mradius=eval(-are);
radiusm=eval(are*10-1);

a=eval(2*(force1-force2)/(pulleymass));
alpha=eval(a/are);
  document.Animator.setAutoRefresh(false);

  document.Animator.setDefault();
  document.Animator.shiftPixOrigin(130,130);
  document.Animator.setTimeDisplay(false);
  document.Animator.addObject("text","text=Time:  ,calc=t,x=-26,y=-26");

document.Animator.addObject("circle","r="+radius+",x=0,y=0");

  id1=document.Animator.addObject("circle","r="+radiusm+",x=0,y=0");
  document.Animator.setRGB(id1,255,0,0);
  document.Animator.addObject("circle","r=1,x=0,y=0");
  document.Animator.addLine("cos("+alpha+"*0.5*t*t)*"+arem,"sin("+alpha+"*0.5*t*t)*"+arem,"0","0");
  idb=document.Animator.addObject("image","file=images/dpull.gif,x=0,y=0");
  document.Animator.setTrajectory(idb,hand1,"-14+0.5*"+a+"*t^2");
  document.Animator.setSticky(idb,true);
  document.Animator.addLine("0","-15+0.5*"+a+"*t*t",are,"0");
  idc=document.Animator.addObject("image","file=images/lpull.gif,x=0,y=0");
  document.Animator.setTrajectory(idc,"-17-0.5*"+a+"*t^2",hand2);
  document.Animator.setSticky(idc,true);
  document.Animator.addLine("-15-0.5*"+a+"*t^2","0","0",are);
rid1=document.Animator.addObject("rectangle","h=20,w=20,x=-30,y=0");
rid2=document.Animator.addObject("rectangle","h=20,w=20,x=-30,y=0");
document.Animator.setForce(rid1,"0","0",-30,are,0,0);
  document.Animator.setForce(rid2,"0","0",are,-30,0,0);
document.Animator.setSticky(rid1,true);
document.Animator.setSticky(rid2,true);
document.Animator.setVisibility(rid1,false);
document.Animator.setVisibility(rid2,false);
document.Animator.setCollisionMessage("End of Animation");
document.Animator.setOneShot(0,5,"End of Animation");
idt=document.Animator.addObject("text","text=omega = ,calc="+alpha+"*t");
document.Animator.setDisplayOffset(idt,-130,-50);
document.Animator.setAnimationSlave(id1,idt);
 
 
  forcetext2=document.Animator.addObject("text","text=F");
document.Animator.setDisplayOffset(forcetext2,-20,-30);
forcetext2b=document.Animator.addObject("text","text=2");
document.Animator.setDisplayOffset(forcetext2b,-13,-35);
document.Animator.setAnimationSlave(idb,forcetext2);
document.Animator.setAnimationSlave(idb,forcetext2b);

forcetext1=document.Animator.addObject("text","text=F");
document.Animator.setDisplayOffset(forcetext1,0,-30);
forcetext1b=document.Animator.addObject("text","text=1");
document.Animator.setDisplayOffset(forcetext1b,7,-35);
document.Animator.setAnimationSlave(idc,forcetext1);
document.Animator.setAnimationSlave(idc,forcetext1b);

document.Animator.addObject("circle","r="+radius+",x=-18,y=-18");
  id1=document.Animator.addObject("circle","r="+radiusm+",x=-18,y=-18");
  document.Animator.setRGB(id1,255,155,155);
  document.Animator.addObject("circle","r=2,x=-18,y=-18");
  document.Animator.addObject("arrow2","h=-"+force1+",v=0,x=-18,y="+vector1+",thickness=2");
  document.Animator.addObject("arrow2","h=0,v=-"+force2+",x="+vector2+",y=-18,thickness=2");
  document.Animator.addObject("arrow2","h="+force1+",v="+force2+",x=-18,y=-18,thickness=2");
document.Animator.setAutoRefresh(true);
  document.Animator.forward();
}

function killmenow(){
window.onerror= function() { return true;}
clearTimeout(timerID);
loaded=false;
timerID=-1;
}

Logged
juro41
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #7 on: November 30, 2011, 04:13:11 pm » posted from:Zlín,Zlinsky kraj,Czech Republic

it is possible to convert this source code to java code?
Logged
ahmedelshfie
Ahmed
Hero Member
*
Offline Offline

Posts: 954



«
Embed this message
Reply #8 on: November 30, 2011, 07:57:08 pm » posted from:SAO PAULO,SAO PAULO,BRAZIL

I believe you can convert any java code to java class, however you need to download program to compile i suggest DJ Java Decompiler, remember you should download java J2se sdk too.

You can download DJ Java Decompiler from here http://members.fortunecity.com/neshkov/dj.html
Logged
juro41
Newbie
*
Offline Offline

Posts: 11


«
Embed this message
Reply #9 on: December 08, 2011, 11:39:05 pm » posted from:Zlín,Zlinsky kraj,Czech Republic

pleas if is possible send me .jar file. thanks
Logged
Pages: [1]   Go Up
  Print  
Progress is impossible without change; and those who cannot change their minds cannot change anything. ..."George Bernard Shaw(1865-1950, Irish dramatist, essayist and critic, Nobel Prize for Literature 1925)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Another balanced forces (with tension)
Dynamics
Fu-Kwun Hwang 0 10621 Last post February 25, 2007, 11:16:45 am
by Fu-Kwun Hwang
Pull weight over a pulley cylinder - help/board:26-1-
Request for physics Simulations
elendin 1 7834 Last post November 24, 2011, 01:00:43 pm
by Fu-Kwun Hwang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.283 seconds with 23 queries.since 2011/06/15