This is the web version of EJS interface
EJS version 4.3.5
  1. Title=Metalic conductor
  2. Author=Francisco Esquembre and Maria Jose Cano, Universidad de Murcia
  3. Keywords=conductivity, electrons
  4. Abstract=Based on an animation of the Supercomet 2 project
  5. CaptureTools=false
  6. DataTools=false
  7. LanguageTools=false
  8. EmersionSupport=false
  9. AppletColSupport=false
  10. UseInterpreter=false
  11. DetectedFiles=./DescriptionCapture.jpg;
  12. AuxiliaryFiles=./;

Introduction

    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    if (rows!=positiveRows || columns!=positiveColumns || negs!=negatives) { positiveRows = rows; positiveColumns = columns; positives = positiveRows*positiveColumns; negatives = negs; n = positives+negatives; x = new double[n]; x0 = new double[positives]; vx = new double[n]; y = new double[n]; y0 = new double[positives]; vy = new double[n]; diameter = new double[n]; mass = new double[n]; charge = new double[n]; images = new String[n]; forceX = new double[n]; forceY = new double[n]; zeros = new double[n]; xmax = 3*positiveColumns; ymax = 3*positiveRows; } //_view.displayDialog.setSize((int)(22*xmax),(int)(24*ymax));
    for (int i=0; i<positives; i++) { images[i] = "./MetalicConductor/PositiveParticleDef.gif"; mass[i] = 1000; charge[i] = +1; diameter[i] = 2; x0[i] = x[i] = xmin + (i%positiveColumns+0.5)*(xmax-xmin)/positiveColumns; y0[i] = y[i] = ymin + (i/positiveColumns+0.5)*(ymax-ymin)/positiveRows; double angle = 2*Math.PI*Math.random(); vx[i] = temperature*Math.cos(angle); vy[i] = temperature*Math.sin(angle); } k = kinit*temperature*temperature*temperature;
    for (int i=positives; i<n; i++) { images[i]="./MetalicConductor/NegativeParticleDef.gif"; mass[i]=1; charge[i]=-1; diameter[i]=.35; zeros[i]=0; x[i] = xmin+0.5*diameter[i] + (xmax-xmin-diameter[i] )*Math.random(); vx[i] = force +0.3*(xmax-xmin)*(Math.random()-0.5); y[i] = ymin+0.5*diameter[i] + (ymax-ymin-diameter[i] )*Math.random(); vy[i] = 0.3*(ymax-ymin)*(Math.random()-0.5); for (int j=0; j<positives; j++) { double d = Math.sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j])); if (d<(diameter[i]+diameter[j])/2) { double r = Math.random(); // toss a coin if (r<0.25) x[i] = x[j] + diameter[j]/2+diameter[i]/2+Math.random()*(xmax-xmin)/10; else if (r<0.5) x[i] = x[j] - diameter[j]/2-diameter[i]/2-Math.random()*(xmax-xmin)/10; else if (r<0.75) y[i] = y[j] + diameter[j]/2+diameter[i]/2+Math.random()*(ymax-ymin)/10; else y[i] = y[j] - diameter[j]/2-diameter[i]/2-Math.random()*(ymax-ymin)/10; break; } } }
    t = 0; _view.resetTraces(); _setDelay(1); // Max speed but limited

    Motion

    Indep. Var. Increment
    d x[i] /dt=vx[i]
    d vx[i] /dt=forceX[i]/mass[i]-friction*vx[i]*Math.abs(vx[i])
    d y[i] /dt=vy[i]
    d vy[i] /dt=forceY[i]/mass[i]
    SolverRungeKuttaFehlberg AbsoluteTolerance=0.001
    see preliminary code

    Walls

    Array