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 'Question about pressure of a liquid'
I am looking at pressure in liquids and I am testing my idea. The vertical tube is 100m, the contraption is filled with water. The vertical tube is very thin(maybe 1mm^2 cross section). The area of the base is ~100m^2. Will he top half be launched in the air if suddenly it cracked?- assuming its light enough. I want to test my idea that if I had a thin long ruber tube that I lifted up, then the pressure at "red lines" will be high and that the $force = pressure * area$ would be massive...
I feel it should be solvable we just need to find a perfect pattern, and there will be a general pattern since the forces acting are based on a single function, so..... you can't actually say it is unsolvable right? Cause imaging 3 bodies actually existed somwhere in this universe then nature isn't gonna wait till we predict it! And yea I have checked in many places that tiny changes cause large changes so it becomes chaos........ but still I just can't accept that it is impossible to solve...
Back
Top