OpenMPCD
Public Member Functions | List of all members
MPCDAnalysis.PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles Class Reference

Public Member Functions

def __init__ (self, prefactor, orientation)
 
def getPrefactor (self)
 
def getOrientation (self)
 
def getPotential (self, r)
 

Detailed Description

Interactions between two constant and identical magnetic dipoles.

The general magnetic dipole-dipole interaction potential is given by
\f[
    - \frac{ \mu_0 }{ 4 \pi r^3 }
    \left(
        3
        \left(\vec{m_1} \cdot \hat{r} \right)
        \left(\vec{m_2} \cdot \hat{r} \right)
        -
        \vec{m_1} \cdot \vec{m_2}
    \right)
\f]
where \f$ \mu_0 \f$ is the vacuum permeability, \f$ \hat{r} \f$ and
\f$ r \f$ are, respectively, the unit vector and length of the vector
\f$ \vec{r} \f$ that points from one dipole's position to the other's,
\f$ \vec{m_1} \f$ and \f$ \vec{m_2} \f$ are the magnetic dipole moments, and
\f$ \cdot \f$ denotes the inner product.

In the special case treated in this class, the magnetic dipole moments are
assumed to be constant throughout time in size and orientation. Therefore,
with \f$ m \f$ being the magnitude of the individual dipole moments and with
\f$ \hat{m} \f$ being the unit vector of the individual dipole moments, the
interaction potential is given by
\f[
    - \frac{ \mu_0 m^2 }{ 4 \pi r^3 }
    \left( 3 \left(\hat{m} \cdot \hat{r} \right)^2 - 1 \right)
\f]

Definition at line 32 of file MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.py.

Constructor & Destructor Documentation

◆ __init__()

def MPCDAnalysis.PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.__init__ (   self,
  prefactor,
  orientation 
)
    The constructor.

    @throw TypeError
           Throws if `prefactor` is neither `int` nor `float`.
    @throw TypeError
           Throws if `orientation` is not an instance of `Vector3DReal`.
    @throw ValueError
           Throws if `prefactor` is negative.
    @throw ValueError
           Throws if `orientation` is not a unit vector.

    @param[in] prefactor
               The term \f$ \frac{\mu_0 m^2}{4 \pi} \f$, which must be
               non-negative.
    @param[in] orientation
               The orientation unit vector \f$ \hat{m} \f$ of the dipole
               moments.

Definition at line 54 of file MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.py.

Member Function Documentation

◆ getOrientation()

def MPCDAnalysis.PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.getOrientation (   self)
    Returns the orientation unit vector \f$ \hat{m} \f$ of the dipole
    moments as an instance of `Vector3DReal`.

Definition at line 87 of file MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.py.

◆ getPotential()

def MPCDAnalysis.PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.getPotential (   self,
  r 
)
    Returns the potential for an input value of \f$ r \f$.

    @throw TypeError
           Throws if `r` is neither `int` nor `float` or `Vector3DReal`.
    @throw ValueError
           Throws if `r` is the zero vector.

    @param[in] r
               The input value, which must may be a non-zero vector of type
               `Vector3DReal`.

Definition at line 105 of file MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.py.

◆ getPrefactor()

def MPCDAnalysis.PairPotentials.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.getPrefactor (   self)
    Returns the term \f$ \frac{\mu_0 m^2}{4 \pi} \f$ as a `float`.

Definition at line 77 of file MagneticDipoleDipoleInteraction_ConstantIdenticalDipoles.py.


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