Ejemplo n.º 1
0
        static void TestFieldTransforms(EuclideanVector3 E, EuclideanVector3 B, EuclideanVector3 Ep, EuclideanVector3 Bp, EuclideanVector3 v)
        {
            Symbol gamma = LorentzTransform.Gamma(v);

            Assert.AreEqual(Ep.ParallelComponent(v), E.ParallelComponent(v), "E Parallel component:");
            Assert.AreEqual(Ep.PerpendicularComponent(v), gamma * (E + v.Cross(B)).PerpendicularComponent(v), "E Perpendicular component:");
            Assert.AreEqual(Bp.ParallelComponent(v), B.ParallelComponent(v), "B Parallel component:");
            Assert.AreEqual(Bp.PerpendicularComponent(v), gamma * (B - v.Cross(E)).PerpendicularComponent(v), "B Perpendicular component:");
        }
Ejemplo n.º 2
0
 public RelativisticParticle(Symbol mass, EuclideanVector3 position, Variable time)
 {
     this.Mass = mass;
     this.Position = new LorentzVectorU(time, position);
     Operator dt = new Derivative(time);
     EuclideanVector3 v = dt * position;
     this.Gamma = LorentzTransform.Gamma(v);
     this.Velocity = this.Gamma * new LorentzVectorU(Symbol.One, v);
     this.InvariantTimeDerivative = this.Gamma * dt;
 }
Ejemplo n.º 3
0
        static void TestLorentzTransform(EuclideanVector3 v)
        {
            LorentzVectorVariableU x0 = new LorentzVectorVariableU("t", "x", "y", "z");

            LorentzVectorU x1 = x0.Transform(v);
            LorentzVectorU x2 = x1.Transform(-v);

            Assert.AreEqual(x0, x2);
            Assert.AreEqual(LorentzMatrixUL.One, LorentzTransform.Matrix(v) * LorentzTransform.Matrix(-v));
        }
Ejemplo n.º 4
0
 public LorentzVectorOperatorU Transform(EuclideanVector3 velocity)
 {
     return(LorentzTransform.Matrix(velocity) * this);
 }
Ejemplo n.º 5
0
 public RelativisticParticle Transform(EuclideanVector3 velocity)
 {
     LorentzMatrixUL L = LorentzTransform.Matrix(velocity);
     return new RelativisticParticle(this.Mass, L * this.Position, this.InvariantTimeDerivative);
 }
Ejemplo n.º 6
0
        public ElectromagneticField Transform(EuclideanVector3 velocity)
        {
            LorentzMatrixUL L = LorentzTransform.Matrix(velocity);

            return(new ElectromagneticField(L * this.Potential, L.Invert() * this.Del));
        }
Ejemplo n.º 7
0
 public LorentzVectorL Transform(EuclideanVector3 velocity)
 {
     return(this * LorentzTransform.Matrix(velocity));
 }