LLG方程
[Wang, M., Cai, W., Zhu, D., Wang, Z., Kan, J., Zhao, Z., Cao, K., Wang, Z., Zhang, Y., Zhang, T., Park, C., Wang, J. P., Fert, A., & Zhao, W. (2018). Field-free switching of a perpendicular magnetic tunnel junction through the interplay of spin–orbit and spin-transfer torques. Nature Electronics, 1(11), 582–588. https://doi.org/10.1038/s41928-018-0160-7]
[Wang, Z., Zhao, W., Deng, E., Klein, J. O., & Chappert, C. (2015). Perpendicular-anisotropy magnetic tunnel junction switched by spin-Hall-assisted spin-transfer torque. Journal of Physics D: Applied Physics, 48(6), 65001. https://doi.org/10.1088/0022-3727/48/6/065001]
//先是一系列参数初始化
@(initial_step)
begin
seed=1;
FA = 3.3141e-7/RA;
toxreal=tox;
tslreal=tsl;
TMRreal=TMR;
if (SAS==1)begin //是否考虑STT翻转电流非对称性
asy_real=asy; //1.1
end
else begin
asy_real=1;
end
P=sqrt(TMRreal/(2+TMRreal));
gamma = 2*`uB/`hbas;
lamda = gamma*`hbas/(`e*tslreal*Ms);
E_thermal = 0.5*`u0*Ms*Hk*tslreal*surface;
delta_aver = sqrt(`kB*T/(2.0*E_thermal)); //theta的微分变化值
Rp=(toxreal/(FA*sqrt(PhiBas)*surface))*exp(2*sqrt(2*`m*`e*PhiBas)*toxreal/`hbas); //Rp
R_HM=rho*l/(d*w); // heavy metal 半电阻
Hext = Bext/`u0; //外加磁场
phi = 0;
if (PAP == 0) begin
theta = delta_aver;
end
else begin
theta = `M_PI-delta_aver;
end
mz = cos(theta);
t_previous = $abstime;
end
//两个电流源会在底电极有交汇 分割出来J_STT和J_SHE
J_STT = -I(T1,Tc)/surface;
if (V(T2) > V(T3))
J_SHE = min(abs(I(T2,Tc)),abs(I(Tc,T3)))/(w*d);
else if (V(T2) < V(T3))
J_SHE = -min(abs(I(T3,Tc)),abs(I(Tc,T2)))/(w*d);
else begin
J_SHE = 0;
end
if (analysis("tran"))
begin
delta_phi = ($abstime-t_previous)*(1.0/((1+alpha*alpha)*sin(theta)))*(gamma*`u0*Hk*sin(theta)*cos(theta)-gamma*`u0*Hext*cos(theta)*sin(phi)+fac_FL*0.5*lamda*J_SHE*eta*cos(theta)*cos(phi)+gamma*`u0*Hext*alpha*cos(phi)+fac_FL*0.5*lamda*J_SHE*eta*alpha*sin(phi)-(P*asy_real*asy_real/((asy_real*asy_real+1)+(asy_real*asy_real-1)*cos(theta)))*lamda*J_STT*alpha*sin(theta)-0.5*lamda*eta*J_SHE*(alpha*cos(theta)*cos(phi)-sin(phi)));
delta_theta = ($abstime-t_previous)*(1.0/(1+alpha*alpha))*(gamma*`u0*Hext*cos(phi)-alpha*gamma*`u0*Hk*sin(theta)*cos(theta)+gamma*`u0*Hext*alpha*cos(theta)*sin(phi)-fac_FL*0.5*lamda*J_SHE*eta*alpha*cos(theta)*cos(phi)+fac_FL*0.5*lamda*J_SHE*eta*sin(phi)-(P*asy_real*asy_real/((asy_real*asy_real+1)+(asy_real*asy_real-1)*cos(theta)))*lamda*J_STT*sin(theta)-0.5*lamda*eta*J_SHE*(alpha*sin(phi)+cos(theta)*cos(phi)));
//phi弧度变化量;theta弧度变化量
//theta和phi的变化计算方程由LLG方程推导得来,外加条件作用下,m的theta和phi开始改变,cos(theta)改变,mz改变,R_MTJ改变;
//当theta=180度时,即m与参考层磁矩反向时,完成该进动过程,m翻转为垂直向下,R_MTJ变为Rap
phi = phi + delta_phi; //更新phi值
theta = theta + delta_theta; //更新delta值
t_previous = $abstime;
$bound_step(sim_step);
end
if(theta > `M_PI-delta_aver)
theta = `M_PI - delta_aver;
else if (theta < delta_aver)
theta = delta_aver;
mz = cos(theta); //m在z方向的投影
V(Tmz)<+mz;
V(Tc)<+(0.5*V(T1)*R_HM+(Rp*(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+TMRreal)/(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+0.5*(1+mz)*TMRreal))*(V(T2)+V(T3)))/(2*(Rp*(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+TMRreal)/(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+0.5*(1+mz)*TMRreal))+0.5*R_HM);
R_MTJ = Rp*(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+TMRreal)/(1+(V(T1)-V(Tc))*(V(T1)-V(Tc))/(Vh*Vh)+0.5*(1+mz)*TMRreal); //mz=cos(theta) 当theta=0,磁矩与参考层同向,R_MTJ=Rp;反向时,R_MTJ>Rp
P->AP过程:
theta和phi的变化计算方程由LLG方程推导得来,外加条件作用下,m的theta和phi开始改变,cos(theta)改变,mz改变,R_MTJ改变;当theta=180度时,即m与参考层磁矩反向时,完成该进动过程,m翻转为垂直向下,R_MTJ变为Rap