This is the web version of EJS interface
EJS version 4.2.7
  1. Author=Fu-Kwun Hwang - Dept. of Physics, National Taiwan Normal Univ.
  2. Abstract=hwang@phy.ntnu.edu.tw
  3. CaptureTools=true
  4. DataTools=true
  5. LanguageTools=true
  6. EmersionSupport=true
  7. UseInterpreter=true
  8. AuxiliaryFiles=_data/init.gif;_data/pause.gif;_data/play.gif;_data/reset.gif;_data/fex.gif;
  9. DetectedFiles=_data/fex.gif;_data/init.gif;_data/pause.gif;_data/play.gif;_data/reset.gif;
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    t=0; vy1=vy2=0; y2=ymin+size2; y1=y2+L0-m1*g/k;

    Evol Page

    Indep. Var. Increment
    d y1 /dt=vy1
    d y2 /dt=vy2
    d vy1 /dt=-k*(y1-y2-L0)/m1-g-b*vy1
    d vy2 /dt=calF(y2,y1)/m2
    SolverRungeKutta AbsoluteTolerance=0.001

    Name:E,active=E,條件:Method:E,(誤差範圍E),stopatEvent=E
    E


    動作
    E

    Name:t,active=t,條件:Method:t,(誤差範圍t),stopatEvent=t
    t


    動作
    t

    Name:,active=,條件:Method:,(誤差範圍),stopatEvent=


    動作

    FixRel Page

    Array

    calF

    public double calF (double yb,double ya) { f=k*(ya-yb-L0)-m2*g; if(yb<=ymin+size2 && f<0)return 0; return f-b*vy2; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double,double,double
    title="Frame"
    layout=border
    visible=true
    location="153,0"
    size="800,400"
    background=DARKGRAY
    position=center
    layout=border
    background=DARKGRAY
    position=east
    layout=GRID:2,0,0,0
    borderType=LOWERED_ETCHED
    image="_data/reset.gif"
    action=_reset()
    size="90,35"
    image="_data/init.gif"
    enabled=_isPaused()
    action=_initialize()
    size="90,35"
    variable=_isPaused
    size="90,35"
    imageOn="_data/play.gif"
    actionOn=_play()
    imageOff="_data/pause.gif"
    actionOff=_pause()
    image="_data/fex.gif"
    action=Fext=0; _pause(); _initialize();
    size="90,35"
    position=center
    layout=HBOX
    foreground=255,192,0
    variable=m1
    value=4.9996
    minimum=1.0
    maximum=10.0
    format="m1=0.0"
    ticks=19
    closest=true
    enabled=_isPaused()
    dragaction=_initialize()
    variable=m2
    minimum=1.0
    maximum=10.0
    format="m2=0.0"
    ticks=19
    closest=true
    enabled=_isPaused()
    dragaction=_initialize()
    variable=k
    minimum=10.0
    maximum=200.0
    format="k=0.0"
    ticks=20
    closest=true
    enabled=_isPaused()
    dragaction=_initialize()
    variable=Fext
    value=100.73100000000001
    minimum=0.0
    maximum=k*L0-2*m1*g
    format="F_ext=0.0 N"
    enabled=_isPaused()
    dragaction=y1=y2+L0-(Fext+m1*g)/k;
    action=_play()
    variable=b
    minimum=0.0
    maximum=2.0
    format="b=0.0"
    ticks=21
    closest=true
    enabled=_isPaused()
    position=north
    layout=border
    background=LIGHTGRAY
    position=west
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    background=BLACK
    x=x2+0
    y=y2
    sizeX=w
    sizeY=size2
    style=RECTANGLE
    elementposition=NORTH
    lineColor=192,255,0
    fillColor=128,192,0
    lineWidth=stroke
    x=x1+0
    y=y1
    sizeX=w
    sizeY=size2
    enabledPosition=_isPaused()
    sensitivity=0
    dragAction=Fext=k*(L0-(y1-y2))-m1*g;
    releaseAction=_play()
    style=RECTANGLE
    elementposition=SOUTH
    lineColor=192,128,0
    fillColor=192,0,0
    lineWidth=stroke
    x=x1
    y=y1
    sizeX=0
    sizeY=y2-y1
    radius=size
    loops=16
    lineColor=128,0,255
    x=x1+w/2+size2
    y=y1
    pixelSize=true
    visible=_isPaused()
    text="1"
    font=Monospaced,BOLD,18
    elementposition=WEST
    lineColor=CYAN
    fillColor=CYAN
    x=x2+w/2+size2
    y=y2
    pixelSize=true
    visible=_isPaused()
    text="2"
    font=Monospaced,BOLD,18
    elementposition=WEST
    lineColor=PINK
    fillColor=PINK
    position=center
    autoscaleX=true
    autoscaleY=true
    title="y1(t).y2(t)"
    interiorBackground=128,192,0
    background=BLACK
    foreground=128,64,0
    x=t
    y=y1
    memory=ntrace
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    color=192,0,0
    stroke=stroke
    x=t
    y=y2
    memory=ntrace
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    color=PINK
    x=t
    y=vy1
    memory=ntrace
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    color=CYAN
    stroke=stroke
    x=t
    y=vy2
    memory=ntrace
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    color=128,0,255
    position=north
    layout=border
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=-1.0
    maximumX=1.0
    minimumY=-1.0
    maximumY=1.0
    size="0,15"
    background=LIGHTGRAY
    x=0.5
    y=0
    sizeX=0.2
    sizeY=1.5
    text="y1(t).y2(t)"
    lineColor=128,64,0
    fillColor=128,64,0