- #1
DivergentSpectrum
- 149
- 15
i ran a simulation that calculates the trajectory of a particle in the presence of a magnetic field from maxwells equations.
it also calculates the work (line integral of force) and the kinetic energy gained(kinetic energy at the end of simulation minus kinetic energy at the beginning)
i was pretty surprised to see that the values are the same. i know its not a programming error.
here the magnetic field is constant(maybe that's why?)
B=3,5,10
and there is an electrostatic force.
E=-100[x,y,z]/R^3
(i know these differ by permissivity or permittivity of free space or whatever but it shouldn't matter, besides i get the same result with just a straight magnetic force)
initial conditions x,y,z=[3,1,2] and dx/dt,dy/dt,dz/dt=[1,4,3]
it also calculates the work (line integral of force) and the kinetic energy gained(kinetic energy at the end of simulation minus kinetic energy at the beginning)
i was pretty surprised to see that the values are the same. i know its not a programming error.
here the magnetic field is constant(maybe that's why?)
B=3,5,10
and there is an electrostatic force.
E=-100[x,y,z]/R^3
(i know these differ by permissivity or permittivity of free space or whatever but it shouldn't matter, besides i get the same result with just a straight magnetic force)
initial conditions x,y,z=[3,1,2] and dx/dt,dy/dt,dz/dt=[1,4,3]