OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::MagneticField Class Reference

Applies a uniform (vector) magnetic field to the system. More...

#include <MagneticField.hpp>

+ Inheritance diagram for OpenMD::MagneticField:

Public Member Functions

 MagneticField (SimInfo *info)
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMD::ForceModifier
 ForceModifier (SimInfo *info)
 
- Protected Attributes inherited from OpenMD::ForceModifier
SimInfoinfo_ {nullptr}
 

Detailed Description

Applies a uniform (vector) magnetic field to the system.

The field is applied as an external perturbation. The user specifies

magneticField = (a, b, c);

in the .omd file where the values of a, b, and c are in units of Tesla

When a charge moves in a magnetic field, there is no work done, so there is no change in potential.

The field itself is

\( \mathbf{B} = \left( \begin{array}{c} a \\ b \\ c \end{array} \right) \)

The external magnetic field applies a force on moving charged atoms, \( \mathbf{F} = C \mathbf{v} \times \mathbf{B} \) and a torque on moving (and rotating) dipoles, \( \mathbf{\tau} = \mathbf{D} \times ( \mathbf{v} \times \mathbf{B} ) + (\mathbf{\omega} \times \mathbf{D} ) \times \mathbf{B} \)

Definition at line 81 of file MagneticField.hpp.

Constructor & Destructor Documentation

◆ MagneticField()

OpenMD::MagneticField::MagneticField ( SimInfo * info)

Definition at line 56 of file MagneticField.cpp.


The documentation for this class was generated from the following files: