simulations.experiments.electrostatics
Class ColorTestExperiment.Motion

java.lang.Object
  extended bycore.field.VecTimeField
      extended bysimulations.experiments.electrostatics.ColorTestExperiment.Motion
Enclosing class:
ColorTestExperiment

private class ColorTestExperiment.Motion
extends VecTimeField

The equation of motion governing the evolution of the system


Constructor Summary
private ColorTestExperiment.Motion()
           
 
Method Summary
 Vec get(Vec p, double t, Vec v)
          Given the state of the system p at time t, computes its first time derivatives and puts them in v, and returns v.
 
Methods inherited from class core.field.VecTimeField
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorTestExperiment.Motion

private ColorTestExperiment.Motion()
Method Detail

get

public Vec get(Vec p,
               double t,
               Vec v)
Given the state of the system p at time t, computes its first time derivatives and puts them in v, and returns v. The vector p is the position (p.x[0]) and speed (p.x[1]) of the charge moving along the z-axis , v.x[0] = p.x[1], and v.x[1] is the acceleration, and is computed from the coulomb force between the two charges.

Specified by:
get in class VecTimeField
Parameters:
p - the position (first location p.x[0]) and the speed (second location p.x[1]) of the moving charge.
t - the time
v - the derivative of the p vector--so v.x[0] is the speed and v.x[1] is the acceleration, as calculated using Coubomb's law for the force betweeen the charges.