SpinW / spinw

SpinW Matlab library for spin wave calculation
http://www.spinw.org
GNU General Public License v3.0
35 stars 15 forks source link

single ion anisotropy in magneti Hamiltonian #137

Open dittosun opened 1 year ago

dittosun commented 1 year ago

I added both the easy-plane anisotropy Dz and easy-axis anisotropy Dx in the magnetic Hamiltonian. AFM.addmatrix('value',diag([Dx 0 Dz]),'label','D','color','black') (Dx<0 Dz>0) But the symbolic solution only shows D, not Dx and Dz: symSpec = spinwavesym(AFM,'hkl',[0; 0; 0]) pretty(symSpec.omega)

1 == sqrt((2 D - J1 + 3 J3) (D - 2 J1 + 4 J2)) 2

2 == sqrt(2) sqrt((D - J1 + 2 J2) (D - J1 + 3 J3)) 2

3 == sqrt(D (2 D + J1 + 4 J2 + 3 J3)) 2

4 == sqrt(2) sqrt(D (D + J1 + 4 J2 + 3 J3)) 2

How can I get the right symbolic solution of eigenvalue with Dx and Dz, not D?

mducle commented 1 year ago

@dittosun I think you have to specify the matrices for the x and z anisotropy separately. SpinW uses the 'label' to define the symbols in the symbolic calculation and in your example you the same 'label' (D). Try:

AFM.addmatrix('value',diag([1 0 0]),'label','Dx','color','black')
AFM.addmatrix('value',diag([0 0 1]),'label','Dz','color','black')
dittosun commented 1 year ago

@mducle Hi, thank you for your suggestion. I have tried this method before, but spinw seems to only know one single-ion anisotropy matrix.

AFM.addmatrix('value',diag([0 0 Dz),'label','Dz','color','black') AFM.addmatrix('value',diag([Dx 0 0]),'label','Dx','color','gray') AFM.addaniso('Dz') AFM.addaniso('Dx')

The program can only know the latest addaniso Dx (If I invert the sequence like AFM.addaniso('Dx') AFM.addaniso('Dz') only Dz is included in the calculation ).

And if I check the single-ion anisotropy matrix by using NiPS3.single_ion.aniso, only one matrix is assigned to the single_ion term. So I don't know how to add two single-ion anisotropy in the program.

By the way, if I use AFM.addmatrix('value',diag([Dx 0 Dz]),'label','D','color','black') in the program, the numeric plot of spinwave dispersion seems to be right, but only the symbolic solution is not correct.