📄 newton.m
字号:
function x=newton(P,S1,S2)
bbap=5*10^(-25);bbas=0.1*10^(-25);bbes=2.5*10^(-25);
k1013=2.4*10^(-24);k3101=3*10^(-23);
%k1013=0.3*10^(-27);k3101=3*10^(-24);
tau1=340*10^(-6);
%tau3=10*10^(-7);
tau3=14.2*10^(-6);
bbeta30=0.14;bbeta31=0.72;N=5.51*10^24;c=3*10^8;A=1.39*10^(-11);
h=6.63*10^(-34);Lp=790*10^(-9);Ls=1.9*10^(-6);
Taup=0.8964;
%Taup=0.01;
Taus=0.7520;
% bbap and bbas are the absorption cross section of the pump and laser
% bbes is the stimulated emission cross section of the laser
% k1013 and k3101 are the cross-relaxation rates
% tau1 and tau3 are the nonradiation transition rates
% bbeta30 and bbeta31 are the spontaneous transition diversion rates
% N is the total numbers of the ions
;maxit=15;
x=zeros(2,1);f=zeros(2,1);
for k=1:maxit
f(1)=-bbap*Lp*P*Taup/(h*c*A)*x(1)+k1013*x(2)^2-k3101*(N-x(1)-x(2))*x(1)+x(2)/tau1+bbeta30*(N-x(1)-x(2))/tau3+Ls*(S1+S2)*Taus/(h*c*A)*(bbes*x(2)-bbas*x(1));
f(2)=bbap*Lp*P*Taup/(h*c*A)*x(1)-(N-x(1)-x(2))/tau3-k3101*(N-x(1)-x(2))*x(1)+k1013*x(2)^2;
J=[2*k3101*x(1)-k3101*(N-x(2))-bbap*Lp*P*Taup/(h*c*A)-bbeta30/tau3-Ls*(S1+S2)*Taus/(h*c*A)*bbas 2*k1013*x(2)+k3101*x(1)+1/tau1-bbeta30/tau3+Ls*(S1+S2)*Taus/(h*c*A)*bbes;2*k3101*x(1)-k3101*(N-x(2))+bbap*Lp*P*Taup/(h*c*A)+1/tau3 1/tau3+k3101*x(1)+2*k1013*x(2)];
dx=-J\f;
x=x+dx;
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -