我是靠谱客的博主 畅快向日葵,最近开发中收集的这篇文章主要介绍MATLAB中iterate程序,sbs的matlab程序,每行都是什么意思呢,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

%%%%%%%%Experimental and Modeling Studies of a Brillouin Amplifier%%%%%%%%%

clc;clear;format long;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%FC-72%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

c=2.998e8;

n=1.251;

tauB=1.2e-9;

gama=(n^2-1)*(n^2+2)/3;

nuaB=512;

rho0=1680;

alpha0=1e-3;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lambda=1.053e-6;

gB=4*pi*pi*(gama^2)*tauB/n/c/(lambda^2)/nuaB/rho0;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tpw=12e-9;

tpp=tpw/2+1e-9;

tsw=tpw*2;

tsp=tsw/2+1e-9;

Td=4e-9;

R=8e-3;

wp0=5e-3;

wsL=wp0*10;

L=1.5;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%???????????%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

dz=0.03;

NumZ=L/dz;

z=0:dz:L;

NumR=50;

dr=R/NumR;

r=0:dr:R;

T=80e-9;

NumT=10*T*1e9;

NumTd=10*Td*1e9;

dt=(T+Td)/(NumT+NumTd);

t=0:dt:(T+Td);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%??洢%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Ep0=zeros(NumZ+1,NumR+1);

Ep1=zeros(NumZ+1,NumR+1);

Eptemp=zeros(NumZ+1,NumR+1);

Es0=zeros(NumZ+1,NumR+1);

Es1=zeros(NumZ+1,NumR+1);

Estemp=zeros(NumZ+1,NumR+1);

Q0=zeros(NumZ+1,NumR+1);

Q1=zeros(NumZ+1,NumR+1);

Qtemp=zeros(NumZ+1,NumR+1);

IL=zeros(NumT+NumTd+1,NumR+1);

Is0=zeros(NumT+NumTd+1,NumR+1);

P0=zeros(NumT+NumTd+1,NumR+1);

SL=zeros(NumT+NumTd+1,NumR+1);

Ep1_0=ones(NumT+NumTd,7);

Es1_0=zeros(NumT+NumTd,7);

Q1_0=zeros(NumT+NumTd,7);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

epsilon_l=60e-3;

I0=epsilon_l/(pi*(wp0^2)*tpw);

I0=I0.^0.5;

S0=I0*1e-6;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tpw_2=tpw^2;

tsw_2=tsw^2;

wp0_2=wp0^2;

wsL_2=wsL^2;

r_2=r.^2;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%???????%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ttppTd=((t-(tpp+Td)*ones(1,NumT+NumTd+1))).^2/tpw_2;

ttsp=((t-tsp*ones(1,NumT+NumTd+1))).^2/tsw_2;

P0=I0*exp(-ttppTd)'*exp(-2*r_2/wp0_2);

SL=S0*exp(-ttsp)'*exp(-2*r_2/wsL_2);

Ep0(1,:)=P0(1,:);

Es0(NumZ+1,:)=SL(1,:);

IL(1,:)=Ep0(NumZ+1,:).*conj(Ep0(NumZ+1,:));

Is0(1,:)=Es0(1,:).*conj(Es0(1,:));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

c1=(1-alpha0*dz*0.5);

c2=gB*dz*0.125/tauB;

c3=1-dt*0.5/tauB;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for counter_t=1:NumT+NumTd

Ep1(1,:)=P0(counter_t+1,:);

Es1(NumZ+1,:)=SL(counter_t+1,:);

Ep1(2:NumZ+1,:)=Ep0(1:NumZ,:).*(ones(NumZ,NumR+1)*c1-c2*(Q0(1:NumZ,:).*Es0(1:NumZ,:)+Q0(2:NumZ+1,:).*Es0(2:NumZ+1,:)));

Es1(1:NumZ,:)=Es0(2:NumZ+1,:).*(ones(NumZ,NumR+1)*c1+c2*(conj(Q0(2:NumZ+1,:)).*Ep0(2:NumZ+1,:)+conj(Q0(1:NumZ,:)).*Ep1(1:NumZ,:)));

Q1=Q0.*(ones(NumZ+1,NumR+1)*c3+0.5*(Ep0.*conj(Es0)+Ep1.*conj(Es1)));

for iterate=1:3

%Eptemp=Ep1;

%Qtemp=Q1;

Ep1(2:NumZ+1,:)=Ep0(1:NumZ,:).*(ones(NumZ,NumR+1)*c1-c2*(Q0(1:NumZ,:).*Es0(1:NumZ,:)+Q1(2:NumZ+1,:).*Es1(2:NumZ+1,:)));

Es1(1:NumZ,:)=Es0(2:NumZ+1,:).*(ones(NumZ,NumR+1)*c1+c2*(conj(Q0(2:NumZ+1,:)).*Ep0(2:NumZ+1,:)+conj(Q1(1:NumZ,:)).*Ep1(1:NumZ,:)));

Q1=Q0.*(ones(NumZ+1,NumR+1)*c3+0.5*(Ep0.*conj(Es0)+Ep1.*conj(Es1)));

%Ep1_0(counter_t,iterate)=max(max(abs(Ep1-Eptemp)));

%Es1_0(counter_t,iterate)=max(max(abs(Es1-Estemp)));

%Q1_0(counter_t,iterate)=max(max(abs(Q1-Q0)));

end

Ep0=Ep1;

Es0=Es1;

Q0=Q1;

IL(counter_t+1,:)=Ep1(NumZ+1,:).*conj(Ep1(NumZ+1,:));

Is0(counter_t+1,:)=Es1(1,:).*conj(Es1(1,:));

end

[RR,TT]=meshgrid(r,t);

figure(1);

mesh(TT,RR,IL);

figure(2);

p0_2=zeros(NumT+NumTd+1,NumR+1);

p0_2=P0.*conj(P0);

mesh(TT,RR,p0_2);

figure(3);

mesh(TT,RR,Is0);

for counter_r=1:NumR+1

figure(4);

hold on;

plot(t,IL(:,counter_r));

end

figure(4);

hold off;

for counter_ttt=NumTd:NumTd+100

figure(5);

hold on;

plot(r,IL(counter_ttt,:));

end

figure(5);

hold off;

最后

以上就是畅快向日葵为你收集整理的MATLAB中iterate程序,sbs的matlab程序,每行都是什么意思呢的全部内容,希望文章能够帮你解决MATLAB中iterate程序,sbs的matlab程序,每行都是什么意思呢所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部