This is the web version of EJS interface
EJS version 4.3.7
  1. Author=Fu-Kwun Hwang - Professor
  2. Abstract=http://www.phy.ntnu.edu.tw/ntujava/
  3. CaptureTools=false
  4. DataTools=false
  5. LanguageTools=false
  6. AppletColSupport=false
  7. UseMacMenuBar=false
  8. UseInterpreter=true
  9. DetectedFiles=./_data/torque1.gif;
    NameValueTypeDimension
    NameValueTypeDimension

    初始值

    y=ymin+R+size; w=0; c=0; x=0; vx=0;

    Evol Page

    Indep. Var. Increment
    d x /dt=vx
    d vx /dt=IR*F*(Math.cos(Fc)-r/R)/(I+IR)/m
    d c /dt=w
    d w /dt=-F*(R*Math.cos(Fc)-r)/(I+IR)
    SolverRungeKutta AbsoluteTolerance=0.00001

    關係式

    xf=x+r*Math.sin(Fc); yf=y-r*Math.cos(Fc); f=IR*F*(Math.cos(Fc)-r/R)/(I+IR);

    calF

    public double calF (double F) { return -(I*Math.cos(Fc)+m*R*r)/(I+m*R*R)*F; /// return f=-(I/(m*R)*Math.cos(Fc)+r)/((I/(m*R)+R))*F; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Frame"
    layout=border
    visible=true
    size="822,426"
    position=north
    layout=border
    size="0,80"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=-1.0
    maximumX=1.0
    minimumY=-1.0
    maximumY=1.0
    trueSize=true
    sizeX=r*2
    sizeY=r*2/3
    imageFile="./_data/torque1.gif"
    elementposition=SOUTH
    pixelSize=true
    text="If the spool is pulled horizontally to the right. in which direction will it roll?"
    font=Monospaced,PLAIN,16
    elementposition=NORTH
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    keyAction=showf=!showf;
    x=0
    y=y0
    sizeX=(xmax-xmin)*2
    sizeY=size
    style=RECTANGLE
    elementposition=NORTH
    lineColor=200,220,208
    fillColor=200,220,208
    x=x
    y=y
    sizeX=R*2
    sizeY=R*2
    transformation=c
    style=WHEEL
    fillColor=LIGHTGRAY
    x=x
    y=y
    sizeX=r*2
    sizeY=r*2
    transformation=c
    style=WHEEL
    fillColor=GRAY
    x=xf
    y=yf
    sizeX=Fx
    sizeY=Fy
    enabledSize=ENABLED_ANY
    dragAction=//F=Math.sqrt(Fx*Fx+Fy*Fy); Fc=Math.atan2(Fy,Fx); Fx=F*Math.cos(Fc); Fy=F*Math.sin(Fc); Fn=m*g-Fy; //calF(Fx);
    lineWidth=stroke
    x=x
    y=y-R
    sizeX=-f
    sizeY=0
    visible=showf
    lineWidth=stroke
    x=xf+Fx+size/4
    y=yf+Fy
    pixelSize=true
    text="F"
    font=Monospaced,PLAIN,18
    elementposition=WEST
    x=xf
    y=yf
    sizeX=(y0-yf)/Math.tan(Fc)
    sizeY=y0-yf
    visible=xf!=x &&showf
    lineColor=64,64,64,128
    x=xf
    y=yf
    sizeX=x-xf
    sizeY=y-yf
    visible=xf!=x &&showf
    lineColor=64,64,64,128
    position=south
    layout=border
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    text="init"
    action=_initialize()
    variable=_isPaused
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    position=center
    layout=HBOX
    variable=r
    minimum=ymax*0.1
    maximum=R*0.95
    format="r=0.0"
    dragaction=_initialize()
    variable=R
    minimum=r*1.05
    maximum=ymax-size/2
    format="R=0.0"
    dragaction=_initialize()
    variable=F
    minimum=xmin
    maximum=xmax
    format="F=0.00"
    dragaction=Fx=F*Math.cos(Fc); Fy=F*Math.sin(Fc);