Spin torques included in the magnetisation dynamics equation can be computed self-consistently using a drift-diffusion model. Within this model the charge and spin current densities are given as:

(1)

(2)

Here **J**_{S} is a rank-2 tensor such that **J**_{Sij} signifies the flow of the *j* component of spin polarisation in the direction *i*. Equation (2) contains contributions due to i) drift included in ferromagnetic (F) layers, where *P* is the current spin-polarisation and s the electrical conductivity, ii) diffusion, where *D _{e}* is the electron diffusion constant, and iii) spin-Hall effect, included in non-magnetic (N) layers, where is the spin-Hall angle and is the rank-3 unit antisymmetric tensor. Equation (1) contains contributions due i) Ohm’s law, ii) CPP-GMR in multilayers , and iii) inverse spin-Hall effect. The spin accumulation,

**S**, satisfies the equation of motion:

(3)

For boundaries containing an electrode with a fixed potential, differential operators applied to *V* use a Dirichlet boundary condition. For other external boundaries we require both the charge and spin currents to be zero in the direction normal to the boundary, i.e. **J**_{C}.**n** = 0 and **J**_{S}.**n** = 0. This results in the following non-homogeneous Neumann boundary conditions:

(4)

(5)

At the interface between two N layers we obtain composite media boundary conditions for *V* and **S** by requiring both a potential and associated flux to be continuous in the direction normal to the interface, i.e. *V* and **J**_{C}, and **S** and **J**_{S} respectively. At an N/F interface we do not assume such continuity, but instead model the absorption of transverse spin components using the spin-mixing conductance:

(6)

(7)

(8)

Here is the potential drop across the N/F interface and is the spin chemical potential drop, where , and , are interface conductances for the majority and minority spin carriers respectively. The transverse spin current absorbed at the N/F interface results in a torque on the magnetisation as a consequence of conservation of total spin angular momentum. If the F layer has thickness *d _{F}*, this interfacial torque is obtained as:

(9)

Bulk spin torques are obtained as:

(10)

In the equation of motion for **m**, these torques are included as:

(11)

Using the composite media boundary conditions above we can also include spin pumping on the N side of the equation as:

(12)