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

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

    上一主题 下一主题
    离线小火龙果
     
    发帖
    930
    光币
    2161
    光券
    0
    只看楼主 倒序阅读 楼主  发表于: 2020-05-28
    (* y$6~&X  
    Demo for program"RP Fiber Power": thulium-doped fiber laser, L j>HZS$F  
    pumped at 790 nm. Across-relaxation process allows for efficient vS'l@`Eg]  
    population of theupper laser level. j8#xNA  
    *)            !(*  *)注释语句 ! uX0G4  
    FQW{c3%qZ  
    diagram shown: 1,2,3,4,5  !指定输出图表 vn Ol-`Z ~  
    ; 1: "Powersvs. Position"     !分号是注释;光纤长度对功率的影响 ;2%8tV$V  
    ; 2:"Variation of the Pump Power"  !泵浦光功率变化对信号输出功率的影响 GZCXm+  
    ; 3:"Variation of the Fiber Length"!信号输出功率vs 光纤长度的变化,仿真最佳光纤长度 Lk>o`<*  
    ; 4:"Transverse Profiles"             !横向分布,横坐标为半径位置 "-afHXED  
    ; 5:"Transition Cross-sections"    !不同波长的跃迁横截面,横坐标波长,纵坐标为横截面  L$Yg*]\  
    F*rsi7#!pG  
    include"Units.inc"         !读取“Units.inc”文件中内容 3tu:Vc.:M  
    "B3&v%b  
    include"Tm-silicate.inc"    !读取光谱数据 Q$XNs%7w5,  
    Oi-= Fp  
    ; Basic fiberparameters:    !定义基本光纤参数 Wi%e9r{hU  
    L_f := 4 { fiberlength }      !光纤长度 6#za\[  
    No_z_steps := 50 {no steps along the fiber } !光纤步长,大括号{ }是注释,相当于备注 -gK*&n~  
    r_co := 6 um { coreradius }                !纤芯半径 Iq["(!7E5  
    N_Tm := 100e24 { Tmdoping concentration }  !纤芯Tm离子掺杂浓度 H{CiN  
    wJ Qm7n-+  
    ; Parameters of thechannels:                !定义光信道 ]**h`9MF  
    l_p := 790 nm {pump wavelength }                !泵浦光波长790nm :Cdqj0O3u  
    dir_p := forward {pump direction (forward or backward) }   !前向泵浦 PqVz ^(Wz  
    P_pump_in := 5 {input pump power }                    !输入泵浦功率5W g;mX{p_@  
    w_p := 50 um {radius of pump cladding }               !包层泵浦相应的半径 50um +pG[ [}/  
    I_p(r) := (r <=w_p) { pump intensity profile }          !泵浦光强度分布 cf`g.9pjlx  
    loss_p := 0 {parasitic losses of pump wave }           !泵浦光寄生损耗为0 {;-wXzv`  
    iPeW;=-2Wk  
    l_s := 1940 nm {signal wavelength }                   !信号光波长1940nm }eq*dr1`  
    w_s := 7 um                          !信号光的半径 X4I+  
    I_s(r) := exp(-2 *(r / w_s)^2)            !信号光的高斯强度分布 v-ZTl4j$  
    loss_s := 0                            !信号光寄生损耗为0 u|{(m_"H  
    b<E+5;u  
    R_oc := 0.70 {output coupler reflectivity (right side) }      !输出耦合反射率 4157!w'\y  
    " .<>(bE  
    ; Function for defining themodel:   !定义模型函数,一定要有calc命令,否则函数只会被定义,但不会被执行 7Adg;  
    calc "%E<%g  
      begin %ZbdWHO#  
        global allow all;                   !声明全局变量 )~2~q7  
        set_fiber(L_f, No_z_steps, '');        !光纤参数 M,we9];N  
        add_ring(r_co, N_Tm); 67D{^K"KT  
        def_ionsystem();              !光谱数据函数 [ @ASAhV^+  
        pump := addinputchannel(P_pump_in, l_p,'I_p', loss_p, dir_p);  !泵浦光信道 V7(-<})8  
        signal_fw := addinputchannel(0, l_s, 'I_s',loss_s, forward);      !前向信号光信道 LTlbrB  
        signal_bw := addinputchannel(0, l_s, 'I_s',loss_s, backward);    !后向信号光信道 ;6AanwR6  
        set_R(signal_fw, 1, R_oc);                                 !设置反射率函数 b9RJ>K  
        finish_fiber();                                   )&vuT q'7'  
      end; V ah&)&n  
    ec3zoKtV  
    ; Display someoutputs in the Output window (on the right side): !在Output aera区域显示输出 `W9~u: F  
    show "Outputpowers:"                                   !输出字符串Output powers: X`Jo XNqm  
    show"pump:     ", P_out(pump):d3:"W"  !输出字符串pump:和计算值(格式为3个有效数字,单位W) k(ho?  
    show"signal:   ",P_out(signal_fw):d3:"W" !输出字符串signal:和计算值(格式为3个有效数字,单位W) K=N8O8R$y  
    U~I y),5  
    aExt TE  
    ; ------------- 4H*M^?h\#  
    diagram 1:                   !输出图表1 ?"-1QG  
    Ou7nk:I@  
    "Powers vs.Position"          !图表名称 E]dc4US  
    1uco{JX<S  
    x: 0, L_f                      !命令x: 定义x坐标范围 ifI0s)Pn  
    "position infiber (m)", @x      !x轴标签;@x 指示这些字符串沿坐标轴放置 0`KR8# A@  
    y: 0, 15                      !命令y: 定义y坐标范围 D5"Xjo*  
    y2: 0, 100                    !命令y2: 定义第二个y坐标范围 8T5W6Zs1  
    frame          !frame改变坐标系的设置 z2~\ b3G  
    legpos 600, 500  !图行在图表窗口中的位置(相对于左上角而言) 9}A\Bh tiM  
    hx             !平行于x方向网格 6lob&+  
    hy              !平行于y方向网格 BT^HlW<  
    ":!1gC  
    f: P(pump, x),    !命令f: 定义函数图;P(pump, x)函数是计算x位置处的泵浦光功率 u9u'!hAGH  
      color = red,  !图形颜色 Nh[H[1"J  
      width = 3,   !width线条宽度 ~c`%k>$  
      "pump"       !相应的文本字符串标签 }uiD8b{I  
    f: P(signal_fw, x),  !P(signal_fw ,x) 函数是计算x位置处的前向信号光功率 kca#ssN  
      color = blue,     I3;03X<2  
      width = 3, P!u0_6  
      "fw signal" fLg :+Ue<B  
    f: P(signal_bw, x),   !P(signal_bw ,x) 函数是计算x位置处的后向信号光功率 !QlCt>{  
      color = blue, aIo%~w  
      style = fdashed, G#YBfPmr  
      width = 3, K1CgM1v  
      "bw signal" 45Lzq6  
    BG_6$9y  
    f: 100 * n(x, 2),    !n(x ,2) 函数是计算x位置处激活粒子数在能级2上的占比 4w#:?Y _\[  
      yscale = 2,            !第二个y轴的缩放比例 )(+q~KA}  
      color = magenta, Ij2T h]  
      width = 3, 8lFYk`|g  
      style = fdashed, sB0m^Y'  
      "n2 (%, right scale)" m+QZ|  
    nm,(Wdr  
    f: 100 * n(x, 3),          !n(x ,3) 函数是计算x位置处激活粒子数在能级3上的占比 KGrYF  
      yscale = 2, d+p^fBz  
      color = red, z:oi @q  
      width = 3, m:Fdgu9  
      style = fdashed, PIHKSAnq  
      "n3 (%, right scale)" eCjyx|:J  
    L, 2;-b|  
    ^B$cfs@*  
    ; ------------- j [4l'8Ek  
    diagram 2:                    !输出图表2 D<'G\#n3I=  
    >02p,W6S>  
    "Variation ofthe Pump Power" 8&SW Q  
    'HJ<"<  
    x: 0, 10 ',!>9Dj  
    "pump inputpower (W)", @x Z5eM  
    y: 0, 10 0[p"8+x  
    y2: 0, 100 e"|ZTg+U  
    frame rP IAu[],g  
    hx !b?cY{  
    hy 9B/iQCFtj$  
    legpos 150, 150 C8%MKNPd  
    w\a6ga!xt"  
    f: (set_P_in(pump, x);P_out(signal_fw)), !set_P_in(pump,x)改变泵浦信道功率;P_out(signal_fw)输出前向信号光 =w7+Yt  
      step = 5, |3BxNFe`%  
      color = blue,  0:$pJtx"  
      width = 3, e4FR)d0x  
      "signal output power (W, leftscale)",     !相应的文本字符串标签 +5Ju `Z  
      finish set_P_in(pump, P_pump_in) piFZu/~Gq\  
    gOr%N!5  
    f: (set_P_in(pump,x); 100 * n_av(2)),   !改变泵浦信号功率对能级2上激活粒子占比的影响 [Pl''[  
      yscale = 2, Y+eDE:4  
      step = 5, ]U&<y8Q_6  
      color = magenta, k\Y*tY#2  
      width = 3, F{Oaxn  
      "population of level 2 (%, rightscale)", HMhdK  
      finish set_P_in(pump, P_pump_in) =R)w=ce  
    h:i FLSf  
    f: (set_P_in(pump,x); 100 * n_av(3)),   !改变泵浦信号功率对能级3上激活粒子占比的影响 :r7!HG _  
      yscale = 2, Sa@T#%oU  
      step = 5, N]-skz<v  
      color = red, ^ywDa^;-  
      width = 3, LTuT"}dT[  
      "population of level 3 (%, rightscale)", m#<Jr:-  
      finish set_P_in(pump, P_pump_in) _k#GjAPM  
    N~P1^x~  
    T.W^L'L `  
    ; ------------- ~=9S AJr]  
    diagram 3:                         !输出图表3 `3*QKi$  
    Rh%@N.Z*  
    "Variation ofthe Fiber Length" ^fE8|/]nG9  
    iNilk!d6Q3  
    x: 0.1, 5 .)<l69ZD Z  
    "fiber length(m)", @x 7rG+)kHG  
    y: 0, 10 *JAC+<~d  
    "opticalpowers (W)", @y 7g:Lj,Z4L  
    frame Y@7n>U  
    hx + Y!:@d  
    hy dptfIBYc+  
    5}a.<  
    f: (set_L(x);P_out(signal_fw)),     !改变光纤长度对信号光输出功率的影响 l| y.6v  
      step = 20,             3p]\l ]=  
      color = blue, g_0| `Sm  
      width = 3, p_vl dTIW  
      "signal output" #CcEI  
    "{Hl! Zq/  
    ;f: (set_L(x);P_out(pump)),                     !改变光纤长度对泵浦信号输出功率的影响 /PbMt  
       step = 20, color = red, width = 3,"residual pump" gf}*}8D  
    NKTy!zWh  
    ! set_L(L_f) {restore the original fiber length } BAi`{?z$<  
    uN1VkmtDO  
    N`4XlD  
    ; ------------- ].sD#~L_  
    diagram 4:                                  !输出图表4 0|g@; Pc  
    db@^CS[P  
    "TransverseProfiles" .hUlI3z9  
    CR;E*I${  
    I_max :=maxr(I(pump, -1, 0, 0), I(signal_fw, -1, 0, 0)) Ti7 @{7>  
    9W, %[  
    x: 0, 1.4 * r_co /um ) I(9qt>Y  
    "radialposition (µm)", @x JJ'f\f9  
    y: 0, 1.2 * I_max *cm^2 9|Ylv:sR  
    "intensity (W/ cm&sup2;)", @y 5,-:31(j\  
    y2: 0, 1.3 * N_Tm AMASh*  
    frame #m;o)KkH$r  
    hx CH q5KB98+  
    hy [XubzZ9  
    aX*9T8H/  
    f: N_dop(1, x * um,0),      !掺杂浓度的径向分布 .jiJgUa7  
      yscale = 2, f'*/IG  
      color = gray, w`fbUh6/  
      width = 3, Xk1uCVUe5  
      maxconnect = 1, ya[f? 0b0  
      "N_dop (right scale)" k7j[tB#  
    l]j;0i  
    f: I(pump, -1, x *um, 0) * cm^2,    !泵浦光沿光纤径向的强度分布 7SNdC8GZ~  
      color = red, UZ "!lpg  
      maxconnect = 1,           !限制图形区域高度,修正为100%的高度 1Oq VV?oz  
      width = 3, x-W~&`UU  
      "pump" u /DE  
    j@Pd" Z9  
    f: I(signal_fw, -1,x * um, 0) * cm^2,  !信号光沿光纤径向的强度分布  <4< y  
      color = blue, pvb&vtp  
      maxconnect = 1, 78 ]Kv^l^_  
      width = 3, ,In%r`{i  
      "signal" FnI}N;"  
    8aKS=(Z!j  
    sKJr34  
    ; ------------- &5XEjY>@  
    diagram 5:                                  !输出图表5 |=KzQY|u  
    +@yU `  
    "TransitionCross-sections" =F}qT|K  
    iX<" \pV  
    I_max :=maxr(I(pump, -1, 0, 0), I(signal_fw, -1, 0, 0)) qkz|r?R)  
    )=`DEbT  
    x: 1450, 2050 b)M- q{  
    "wavelength(nm)", @x m{$}u@a  
    y: 0, 0.6 %d *0"<v  
    "cross-sections(1e-24 m&sup2;)", @y ~j(vGO3JB  
    frame LI&E.(:  
    hx D~Ef%!&  
    hy `9gV8u  
    /xcXd+k]  
    f: s12_Tm(x * nm) /1e-24,      !Tm3+吸收截面与波长的关系 ,zr,>^ v  
      color = red, ZJc{P5a1J  
      width = 3, iH@u3[w  
      "absorption" Km!ACA&s6  
    f: s21_Tm(x * nm) /1e-24,  !Tm3+发射截面与波长的关系 -iY-rzW  
      color = blue, "'@D\e}  
      width = 3, N ~fE&@-  
      "emission" .MRN)p  
    %{pjC7j#  
     
    分享到
    离线lileisgsz
    发帖
    14
    光币
    69
    光券
    0
    只看该作者 1楼 发表于: 2021-09-28
    感谢,视频上有点看不清楚