File dom.hpp

namespace dom

discrete orientation model for magnetic particles

Functions

void transition_matrix(double *W, const double k, const double v, const double T, const double h, const double ms, const double alpha)

Compute the 2x2 transition matrix for a single particle.

Assumes uniaxial anisotropy and an applied field h<1 Only valid for large energy barriers: $(1-h)^2>>1$

Parameters
  • W: transition matrix [2x2]
  • k: anisotropy strength constant for the uniaxial anisotropy
  • v: volume of the particle in meter^3
  • T: temperature of environment in Kelvin
  • h: dimensionless applied field - normalised by \(H_k=\frac{2K}{\mu_0M_s}\)
  • ms: saturation magnetisation
  • alpha: dimensionless damping constant

void master_equation_with_update(double *derivs, double *work, const double k, const double v, const double T, const double ms, const double alpha, const double t, const double *state_probabilities, const std::function<double(double)> applied_field)

Computes master equation for particle in time-dependent field.

Computes the applied field in the z-direction at time t. Uses the field value to compute the transition matrix and corresponding master equation derivatives for the single particle.

Parameters
  • derivs: master equation derivatives [length 2]
  • work: vector [length 4]
  • k: anisotropy strength constant for the uniaxial anisotropy
  • v: volume of the particle in meter^3
  • T: temperature of environment in Kelvin
  • ms: saturation magnetisation
  • alpha: dimensionless damping constant
  • t: time at which to evaluate the external field
  • state_probabilities: the current state probabilities for each of the 2 states (up and down) [length 2]
  • applied_field: a scalar function takes a double and returns a double. Given the current time should return normalised field \(h=(t)\) where the field is normalised by \(H_k\)

double single_transition_energy(double K, double V, double h)

Compute the energy dissipated during one transition of the particle.

Return
the energy dissipated in one transition
Parameters
  • K: anisotropy constant of the particle
  • V: volume of the particle
  • h: applied field on the particle, reduced by the anisotropy field \(H_k=\frac{2K}{\mu_0M_s}\)