|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimulations.experiments.BaseExperiment
simulations.experiments.electrostatics.ChargeInFieldExperiment
Experiment to show the electric field motion for an electric charge moving in a constant background electric field. Extends BaseExperiment. We provide a method getHue which allows us to color the field lines connected to the charge a different color than the field lines connected to the charges which produce the constant field.
Nested Class Summary | |
class |
ChargeInFieldExperiment.Motion
the equation of motion for a charge in an electric field |
Field Summary | |
private MovingPointCharge |
charge
the charge (initially moving upward) |
private EMCollection |
collection
collection of EM objects consisting of the charge and the constant electric field |
private double |
E
electric field |
private ChargeInFieldExperiment.Motion |
equations
equation of motion of the particle |
private ConstantFields |
fields
the electric field pointing downward |
private RungeKuttaIntegration |
integrator
integrator for the equation of motion of the particle |
private double |
m
mass of the particle |
private double |
q
charge of the particle |
private double |
t
time |
private double |
v
z velocity of the particle |
private double |
z
z position of the particle |
Fields inherited from class simulations.experiments.BaseExperiment |
eps, FieldMotionType, FieldType, FluidFlowSpeed, Fnorm, Fpower, numberSmallSteps |
Constructor Summary | |
ChargeInFieldExperiment(double E,
double q,
double m,
double z0,
double v0)
constructor for charge in field experiment |
Method Summary | |
void |
ConstructEMSource()
constructs the EM source consisting of the charge and the constant field |
void |
Evolve(double dt)
method to evolve the particle motion in time |
BaseObject |
getEMSource()
returns the collecton of charge and constant field as the EM source |
double |
getFlowSpeed(Vec3 r,
Vec RegionFlow)
Method to find the flow speed in a given region when we are determining that speed according to region. |
double |
getHue(double TargetHue,
Vec3 r,
Vec RegionColor)
Method to find the hue in a given region when we are coloring according to region (Color Mode 4). |
private static void |
println(java.lang.String s)
prints the string s |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private double E
private double q
private double m
private double z
private double v
private double t
private MovingPointCharge charge
private ConstantFields fields
private EMCollection collection
private ChargeInFieldExperiment.Motion equations
private RungeKuttaIntegration integrator
Constructor Detail |
public ChargeInFieldExperiment(double E, double q, double m, double z0, double v0)
E
- background electric fieldq
- chargem
- mass of chargez0
- initial position of charge at t = 0v0
- initial velocity of charge at t = 0Method Detail |
public void ConstructEMSource()
ConstructEMSource
in class BaseExperiment
public BaseObject getEMSource()
getEMSource
in class BaseExperiment
public void Evolve(double dt)
Evolve
in class BaseExperiment
private static void println(java.lang.String s)
public double getHue(double TargetHue, Vec3 r, Vec RegionColor)
getHue
in class BaseExperiment
TargetHue
- This is the target hue from the renderer.r
- This is the vector postion of the point in the image.RegionColor
- This is the varous hues for the regions.
public double getFlowSpeed(Vec3 r, Vec RegionFlow)
getFlowSpeed
in class BaseExperiment
r
- This is the vector postion of the point in the image.RegionFlow
- This is the flow speeds for the regions.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |