ConstantMagneticField

The ConstantMagneticField potential models a uniform, constant magnetic field applied to magnetic particles in the system.

The magnetic field is given by:

\[\mathbf{B} = B_0 \vec{n}\]

where \(B_0\) is the magnitude and \(\vec{n}\) is the direction vector.

The energy of a magnetic dipole \(\mathbf{m}\) in this field is:

\[U = -\mathbf{m} \cdot \mathbf{B}\]

And the torque on the dipole is:

\[\mathbf{\tau} = \mathbf{m} \times \mathbf{B}\]

  • type: External, ConstantMagneticField

  • parameters:

    • b0: real: Magnitude of the magnetic field \([magnetic field]\), B_0

    • direction: real3: Direction vector of the magnetic field

Example:

"constantMagneticField":{
  "type":["External","ConstantMagneticField"],
  "parameters":{
    "b0": 1.0,
    "direction": [0.0, 0.0, 1.0]
  }
}

Note

This potential requires magnetic moment information for each particle. Ensure that the magnetic moments are properly set for each particle before using this potential.

Tip

The ConstantMagneticField potential can be used to study the alignment and dynamics of magnetic particles or to model systems in strong external magnetic fields.