What are some methods for plotting the path of a particle in a magnetic bottle?

AI Thread Summary
To plot the path of a particle in a magnetic bottle formed by coaxial circular loops of wire, the Biot-Savart law and Lorentz force equations are essential for calculating the magnetic field and particle acceleration. Numerical methods, such as Euler's method or the fourth-order Runge-Kutta, are recommended for integrating these equations, especially since analytical solutions are complex. Java is suggested as a suitable programming language for simulations, although 3D plotting may pose challenges. A simplification to consider is to initially plot only two dimensions to visualize the particle's path effectively. Overall, combining these methods will facilitate the simulation of particle dynamics in a magnetic field.
foxjwill
Messages
350
Reaction score
0
I was wondering about a good application to plot the path of a particle in a magnetic bottle (i.e. the magnetic field in the region between two coaxial circular loops of wire)

I was thinking that maybe I could use Biot Savert's (sp.) law

d\textbf{B} = \frac{\mu_0}{4\pi} \frac{Id\textbf{l} \times \textbf{\hat{r}}}{r^2}

and

d\textbf{F} = q\textbf{v} \times d\textbf{B}

but, as I mentioned earlier, I don't have a good application for that. Worse comes the worse, I could try and write a program to do it, but

  1. I don't know what method of approximation to use, and
  2. I'm not very good at coding.
 
Physics news on Phys.org
Thats a surprisingly complex situation; you won't be able to plot it analytically unless you take some drastic approximations.
I suggest... either you find an animation of it online (shouldn't be hard). Or you learn to code and find a numerical solution.
 
err... I know how to code, but I can never seem to get my programs to work right. I know java, but I'm not sure if that's the best language to use for this. Any ideas?
 
I've used java and C++, and i find java to work well for programming simulations (at least for my purposes). The problem is going to be plotting in 3D. Java 2D works great, but i hear that 3D is pretty rough (though I've never tried it).
 
Ok, then, I'll look into java 3d. But what method(s) should I use for approximation?
 
Well, make the loops perfectly conducting, with a fixed constant current in each (should be going in the same direction).
From that you can use the Biot-Savart law to find the magnetic field everywhere--> you'll need to set up the B = integral_____... then use some method of numerical integration. the fourth order runga-kutta is the standard method for numerical integration, but i'd recommend a simple Euler's method (at least to start with). Once you have the magnetic fields everywhere, you can use the lorentz force equations to find the acceleration --> numerically integrate to find velocity --> and again to find positions as a function of time.
Does that make sense?
One simplification to start with, would be to only plot 2 of the 3 dimensions, it would surely give you something cool to look at!
 
This is from Griffiths' Electrodynamics, 3rd edition, page 352. I am trying to calculate the divergence of the Maxwell stress tensor. The tensor is given as ##T_{ij} =\epsilon_0 (E_iE_j-\frac 1 2 \delta_{ij} E^2)+\frac 1 {\mu_0}(B_iB_j-\frac 1 2 \delta_{ij} B^2)##. To make things easier, I just want to focus on the part with the electrical field, i.e. I want to find the divergence of ##E_{ij}=E_iE_j-\frac 1 2 \delta_{ij}E^2##. In matrix form, this tensor should look like this...
Thread 'Applying the Gauss (1835) formula for force between 2 parallel DC currents'
Please can anyone either:- (1) point me to a derivation of the perpendicular force (Fy) between two very long parallel wires carrying steady currents utilising the formula of Gauss for the force F along the line r between 2 charges? Or alternatively (2) point out where I have gone wrong in my method? I am having problems with calculating the direction and magnitude of the force as expected from modern (Biot-Savart-Maxwell-Lorentz) formula. Here is my method and results so far:- This...
Back
Top