OpenMPCD
|
Interactions between two constant and equal magnetic dipoles oriented along the Z axis. More...
#include <MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp>
Public Member Functions | |
OPENMPCD_CUDA_HOST_AND_DEVICE | MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ (const T prefactor) |
The constructor. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< T > | force (const Vector3D< T > &R) const |
Returns the force vector of the interaction for a given position vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | potential (const Vector3D< T > &R) const |
Returns the potential of the interaction for a given position vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getPrefactor () const |
Returns the term \( \frac{\mu_0 m^2}{4 \pi} \). More... | |
virtual OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< FP > | force (const Vector3D< FP > &Rvec) const=0 |
Returns the force vector of the interaction for a given position vector. More... | |
virtual OPENMPCD_CUDA_HOST_AND_DEVICE FP | potential (const Vector3D< FP > &Rvec) const=0 |
Returns the potential of the interaction for a given position vector. More... | |
const OPENMPCD_CUDA_HOST_AND_DEVICE Vector3D< FP > | forceOnR1DueToR2 (const Vector3D< FP > &r1, const Vector3D< FP > &r2) const |
Returns the force exerted on the particle at r1 due to the particle at r2 . More... | |
Interactions between two constant and equal magnetic dipoles oriented along the Z axis.
The general magnetic dipole-dipole interaction potential is given by
\[ - \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) \]
where \( \mu_0 \) is the vacuum permeability, \( \hat{r} \) and \( r \) are, respectively, the unit vector and length of the vector \( \vec{r} \) that points from one dipole's position to the other's, \( \vec{m_1} \) and \( \vec{m_2} \) are the magnetic dipole moments, and \( \cdot \) 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, with the latter being along the \( z \) axis. Therefore, with \( m \) being the magnitude of the individual dipole moments and with \( R_z \) being the \( z \) component of \( \hat{r} \), the interaction potential is given by
\[ - \frac{ \mu_0 m^2 }{ 4 \pi r^3 } \left( 3 R_z^2 - 1 \right) \]
T | The numeric data type. |
Definition at line 54 of file MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp.
The constructor.
[in] | prefactor | The term \( \frac{\mu_0 m^2}{4 \pi} \). |
Definition at line 64 of file MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp.
|
pure virtualinherited |
Returns the force vector of the interaction for a given position vector.
This function returns the directional derivative
\[ - \nabla_R V \left( \vec{R} \right) \]
where \( \vec{R} \) is the Rvec
parameter, \( V \) is the potential as given by the potential
function, and \( \nabla_R V \) is the gradient of \( V \) with respect to \( \vec{R} \).
[in] | Rvec | The relative position vector. |
|
inline |
Returns the force vector of the interaction for a given position vector.
This function returns the directional derivative
\[ - \nabla_R V \left( \vec{R} \right) \]
where \( \vec{R} \) is the R
parameter, \( V \) is the potential as given by the potential
function, and \( \nabla_R V \) is the gradient of \( V \) with respect to \( \vec{R} \).
OpenMPCD::AssertionException | If OPENMPCD_DEBUG is defined, throws if OpenMPCD::Scalar::isZero(R.getMagnitudeSquared()) . |
[in] | R | The relative position vector. |
Definition at line 86 of file MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp.
|
inlineinherited |
Returns the force exerted on the particle at r1
due to the particle at r2
.
[in] | r1 | The position of the first particle. |
[in] | r2 | The position of the second particle. |
Definition at line 65 of file PairPotentials/Base.hpp.
|
inline |
Returns the term \( \frac{\mu_0 m^2}{4 \pi} \).
Definition at line 136 of file MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp.
|
pure virtualinherited |
Returns the potential of the interaction for a given position vector.
[in] | Rvec | The relative position vector. |
|
inline |
Returns the potential of the interaction for a given position vector.
OpenMPCD::AssertionException | If OPENMPCD_DEBUG is defined, throws if OpenMPCD::Scalar::isZero(R.getMagnitudeSquared()) . |
[in] | R | The relative position vector. |
Definition at line 119 of file MagneticDipoleDipoleInteraction_ConstantEqualDipolesAlongZ.hpp.