Energy of magnetic field created by magnetic dipoles in a shphere.

Click For Summary
SUMMARY

The discussion focuses on calculating the magnetic field energy created by magnetic dipoles within a thin hollow sphere using genetic algorithms. The user has successfully implemented a solution in two dimensions and seeks guidance on extending this to three dimensions. The key formula for the magnetic field generated by a dipole is provided, along with the method for summing the contributions from multiple dipoles. A proposed solution involves using spherical coordinates to define the orientation of dipole moments and transforming these into Cartesian coordinates for calculations.

PREREQUISITES
  • Understanding of magnetic dipole theory
  • Familiarity with genetic algorithms
  • Knowledge of spherical and Cartesian coordinate systems
  • Basic principles of electromagnetism
NEXT STEPS
  • Research "Magnetic field calculations for dipoles in 3D" to understand the complexities involved.
  • Explore "Genetic algorithms for optimization problems" to enhance algorithm efficiency.
  • Study "Transformations between spherical and Cartesian coordinates" for accurate vector calculations.
  • Investigate "Energy minimization techniques in physical systems" to apply relevant methods to the problem.
USEFUL FOR

Researchers in computational physics, engineers working with magnetic systems, and developers implementing genetic algorithms for optimization tasks will benefit from this discussion.

sotnet
Messages
3
Reaction score
0
Dear everyone,

I am researching genetic algorithms and at the moment I am trying to solve a problem how would magnetic particles (dipoles) orient themselves in a thin hollow sphere.

Suppose that I have N magnetic dipoles placed in the sphere. There is no external magnetic field. The dipoles create their own magnetic field, thus the system has some magnetic energy. I am writing a genetic algorithm to minimize this energy.
I did the problem in 2 dimensions (on a plane) already, and it worked perfectly!

The problem is that I am not sure how to calculate the magnetic field energy created by dipoles in 3 dimensions.

The formula for calculating magnetic field created by one dipole with magnetic moment \vec{m} at point \vec{r} in SI system is:
\vec{B}(\vec{r}) = \frac{\mu_{0}}{4\pi}(\frac{3(\vec{m}\hat{r}) - \vec{m}}{r^{3}})

To find the energy, I just sum over all dipole moments \vec{m} and multiply by \vec{B} created by others (with minus sign).

In 2D I set the problem so that all the dipoles had \vec{m} and \vec{r} perpendicular, that is \vec{m}\vec{r} = 0 (magnetic dipole moment \vec{m} was perpendicular to the 2d plane the dipoles were on).

In 3D I have the \vec{m}\vec{r} term, which I am not sure how to calculate.

Any advice how to calculate this term to find energy in 3 dimensions?



Stan
 
Physics news on Phys.org
You can define orientation of each magnetic dipole moment with two angles in spherical coordinates (theta,fi). Then you transform this vector into cartesian coordinates:

mx=m*sin(theta)*cos(fi)
my=m*sin(theta)*sin(fi)
mz=m*cos(theta)

And the product of r and m is:

mx*x+my*y+mz*z

where (x,y,z) is a vector from the source dipole to the second dipole.
 

Similar threads

  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K