NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
February 26, 2020, 11:28:53 pm

Peaceful solution is always the best solution. ...Wisdom

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

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
Hero Member

Offline

Posts: 3085

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

 Logged
nobody_12
Newbie

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
 Logged
juro41
Newbie

Offline

Posts: 11

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

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

Offline

Posts: 3085

 « 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

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
Hero Member

Offline

Posts: 3085

 « 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;

function initApplets(){
clearTimeout(timerID);
timerID=setTimeout("initApplet()",100);
}

function initApplet(){
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.setRGB(id1,255,0,0);
document.Animator.setTrajectory(idb,"1.5","-14");
document.Animator.setTrajectory(idc,"-17","2.5");
document.Animator.setDisplayOffset(idt,-130,-50);
document.Animator.setAnimationSlave(id1,idt);

document.Animator.setDisplayOffset(forcetext2,-20,-30);
document.Animator.setDisplayOffset(forcetext2b,-13,-35);
document.Animator.setAnimationSlave(idb,forcetext2);
document.Animator.setAnimationSlave(idb,forcetext2b);

document.Animator.setDisplayOffset(forcetext1,0,-30);
document.Animator.setDisplayOffset(forcetext1b,7,-35);
document.Animator.setAnimationSlave(idc,forcetext1);
document.Animator.setAnimationSlave(idc,forcetext1b);

document.Animator.setRGB(id1,255,155,155);

document.Animator.setAutoRefresh(true);
}

function cfn11_1(){
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;
}
return;
}

force1=eval(document.Massform.force1.value);
force2=eval(document.Massform.force2.value);
pulleymass=eval(document.Massform.mass.value);
hand1=eval(are-0.5);
hand2=eval(are+0.5);
vector1=eval(are-18);
vector2=eval(-18+are);

arem=eval(are-0.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.setRGB(id1,255,0,0);
document.Animator.setTrajectory(idb,hand1,"-14+0.5*"+a+"*t^2");
document.Animator.setSticky(idb,true);
document.Animator.setTrajectory(idc,"-17-0.5*"+a+"*t^2",hand2);
document.Animator.setSticky(idc,true);
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");
document.Animator.setDisplayOffset(idt,-130,-50);
document.Animator.setAnimationSlave(id1,idt);

document.Animator.setDisplayOffset(forcetext2,-20,-30);
document.Animator.setDisplayOffset(forcetext2b,-13,-35);
document.Animator.setAnimationSlave(idb,forcetext2);
document.Animator.setAnimationSlave(idb,forcetext2b);

document.Animator.setDisplayOffset(forcetext1,0,-30);
document.Animator.setDisplayOffset(forcetext1b,7,-35);
document.Animator.setAnimationSlave(idc,forcetext1);
document.Animator.setAnimationSlave(idc,forcetext1b);

document.Animator.setRGB(id1,255,155,155);
document.Animator.setAutoRefresh(true);
document.Animator.forward();
}

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

 Logged
juro41
Newbie

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

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.

 Logged
juro41
Newbie

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
Peaceful solution is always the best solution. ...Wisdom