%%NLO4mix.m
function [Ap,As,Ai,cavp,cavs,cavi]=NLO4mix(lambda_p,lambda_s,lambda_i,np,ns,ni,dz,crystal_L,Ap,As,Ai,fx,fy,dx,dy,mu,c,loss_p,loss_s,loss_i,deff)
j=1i;
kappap=2deffpi./(np.lambda_p);
kappas=2deffpi./(ns.lambda_s);
kappai=2deffpi./(ni.lambda_i);
% Initialize Internal Intensities
cavp=zeros(1,length(crystal_L));
cavs=zeros(1,length(crystal_L));
cavi=zeros(1,length(crystal_L));
for t=1:length(crystal_L)
% Split Step - exp(L/2)exp(N)exp(L/2)A
% Linear (dz/2), Nonlinear (dz), Linear (dz/2)
% Propagation in Crystal half step (dz/2)
Ap=CrystalProp(Ap,lambda_p,np,dz/2,fx,fy,loss_p);
As=CrystalProp(As,lambda_s,ns,dz/2,fx,fy,loss_s);
Ai=CrystalProp(Ai,lambda_i,ni,dz/2,fx,fy,loss_i);
% Nonlinear Mixing - Traditional 4th Order Runga Kutta over full step dz
k1p=jdzkappap
四阶龙格-库塔法,解微分方程组,时域频域转换采用分步傅里叶法
![](https://img-home.csdnimg.cn/images/20240711042549.png)