资源描述:
《《隧道及地下工程flac解析方法》——李围 ——命令流》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、第二章命令流按照顺序进行2-1定义一个FISH函数newdefabcabc=25*3+5Endprintabc2-2使用一个变量newdefabchh=25abc=hh*3+5EndPrinthhPrintabc2-3对变量和函数的理解newdefabchh=25abc=hh*3+5Endsetabc=0hh=0printhhprintabcprinthhnewdefabcabc=hh*3+5endsethh=25printabcsetabc=0hh=0printhhprintabcprinthh2-4获
2、取变量的历史记录newgenzonebricksize121modelmohrpropshear=1e8bulk=2e8cohes=1e5tens=1e10fixxyzrangey-0.10.1applyyvel-1e-5rangey1.92.1plotsetrotation0045plotblockgroupdefget_adad1=gp_near(0,2,0)ad2=gp_near(1,2,0)ad3=gp_near(0,2,1)ad4=gp_near(1,2,1)endget_addefloadlo
3、ad=gp_yfunbal(ad1)+gp_yfunbal(ad2)+gp_yfunbal(ad3)+gp_yfunbal(ad4)endhistloadhistgpydis0,2,0step1000plothis1vs-22-5用FISH函数计算体积模量和剪砌模量newdefderives_mod=y_mod/(2.0*(1.0+p_ratio))b_mod=y_mod/(3.0*(1.0-2.0*p_ratio))endsety_mod=5e8p_ratio=0.25deriveprintb_modp
4、rints_mod2-6在FLAC输入中使用符号变量Newdefderives_mod=y_mod/(2.0*(1.0+p_ratio))b_mod=y_mod/(3.0*(1.0-2.0*p_ratio))endsety_mod=5e8p_ratio=0.25derivegenzonebricksize2,2,2modelelasticpropbulk=b_modshear=s_modprintzonepropbulkprintzonepropshear2-7控制循环Newdefxxxsum=0prod
5、=1loopn(1,10)sum=sum+nprod=prod*nend_loopendxxxprintsum,prodnewgenzonebrickp0(0,0,0)p1(-10,0,0)p2(0,10,0)p3(0,0,-10)modelelasplotsetrotation0045plotblockgroupdefinstallpnt=zone_headloopwhilepnt#nullz_depth=-z_zcen(pnt)y_mod=y_zero+cc*sqrt(z_depth)z_prop(p
6、nt,’shear’)=y_mod/(2.0*(1.0+p_ratio))z_prop(pnt,’bulk’)=y_mod/(3.0*(1.0-2.0*p_ratio))pnt=zone_next(pnt)end_loopendsetp_ratio=0.25y_zero=1e7cc=1e8install2-8拆分命令行new;exampleofasumofmanythingsdeflong_sumtemp=v1+v2+v3+v4+v5+v6+v7+v8+v9+v10long_sum=temp+v11+v1
7、2+v13+v14+v15end2-9变量类型newdefhaveoneaa=2bb=3.4cc=’Haveaniceday’dd=aa*bbee=cc+’,oldchap’endhaveoneprintfish2-10IF条件语句newdefabcifxx>0thenabc=1000elseabc=-1000end_ifendsetxx=10printabcsetxx=0printabc2-11索单元自动生成newgenzonebricksize1035plotsetrotation0045plotbl
8、ockgroupdefplace_cablesloopn(1,5)z_d=float(n)-0.5commandselcablebeg0.0,1.5,z_dend7.0,1.5,z_dnseg7end_commandend_loopendplace_cablesplotgridselgeomrednewgenzonebricksize1035plotsetrotation15060plotblockgroupmodmohrpr