Hi,
You did not include the anisotropy axis. Simplifying your script and adding the anisotropy axis, it becomes:
SetGridsize(64, 64, 64)
SetCellsize(1e-9, 1e-9, 1e-9)
setgeom(ellipsoid(10e-9, 10e-9, 10e-9) )
Msat = 1.7e6
Kc1=4.8e4
Aex = 21e-12
anisc1=vector(1,0,0)
anisc2=vector(0,1,0)
m = randomMag()
relax()
saveas(m,"m_initial")
Bmax := 200.0e-3
Bstep := 2.0e-3
MinimizerStop = 1e-6
TableAdd(B_ext)
for B:=Bmax; B>=-Bmax; B-=Bstep{
B_ext = vector(B*cos(pi/180), B*sin(pi/180), 0)
minimize()
tablesave()
}
You don't need the other hysteresis branches, they are only useful for academic purposes or the ascending branch if you have asymmetries. In your case, there is no reason for that. With your parameters Bk=0.0545 T only considering the cubic anisotropy.
In the case of 10 nm, one will have monodomain behaviour. Then the demagnetization factor will be N=(1/3,1/3,1/3). This means that for 10 nm I expect no role of demag. It will be the effect only of cubic anisotropy.
The obtained loop matches that perfectly. I also tried with the case of 45 degrees. For that one needs to add a small angle less than one degree to Pi/4. Otherwise, with one degree the dependence with the angle is strong and one will obtain a different loop.
0 represents 1 degree as you did at the beginning. That explains the small deviation because there is a small dependence on the angle of the coercivity. These results match well with the expected coherent rotation model. I did that during my PhD and you can find it here
https://fgarciasanchez.es/thesisfelipe/node59.html , but there is also material in textbooks. You can see that mumax3 matches that behaviour well. I did not try to compare the loops in a single graph with the analytical ones but they seem Ok.
One can also try with 30 nm particle. In that case, the coherent behavior does not happen and the loop changes. It becomes dominated by demag because now it is able to create inhomogeneous structures. This is reflected in your original figure because the role of cubic anisotropy is smaller closer to your script where you forgot to add it.
The case of 50 nm requires a larger range of fields as it is evident even in your initial calculations. To summarise, I don't see any problem with the calculations. Maybe, a FEM solver is needed because a sphere in mumax3 looks very lego-like. One can use analytical models for the 10 nm case.
Felipe