Inquiry about Figure 6 in the Paper Titled "Micromagnetic Monte Carlo method with variable magnetization length based on the Landau–Lifshitz–Bloch equation for computation of large-scale thermodynamic equilibrium states"

27 views
Skip to first unread message

Zhiyu Zhang

unread,
Oct 3, 2024, 2:43:32 AM10/3/24
to Boris Computational Spintronics

Hi, Serban,

I would like to know how the hysteresis loops in Figure 6 of your paper titled "Micromagnetic Monte Carlo method with variable magnetization length based on the Landau–Lifshitz–Bloch equation for computation of large-scale thermodynamic equilibrium states " were generated. I mean, I have tried using the micromagnetic parameters mentioned in your paper, but I haven't been able to achieve such a well-defined curve. Could you briefly explain the code or steps required to reproduce that figure?

Thank you in advance for your help!

Screenshot 2024-10-03 142835.png

First, I think i shold create a maze domain at 0 field,  here's my code:

FM = ns.Material('Co/Pt', [100e-9, 100e-9, 1e-9], [2e-9, 2e-9, 1e-9])
FM.modules(['Zeeman', 'demag', 'iDMexchange', 'aniuni'])
deg_ip = 89
deg_op = 1
FM.setangle(deg_op, 0)
FM.param.Ms = 6e5
FM.param.K1 = 3e5
FM.param.D = 2e-3
FM.param.A = 10e-12
FM.param.ea1 = (0, 0, 1)

FM.temperature(300)
FM.curietemperature(600)

FM.pbc('x', 10)
FM.pbc('y', 10)

ns.setsavedata('OP_hys.txt',['Ha', FM],['<M>', FM])
for data in ['Ha', '<M>']:
    FM.addpinneddata(data)

ns.setode('LLGStatic', 'SDesc')
ns.cuda(1)

ns.skyrmion(FM, 1, 1, 100e-9, [50e-9, 50e-9])
ns.Relax(['mxh', 1e-6, 'none']) 

Then, sweep field from 0 to max:

ns.setode('LLG', 'RKF45')
ns.Hpolar_seq([FM, [0, deg_op, 0, 1e6, deg_op, 0, 20], 'dmdt', 1e-5, 'time', 100e-12])

Best regards,  

Zhiyu

Serban Lepadatu

unread,
Oct 4, 2024, 4:58:56 AM10/4/24
to Boris Computational Spintronics
Hi Zhiyu,

Please try the script below.

Regards,
Serban

from NetSocks import NSClient, customize_plots
import matplotlib.pyplot as plt
import numpy as np

ns = NSClient(); ns.configure(True)
customize_plots()

FM = ns.Material('Co/Pt', [1000e-9, 1000e-9, 2e-9], [2e-9])
FM.modules(['Zeeman', 'iDMexchange', 'aniuni', 'demag'])

FM.param.Ms = 600e3
FM.param.K1 = 300e3
FM.param.D = -3e-3


FM.pbc('x', 10)
FM.pbc('y', 10)

FM.setangle(180, 0)

FM.curietemperature(640)
FM.temperature(300)

ns.cuda(1)

Hmax = 600e3
steps = 600

fileName = 'Co_Pt_DMI_MMC.txt'
ns.dp_newfile(fileName)

for idx in range(steps + 1):
   
    Hstep = 2*Hmax / steps
    H = -Hmax + idx * Hstep

    FM.setfield(H, 0, 0)
    ns.MonteCarlo([0.5, 'iter', 2000])
    ns.reset()
   
    Mav = FM.showdata('<M>')
    ns.SaveDataToFile(fileName, [H, Mav[0], Mav[1], Mav[2]])
   
for idx in range(steps + 1):
   
    Hstep = 2*Hmax / steps
    H = Hmax - idx * Hstep

    FM.setfield(H, 0, 0)
    ns.MonteCarlo([0.5, 'iter', 1000])
    ns.reset()
   
    Mav = FM.showdata('<M>')
    ns.SaveDataToFile(fileName, [H, Mav[0], Mav[1], Mav[2]])
 
data = ns.Get_Data_Columns(fileName, [0, 3])
plt.axes(xlabel = 'Field (kA/m)', ylabel = 'M (kA/m)')
plt.plot(np.array(data[0])/1e3, np.array(data[1])/1e3)
plt.show()





Reply all
Reply to author
Forward
0 new messages