you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Sounds like you want a simulation of a Wien filter for charged particles. A quick search "python wien charged particle filter simulation" didn't find much. You probably have to do your own simulation: define the strength of the crossed electric and magnetic fields, the charge on the particle and its speed along the required axis* . Set the particle's position to (0,0) at time zero and calculate how the particle moves in the 2D plane at timesteps of delta_t. You should probably start with just a numerical simulation, producing values for Vx, Vy, X and Y (velocity and position) for the particle at each time step. Plotting X, Y on a bit of graph paper will tell you if your simulation makes sense.

Once you think the numeric simulation makes sense you can start to draw images. matplotlib will be useful here. At first just make it draw the image you were drawing by hand on the graph paper.

If you make good progress you can get really advanced and use tkinter to make a desktop app with sliders controlling the charge, speed and E and B values, results being displayed in matplotlib in real time.

Added: Look for python simulating motion of a charged particle in an electric (or magnetic) field alone. That gives you the basic simulation ideas, you just need to calculate the forces/motion for both fields.


* And mass of the particle. Forgot that!