Hello all,
I am trying to solve LLG equation for a 2 spin system. When I add vector B to effective field Heff I get error ‘The arguments are expected to be vectors of equal length, and the number of arguments is expected to be 1 less than their length.’ I see that Assumptions in the beginning is not helping me. Can some one tell me how to define m(t) as a vector in the beginning? Please find my code pasted below.
gamma = 1;
alphag = 0.1;
Beff = {0, 0, 10};
z = {0, 0, 1}
J = -1;
B = {0, 1, 0};
$Assumptions = (m[t] | m1[t]) \[Element] Vectors[3, Reals];
Heff[t_] := J*m1[t] + B;
Heff1[t_] := J*m[t] + B;
cons[t_] := Cross[m[t], Heff[t]];
cons1[t_] := Cross[m1[t], Heff1[t]];
tGilbdamp[t_] := alphag*Cross[m[t], cons[t]];
tGilbdamp1[t_] := alphag*Cross[m1[t], cons1[t]];
tmax = 100;
LLGS = {m'[t] == -gamma*{cons[t] + tGilbdamp[t]},
m[0] == Normalize[{-Sqrt[3.]/2, -1/2, 0}]};
LLGS1 = {m1'[t] == -gamma*{cons1[t] + tGilbdamp1[t]},
m1[0] == Normalize[{Sqrt[3.]/2, -1/2, 0}]};
sol1 = NDSolve[{LLGS, LLGS1}, {m, m1,}, {t, 0, tmax}]
Plot[Evaluate[m[t] /. sol1[[1]]], {t, 0, tmax}]
Plot[Evaluate[m1[t] /. sol1[[1]]], {t, 0, tmax}]