切换到宽版
  • 广告投放
  • 稿件投递
  • 繁體中文
    • 2469阅读
    • 1回复

    [原创]RP Fiber Power仿真设计掺铥光纤激光器代码详解 [复制链接]

    上一主题 下一主题
    离线小火龙果
     
    发帖
    932
    光币
    2176
    光券
    0
    只看楼主 倒序阅读 楼主  发表于: 2020-05-28
    (* _,3ljf?WQM  
    Demo for program"RP Fiber Power": thulium-doped fiber laser, 1{uxpYAP=  
    pumped at 790 nm. Across-relaxation process allows for efficient `sjY#Ua<  
    population of theupper laser level. !$I~3_c  
    *)            !(*  *)注释语句 unDW2#GX  
    B-I4(w($  
    diagram shown: 1,2,3,4,5  !指定输出图表  _"DC )  
    ; 1: "Powersvs. Position"     !分号是注释;光纤长度对功率的影响 7?lz$.*Avp  
    ; 2:"Variation of the Pump Power"  !泵浦光功率变化对信号输出功率的影响 S"bN9?;#u  
    ; 3:"Variation of the Fiber Length"!信号输出功率vs 光纤长度的变化,仿真最佳光纤长度 }D1x%L  
    ; 4:"Transverse Profiles"             !横向分布,横坐标为半径位置 6)[moR{N1  
    ; 5:"Transition Cross-sections"    !不同波长的跃迁横截面,横坐标波长,纵坐标为横截面 c r=Q39{  
    pwSgFc$z  
    include"Units.inc"         !读取“Units.inc”文件中内容 f-U zFlU  
    srS!X$cec  
    include"Tm-silicate.inc"    !读取光谱数据 I| TNo-!$  
    r[9m-#)>  
    ; Basic fiberparameters:    !定义基本光纤参数 J"gMm@#C4  
    L_f := 4 { fiberlength }      !光纤长度 &61U1"&$R  
    No_z_steps := 50 {no steps along the fiber } !光纤步长,大括号{ }是注释,相当于备注 .ARYCTyG  
    r_co := 6 um { coreradius }                !纤芯半径 bW yimr&B  
    N_Tm := 100e24 { Tmdoping concentration }  !纤芯Tm离子掺杂浓度 "O$bq::(]e  
    O]:9va  
    ; Parameters of thechannels:                !定义光信道 ammi4k/  
    l_p := 790 nm {pump wavelength }                !泵浦光波长790nm ~!uX"F8Xl  
    dir_p := forward {pump direction (forward or backward) }   !前向泵浦 _|~Dj)z  
    P_pump_in := 5 {input pump power }                    !输入泵浦功率5W "&L8d(ZuA  
    w_p := 50 um {radius of pump cladding }               !包层泵浦相应的半径 50um KpN]9d   
    I_p(r) := (r <=w_p) { pump intensity profile }          !泵浦光强度分布 HwU9 y   
    loss_p := 0 {parasitic losses of pump wave }           !泵浦光寄生损耗为0 XJul~"  
    #N{]  
    l_s := 1940 nm {signal wavelength }                   !信号光波长1940nm -"-.Z&#  
    w_s := 7 um                          !信号光的半径 n6Oz[7M  
    I_s(r) := exp(-2 *(r / w_s)^2)            !信号光的高斯强度分布 =7!s8D,[  
    loss_s := 0                            !信号光寄生损耗为0 A}fm).Wp@  
    SQMl5d1d:  
    R_oc := 0.70 {output coupler reflectivity (right side) }      !输出耦合反射率 YNr5*P1  
    @&T' h}|:  
    ; Function for defining themodel:   !定义模型函数,一定要有calc命令,否则函数只会被定义,但不会被执行 4Kqo>|C  
    calc We6eAP/Z  
      begin #H$lBC WI  
        global allow all;                   !声明全局变量 -TD\?Q  
        set_fiber(L_f, No_z_steps, '');        !光纤参数 <4{m99  
        add_ring(r_co, N_Tm); z+Xr2B  
        def_ionsystem();              !光谱数据函数 EBhdP  
        pump := addinputchannel(P_pump_in, l_p,'I_p', loss_p, dir_p);  !泵浦光信道 aEf3hB*~  
        signal_fw := addinputchannel(0, l_s, 'I_s',loss_s, forward);      !前向信号光信道 b'wy{~l@  
        signal_bw := addinputchannel(0, l_s, 'I_s',loss_s, backward);    !后向信号光信道 9nY`rF8@  
        set_R(signal_fw, 1, R_oc);                                 !设置反射率函数 4!sK>l!  
        finish_fiber();                                   ~+.=  
      end; w4fKh  
    S1|5+PPs  
    ; Display someoutputs in the Output window (on the right side): !在Output aera区域显示输出 |JkfAnrN$I  
    show "Outputpowers:"                                   !输出字符串Output powers: [ G 9Pb)  
    show"pump:     ", P_out(pump):d3:"W"  !输出字符串pump:和计算值(格式为3个有效数字,单位W) 2poo@]M/  
    show"signal:   ",P_out(signal_fw):d3:"W" !输出字符串signal:和计算值(格式为3个有效数字,单位W) _2KIe(,;  
    RvG=GJJ9  
    [aSuEu?mC  
    ; ------------- 9]Jv >_W*  
    diagram 1:                   !输出图表1 eA N{BPN [  
    1zRYd`IPoq  
    "Powers vs.Position"          !图表名称 $yU 5WEX  
    7U7!'xU  
    x: 0, L_f                      !命令x: 定义x坐标范围 5V 2ZAYV  
    "position infiber (m)", @x      !x轴标签;@x 指示这些字符串沿坐标轴放置 9L$OSy|  
    y: 0, 15                      !命令y: 定义y坐标范围 cB&_':F  
    y2: 0, 100                    !命令y2: 定义第二个y坐标范围 G]h_z|$K  
    frame          !frame改变坐标系的设置 2l?^\9&  
    legpos 600, 500  !图行在图表窗口中的位置(相对于左上角而言) O=__w *<  
    hx             !平行于x方向网格 2 G.y.#W  
    hy              !平行于y方向网格  Z 9:  
    3cHYe  
    f: P(pump, x),    !命令f: 定义函数图;P(pump, x)函数是计算x位置处的泵浦光功率 <M9NyD`  
      color = red,  !图形颜色 4eWv).  
      width = 3,   !width线条宽度 J0V m&TY  
      "pump"       !相应的文本字符串标签 3JC uM_y  
    f: P(signal_fw, x),  !P(signal_fw ,x) 函数是计算x位置处的前向信号光功率 %N Q mV_1  
      color = blue,     MK3h~`is  
      width = 3, *I :c@iCNJ  
      "fw signal" Bq$IBAot  
    f: P(signal_bw, x),   !P(signal_bw ,x) 函数是计算x位置处的后向信号光功率 #E+ybwA  
      color = blue, 1v&!%9  
      style = fdashed, 1IoW}yT  
      width = 3, :G>w MMv&z  
      "bw signal" t]I9[5Pq\  
    'goKYl#1Q  
    f: 100 * n(x, 2),    !n(x ,2) 函数是计算x位置处激活粒子数在能级2上的占比 UIDeMz  
      yscale = 2,            !第二个y轴的缩放比例 *AV%=   
      color = magenta, Cu`  
      width = 3, % PzkVs  
      style = fdashed, 4Q!A w  
      "n2 (%, right scale)" NsI.mTc2  
    r10VFaly  
    f: 100 * n(x, 3),          !n(x ,3) 函数是计算x位置处激活粒子数在能级3上的占比 ~QSX 1w"  
      yscale = 2, OxDq LX  
      color = red, Z,"4f*2  
      width = 3, \v&zsv\B@  
      style = fdashed, X$KTsG*  
      "n3 (%, right scale)" a4UwhbH  
    q\@_L.tc[  
    &|Wqzdo?#  
    ; ------------- %}(` ?  
    diagram 2:                    !输出图表2 $y6 <2w%b  
    hDi~{rbmc  
    "Variation ofthe Pump Power" /a*){JQ5j  
    $B8Vg `+  
    x: 0, 10 d<d3j9u(#  
    "pump inputpower (W)", @x ,KJHYm=Q  
    y: 0, 10 .1TuHC\mC  
    y2: 0, 100 tC|?Kl7  
    frame 3!8(A/YP;  
    hx /[dMw *SRz  
    hy d4ecF%R  
    legpos 150, 150 ^'[QCwY~  
    rJGh3%  
    f: (set_P_in(pump, x);P_out(signal_fw)), !set_P_in(pump,x)改变泵浦信道功率;P_out(signal_fw)输出前向信号光 /?r A|  
      step = 5, HL&HY)W1gf  
      color = blue, ^2}HF/  
      width = 3, !-t w  
      "signal output power (W, leftscale)",     !相应的文本字符串标签 t$du|q(  
      finish set_P_in(pump, P_pump_in) Uj;JN}k  
    O)`L( x  
    f: (set_P_in(pump,x); 100 * n_av(2)),   !改变泵浦信号功率对能级2上激活粒子占比的影响 Xk.OyQ@  
      yscale = 2, ;@=3 @v  
      step = 5, |l8=z*v<  
      color = magenta, zc8^#D2y&  
      width = 3, el`?:dY H  
      "population of level 2 (%, rightscale)", 0 aH&M4  
      finish set_P_in(pump, P_pump_in) 2!0tD+B  
    Yw#fQFm  
    f: (set_P_in(pump,x); 100 * n_av(3)),   !改变泵浦信号功率对能级3上激活粒子占比的影响 p/ xlR[  
      yscale = 2, +z nlf-  
      step = 5, K?J_cnJ`  
      color = red, C*ep8{B  
      width = 3, VxDIA_@y  
      "population of level 3 (%, rightscale)", S[!6Lw  
      finish set_P_in(pump, P_pump_in) 2`*w*  
    {Z k^J  
    R_B0CM<!  
    ; ------------- j7ZxA*  
    diagram 3:                         !输出图表3 e1a\ --  
    6&0@k^7~  
    "Variation ofthe Fiber Length" K-:y  
    ViiJDYT>E<  
    x: 0.1, 5 ZeuL*c \  
    "fiber length(m)", @x 7P2n{zd,  
    y: 0, 10 =V|jd'iwx  
    "opticalpowers (W)", @y pC:YT/J  
    frame :se$<d%  
    hx UH-873AK  
    hy ;Tnid7:S  
    BW)-F (v   
    f: (set_L(x);P_out(signal_fw)),     !改变光纤长度对信号光输出功率的影响 5c3-?u!  
      step = 20,             ,93Uji[l  
      color = blue, :+DrV\)  
      width = 3, z |llf7:  
      "signal output" ^Zz^h@+  
    B?i#m^S  
    ;f: (set_L(x);P_out(pump)),                     !改变光纤长度对泵浦信号输出功率的影响 KGM__ZO.  
       step = 20, color = red, width = 3,"residual pump" 0zNbux_  
    yn}Dj9(q  
    ! set_L(L_f) {restore the original fiber length } 4*qBu}(  
    :pdX  
    Y]L4,V  
    ; ------------- Rm=p}  
    diagram 4:                                  !输出图表4 =gI41Y]  
    OiQf=Uz\  
    "TransverseProfiles" 1l$ C3c  
    $,@}%NlHc  
    I_max :=maxr(I(pump, -1, 0, 0), I(signal_fw, -1, 0, 0)) zQulPU  
    f2x!cL|Kx?  
    x: 0, 1.4 * r_co /um 3bWGWI  
    "radialposition (µm)", @x pi"M*$  
    y: 0, 1.2 * I_max *cm^2 )9"^ D  
    "intensity (W/ cm&sup2;)", @y YA$YT8iMe  
    y2: 0, 1.3 * N_Tm y/\b0&  
    frame I9 zs  
    hx '(@q"`n  
    hy K1hkOj;S  
    ,e43m=KhK  
    f: N_dop(1, x * um,0),      !掺杂浓度的径向分布 q~ a FV<Q  
      yscale = 2, j7Fb4;o{  
      color = gray, r\Y,*e  
      width = 3, 0\XWdTj{  
      maxconnect = 1, Fge%6hu  
      "N_dop (right scale)" $x'jf?zs!  
    Y M:9m)  
    f: I(pump, -1, x *um, 0) * cm^2,    !泵浦光沿光纤径向的强度分布 `B@eeXa;u  
      color = red, rQ{|0+l  
      maxconnect = 1,           !限制图形区域高度,修正为100%的高度 ~'%d]s+q  
      width = 3, aI&~aezmN  
      "pump" # &.syD#  
     B`e/ /  
    f: I(signal_fw, -1,x * um, 0) * cm^2,  !信号光沿光纤径向的强度分布 7JBs7LG  
      color = blue, */h(4Hz  
      maxconnect = 1, Oq~{HJ{  
      width = 3, 0RA#Y(IR  
      "signal" xR0*w7YE  
    S'34](9n6  
    tV(iC~/  
    ; ------------- ]%D!-[C%1  
    diagram 5:                                  !输出图表5 > f X^NX  
    "O>~osj  
    "TransitionCross-sections" P^<3 Z)L  
    [<f2h-V$  
    I_max :=maxr(I(pump, -1, 0, 0), I(signal_fw, -1, 0, 0)) [T_[QU:A  
    }d}gb`Du  
    x: 1450, 2050 39 }e }W"  
    "wavelength(nm)", @x ;S U<T^a  
    y: 0, 0.6 !6=s{V&r1  
    "cross-sections(1e-24 m&sup2;)", @y s 1M-(d Q  
    frame "L]v:lg3  
    hx !6-t_S  
    hy ;GM`=M4  
    E~}H,*)  
    f: s12_Tm(x * nm) /1e-24,      !Tm3+吸收截面与波长的关系 $/"Ymm#"\Y  
      color = red, n~6$CQ5dF(  
      width = 3, DGGySO6=$e  
      "absorption" 5%2~/ "  
    f: s21_Tm(x * nm) /1e-24,  !Tm3+发射截面与波长的关系 y_Lnk=Q ^  
      color = blue, .5; JnJI  
      width = 3,  Culv/  
      "emission" gS<p~LPf  
    )q_,V"  
     
    分享到
    离线lileisgsz
    发帖
    14
    光币
    69
    光券
    0
    只看该作者 1楼 发表于: 2021-09-28
    感谢,视频上有点看不清楚