simulations.experiments.faradaysLaw
Class TwoPlanesExperiment

java.lang.Object
  extended bysimulations.experiments.BaseExperiment
      extended bysimulations.experiments.faradaysLaw.TwoPlanesExperiment

public class TwoPlanesExperiment
extends BaseExperiment

Receeding Image experiment, consisting of a monopole appearing at t =0 in the first quadrant of two perpendicular thin conducting planes. This object computes the evolution of the system and also generates an EMSource that computes the E&M fields of the system. The evolution is computed in terms of dimensionless variables and then converted to "real" units.

Version:
1.0
Author:
John Belcher, Yao Liu

Nested Class Summary
 class TwoPlanesExperiment.Motion
          Specifies the time derivative of the parmeters which describe the experiment at any time t.
 
Field Summary
private  EMCollection collection
           
 TwoPlanesExperiment.Motion equations
          Define the evolution equations used by the RK4 integrator
 double h
           
private  RungeKuttaIntegration integrator
          define the integraton scheme used to numerically integrate the evolution equations in time
 double k
          Location of the monopole (k,0,h)
 MagneticMonopole mono
          the real magnetic monopole
 double offset
          offset is an overall time offset before the image charges start moving
 double q0
          q0 is the magnetic charge
 double t
          the time
 TwoPlanes twoPlanes
           
 double v1
          v1 is the receeding velocity associated with x=0 plane
 double v2
          v1 is the receeding velocity associated with z=0 plane
 
Fields inherited from class simulations.experiments.BaseExperiment
eps, FieldMotionType, FieldType, FluidFlowSpeed, Fnorm, Fpower, numberSmallSteps
 
Constructor Summary
TwoPlanesExperiment(double k, double h, double q0, double v1, double v2, double t, double offset)
          Constructs an instance of the experiment using the given parameters.
 
Method Summary
 void ConstructEMSource()
          Constructs the EMCollection representing the experiment
 void Evolve(double dt)
          Evolves the experiment by a time step "dt" using an RK4 integrator by taking numberSmallSteps between t and t + dt, for accuracy.
 void Evolve(double dt, double maxStep)
          Evolve the experiment by a time step "dt" using an integrator.
 BaseObject getEMSource()
          An EMSource that represents the current experimental state that can be used to compute the current E&M fields.
 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

k

public double k
Location of the monopole (k,0,h)


h

public double h

t

public double t
the time


offset

public double offset
offset is an overall time offset before the image charges start moving


q0

public double q0
q0 is the magnetic charge


v1

public double v1
v1 is the receeding velocity associated with x=0 plane


v2

public double v2
v1 is the receeding velocity associated with z=0 plane


mono

public MagneticMonopole mono
the real magnetic monopole


twoPlanes

public TwoPlanes twoPlanes

collection

private EMCollection collection

equations

public TwoPlanesExperiment.Motion equations
Define the evolution equations used by the RK4 integrator


integrator

private RungeKuttaIntegration integrator
define the integraton scheme used to numerically integrate the evolution equations in time

Constructor Detail

TwoPlanesExperiment

public TwoPlanesExperiment(double k,
                           double h,
                           double q0,
                           double v1,
                           double v2,
                           double t,
                           double offset)
Constructs an instance of the experiment using the given parameters.

Parameters:
k - the horizontal displacement of the monopole from the vertical plane
h - the vertical displacement of the monopole from the horizontal plane
offset - the frame offset before image charges begin moving
q0 - the magnetic charge
v1 - the receding image speed for the vertical plane
v2 - the receding image speed for the horizontal plane
t - the time
Method Detail

ConstructEMSource

public void ConstructEMSource()
Constructs the EMCollection representing the experiment

Specified by:
ConstructEMSource in class BaseExperiment

getEMSource

public BaseObject getEMSource()
An EMSource that represents the current experimental state that can be used to compute the current E&M fields.

Specified by:
getEMSource in class BaseExperiment

Evolve

public void Evolve(double dt,
                   double maxStep)
Evolve the experiment by a time step "dt" using an integrator. The maximum integrator step size allowed is "maxStep". The state of the EMSource representing the system is updated to reflect the change.

Parameters:
maxStep - the maximum step allowed
dt - the time step

Evolve

public void Evolve(double dt)
Evolves the experiment by a time step "dt" using an RK4 integrator by taking numberSmallSteps between t and t + dt, for accuracy.

Specified by:
Evolve in class BaseExperiment

getHue

public 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).

Specified by:
getHue in class BaseExperiment
Parameters:
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.
Returns:
The hue for the part of the image map at r.

getFlowSpeed

public 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. This method is used when we have set experiment.FieldMotionType to one of either Constants.FIELD_MOTION_VREFIELD or Constants.FIELD_MOTION_VRBFIELD.

Specified by:
getFlowSpeed in class BaseExperiment
Parameters:
r - This is the vector postion of the point in the image.
RegionFlow - This is the flow speeds for the regions.
Returns:
The flow speed for the part of the image map at r.