Skip to content

Commit d4e8ff9

Browse files
committed
Merge branch 'simulations' into 'main'
Simulations See merge request magnetism/leaky-integrate-and-fire-neuron!1
2 parents eb313f6 + a6ffef5 commit d4e8ff9

9 files changed

+287
-17
lines changed
2.42 MB
Loading
45.9 KB
Loading
42.1 KB
Loading
35.5 KB
Loading
32 KB
Loading
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
//Dimension of the material and its discretization
2+
Nx := 850
3+
Ny := 40
4+
Nz := 1
5+
setGridSize(Nx, Ny, Nz)
6+
setCellSize(1e-9, 1e-9, 1e-9)
7+
//Period Boundary Condition (PBC). PBC must be canceled out to evaluate the position, the speed, and the tilting angle of the Domain Wall through ext_dwpos, ext_dwspeed, ext_dwtilt respectively
8+
//setPBC(4,0,0)
9+
//Tilting angle of anisotropy vector
10+
angle := 0.05 //between 0.01 and 1 rad
11+
py := 0
12+
pz := 1
13+
14+
//Parameters
15+
Msat = 1e6 //Saturation Magnetization
16+
Aex = 10e-12 // Exchange stiffness interaction
17+
anisU = vector(0, py, pz) //Anisotropy Vector
18+
alpha = 0.02 //max = 0.04 min = 0.015, Damping factor
19+
Xi = 0.2 //Non-adiabatic parameter
20+
pol = 1 //Current Polarization
21+
Dind = 0.1e-3 //DMI interaction J m3
22+
Minx := -Nx/2 + 25 //Min X offset for starting Anisotropy Gradient
23+
24+
//Anisotropy gradient definition
25+
Min_Ku1 := 0.8e6 //Minumum Anisotropy constant
26+
Max_Ku1 := 1.6e6 //Maximum Anisotropy constant
27+
numregions := (Nx-50)/10
28+
Delta_Ku := (Max_Ku1-Min_Ku1)/numregions
29+
30+
First_Reg := xrange(-425e-9,-400e-9)
31+
Second_Reg := xrange(400e-9,425e-9)
32+
33+
defregion(1, First_Reg)
34+
defregion(2, Second_Reg)
35+
36+
ku1.setregion(2, Min_Ku1) // Set minimum anisotropy left part of the track
37+
ku1.setregion(1, Max_Ku1) // Set maxium anisotropy right part of the track
38+
39+
count := 3;
40+
for i:=0; i<numregions; i+=1 {
41+
defregion(i+3, xrange((Minx+i*10)*1e-9, (Minx+(i+1)*10)*1e-9))
42+
ku1.setregion(i+3, Max_Ku1 - Delta_Ku*i)
43+
count = count + 1;
44+
print("Count", count)
45+
print("Region low Border=", (Minx+i*10)*1e-9, "Region up Border=", (Minx+(i+1)*10)*1e-9)
46+
}
47+
snapshot(regions)
48+
49+
//Magnetization Domain Definition
50+
m = twoDomain(0,0,1, 0,1,0, 0,0, -1).transl(-(Nx/2-25)*1e-9,0,0)
51+
relax() //Energy Minimization
52+
Snapshot(m)
53+
54+
55+
// Schedule output
56+
autosave(m, 1e-9) //Magnetization autosave
57+
tableadd(E_anis)
58+
tableadd(E_custom)
59+
tableadd(E_demag)
60+
tableadd(E_exch)
61+
tableadd(E_mel)
62+
tableadd(E_therm)
63+
tableadd(E_total)
64+
tableadd(E_Zeeman)
65+
66+
tableadd(Edens_anis)
67+
tableadd(Edens_custom)
68+
tableadd(Edens_demag)
69+
tableadd(Edens_exch)
70+
tableadd(Edens_mel)
71+
tableadd(Edens_therm)
72+
tableadd(Edens_total)
73+
tableadd(Edens_Zeeman)
74+
//tableautosave(10e-12) //Really dense autosaving to have good fitting of the DW Tilting Angle
75+
76+
//for i:=0; i<Nx; i++ {
77+
// tableadd(crop(m.comp(2), i, (i+1),Ny/2, Ny/2+1 ,0,1))
78+
//}
79+
tableautosave(0.5e-9)
80+
81+
Run(300e-9)
1.94 MB
Loading
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
//Dimension of the material and its discretization
2+
Nx := 850
3+
Ny := 40
4+
Nz := 1
5+
setGridSize(Nx, Ny, Nz)
6+
setCellSize(1e-9, 1e-9, 1e-9)
7+
//Period Boundary Condition (PBC). PBC must be canceled out to evaluate the position, the speed, and the tilting angle of the Domain Wall through ext_dwpos, ext_dwspeed, ext_dwtilt respectively
8+
//setPBC(4,0,0)
9+
//Tilting angle of anisotropy vector
10+
angle := 0.05 //between 0.01 and 1 rad
11+
py := 0
12+
pz := 1
13+
14+
//Parameters
15+
Msat = 1e6 //Saturation Magnetization
16+
Aex = 10e-12 // Exchange stiffness interaction
17+
anisU = vector(0, py, pz) //Anisotropy Vector
18+
alpha = 0.02 //max = 0.04 min = 0.015, Damping factor
19+
Xi = 0.2 //Non-adiabatic parameter
20+
pol = 1 //Current Polarization
21+
Dind = 0.1e-3 //DMI interaction J m2
22+
Minx := -Nx/2 + 25 //Min X offset for starting Anisotropy Gradient
23+
24+
//Anisotropy gradient definition
25+
Min_Ku1 := 0.8e6 //Minumum Anisotropy constant
26+
Max_Ku1 := 1.6e6 //Maximum Anisotropy constant
27+
numregions := (Nx-50)/10
28+
Delta_Ku := (Max_Ku1-Min_Ku1)/numregions
29+
30+
First_Reg := xrange(-425e-9,-400e-9)
31+
Second_Reg := xrange(400e-9,425e-9)
32+
33+
defregion(1, First_Reg)
34+
defregion(2, Second_Reg)
35+
36+
ku1.setregion(2, Min_Ku1) // Set minimum anisotropy left part of the track
37+
ku1.setregion(1, Max_Ku1) // Set maxium anisotropy right part of the track
38+
39+
count := 3;
40+
for i:=0; i<numregions; i+=1 {
41+
defregion(i+3, xrange((Minx+i*10)*1e-9, (Minx+(i+1)*10)*1e-9))
42+
ku1.setregion(i+3, Max_Ku1 - Delta_Ku*i)
43+
count = count + 1;
44+
print("Count", count)
45+
print("Region low Border=", (Minx+i*10)*1e-9, "Region up Border=", (Minx+(i+1)*10)*1e-9)
46+
}
47+
snapshot(regions)
48+
49+
//Magnetization Domain Definition
50+
m = twoDomain(0,0,1, 0,1,0, 0,0, -1).transl((Nx/2-25)*1e-9,0,0)
51+
relax() //Energy Minimization
52+
Snapshot(m)
53+
54+
55+
// Schedule output
56+
autosave(m, 1e-9) //Magnetization autosave
57+
58+
for i:=0; i<Nx; i++ {
59+
tableadd(crop(m.comp(2), i, (i+1),Ny/2, Ny/2+1 ,0,1))
60+
}
61+
tableautosave(0.5e-9)
62+
63+
J_SOT := abs(-0.0e11)
64+
65+
RunTime_On := 8e-9
66+
RunTime_Off := 40e-9
67+
68+
//Define constants for SOT
69+
AlphaH := 0.15 //Parameter of the Damping like SOT
70+
e := 1.6021766e-19 //Electron charge
71+
d := 1e-9 //oxide thickness
72+
Ms := 1e6 //Saturation Magnetization
73+
hbar := 1.0545718e-34 //Reduced Planck constant
74+
zi := ConstVector(0, 1, 0) //Direction Perpendicular to the Spin Current and to the Underlayer Current
75+
SOTxi := -2.0 //Ratio between Field Like SOT and Damping SOT
76+
77+
//First Current Pulse
78+
J_SOT = abs(7e11) //Underlayer Current
79+
print("Current ON...")
80+
print("J = ", J_SOT, " for ", 5, "ns")
81+
82+
//Define Damping Like SOT and Field Like SOT prefactors
83+
aj := Const(J_SOT*(hbar/2.*alphaH/e/d/Ms)) //Damping Like factor
84+
bj := Mul(aj,Const(SOTxi)) //Field Like Factor
85+
86+
//Add damping-like SOT term
87+
dampinglike := Mul(aj, Cross(m,zi))
88+
AddFieldTerm(dampinglike)
89+
AddEdensTerm(Mul(Const(-0.5),Dot(dampinglike,M_full)))
90+
91+
//Add field-like SOT term
92+
fieldlike := Mul(bj,zi)
93+
AddFieldTerm(fieldlike)
94+
AddEdensTerm(Mul(Const(-0.5),Dot(fieldlike,M_full)))
95+
96+
Run(RunTime_On)
97+
98+
//First Off Period
99+
//Remove all the customized field previously created
100+
RemoveCustomFields()
101+
J_SOT = abs(-0.0e11)
102+
print("Current OFF...")
103+
print("J = ", J_SOT, " for ", 20, "ns")
104+
Run(RunTime_Off)
105+
106+
//Second Current Pulse
107+
J_SOT = abs(-7.0e11) //Underlayer Current
108+
print("Current ON...")
109+
print("J = ", J_SOT, " for ", 5, "ns")
110+
111+
//Define Damping Like SOT and Field Like SOT prefactors
112+
aj = Const(J_SOT*(hbar/2.*alphaH/e/d/Ms)) //Damping Like factor
113+
bj = Mul(aj,Const(SOTxi)) //Field Like Factor
114+
115+
//Add damping-like SOT term
116+
dampinglike1 := Mul(aj, Cross(m,zi))
117+
AddFieldTerm(dampinglike1)
118+
AddEdensTerm(Mul(Const(-0.5),Dot(dampinglike1,M_full)))
119+
120+
//Add field-like SOT term
121+
fieldlike = Mul(bj,zi)
122+
AddFieldTerm(fieldlike)
123+
AddEdensTerm(Mul(Const(-0.5),Dot(fieldlike,M_full)))
124+
125+
Run(RunTime_On)
126+
127+
//Second Off Period
128+
//Remove all the customized field previously created
129+
RemoveCustomFields()
130+
J_SOT = abs(-0.0e11)
131+
print("Current OFF...")
132+
print("J = ", J_SOT, " for ", 10, "ns")
133+
Run(RunTime_Off)
134+
135+
136+
//Third Current Pulse
137+
J_SOT = abs(7e11) //Underlayer Current
138+
print("Current ON...")
139+
print("J = ", J_SOT, " for ", 5, "ns")
140+
141+
//Define Damping Like SOT and Field Like SOT prefactors
142+
aj = Const(J_SOT*(hbar/2.*alphaH/e/d/Ms)) //Damping Like factor
143+
bj = Mul(aj,Const(SOTxi)) //Field Like Factor
144+
145+
//Add damping-like SOT term
146+
dampinglike = Mul(aj, Cross(m,zi))
147+
AddFieldTerm(dampinglike)
148+
AddEdensTerm(Mul(Const(-0.5),Dot(dampinglike,M_full)))
149+
150+
//Add field-like SOT term
151+
fieldlike = Mul(bj,zi)
152+
AddFieldTerm(fieldlike)
153+
AddEdensTerm(Mul(Const(-0.5),Dot(fieldlike,M_full)))
154+
155+
Run(RunTime_On)
156+
157+
//Third OFF period
158+
//Remove all the customized field previously created
159+
RemoveCustomFields()
160+
J_SOT = abs(-0.0e11)
161+
print("Current OFF...")
162+
print("J = ", J_SOT, " for ", 5, "ns")
163+
Run(RunTime_Off)
164+
165+
166+
//Fourth Current Pulse
167+
J_SOT = abs(7e11) //Underlayer Current
168+
print("Current ON...")
169+
print("J = ", J_SOT, " for ", 5, "ns")
170+
171+
//Define Damping Like SOT and Field Like SOT prefactors
172+
aj = Const(J_SOT*(hbar/2.*alphaH/e/d/Ms)) //Damping Like factor
173+
bj = Mul(aj,Const(SOTxi)) //Field Like Factor
174+
175+
//Add damping-like SOT term
176+
dampinglike = Mul(aj, Cross(m,zi))
177+
AddFieldTerm(dampinglike)
178+
AddEdensTerm(Mul(Const(-0.5),Dot(dampinglike,M_full)))
179+
180+
//Add field-like SOT term
181+
fieldlike = Mul(bj,zi)
182+
AddFieldTerm(fieldlike)
183+
AddEdensTerm(Mul(Const(-0.5),Dot(fieldlike,M_full)))
184+
185+
Run(RunTime_On)
186+
187+
//Fourth OFF period
188+
//Remove all the customized field previously created
189+
RemoveCustomFields()
190+
J_SOT = abs(-0.0e11)
191+
print("Current OFF...")
192+
print("J = ", J_SOT, " for ", 5, "ns")
193+
Run(RunTime_Off)
194+

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
In this folder you will find some supplementary material regarding the article
2-
"DMI Influence on the Integration, Leakage and Threshold Property of Domain Wall based Neurons".
3-
In particular:
4-
5-
- The folder "DW_Leaking_40nmTrack_DMI0d1em3" contains some material about the simulation
6-
of the Leaking of the DW in the 40 nm wide track when the DMI coefficient is 0.1x10^-3 mJ/m^2:
7-
1) the .mx3 script used to run the simulation in Mumax;
8-
2) the plots of the Demagnetization, Anisotropy, Exchange and Total energies;
9-
3) A gif of the movement of the DW along the track. Each second corresponds to
10-
1 ns of the simulation.
11-
12-
- The folder "LIFNeuron_DMI0d1em3_CurrentPulse_On8ns_Off40ns" contains some material about
13-
the simulation of the response to current pulses of the LIF neuron, for a DMI coefficient of
14-
0.1x10^-3 mJ/m^2 and current pulses of 7e11 A/m^2:
15-
1) the .mx3 script used to run the simulation in Mumax;
16-
2) A gif of the movement of the DW along the track. Each second corresponds to
17-
1 ns of the simulation.
1+
In this folder you will find some supplementary material regarding the article
2+
"DMI Influence on the Integration, Leakage and Threshold Property of Domain Wall based Neurons".
3+
In particular:
4+
5+
1. The folder "DW_Leaking_40nmTrack_DMI0d1em3" contains some material about the simulation of the Leaking of the DW in the 40 nm wide track when the DMI coefficient is 0.1x10^-3 mJ/m^2:
6+
+ the .mx3 script used to run the simulation in Mumax;
7+
+ the plots of the Demagnetization, Anisotropy, Exchange and Total energies;
8+
+ a gif of the movement of the DW along the track. Each second corresponds to 1 ns of the simulation.
9+
10+
2. The folder "LIFNeuron_DMI0d1em3_CurrentPulse_On8ns_Off40ns" contains some material about the simulation of the response to current pulses of the LIF neuron, for a DMI coefficient of 0.1x10^-3 mJ/m^2 and current pulses of 7e11 A/m^2:
11+
+ the .mx3 script used to run the simulation in Mumax;
12+
+ a gif of the movement of the DW along the track. Each second corresponds to 1 ns of the simulation.

0 commit comments

Comments
 (0)