simulations.objects
Class PointCharge

java.lang.Object
  extended bysimulations.objects.BaseObject
      extended bysimulations.objects.PointCharge
Direct Known Subclasses:
MovingPointCharge

public class PointCharge
extends BaseObject

Point Charge. This BaseObject calculates the non-relativistic electric and magnetic fields of a stationary point charge


Field Summary
 double m
          the mass of the point charge
 Vec3 p
          the position of the point charge
 double q
          the charge of the point charge
 double radius
          the Pauli radius of the point charge (repulsion always dominates inside this radius).
 
Constructor Summary
PointCharge(double q, Vec3 p)
          constructor for the point charge with radius set to 5.
PointCharge(double q, Vec3 p, double radius)
          constructor for the point charge setting Pauli radius
 
Method Summary
 Vec3 Bfield(Vec3 x, Vec3 B)
          the magnetic field of a stationary point charge (zero)
 Vec3 Efield(Vec3 x, Vec3 E)
          the electric field of a stationary point charge
 java.lang.String toString()
          writes properties of the point charge to a string
 
Methods inherited from class simulations.objects.BaseObject
Bfield, Efield, Evolve, Pfield, Pfield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

q

public double q
the charge of the point charge


m

public double m
the mass of the point charge


radius

public double radius
the Pauli radius of the point charge (repulsion always dominates inside this radius). Radius is the "Pauli" radius, that is the radius at which a r**(-12) repulsion sets in regardless of whether we have electrostatic repulsion or attraction.


p

public Vec3 p
the position of the point charge

Constructor Detail

PointCharge

public PointCharge(double q,
                   Vec3 p,
                   double radius)
constructor for the point charge setting Pauli radius

Parameters:
q - the charge
p - the position
radius - the Pauli radius

PointCharge

public PointCharge(double q,
                   Vec3 p)
constructor for the point charge with radius set to 5.

Parameters:
q - the charge
p - the position
Method Detail

Efield

public Vec3 Efield(Vec3 x,
                   Vec3 E)
the electric field of a stationary point charge

Specified by:
Efield in class BaseObject
Parameters:
x - the position of the observer
E - the electric field at the position of the observer due to the charge at p (calculated)
Returns:
E the electric field at the position of the observer due to the charge at p (calculated)

Bfield

public Vec3 Bfield(Vec3 x,
                   Vec3 B)
the magnetic field of a stationary point charge (zero)

Specified by:
Bfield in class BaseObject
Parameters:
x - the position of the observer
B - the magnetic field at the observer's position if the charge is at p (calculated)
Returns:
zero for a stationary charge

toString

public java.lang.String toString()
writes properties of the point charge to a string