This is the web version of EJS interface
EJS version 4.3.0
  1. Title=Magnet falling through coil
  2. Author=Maria Jose Cano, Ernesto Martin, and Francisco Esquembre - Universidad Murcia
  3. Abstract=This simulation was created as part of the MOSEM2 project: http://forum.mosem.no/
  4. CaptureTools=false
  5. DataTools=true
  6. LanguageTools=false
  7. EmersionSupport=false
  8. UseInterpreter=true
  9. AuxiliaryFiles=_data/play.gif;
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    // Computation used frequently double radius = coilDiameter/2; aux1 = 9*mu0*mu0*magnetMu*magnetMu* coilSigma*radius*radius*radius/(8.*Math.PI); aux2 = 3*mu0*magnetMu*radius*radius/2; coilResistance = Math.PI*coilDiameter/coilSigma/coilWireSection; // Initial conditions time = 0; magnetZ = freeFallZ = maximum/4; magnetVz = freeFallVz = 0; rotateElectrons = 0; stopMagnet = false; _view.freeFallZTrail.clear(); _view.freeFallVzTrail.clear(); _view.magnetZTrail.clear(); _view.magnetVzTrail.clear(); _view.voltageTrail.initialize(); // makes sure the current segment is empty if (firstTime) _view.tabbedPanel.setSelectedIndex(2);

    Evol Page

    Indep. Var. Increment
    d magnetZ /dtime=magnetVz
    d magnetVz /dtime=accelerationZ
    d freeFallZ /dtime=freeFallVz
    d freeFallVz /dtime=-gravity
    d rotateElectrons /dtime=I
    SolverRungeKutta AbsoluteTolerance=0.00001

    Name:Event,active=true,條件:Method:BISECTION,(誤差範圍1.0e-5),stopatEvent=true
    return magnetZ-magnetLength/2-minimum;


    動作
    stopMagnet = true; _pause();

    Name:Zero crossing,active=true,條件:Method:BISECTION,(誤差範圍1.0e-5),stopatEvent=true
    return magnetZ;


    動作
    _view.voltageTrail.addPoint(time,magnetZ);

    Name:Rebounce,active=true,條件:Method:BISECTION,(誤差範圍1.0e-5),stopatEvent=true
    return freeFallZ-freeFallDiameter/2-minimum;


    動作
    freeFallVz *= -1;

    FixRel Page

    double radius = coilDiameter/2; // electrons for (int i=0; i<numElectrons; i++) { double angle = rotateElectrons + i*2*Math.PI/numElectrons; electrons[i][0] = radius*Math.cos(angle); electrons[i][1] = radius*Math.sin(angle); electrons[i][2] = coilZ; } tension = coilResistance*coilCurrent; if (north_south) tension = -tension;
    public void newExperiment () { _view.voltageTrail.newSegment(); lineColor++; _initialize(); }
    public void closePerpective () { screenAt = 16.45; azimuth = 0.38; altitude = 0.25; } public void bottomPerpective () { screenAt = 6.35; azimuth = 0.35; altitude = -0.25; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double
    title="Magnet falling through ring"
    layout=border
    visible=true
    location="287,52"
    size="540,508"
    position=center
    minimumX=-0.2
    maximumX=0.2
    minimumY=-0.2
    maximumY=0.2
    minimumZ=minimum
    maximumZ=maximum
    cameraAzimuth=azimuth
    cameraAltitude=altitude
    cameraFocusX=0.0
    cameraFocusY=0.0
    cameraFocusZ=0.0
    cameraRotation=0.0
    cameraDistanceToScreen=screenAt
    menuName="3D drawing panel"
    implementation=JAVA3D
    decorationType=CUBE
    allowQuickRedraw=false
    useColorDepth=false
    squareAspect=true
    size="350,100"
    background=200,220,208
    x=center
    y=center
    z=minimum
    sizeX=0.4
    sizeY=0.4
    fillColor=LIGHTGRAY
    drawingLines=false
    resolution="1,1,1"
    depthFactor=1.1
    x=0
    y=coilDiameter/2 + space/20
    z=freeFallZ
    sizeX=freeFallDiameter
    sizeY=freeFallDiameter
    sizeZ=freeFallDiameter
    visible=showBall
    fillColor=GRAY
    depthFactor=0
    x=0
    y=0
    z=coilZ
    sizeX=coilDiameter
    sizeY=coilDiameter
    sizeZ=(maximum-minimum)/40
    closedTop=false
    closedBottom=false
    lineColor=BLACK
    fillColor=255,128,0,200
    drawingLines=false
    resolution="1,15,1"
    depthFactor=0
    x=0
    y=0
    z=magnetZ
    sizeX=0.015
    sizeY=0.015
    sizeZ=magnetLength
    x=0
    y=0
    z=-0.4
    sizeX=1
    sizeY=1
    sizeZ=0.2
    movesGroup=true
    fillColor=blue
    drawingLines=false
    x=0
    y=0
    z=0.4
    sizeX=1
    sizeY=1
    sizeZ=0.2
    movesGroup=true
    fillColor=red
    drawingLines=false
    x=0
    y=0
    z=0
    sizeX=1
    sizeY=1
    sizeZ=.6
    fillColor=GRAY
    drawingLines=false
    position=electrons
    position=electrons
    sizeX=electronSize
    sizeY=electronSize
    sizeZ=electronSize
    fillColor=RED
    position=east
    layout=border
    size="350,0"
    position=center
    tabTitles="Position,Velocity,Voltage"
    background=LIGHTGRAY
    foreground=128,0,0
    position=center
    autoscaleX=true
    autoscaleY=true
    menuName="Position panel"
    title="Position vs Time"
    titleX="Time (s)"
    titleY="Position (m)"
    interiorBackground=128,192,0
    background=GRAY
    foreground=255,255,64
    inputX=time
    inputY=freeFallZ
    menuName=null
    visible=showBall
    norepeat=true
    lineColor=BLUE
    inputX=time
    inputY=magnetZ
    menuName=null
    norepeat=true
    lineColor=lineColor
    position=center
    autoscaleX=true
    autoscaleY=true
    menuName="Velocity panel"
    title="Velocity vs Time"
    titleX="Time (s)"
    titleY="Velocity (m/s)"
    interiorBackground=128,192,0
    background=GRAY
    foreground=255,255,64
    inputX=time
    inputY=freeFallVz
    menuName=null
    visible=showBall
    norepeat=true
    lineColor=BLUE
    inputX=time
    inputY=magnetVz
    menuName=null
    norepeat=true
    lineColor=lineColor
    autoscaleX=true
    autoscaleY=true
    menuName="Voltage panel"
    title="Voltage vs Time"
    titleX="Time (s)"
    titleY="Voltage (V)"
    interiorBackground=128,192,0
    background=GRAY
    foreground=255,255,64
    inputX=time
    inputY=tension
    menuName="Voltage"
    norepeat=true
    lineColor=lineColor
    position=south
    layout=GRID:0,1,0,0
    background=LIGHTGRAY
    foreground=192,0,0
    position=north
    layout=FLOW:center,0,0
    variable=cooling
    selected=false
    text="Cool ring"
    actionon=coilSigma *= 8; coilResistivity = 1./coilSigma; newExperiment ();
    actionoff=coilSigma /= 8; coilResistivity = 1./coilSigma; newExperiment ();
    foreground=128,0,255
    variable=north_south
    textOn="North is Up"
    actionOn=_view.redCylinder.setZ(-0.4); _view.blueCylinder.setZ(0.4); newExperiment ();
    background=192,128,0
    textOff="South is Up"
    actionOff=_view.redCylinder.setZ(0.4); _view.blueCylinder.setZ(-0.4); newExperiment ();
    backgroundOff=192,128,0
    layout=FLOW:center,0,0
    text="Ring $\\rho$="
    tooltip="Resistivity of the ring"
    variable=coilResistivity*100000000
    format="0.##### E-8"
    editable=false
    columns=8
    text=" Ring $\\Phi$="
    tooltip="Diameter of the ring"
    variable=coilDiameter
    action=newExperiment();
    columns=6
    layout=FLOW:center,0,0
    text="Analyze voltage"
    action=_tools.clearDataTool(); _tools.showDataTool(_view.tabbedPanel, _view.voltageTrail); //.getDataList());
    text="Clear data"
    action=_view.voltageTrail.clear(); _tools.clearDataTool();
    position=south
    layout=FLOW:center,0,0
    position=west
    layout=border
    position=center
    variable=screenAt
    minimum=3.5
    maximum=30
    size="100,25"
    position=west
    text="Zoom:"
    position=east
    textOn="Bottom view"
    actionOn=bottomPerpective ()
    background=192,128,0
    textOff="Close up"
    actionOff=closePerpective ()
    backgroundOff=192,128,0
    layout=BORDER:0,0
    borderType=LOWERED_ETCHED
    position=west
    layout=FLOW:center,0,0
    variable=_isPaused
    imageOn="/org/opensourcephysics/resources/controls/images/play.gif"
    actionOn=_play()
    background=DARKGRAY
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    backgroundOff=DARKGRAY
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_initialize()
    background=DARKGRAY
    image="/org/opensourcephysics/resources/controls/images/stepforward.gif"
    action=_step()
    background=DARKGRAY
    position=east
    variable=showBall
    text="Show free falling ball"
    foreground=BLUE