How Do You Simulate Magnetic Field Lines in MATLAB?

AI Thread Summary
The discussion focuses on simulating magnetic field line expansion from a coil using Matlab. The user seeks to understand how to visually represent these field lines, noting that textbooks often show curving lines instead of filled pages of arrows. It is clarified that every point in a magnetic field has a magnitude, and illustrations are simplified for clarity. The suggestion is made to utilize Matlab's quiver and quiver3 commands to plot vector fields effectively. Overall, the conversation emphasizes the importance of clarity in visual representation while providing practical coding advice.
lechko
Messages
3
Reaction score
0
Hello everyone, I am trying my best to do this simulation on Matlab to show the expancion of Magnetic field lines out of a coil. Now, finding the amplitude and direction of the field at a given place is pretty simple, the trick is to produce those tidy lines we all see in books, i gather they are supposed to be tangential to the field direction but there has to be something that I am missing... why in all of the books they chose to show us those curving lines and when u think of it, it's supposed to be a page filled with arrows.
I really hope this question is not inappropriate here but I am sure there's smtng I'm missing there and can't quite figure what.

thank you
lechko
 
Physics news on Phys.org
Welcome to the forums, Lechko!

Every point in a field has a magnitude. The pics in the books trim them out for clarity.

If you're doing it in Matlab, you may want to look into the quiver and quiver3 commands. They plot vector fields with magnitude (u(i),v(i),w(i)) at points (x(i),y(i),z(i)) which are fed into the command.
 
so every poit on the same line has the same magnitude and the "quiver" command will just point them out? great!
i already started thinking of some complicated "For"-"If" structure :)
thanks alot!
 
Thread 'Gauss' law seems to imply instantaneous electric field'
Imagine a charged sphere at the origin connected through an open switch to a vertical grounded wire. We wish to find an expression for the horizontal component of the electric field at a distance ##\mathbf{r}## from the sphere as it discharges. By using the Lorenz gauge condition: $$\nabla \cdot \mathbf{A} + \frac{1}{c^2}\frac{\partial \phi}{\partial t}=0\tag{1}$$ we find the following retarded solutions to the Maxwell equations If we assume that...
Maxwell’s equations imply the following wave equation for the electric field $$\nabla^2\mathbf{E}-\frac{1}{c^2}\frac{\partial^2\mathbf{E}}{\partial t^2} = \frac{1}{\varepsilon_0}\nabla\rho+\mu_0\frac{\partial\mathbf J}{\partial t}.\tag{1}$$ I wonder if eqn.##(1)## can be split into the following transverse part $$\nabla^2\mathbf{E}_T-\frac{1}{c^2}\frac{\partial^2\mathbf{E}_T}{\partial t^2} = \mu_0\frac{\partial\mathbf{J}_T}{\partial t}\tag{2}$$ and longitudinal part...
Back
Top