;-----------------------------------------------------;----ExcavationandSupportforaShallowTunnel---;-----------------------------------------------------new;新建项目setfishautocreateofftitle'ExcavationandSupportforaShallowTunnel';定义题目;generateprimitivecomponentsofgrid;concreteliner-uppertunnelgenzoncshellp0000p1700p20510p3005.5&dim5555size25110groupzone'concreteliner';;uppertunnelgenzoncylinderp0000p1500p20510p3005&size55110groupzonetunnelrangegroup'concreteliner'not;;lowertunnel&linergenzonebrickp000-4.5p1add700p2add0510p3add004.5&size7513;;surroundingrock(8primitives)genzonradcylp0000p12700p20510p30025&dim75.575.5size551108rat1111.3;genzonebrickp070-4.5p1270-15p2add0510p3700&p42751-15p57510p62700p727510&size8513ratio1.311;genzonebrickp000-15p1add2700p2add0510p300-4.5&p42751-15p5051-4.5p670-4.5p7751-4.5&size7518rat110.7692307692307692;genzonbrickp00025p1add2700p2add0510p3add0010&size5512;genzonbricp027025p1add1700p2add0510p3add0010&size2512rat211;genzonbricp0270-15p1add1700p2add0510p3add0040&size2518rat211;genzonbricp0270-40p1add1700p2add0510p3add0025&size2512rat210.5;genzonbricp000-40p1add2700p2add0510p3add0025&size7512rat110.5;;assignnamestogroupsofzonesgroupzonerockrangegroup'concreteliner'notgrouptunnelnot;;assignMohr-Coulombmaterialmodelmodelmechmohrprobulk50e6she18e6fric20coh25e3ten0dil0rangez2535probulk4e8she1.5e8fric20coh50e3ten5e3dil3rangez-5025;assignboundaryconditions;施加边界条件,后面可以直接修改为具体的数字fixxrangex-.1.1fixxrangex43.944.1fixzrangez-40.1-39.9fixyrangey-.1.1fixyrangey50.951.1;assigninitialstressstate;初始应力状态setgrav00-10inidensity2200iniszz-770e3grad0022000inisxx-770e3grad0022000inisyy-385e3grad0011000;施加初始应力;monitorvariablesinmodel;模型中变量的监控histaddunbal;监控不平衡力histaddgpzdisp005.5histaddgpxdisp700histaddgpzdisp000histaddgpzdisp0035histaddgpzdisp0305.5histaddgpxdisp7300histaddgpzdisp0300histaddgpzdisp03035histaddgpzdisp01235histaddgpzdisp01835histaddgpzdisp02435histaddgpzdisp03635histaddgpzdisp53035histaddgpzdisp103035;监控以上这些点的x及z方向位移变化;savgeom1;defconc_parm;定义支护参数,parm即parameter,参数的意思globalbmc=20.7e9;定义体积模量为全局变量,b代表bulk,m代表modulus,c代表concreteglobalsmc=12.6e9;定义剪切模量为全局变量,s代表shear,m代表modulus,c代表concreteend@conc_parm;;definethelocationsofcablepatterns1,2and3;defcab_parm;定义锚杆参数globalx_b=get_array(4,3);定义数组(4,3),即锚杆的位置globalz_b=get_array(4,3)globaly0=-3;将锚杆的位置以数组的形式表示出来(x,y,z)x_b(1,1)=0.8x_b(2,1)=2.1x_b(3,1)=3.5x_b(4,1)=5.5z_b(1,1)=5.5z_b(2,1)=2.4z_b(3,1)=4.7z_b(4,1)=1.5x_b(1,2)=0.8x_b(2,2)=0.8x_b(3,2)=3.5x_b(4,2)=5.5z_b(1,2)=0.6z_b(2,2)=4.0z_b(3,2)=2.4z_b(4,2)=0.6x_b(1,3)=0.8x_b(2,3)=2.6x_b(3,3)=5.0x_b(4,3)=3.5z_b(1,3)=2.4z_b(2,3)=4.0z_b(3,3)=3.0z_b(4,3)=0.6;对每根锚杆的位置进行赋值enddefinip(iidx);定义初始锚杆位置globalx1=x_b(1,iidx)globalx2=x_b(2,iidx)globalx3=x_b(3,iidx)globalx4=x_b(4,iidx)globalz1=z_b(1,iidx)globalz2=z_b(2,iidx)globalz3=z_b(3,iidx)globalz4=z_b(4,iidx)end@cab_parm;;installinitialcables;安装初始锚杆;defins_cab;定义要初始安装的锚杆,其中ins_cab表示installinitialcablesglobaliidx;定义全局变量iidxglobalcab_seg;定义锚杆划分单元数globalcab_seg_m;锚杆长度(有待进一步确认)loopiidx(1,3)inip(iidx)cab_seg=cab_seg_m-3*(3-iidx)globaly1=0.globaly2=float(cab_seg)commandselcableid@iidxbegin@x1@y1@z1end@x1@y2@z1nseg@cab_segselcableid@iidxbegin@x2@y1@z2end@x2@y2@z2nseg@cab_segselcableid@iidxbegin@x3@y1@z3end@x3@y2@z3nseg@cab_segselcableid@iidxbegin@x4@y1@z4end@x4@y2@z4nseg@cab_segselcableproemod45e9xcarea1.57e-3gr_per1.0&yten25e4gr_k17.5e6gr_c20e4rangeid@iidx;施作初始锚杆end_commandend_loopendset@cab_seg_m15@ins_cab;installpre-supportconcrete;预支护;selshellid10grouprockrangecylend100-1.5end201-1.5rad7.4&cylend100-1.5end201-1.5rad6.7not&z-0.16selshellpropisotropic10.5e9,0.25thickness0.3density2500defmonitglobalipt_surf=gp_near(0,30,35);地表globalipt_crown=gp_near(0,30,5.5);拱顶globalipt_spring=gp_near(7,30,0)end@monitsavem_initable1name'groundsurfaceattunnelcenterline'table2name'tunnelcrown';隧道拱顶table3name'tunnelsidewall';定义表格的名字,隧道边墙;;FISHfunctiontocontrolexcavationandsupportsequencedefexcavy0=y0+3localcut_i=y0/3+1globalcutloopcut(cut_i,16)localcut_cur=cutlocalii=out('EXCAVATIONSTEP'+string(cut))y0=3*(cut-1)y1=y0+3globalyp0=y0+1globalyp1=y1+1globalys0=yp0-3globalys1=yp1-3globalyc0=y0-3globalyc1=y1-3globalid_=10;id_=10*(cut+1);useifshellsunconnectedcommand;installpresupportconcreteselshellid@id_grouprock&rangecylend10@yp0-1.5end20@yp1-1.5rad7.4&cylend10@yp0-1.5end20@yp1-1.5rad6.7not&z-0.16selshellpropisotropic10.5e9,0.25thickness0.3density2500&rany@yp0@yp1;excavatenextcutmodelmechnullrangegrouptunnely@y0@y1modelmechnullrangegroup'concreteliner'y@y0@y1;delete-cablesintheexcavatedareaseldeletecablerangeid1y@y0@y1seldeletecablerangeid2y@y0@y1seldeletecablerangeid3y@y0@y1end_commandlocalcut_1=cut-1iidx=int(cut_1-3*(cut_1/3))+1y2=min(y1+15,51)inip(iidx)ii=out('CABLEBOLTPATTERN'+string(iidx))commandseldeletecablerangeid@iidx;installnewcablesselcableid@iidxbegin@x1@y1@z1end@x1@y2@z1nseg@cab_seg_mselcableid@iidxbegin@x2@y1@z2end@x2@y2@z2nseg@cab_seg_mselcableid@iidxbegin@x3@y1@z3end@x3@y2@z3nseg@cab_seg_mselcableid@iidxbegin@x4@y1@z4end@x4@y2@z4nseg@cab_seg_mselcableproemod45e9xcarea1.57e-3gr_pe