- #1
FlatronL1917
- 1
- 0
Hello there! This is my first post here, hopefully I am not posting in the wrong place.
Also, I am an engineer and have not used this stuff for years, so please be patient with me, I am pretty sure that my question is stupid :-)
I would like to develop a simulation code for charged particles moving in a electromagnetic field.
My thought is that, we may not always have the luxury to align the coordinate system to our magnetic field.
Assuming an arbitrary magnetic field vector B in every cell and ignoring the electric field for the moment, I tried solving the equations of motion to see if I can avoid discretization and got the following:
ux = c1x + (c2x+c3x)*cos(qB/m * t) + (c2x-c3x)*sin(qB/m * t)
uy = c1y + (c2y+c3y)*cos(qB/m * t) + (c2y-c3y)*sin(qB/m * t)
uz = c1z + (c2z+c3z)*cos(qB/m * t) + (c2z-c3z)*sin(qB/m * t)
It seems that the cij constants determine the direction of B. I only have the initial conditions for ux, uy, uz, obviously so I can not calculate them. Where do I go from this point? Is my solution wrong? Any help/pointer would be greatly appreciated.
Also, I am an engineer and have not used this stuff for years, so please be patient with me, I am pretty sure that my question is stupid :-)
I would like to develop a simulation code for charged particles moving in a electromagnetic field.
My thought is that, we may not always have the luxury to align the coordinate system to our magnetic field.
Assuming an arbitrary magnetic field vector B in every cell and ignoring the electric field for the moment, I tried solving the equations of motion to see if I can avoid discretization and got the following:
ux = c1x + (c2x+c3x)*cos(qB/m * t) + (c2x-c3x)*sin(qB/m * t)
uy = c1y + (c2y+c3y)*cos(qB/m * t) + (c2y-c3y)*sin(qB/m * t)
uz = c1z + (c2z+c3z)*cos(qB/m * t) + (c2z-c3z)*sin(qB/m * t)
It seems that the cij constants determine the direction of B. I only have the initial conditions for ux, uy, uz, obviously so I can not calculate them. Where do I go from this point? Is my solution wrong? Any help/pointer would be greatly appreciated.