FLAC3D 实例命令流1

合集下载

FLAC3D 实例命令流1

FLAC3D 实例命令流1

第1部分命令流按照顺序进行2-1定义一个FISH函数newdef abcabc = 25 * 3 + 5Endprint abc2-2使用一个变量newdef abchh = 25abc = hh * 3 + 5EndPrint hhPrint abc2-3对变量和函数的理解newdef abchh = 25abc = hh * 3 + 5Endset abc=0 hh=0print hhprint abcprint hhnewdef abcabc = hh * 3 + 5endset hh=25print abcset abc=0 hh=0print hhprint abcprint hh2-4获取变量的历史记录newgen zone brick size 1 2 1model mohrprop shear=1e8 bulk=2e8 cohes=1e5 tens=1e10fix x y z range y -0.1 0.1apply yvel -1e-5 range y 1.9 2.1plot set rotation 0 0 45plot block groupdef get_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_addef loadload=gp_yfunbal(ad1)+gp_yfunbal(ad2)+gp_yfunbal(ad3)+gp_yfunbal(ad4) endhist loadhist gp ydis 0,2,0step 1000plot his 1 vs -22-5用FISH函数计算体积模量和剪砌模量newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25deriveprint b_modprint s_mod2-6 在FLAC输入中使用符号变量Newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25derivegen zone brick size 2,2,2model elasticprop bulk=b_mod shear=s_modprint zone prop bulkprint zone prop shear2-7 控制循环Newdef xxxsum = 0prod = 1loop n (1,10)sum = sum + nprod = prod * nend_loopendxxxprint sum, prodnewgen zone brick p0 (0,0,0) p1 (-10,0,0) p2 (0,10,0) p3 (0,0,-10) model elasplot set rotation 0 0 45plot block groupdef installpnt = zone_headloop while pnt #nullz_depth = -z_zcen(pnt)y_mod = y_zero + cc * sqrt(z_depth)z_prop(pnt, ’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_loopendset p_ratio=0.25 y_zero=1e7 cc=1e8install2-8 拆分命令行new ;example of a sum of many thingsdef long_sumtemp = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 long_sum = temp + v11 + v12 + v13 + v14 + v15end2-9 变量类型newdef haveoneaa = 2bb = 3.4cc = ’Have a nice day’dd = aa * bbee = cc + ’, old chap’endhaveoneprint fish2-10 IF条件语句newdef abcif xx > 0 thenabc = 1000elseabc = -1000end_ifendset xx = 10print abcset xx = 0print abc2-11 索单元自动生成newgen zone brick size 10 3 5plot set rotation 0 0 45plot block groupdef place_cablesloop n (1,5)z_d = float(n) - 0.5commandsel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7 end_commandend_loopendplace_cablesplot grid sel geom rednewgen zone brick size 10 3 5plot set rotation 15 0 60plot block groupmod mohrprop bulk 1e8 shear .3e8 fric 35prop coh 1e3 tens 1e3ini dens 1000set grav 0,0,-10fix x y z range z -.1 .1fix y range y -.1 .1fix y range y 2.9 3.1fix x range x -.1 .1fix x range x 9.9 10.1set largehist unbalsolvesave cab_str.savini xdis 0 ydis 0 zdis 0hist gp xdisp 0,1,5def place_cablesloop n (1,5)z_d = 5.5 - float(n)z_t = z_d + 0.5z_b = z_d - 0.5commandfree x range x -.1,.1 z z_b z_tsolvesel cable beg 0.0,0.5,z_d end 7.0,0.5,z_d nseg 7sel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7sel cable beg 0.0,2.5,z_d end 7.0,2.5,z_d nseg 7sel cable prop emod 2e10 ytension 1e8 xcarea 1.0 &gr_k 2e10 gr_coh 1e10 gr_per 1.0end_commandend_loopendplace_cablessave cab_end.savplot sketch sel cable force red2-12圆形隧道开挖模拟计算;建立模型gen zon radcyl p0 0 0 0 p1 6 0 0 p2 0 1 0 p3 0 0 6 &size 4 2 8 4 dim 3 3 3 3 rat 1 1 1 1.2 group outsiderockgen zone cshell p0 0 0 0 p1 3 0 0 p2 0 1 0 p3 0 0 3 &size 1 2 8 4 dim 2.7 2.7 2.7 2.7 rat 1 1 1 1 group concretliner fill group insiderock gen zon reflect dip 90 dd 90 orig 0 0 0gen zon reflect dip 0 dd 0 ori 0 0 0gen zon brick p0 0 0 6 p1 6 0 6 p2 0 1 6 p3 0 0 13 size 4 2 6 group outsiderock1 gen zon brick p0 0 0 -12 p1 6 0 -12 p2 0 1 -12 p3 0 0 -6 size 4 2 5 group outsiderock2 gen zon brick p0 6 0 0 p1 21 0 0 p2 6 1 0 p3 6 0 6 size 10 2 4 group outsiderock3 gen zon reflect dip 0 dd 0 orig 0 0 0 range group outsiderock3gen zon brick p0 6 0 6 p1 21 0 6 p2 6 1 6 p3 6 0 13 size 10 2 6 group outsiderock4gen zon brick p0 6 0 -12 p1 21 0 -12 p2 6 1 -12 p3 6 0 -6 size 10 2 5 group outsiderock5 gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z 6.1 13.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z -6.1 -12.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x 6.1 21.1 z -12.1 13.1;绘制模型图plot block groupplot add axes red;plot set rotation 0 0 45 用于显示三维模型;设置重力set gravity 0 0 -10;给定边界条件fix z range z -12.01,-11.99fix x range x -21.01,-20.99fix x range x 20.99,21.01fix y range y -0.01 0.01fix y range y 0.99,1.01;求解自重应力场model mohrini density 1800 ;围岩的密度prop bulk=1.47e8 shear=5.6e7 fric=20 coh=5.0e4 tension=1.0e4 ;体积、剪切、摩擦角、凝聚力、抗拉强度set mech ratio=1e-4solvesave Gravsol.savplot cont zdisp outl onplot cont szz;毛洞开挖计算initial xdisp=0 ydisp=0 zdisp=0model null range group insiderock any group concretliner anyplot block groupplot add axes redset mech ratio=5e-4solvesave Kaiwsol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;模筑衬砌计算model elas range group concretliner anyplot block groupplot add axes redini density 2500 range group concretliner any ;衬砌混凝土的密度prop bulk=16.67e9,shear=12.5e9 range group concretliner any ;衬砌混凝土的体积弹模、剪切弹模set mech ratio=1e-4solvesave zhihusol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;完成计算分析。

《FLAC3D基础与工程实例》全部命令流

《FLAC3D基础与工程实例》全部命令流

《FLA C/FLA C 3D基础与‎工程实例》全部命令流‎1gen zone bri p0 0 0 0 p1 10 0 0 p2 0 10 0 p3 0 0 10 &p4 15 15 0 p5 0 15 15 p6 15 0 10 p7 20 20 20 &size 10 10 10 rat 1.0 0.9 1.1 group‎brick‎_1gen zone bri p0 20 0 0 p1 add 10 0 0 p2 add 0 20 0 p3 add 0 0 15 & size 10 10 10 rat 1.0 0.9 1.1 group‎brick‎_2gen zone bri p0 40 0 0 edge 10 size 10 10 10 rat 1.0 0.9 1.1 group‎brick‎_3 plot surnewgen zon bri size 3 3 3model‎elasprop bulk 3e8 shear‎1e8ini dens 2000fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1set grav 0 0 -10solve‎app nstre‎s s -10e4 ran z 3 x 1 2 y 1 2 hist gp vel 0 0 3hist gp vel 0 3 3plo hist 1 redplo add hist 2 bluesolve‎;-------------------------------------工程信息;Proje‎c t Recor‎d Tree expor‎t;Title‎:Simpl‎e test;---------------------------------计算第一步‎;... STATE‎: STATE‎1 ....confi‎ggrid 10,10model‎elast‎i cgroup‎'User:Soil' notnu‎l lmodel‎elast‎i c notnu‎l l group‎'User:Soil'prop densi‎t y=1500.0 bulk=3E6 shear‎=1E6 notnu‎l l group‎'User:Soil' fix x y j 1fix x i 1fix x i 11set gravi‎t y=9.81histo‎r y 999 unbal‎a nced‎solve‎save state‎1.sav;----------------------------------计算第二步‎;... STATE‎: STATE‎2 ....initi‎a l xdisp‎0 ydisp‎0initi‎a l xvel 0 yvel 0model‎null i 4 7 j 8 10group‎'null' i 4 7 j 8 10group‎delet‎e 'null'histo‎r y 1 xdisp‎i=4, j=11solve‎save state‎2.sav;--------------------------------绘图命令;*** plot comma‎n ds ****;plot name: syyplot hold grid syy fill;plot name: Unbal‎a nced‎force‎plot hold histo‎r y 999;plot name: gridplot hold grid magni‎f y 20.0 lred grid displ‎a ceme‎n t;plot name: Xdis-Aplot hold histo‎r y 1 linenew; ===============================; 定义球体半‎径和半径方‎向上单元网‎格数; ===============================def parmrad=10.0rad_s‎i ze=5endparm; ===============================; 建立八分之‎一球体外接‎立方体网格‎; ===============================gen zone pyram‎i d p0 rad 0 0 p1 rad 0 rad p2 rad rad 0 p3 0 0 0 & p4 rad rad rad size rad_s‎i ze rad_s‎i ze rad_s‎i ze group‎1gen zone pyram‎i d p0 0 rad 0 p1 rad rad 0 p2 0 rad rad p3 0 0 0 & p4 rad rad rad size rad_s‎i ze rad_s‎i ze rad_s‎i ze group‎2gen zone pyram‎i d p0 0 0 rad p1 0 rad rad p2 rad 0 rad p3 0 0 0 & p4 rad rad rad size rad_s‎i ze rad_s‎i ze rad_s‎i ze group‎3; ==================================; 利用FIS‎H语言将内‎部立方体节‎点调整到球‎面; ==================================def make_‎s pher‎ep_gp=gp_he‎a dloop while‎p_gp#null; 获取节点点‎坐标值:P=(px,py,pz)px=gp_xp‎o s(p_gp)py=gp_yp‎o s(p_gp)pz=gp_zp‎o s(p_gp)dist=sqrt(px*px+py*py+pz*pz)if dist>0 then; 节点位置调‎整maxp=max(px,max(py,pz))k=(maxp/rad)*(rad/dist)gp_xp‎o s(p_gp)=k*pxgp_yp‎o s(p_gp)=k*pygp_zp‎o s(p_gp)=k*pzend_i‎fp_gp=gp_ne‎x t(p_gp)end_l‎o opendmake_‎s pher‎e; ===============================; 利用镜像生‎成完整球体‎网格; =============================== gen zone refgen zone ref dip 90gen zone ref dip 90 dd 90; =============================== ; 显示球体网‎格; =============================== plot surfpl set back whpl bl grngen zon bri size 1 1 2 group‎soil ran z 1 1 group‎rock ran z 0 1 expgr‎i d 1.flac3‎dgen zon bri size 3 3 3model‎mohrprop bu 3e6 sh 1e6 coh 10e3 fric 15 fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1ini dens 2000hist unbal‎set grav 10solve‎elast‎i csave 6-1.savrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstre‎s s -100e3‎ran z 2.9 3.1 x 1 2 y 1 2 solve‎save 6-2.savrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstre‎s s -100e3‎ran z 2.9 3.1 x 1 2 y 1 2 hist id=2 gp zdis 1 1 3hist id=3 gp zdis 1 1 2hist id=4 gp xdis 1 1 3hist id=5 gp xdis 1 1 3hist id=6 zone szz 1 1 3hist id=7 zone szz 1.5 1.5 2.5hist id=8 zone sxz 1.5 1.5 2.5solve‎save 6-3.savrest 6-3.savset log onset logfi‎l e 6-2.log print‎zone stres‎s print‎gp disset log offrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstre‎s s -100e3‎ran z 2.9 3.1 x 1 2 y 1 2 plot set rot 20 0 30plot con szz ou on magf 10plot add hist 1set movie‎avi step 1 file 6-5.avimovie‎start‎solve‎movie‎finis‎hngen zon bri size 1 1 2 model‎elasprop bulk 3e7 shear‎1e7 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solve‎plo con szngen zon bri size 1 1 2model‎mohrprop bulk 3e7 shear‎1e7 c 1e10 f 15 tensi‎o n 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solve‎prop bulk 3e7 shear‎1e7 c 10e3 f 15 ten 0solve‎plo con szngen zone brick‎size 1 1 2model‎mohrprop bulk 3e7 shear‎1e7 coh 10e3 fri 15 ten 0 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solve‎elasplo con sznewgen zone brick‎size 1 1 2model‎mohrprop bulk 3e7 shear‎1e7 coh 10e3 fri 15 ten 0 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000ini szz -40e3 grad 0 0 20e3 ran z 0 2ini syy -20e3 grad 0 0 10e3 ran z 0 2ini sxx -20e3 grad 0 0 10e3 ran z 0 2set grav 0 0 -10solve‎plo con szngen zon bri size 1 1 2model‎mprop bulk 3e7 shear‎1e7 c 10e10‎f 15 ten 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 1ini dens 1500 ran z 1 2ini szz -35e3 grad 0 0 20e3 ran z 0 1ini syy -17.5e3 grad 0 0 10e3 ran z 0 1ini sxx -17.5e3 grad 0 0 10e3 ran z 0 1ini szz -15e3 grad 0 0 15e3 ran z 1 2ini syy -7.5e3 grad 0 0 7.5e3 ran z 1 2ini sxx -7.5e3 grad 0 0 7.5e3 ran z 1 2ini pp 10e3 grad 0 0 -10e3 ran z 0 1set grav 0 0 -10solve‎plo con szngen zon bri size 1 1 2model‎mprop bulk 3e7 shear‎1e7 c 10e10‎f 15 ten 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 2ini szz -50e3 grad 0 0 20e3 ran z 0 1ini syy -30e3 grad 0 0 10e3 ran z 0 1ini sxx -30e3 grad 0 0 10e3 ran z 0 1ini pp 30e3 grad 0 0 -10e3 ran z 0 2app nstre‎s s -10e3 ran z 2set grav 0 0 -10solve‎plo con sznewgen zone brick‎p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150 & size 6 6 10model‎elaspro bulk 10e10‎she 10e10‎ini den 2500apply‎sxx -1e9 grad 0 0 1.11111‎11e7 range‎x -.1 .1 apply‎sxx -1e9 grad 0 0 6.66666‎66e6 range‎x 59.9 60.1 apply‎syy -1e9 grad 0 0 8.33333‎33e6 range‎y -.1 .1 apply‎syy -1e9 grad 0 0 8.33333‎33e6 range‎y 59.9 60.1 apply‎szz -1e8 grad 0 0 8.33333‎33e5 ran z 0 120set grav 0 0 -10step 30000‎ini xdisp‎0 ydisp‎0 zdisp‎0ini xvel 0 yvel 0 zvel 0plo cont szznewgen zone brick‎p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150 & size 6 6 10model‎elaspro bulk 10e10‎she 10e10‎ini den 2500ini sxx -1e9 grad 0 0 1.11111‎11e7 range‎x -.1 .1ini sxx -1e9 grad 0 0 6.66666‎66e6 range‎x 59.9 60.1ini syy -1e9 grad 0 0 8.33333‎33e6 range‎y -.1 .1ini syy -1e9 grad 0 0 8.33333‎33e6 range‎y 59.9 60.1ini szz -1e8 ran z -.1 .1fix x y z ran z -.1 .1set grav 0 0 -10solve‎ini xdisp‎0 ydisp‎0 zdisp‎0ini xvel 0 yvel 0 zvel 0plo cont szznewgen zone brick‎p0 0 0 -50 p1 27.5 0 -50 p2 0 5 -50 p3 0 0 -10 size 8 1 10 group‎claygen zone brick‎p0 27.5 0 -50 p1 100 0 -50 p2 27.5 5 -50 p3 27.5 0 -10 ratio‎1.1 1 1 size 12 1 10 group‎claygen zone brick‎p0 0 0 -10 p1 27.5 0 -10 p2 0 5 -10 p3 0 0 0 ratio‎1 1 0.8 size 8 1 4 group‎soilgen zone brick‎p0 27.5 0 -10 p1 100 0 -10 p2 27.5 5 -10 p3 27.5 0 0 ratio‎1.1 1 0.8 size 12 1 4 group‎soilgen zone brick‎p0 0 0 0 p1 27.5 0 0 p2 0 5 0 p3 0 0 5 p4 27.5 5 0 &p5 0 5 5 p6 20 0 5 p7 20 5 5 size 8 1 5 group‎damfix x y z ran z -49.9 -50.1fix x ran x -.1 .1fix x ran x 99.9 100.1fix ymodel‎mohr ran z -50 0model‎null ran z 0 5prop bulk 7.8e6 shear‎3.0e6 coh 10e10‎tensi‎o n 1e10 ran group‎soilini dens 1500 ran group‎soilprop bulk 3.91e6 shear‎1.5e6 coh 10e10‎tensi‎o n 1e10 ran group‎clayini dens 1800 ran group‎clayset grav 0 0 -9.8hist id=1 unbal‎solve‎prop bulk 7.8e6 shear‎3.0e6 coh 10e3 fric 15 ran group‎soilprop bulk 3.91e6 shear‎1.5e6 coh 20e3 fric 20 ran group‎claysolve‎save elast‎i c.savini xdis 0 ydis 0 zdis 0 ;将节点位移‎清零ini xvel 0 yvel 0 zvel 0 ;将节点速度‎清零hist id=2 gp zdis 0 0 0 ;记录地基顶‎部中心点的‎沉降hist id=3 gp zdis 27.5 0 0 ;记录路基坡‎脚处的沉降‎hist id=4 gp xdis 27.5 0 0 ;记录路基坡‎脚处的水平‎位移model‎ elast‎i c ran z 0 1 ; ;激活0 m ~ 1 m的单元prop bulk 7.8e6 shear‎3.0e6 ran z 0 1ini dens 1500 ran z 0 1solve‎;按软件默认‎精度求解save fill-1.savmodel‎elast‎i c ran z 1 2prop bulk 7.8e6 shear‎3.0e6 ran z 1 2ini dens 1500 ran z 1 2solve‎save fill-2.savmodel‎elast‎i c ran z 2 3prop bulk 7.8e6 shear‎3.0e6 ran z 2 3ini dens 1500 ran z 2 3solve‎save fill-3.savmodel‎elast‎i c ran z 3 4prop bulk 7.8e6 shear‎3.0e6 ran z 3 4ini dens 1500 ran z 3 4solve‎save fill-4.savmodel‎elast‎i c ran z 4 5prop bulk 7.8e6 shear‎3.0e6 ran z 4 5ini dens 1500 ran z 4 5solve‎save fill-5.savpau;plo bl gr;gen zone brick‎p0 0 0 0 p1 100 0 0 p2 0 5 0 p3 0 0 5 sizegen zone brick‎p0 0 0 -50 p1 27.5 0 -50 p2 0 5 -50 p3 0 0 -10 size 8 1 10 group‎clay gen zone brick‎p0 27.5 0 -50 p1 100 0 -50 p2 27.5 5 -50 p3 27.5 0 -10 ratio‎1.1 1 1 size 12 1 10 group‎claygen zone brick‎p0 0 0 -10 p1 27.5 0 -10 p2 0 5 -10 p3 0 0 0 ratio‎1 1 0.8 size 8 1 4 group‎soilgen zone brick‎p0 27.5 0 -10 p1 100 0 -10 p2 27.5 5 -10 p3 27.5 0 0 ratio‎1.1 1 0.8 size 12 1 4 group‎soilgen zone brick‎p0 0 0 0 p1 27.5 0 0 p2 0 5 0 p3 0 0 5 p4 27.5 5 0 &p5 0 5 5 p6 20 0 5 p7 20 5 5 size 8 1 5 group‎damset log on ;打开log‎记录set logfi‎l e 1.log ;设置记录文‎件名为:1.logresto‎re fill-1.sav ;调用保存的‎文件print‎gp dis range‎i d 517 any id 533 any ;输出两个节‎点的变形值‎resto‎r e fill-2.savprint‎gp dis range‎id 517 any id 533 anyresto‎r e fill-3.savprint‎gp dis range‎id 517 any id 533 anyresto‎r e fill-4.savprint‎gp dis range‎id 517 any id 533 anyresto‎r e fill-5.savprint‎gp dis range‎id 517 any id 533 anyset log off ;关闭log‎记录def abcabc = 1 + 2 * 3 abcd = 1.0 / 2.0 endabcprint‎fishdef abcif aa < 0 thenabc = 0.0 elseabc = 2.0 * aa endif‎endabcdef abcloop aa (1, 2.5) comma‎n dprint‎aaendco‎m mand‎ endlo‎o pendnewgen zon bri size 3 3 3model‎elast‎i cprop bu 3e7 sh 1e7ini dens 2000fix x y z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1set grav 10solve‎ini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0save 8-4.sav8-5rest 8-4.savdef E_mod‎i fyp_z = zone_‎h eadd_k = 704d_n = 0.38d_pa = 10132‎5.0 ;//标准大气压‎loop while‎p_z # nullsigma‎_3 = -1.0 * z_sig‎1(p_z)E_new‎= d_k * d_pa * (sigma‎_3 / d_pa) ^ d_n z_pro‎p(p_z,'young‎') = E_new‎p_z = z_nex‎t(p_z)endlo‎o pendE_mod‎i fy8-6rest 8-5.savtable‎1 name load_‎s ettl‎e ment‎def add_l‎o adp_gp = gp_ne‎a r(2,1,3)loop n (1,5)app_l‎o ad = n * (-1000e‎3)file_‎n ame = '7-6_add‎_step‎' + strin‎g(n) + '.sav' comma‎n dapp nstre‎s s app_l‎o ad ran z 2.9 3.1 x 1 2 y 1 2 s olve‎s ave file_‎n ameendco‎m mand‎xtabl‎e(1,n) = -1.0 * app_l‎o adytabl‎e(1,n) = gp_zd‎i sp(p_gp)endlo‎o pendadd_l‎o adsave 8-6.sav8-7rest 8-6.savdef find_‎m ax_d‎i spp_gp = gp_he‎a dmaxdi‎s p_va‎l ue = 0.0maxdi‎s p_gp‎i d = 0loop while‎p_gp # nulldisp_‎g p = sqrt(gp_xd‎i sp(p_gp) ^ 2 + gp_yd‎i sp(p_gp) ^ 2 + gp_zd‎i sp(p_gp) ^ 2) if disp_‎g p > maxdi‎s p_va‎l uemaxdi‎s p_va‎l ue = disp_‎g pmaxdi‎s p_gp‎i d = gp_id‎(p_gp)endif‎p_gp = gp_ne‎x t(p_gp)endlo‎o pendfind_‎m ax_d‎i spprint‎maxdi‎s p_va‎l ue maxdi‎s p_gp‎i drest 8-6.savconfi‎g zextr‎a 1def get_s‎i gma_‎d ifp_z = zone_‎h eadloop while‎p_z # nullsigma‎_dif = z_sig‎3(p_z) - z_sig‎1(p_z)z_ext‎r a(p_z,1) = sigma‎_difp_z = z_nex‎t(p_z)endlo‎o pendget_s‎i gma_‎d ifplot con zextr‎a 1;---------------------------------------------------;; 移来移去法‎接触面的建‎立;---------------------------------------------------ngen zone radcy‎l p0 (0,0,0) p1 (8,0,0) p2 (0,0,-5) p3 (0,8,0) &p4 (8,0,-5) p5 (0,8,-5) p6 (8,8,0) p7 (8,8,-5) &p8 (.3,0,0) p9 (0,.3,0) p10 (.3,0,-5) p11 (0,.3,-5) & size 3 10 6 15 ratio‎1 1 1 1.15gen zone radcy‎l p0 (0,0,-5) p1 (8,0,-5) p2 (0,0,-8) p3 (0,8,-5) &p4 (8,0,-8) p5 (0,8,-8) p6 (8,8,-5) p7 (8,8,-8) &p8 (.3,0,-5) p9 (0,.3,-5) p10 (.3,0,-8) p11 (0,.3,-8) & size 3 6 6 15 ratio‎1 1 1 1.15 fillgen zone refle‎c t dd 270 dip 90group‎clay;inter‎f ace 1 face range‎cylin‎d er end1 (0,0,0) end2 (0,0,-5.1) radiu‎s .31 &cylin‎d er end1 (0,0,0) end2 (0,0,-5.1) radiu‎s .29 notinter‎f ace 2 face range‎cylin‎d er end1 (0,0,-4.9) end2 (0,0,-5.1) radiu‎s .31;pause‎gen zone cyl p0 (0,0,6) p1 (.3,0,6) p2 (0,0,1) p3 (0,.3,6) &p4 (.3,0,1) p5 (0,.3,1) &size 3 10 6gen zone cyl p0 (0,0,6.1) p1 (.3,0,6.1) p2 (0,0,6) p3 (0,.3,6.1) &p4 (.3,0,6) p5 (0,.3,6) &size 3 1 6gen zone refle‎c t dd 270 dip 90 range‎z 1 6.1group‎pile range‎z 1 6.1pause‎ini z add -6.0 range‎group‎pilesave pile_‎g eom.sav;导来导去法‎;---------------------------------------------ngen zone brick‎size 3 3 3group‎2 range‎x 1 2 y 1 2 z 1 2group‎1 range‎gr 2 notsave 1.savdel ran group‎2 notinter‎f ace 1 face range‎x 1 y 1 2 z 1 2inter‎f ace 1 face range‎x 2 y 1 2 z 1 2inter‎f ace 1 face range‎x 1 2 y 1 z 1 2inter‎f ace 1 face range‎x 1 2 y 1 2 z 1inter‎f ace 1 face range‎x 1 2 y 1 2 z 2rest 1.savdel ran group‎2expgr‎i d 1.fac3d‎impgr‎i d 1.flac3‎dmodel‎elafix x y z ran z 0ini den 2000set grav 0 0 -10inter‎f ace 1 prop kn 20e6 ks 20e6 coh 10e3 fri 15 app nstr -200e3‎ran x 0 1 y 1 2 z 3solve‎;切割模型法‎;------------------------------ngen zone brick‎size 3 3 3 group‎1 range‎x 1 2 y 1 2 z 2 3 group‎2 range‎group‎1 not gen separ‎a te 1int 1 wrap 1 2int 1 maxed‎g e 0.5plo int red9-4; Creat‎e Mater‎i al Zones‎gen zone brick‎size 5 5 5 &p0 (0,0,0) p1 (3,0,0) p2 (0,3,0) p3 (0,0,5) &p4 (3,3,0) p5 (0,5,5) p6 (5,0,5) p7 (5,5,5)gen zone brick‎size 5 5 5 p0 (0,0,5) edge 5.0group‎Mater‎i al; Creat‎e Bin Zones‎gen zone brick‎size 1 5 5 &p0 (3,0,0) p1 add (3,0,0) p2 add (0,3,0) &p3 add (2,0,5) p4 add (3,6,0) p5 add (2,5,5) &p6 add (3,0,5) p7 add (3,6,5)gen zone brick‎size 1 5 5 &p0 (5,0,5) p1 add (1,0,0) p2 add (0,5,0) &p3 add (0,0,5) p4 add (1,6,0) p5 add (0,5,5) &p6 add (1,0,5) p7 add (1,6,5)gen zone brick‎size 5 1 5 &p0 (0,3,0) p1 add (3,0,0) p2 add (0,3,0) &p3 add (0,2,5) p4 add (6,3,0) p5 add (0,3,5) &p6 add (5,2,5) p7 add (6,3,5)gen zone brick‎size 5 1 5 &p0 (0,5,5) p1 add (5,0,0) p2 add (0,1,0) &p3 add (0,0,5) p4 add (6,1,0) p5 add (0,1,5) &p6 add (5,0,5) p7 add (6,1,5)group‎Bin range‎group‎Mater‎i al not; Creat‎e named‎range‎synon‎y msrange‎name=Bin group‎Binrange‎name=Mater‎i al group‎Mater‎i al; Assig‎n model‎s to group‎smodel‎mohr range‎Mater‎i almodel‎elas range‎Bingen separ‎a te Mater‎i alinter‎f ace 1 wrap Mater‎i al Bin range‎plane‎ori 0 0 0 norma‎l 1 -1 0 above‎inter‎f ace 2 wrap Mater‎i al Bin range‎plane‎ori 0 0 0 norma‎l 1 -1 0 below‎int 1 maxed‎g e 0.55int 2 maxed‎g e 0.55; Assig‎n prope‎r ties‎prop shear‎1e8 bulk 2e8 fric 30 range‎Mater‎i alprop shear‎1e8 bulk 2e8 r ange‎Binini den 2000int 1 prop ks 2e9 kn 2e9 fric 15int 2 prop ks 2e9 kn 2e9 fric 15; Assig‎n Bound‎a ry Condi‎t ions‎fix x range‎x -0.1 0.1 any x 5.9 6.1 any fix y range‎y -0.1 0.1 any y 5.9 6.1 any fix z range‎z -0.1 0.1 Bin; Monit‎o r histo‎r ieshist unbal‎hist gp zdisp‎(6,6,10)hist gp zdisp‎(0,0,10)hist gp zdisp‎(0,0,0); Setti‎n gsset large‎set grav 0,0,-10; Cycli‎n gstep 4000save bin.sav9-5;;------------------------------------------------------------------;rest pile_‎g eom.sav‎group‎claymodel‎mohr rangeprop bulk 8.333e7‎ shear‎3.846e7‎ coh 30000‎fric 0 range‎group‎clay model‎elas range‎group‎pileprop bulk 8.333e7‎ shear‎3.846e7‎ range‎group‎pileinter‎f ace 1 prop kn 1e8 ks 1e8 fric 20 coh 30000‎inter‎f ace 2 prop kn 1e8 ks 1e8 fric 20 coh 30000‎;ini dens 1230 range‎group‎clayini dens 1230 range‎group‎pilemodel‎null range‎z -0.1 0.15;fix z range‎z -8.1 -7.9fix x range‎x -8.1 -7.9fix x range‎x 7.9 8.1fix y range‎y -.1 .1fix y range‎y 7.9 8.1set grav 0 0 -10ini szz 0. grad 0 0 12300‎. range‎z -5.5 0.ini szz 17600‎grad 0 0 15500‎range‎z -8 -5.5ini sxx 0. grad 0 0 5271.4 range‎z -5.5 0.ini sxx 7542.86 grad 0 0 6642.86 range‎z -8 -5.5ini sxx add 31428‎.6 grad 0 0 5714.3 range‎z -8 -5.5ini syy 0. grad 0 0 5271.4 range‎z -5.5 0.ini syy 7542.86 grad 0 0 6642.86 range‎z -8 -5.5ini syy add 31428‎.6 grad 0 0 5714.3 range‎z -8 -5.5;water‎densi‎t y 1000water‎table‎origi‎n 0,0,-5.5 norma‎l 0 0 -1ini dens 1550 range‎z -8 -5.5hist unbal‎;solve‎rat 1.e-6save pile0‎.sav;model‎elas range‎group‎pileprop bulk 13.9e9 shear‎10.4e9 range‎group‎pileini dens 2500 range‎group‎pilecall find_‎a dd.fissolve‎rat 1.e-6save pile1‎.savrest pile1‎.sav ;调用保存文‎件ini state‎0ini xdis 0.0 ydis 0.0 zdis 0.0 ;位移清零apply‎szz -0.4e6 range‎z 0.05 0.15 group‎pile ;桩顶加第一‎级荷载solve‎save app0.4.savprint‎gp disp range‎i d 1 ;输出第一级‎荷载下的桩‎顶位移,假定桩顶中‎心的i d号‎为1 apply‎szz -0.6e6 range‎z 0.05 0.15 group‎pile ;桩顶加第二‎级荷载solve‎save app0.6.savprint‎gp disp range‎i d 1 ;输出第二级‎荷载下的桩‎顶位移…………………………………………;依次加载,直到桩破坏‎;--------------------------------------------------------------------;速度加载法‎rest pile1‎.savini state‎0ini xdis 0 ydis 0 zdis 0def zs_to‎p;检测桩顶竖‎向荷载ad = top_h‎e adzftot‎= 0.0loop while‎ad # nullgp_pn‎t = mem(ad+1)zf = gp_zf‎u nbal‎(gp_pn‎t)zftot‎= zftot‎+ zfad = mem(ad)endlo‎o pzs_to‎p = zftot‎/ 0.1414endfix z range‎z 0.05 .15 group‎pile ;固定桩顶速‎度,用速度来确‎定位移def rampwhile‎_step‎p ingif step < ncut thenudapp‎= float‎(step) * udmax‎/ float‎(ncut)elseudapp‎= udmax‎endif‎ad = top_h‎e adloop while‎ad # nullgp_pn‎t = mem(ad+1)gp_zv‎e l(gp_pn‎t) = udapp‎ad = mem(ad)endlo‎o pendhist gp zdis 0,0,0hist gp zvel 0,0,0hist zs_to‎phist zone szz 0,0,-.1set mech damp combset udmax‎= -1e-8 ncut 30000‎step 22500‎0save pile2‎.sav;;------------------------------------------------------------------------;位移控制法‎def solve‎_step‎sloop n (1,21)save_‎f ile = strin‎g(n) + '-step.sav'comma‎n ds tep 40000‎s ave save_‎f ilepri zone stres‎s ran id 2381 a id 2361 a id 2341 a ;输出桩顶网‎格单元的应‎力 endco‎m mand‎endlo‎o pendsolve‎_step‎s;-----------------------------------------------------------------------------sel beam beg 0 0 0 end 2 0 0 nseg 2sel beam beg 2 0 0 end 4 0 -1 nseg 3sel beam id=2 beg 4 0 -1 end 5 0 -2 nseg 2 plot sel geo id on nod on scale‎0.04plot ad axsel node id=1 0 0 0sel node id=2 2 0 0sel node id=3 4 0 -1sel node id=4 5 0 -2sel beams‎e l id=1 cid=1 node 1 2 sel beams‎e l id=1 cid=2 node 2 3 sel beams‎e l id=1 cid=3 node 3 4 plot sel geo id on nod on scale‎0.04 plot ad axdef set_v‎a lsptA = 25.0 * sin( 40.0*degra‎d )ptB = 25.0 * cos( 40.0*degra‎d )endset_v‎a lsgen zone cylin‎d er p0=( 0.0, 0.0, 0.0 ) &p1=( ptA, 0.0, ptB ) &p2=( 0.0, 25.0, 0.0 ) &p3=( 0.0, 0.0, 25.0 ) &p4=( ptA, 25.0, ptB ) &p5=( 0.0, 25.0, 25.0 ) &size=(1, 2, 2)sel shell‎id=5 range‎cylin‎d er end1=(0.0, 0.0,0.0) &e nd2=(0.0,25.0,0.0) radiu‎s=24.5 not plot blo groplot ad sel geom black‎black‎cid on scale‎=0.03plot ad axpaudelet‎e ; delet‎e all zones‎sel node init zpos add -25.0newgen zone brick‎size 6 8 8model‎mohrprop bulk 1e8 shear‎0.3e8 fric 35prop coh 1e10 tens 1e10set grav 0 0 -9.81ini dens 1000fix x range‎x -0.1 0.1fix x range‎x 5.9 6.1fix y range‎y -0.1 0.1fix y range‎y 7.9 8.1fix z range‎z -0.1 0.1hist n 5hist unbal‎set mech force‎50solve‎save beam-brace‎0.sav;prop coh 1e3 tens 1e3model‎null range‎x 2 4 y 2 6 z 5 10set large‎ini xdis 0 ydis 0 zdis 0sel beam begin‎=( 2, 4, 8) end=( 4, 4, 8) nseg=2sel beam prop emod=2.0e11 nu=0.30sel beam prop XCAre‎a=6e-3 XCIz=200e-6 XCIy=200e-6 XCJ=0.0 hist gp zdisp‎4 4 8solve‎save beam-brace‎1.sav;plot creat‎e GravV‎plot set plane‎dip 90 dd 0 origi‎n 3 4 0plot set rot 15 0 20plot set cente‎r 2.5 4.2 4.0plot set cap size 25plot add cont disp plane‎behin‎d shade‎onplot add sel beam force‎fxplot add sel geom black‎black‎node=off shrin‎k fac=0.0plot add axesplot show;非全长锚固‎、预紧力锚杆‎(锚索)模拟;方法1、通过删除-建立lin‎k链接来模‎拟托盘gen zone radtu‎n p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio‎1 1 1 1.1 fillgen zone refle‎c t norma‎l 1 0 0 ori 0 0 0gen zone refle‎c t norma‎l0 0 1 ori 0 0 0mo mohrpro bulk 2.2e9 she 1.3e9 fric 30 coh 1.3e6 ten 1.5e5ini dens 2000fix x range‎x -25.1,-24.9fix x range‎x 24.9 25.1fix y range‎y 49.9 50.1fix z range‎z -25.1 -24.9fix z range‎z 24.9 25.1sel cable‎id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10sel cable‎id=1 beg 0,29,0 end 0,35,0 nseg 6sel cable‎id=1 prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 1 gr_k 1 gr_pe‎r 0.0785 range‎cid 1,10sel cable‎id=1 prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 10e5 gr_k 2e7 range‎cid 11,17sel delet‎e link range‎id 1sel link id=100 1 targe‎t zonesel link attac‎h xdir=rigid‎ydir=rigid‎zdir=rigid‎xrdir‎=rigid‎yrdir‎=rigid‎zrdir‎=rigid‎range‎id 100sel cable‎id=1 prete‎n sion‎60e3 range‎cid 1,10step 2000sav 10-5.sav;非全长锚固‎、预紧力锚杆‎(锚索)模拟;方法2、通过设置极‎大锚固剂参‎数模拟托盘‎gen zone radtu‎n p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio‎1 1 1 1.1 fillgen zone refle‎c t norma‎l 1 0 0 ori 0 0 0gen zone refle‎c t norma‎l0 0 1 ori 0 0 0mo mohrpro bulk 2.2e9 she 1.3e9 fric 30 coh 1.3e6 ten 1.5e5ini dens 2000fix x range‎x -25.1,-24.9fix x range‎x 24.9 25.1fix y range‎y 49.9 50.1fix z range‎z -25.1 -24.9fix z range‎z 24.9 25.1sel cable‎id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10sel cable‎id=1 beg 0,29,0 end 0,35,0 nseg 6sel cable‎ prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 1 gr_k 1 gr_pe‎r 0.0785 range‎cid 2,10sel cable‎ prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 10e5 gr_k 2e7 range‎cid 11,17sel cable‎ prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 10e8 gr_k 2e10 range‎cid 1,1sel cable‎id=1 prete‎n sion‎60e3 range‎cid 1,10step 2000sav 10-6.sav;非全长锚固‎、预紧力锚杆‎(锚索)模拟;方法3、借助别的结‎构单元(如line‎r单元)来模拟托盘‎gen zone radtu‎n p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio‎1 1 1 1.1 fillgen zone refle‎c t norma‎l 1 0 0 ori 0 0 0gen zone refle‎c t norma‎l0 0 1 ori 0 0 0mo mohrpro bulk 2.2e9 she 1.3e9 fric 30 coh 1.3e6 ten 1.5e5ini dens 2000fix x range‎x -25.1,-24.9fix x range‎x 24.9 25.1fix y range‎y 49.9 50.1fix z range‎z -25.1 -24.9fix z range‎z 24.9 25.1sel cable‎id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10sel cable‎id=1 beg 0,29,0 end 0,35,0 nseg 6sel cable‎id=1 prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 1 gr_k 1 gr_pe‎r 0.0785 range‎cid 1,10sel cable‎id=1 prop emod 2e10 ytens‎i on 310e3‎xcare‎a 0.00049‎06 &gr_co‎h 10e5 gr_k 2e7 range‎cid 11,17sel liner‎range‎y=-.1, .1 x=-1,1 z=-1,1sel liner‎PROP iso=( 25e9, 0.15) thick‎=0.1 ; concr‎e tesel liner‎PROP cs_nk‎=8e8 cs_sk‎=8e8 &cs_nc‎u t=0.0 cs_sc‎o h=0.0 cs_sc‎o hres‎=0.0 cs_sf‎r ic=0.0sel delet‎e link range‎id 1sel link id=100 1 targe‎t node tgt_n‎u m 18sel link attac‎h xdir=rigid‎ydir=rigid‎zdir=rigid‎xrdir‎=rigid‎yrdir‎=rigid‎zrdir‎=rigid‎range‎id 100sel cable‎id=1 prete‎n sion‎60e3 range‎cid 1,10step 2000sav 10-7.savntitle‎Struc‎t ure_‎d ynam‎i c_an‎a lysi‎s_lak‎e wate‎rconfi‎g dynsel pile id=1 beg 0 0 0 end 0 0 1sel pile prop dens 2400 &Emod 1.0e10 Nu 0.3 XCAre‎a 0.3 &XCJ 0.16375‎XCIy 0.00625‎XCIz 0.01575‎&Per 2.8 &CS_sK‎1.3e11 CS_sC‎o h 0.0 CS_sF‎r ic 10.0 &CS_nK‎1.3e11 CS_nC‎o h 0.0 CS_nF‎r ic 0.0 CS_nG‎a p offdef f1while‎s tepp‎i ngf0=10000‎*sin(10*dytim‎e)np = nd_he‎a dloop while‎np # nullif nd_po‎s(np,1,3)=1nd_ap‎p ly(np,1)=f0endif‎np = nd_ne‎x t(np)endlo‎o pendsel node fix x y z xr yr zr ran id=1sel set damp combi‎n edplo cre pileplo curre‎n t pileplo set back black‎fore white‎mag 0.8plo add sel geo id on sca .04 magf 1e3plo add sel fapp lgree‎n magf 1e3plo add sel pile mom my lblue‎lred magf 1e3 axe yelset movie‎avi step 100 file pile.avimovie‎start‎sol age 1movie‎finis‎hnewconf dyn ;打开动力计‎算功能gen zone brick‎size 10 5 10mod elasmod null range‎x=0,5 z=5,10 ;删除部分网‎格fix z range‎x=-.1 .1 z=.1 10.1 ;设置静力边‎界条件fix z range‎x=9.9,10.1 z=.1 10.1fix y range‎y=-.1 .1fix y range‎y=4.9 5.1prop bulk 2e8 shear‎ 1e8 ;设置土体参‎数prop bulk 4e9 shear‎ 2e9 range‎x=5,6 z=5,10 ;设置墙体参‎数(土体参数的‎20倍)ini dens 2000 ;设置密度def setup‎;动荷载中的‎变量赋值freq = 1.0omega‎= 2.0 * pi * freqold_t‎i me = clock‎endsetup‎;执行变量赋‎值def wave ;定义动荷载‎函数wave = sin(omega‎* dytim‎e) ;定义动荷载‎变量endapply‎xvel = 1 hist wave range‎z=-.1 .1 ;施加动荷载‎apply‎zvel = 0 r ange‎z=-.1 .1hist gp xvel 5,2,0hist gp xvel 5,2,10hist gp zvel 5,2,10hist dytim‎edef tim ;估算程序运‎行的时间tim = 0.01 * (clock‎- old_t‎i me)endset dyn multi‎ on ;设置动态多‎步solve‎age 1.0print‎ tim ;输出计算时‎间print‎dyn ;输出动力计‎算相关信息‎save mult1‎.savnewconfi‎g dyngen zone brick‎size 1,1,50model‎elasprop shear‎1e7 bulk 2e7ini dens 1000def setup‎omega‎= 2.0 * pi * freqpulse‎= 1.0 / freqendset freq=4.0setup‎def waveif dytim‎e > pulse‎wave = 0.0elsewave = 0.5 * (1.0 - cos(omega‎* dytim‎e))endif‎endrange‎name botto‎m z=-.1 .1fix z range‎z=.5 55 ;将上部网格‎都施加数值‎向约束apply‎dquie‎t squie‎t range‎botto‎mapply‎sxz -2e5 hist wave syz 0.0 szz 0.0 range‎botto‎m;-2e5的系‎数来源于的值apply‎nvel 0 plane‎norm 0,0,1 range‎botto‎mhist gp xvel 0,0,0hist gp xvel 0,0,25hist gp xvel 0,0,50hist dytim‎ehist waveplot creat‎e hhhplot add hist 1 2 3 vs 4plot showsolve‎age 2。

FLAC3D 实例命令流1

FLAC3D 实例命令流1

第1部分命令流按照顺序进行2-1定义一个FISH函数newdef abcabc = 25 * 3 + 5Endprint abc2-2使用一个变量newdef abchh = 25abc = hh * 3 + 5EndPrint hhPrint abc2-3对变量和函数的理解newdef abchh = 25abc = hh * 3 + 5Endset abc=0 hh=0print hhprint abcprint hhnewdef abcabc = hh * 3 + 5endset hh=25print abcset abc=0 hh=0print hhprint abcprint hh2-4获取变量的历史记录newgen zone brick size 1 2 1model mohrprop shear=1e8 bulk=2e8 cohes=1e5 tens=1e10fix x y z range y -0.1 0.1apply yvel -1e-5 range y 1.9 2.1plot set rotation 0 0 45plot block groupdef get_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_addef loadload=gp_yfunbal(ad1)+gp_yfunbal(ad2)+gp_yfunbal(ad3)+gp_yfunbal(ad4) endhist loadhist gp ydis 0,2,0step 1000plot his 1 vs -22-5用FISH函数计算体积模量和剪砌模量newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25deriveprint b_modprint s_mod2-6 在FLAC输入中使用符号变量Newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25derivegen zone brick size 2,2,2model elasticprop bulk=b_mod shear=s_modprint zone prop bulkprint zone prop shear2-7 控制循环Newdef xxxsum = 0prod = 1loop n (1,10)sum = sum + nprod = prod * nend_loopendxxxprint sum, prodnewgen zone brick p0 (0,0,0) p1 (-10,0,0) p2 (0,10,0) p3 (0,0,-10) model elasplot set rotation 0 0 45plot block groupdef installpnt = zone_headloop while pnt #nullz_depth = -z_zcen(pnt)y_mod = y_zero + cc * sqrt(z_depth)z_prop(pnt, ’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_loopendset p_ratio=0.25 y_zero=1e7 cc=1e8install2-8 拆分命令行new ;example of a sum of many thingsdef long_sumtemp = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 long_sum = temp + v11 + v12 + v13 + v14 + v15end2-9 变量类型newdef haveoneaa = 2bb = 3.4cc = ’Have a nice day’dd = aa * bbee = cc + ’, old chap’endhaveoneprint fish2-10 IF条件语句newdef abcif xx > 0 thenabc = 1000elseabc = -1000end_ifendset xx = 10print abcset xx = 0print abc2-11 索单元自动生成newgen zone brick size 10 3 5plot set rotation 0 0 45plot block groupdef place_cablesloop n (1,5)z_d = float(n) - 0.5commandsel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7 end_commandend_loopendplace_cablesplot grid sel geom rednewgen zone brick size 10 3 5plot set rotation 15 0 60plot block groupmod mohrprop bulk 1e8 shear .3e8 fric 35prop coh 1e3 tens 1e3ini dens 1000set grav 0,0,-10fix x y z range z -.1 .1fix y range y -.1 .1fix y range y 2.9 3.1fix x range x -.1 .1fix x range x 9.9 10.1set largehist unbalsolvesave cab_str.savini xdis 0 ydis 0 zdis 0hist gp xdisp 0,1,5def place_cablesloop n (1,5)z_d = 5.5 - float(n)z_t = z_d + 0.5z_b = z_d - 0.5commandfree x range x -.1,.1 z z_b z_tsolvesel cable beg 0.0,0.5,z_d end 7.0,0.5,z_d nseg 7sel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7sel cable beg 0.0,2.5,z_d end 7.0,2.5,z_d nseg 7sel cable prop emod 2e10 ytension 1e8 xcarea 1.0 &gr_k 2e10 gr_coh 1e10 gr_per 1.0end_commandend_loopendplace_cablessave cab_end.savplot sketch sel cable force red2-12圆形隧道开挖模拟计算;建立模型gen zon radcyl p0 0 0 0 p1 6 0 0 p2 0 1 0 p3 0 0 6 &size 4 2 8 4 dim 3 3 3 3 rat 1 1 1 1.2 group outsiderockgen zone cshell p0 0 0 0 p1 3 0 0 p2 0 1 0 p3 0 0 3 &size 1 2 8 4 dim 2.7 2.7 2.7 2.7 rat 1 1 1 1 group concretliner fill group insiderock gen zon reflect dip 90 dd 90 orig 0 0 0gen zon reflect dip 0 dd 0 ori 0 0 0gen zon brick p0 0 0 6 p1 6 0 6 p2 0 1 6 p3 0 0 13 size 4 2 6 group outsiderock1 gen zon brick p0 0 0 -12 p1 6 0 -12 p2 0 1 -12 p3 0 0 -6 size 4 2 5 group outsiderock2 gen zon brick p0 6 0 0 p1 21 0 0 p2 6 1 0 p3 6 0 6 size 10 2 4 group outsiderock3 gen zon reflect dip 0 dd 0 orig 0 0 0 range group outsiderock3gen zon brick p0 6 0 6 p1 21 0 6 p2 6 1 6 p3 6 0 13 size 10 2 6 group outsiderock4gen zon brick p0 6 0 -12 p1 21 0 -12 p2 6 1 -12 p3 6 0 -6 size 10 2 5 group outsiderock5 gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z 6.1 13.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z -6.1 -12.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x 6.1 21.1 z -12.1 13.1;绘制模型图plot block groupplot add axes red;plot set rotation 0 0 45 用于显示三维模型;设置重力set gravity 0 0 -10;给定边界条件fix z range z -12.01,-11.99fix x range x -21.01,-20.99fix x range x 20.99,21.01fix y range y -0.01 0.01fix y range y 0.99,1.01;求解自重应力场model mohrini density 1800 ;围岩的密度prop bulk=1.47e8 shear=5.6e7 fric=20 coh=5.0e4 tension=1.0e4 ;体积、剪切、摩擦角、凝聚力、抗拉强度set mech ratio=1e-4solvesave Gravsol.savplot cont zdisp outl onplot cont szz;毛洞开挖计算initial xdisp=0 ydisp=0 zdisp=0model null range group insiderock any group concretliner anyplot block groupplot add axes redset mech ratio=5e-4solvesave Kaiwsol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;模筑衬砌计算model elas range group concretliner anyplot block groupplot add axes redini density 2500 range group concretliner any ;衬砌混凝土的密度prop bulk=16.67e9,shear=12.5e9 range group concretliner any ;衬砌混凝土的体积弹模、剪切弹模set mech ratio=1e-4solvesave zhihusol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;完成计算分析。

《FLAC3D基础与工程实例》全部命令流

《FLAC3D基础与工程实例》全部命令流

《FLAC3D基础与工程实例》全部命令流《FLAC/FLAC 3D基础与工程实例》全部命令流1gen zone bri p0 0 0 0 p1 10 0 0 p2 0 10 0 p3 0 0 10 &p4 15 15 0 p5 0 15 15 p6 15 0 10 p7 20 20 20 &size 10 10 10 rat 1.0 0.9 1.1 group brick_1gen zone bri p0 20 0 0 p1 add 10 0 0 p2 add 0 20 0 p3 add 0 0 15 &size 10 10 10 rat 1.0 0.9 1.1 group brick_2gen zone bri p0 40 0 0 edge 10 size 10 10 10 rat 1.0 0.9 1.1 group brick_3 plot surnewgen zon bri size 3 3 3model elasprop bulk 3e8 shear 1e8ini dens 2000fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1set grav 0 0 -10solveapp nstress -10e4 ran z 3 x 1 2 y 1 2 hist gp vel 0 0 3hist gp vel 0 3 3plo hist 1 redplo add hist 2 bluesolve;-------------------------------------工程信息;Project Record Tree export;Title:Simple test;---------------------------------计算第一步;... STATE: STATE1 ....configgrid 10,10model elasticgroup 'User:Soil' notnullmodel elastic notnull group 'User:Soil'prop density=1500.0 bulk=3E6 shear=1E6 notnull group 'User:Soil' fix x y j 1fix x i 1fix x i 11set gravity=9.81history 999 unbalancedsolvesave state1.sav;----------------------------------计算第二步;... STATE: STATE2 ....initial xdisp 0 ydisp 0initial xvel 0 yvel 0model null i 4 7 j 8 10group 'null' i 4 7 j 8 10group delete 'null'history 1 xdisp i=4, j=11solvesave state2.sav;--------------------------------绘图命令;*** plot commands ****;plot name: syyplot hold grid syy fill;plot name: Unbalanced forceplot hold history 999;plot name: gridplot hold grid magnify 20.0 lred grid displacement;plot name: Xdis-Aplot hold history 1 linenew; ===============================; 定义球体半径和半径方向上单元网格数; ===============================def parmrad=10.0rad_size=5endparm; ===============================; 建立八分之一球体外接立方体网格; ===============================gen zone pyramid p0 rad 0 0 p1 rad 0 rad p2 rad rad 0 p3 0 0 0 & p4 rad rad rad size rad_size rad_size rad_size group 1gen zone pyramid p0 0 rad 0 p1 rad rad 0 p2 0 rad rad p3 0 0 0 & p4 rad rad rad size rad_size rad_size rad_size group 2gen zone pyramid p0 0 0 rad p1 0 rad rad p2 rad 0 rad p3 0 0 0 & p4 rad rad rad size rad_size rad_size rad_size group 3; ==================================; 利用FISH语言将内部立方体节点调整到球面; ==================================def make_spherep_gp=gp_headloop while p_gp#null; 获取节点点坐标值:P=(px,py,pz)px=gp_xpos(p_gp)py=gp_ypos(p_gp)pz=gp_zpos(p_gp)dist=sqrt(px*px+py*py+pz*pz)if dist>0 then; 节点位置调整maxp=max(px,max(py,pz))k=(maxp/rad)*(rad/dist)gp_xpos(p_gp)=k*pxgp_ypos(p_gp)=k*pygp_zpos(p_gp)=k*pzend_ifp_gp=gp_next(p_gp)end_loopendmake_sphere; ===============================; 利用镜像生成完整球体网格; =============================== gen zone refgen zone ref dip 90gen zone ref dip 90 dd 90; =============================== ; 显示球体网格; =============================== plot surf pl set back whpl bl grngen zon bri size 1 1 2 group soil ran z 1 1 group rock ran z 01 expgrid 1.flac3dgen zon bri size 3 3 3model mohrprop bu 3e6 sh 1e6 coh 10e3 fric 15 fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1ini dens 2000hist unbalset grav 10solve elasticsave 6-1.savrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2 solvesave 6-2.savrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2 hist id=2 gp zdis 1 1 3hist id=3 gp zdis 1 1 2hist id=4 gp xdis 1 1 3hist id=5 gp xdis 1 1 3hist id=6 zone szz 1 1 3hist id=7 zone szz 1.5 1.5 2.5hist id=8 zone sxz 1.5 1.5 2.5solvesave 6-3.savrest 6-3.savset log onset logfile 6-2.log print zone stress print gp disset log offrest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2 plot set rot 20 0 30plot con szz ou on magf 10plot add hist 1set movie avi step 1 file 6-5.avimovie startsolvemovie finishngen zon bri size 1 1 2 model elasprop bulk 3e7 shear 1e7 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solveplo con szngen zon bri size 1 1 2model mohrprop bulk 3e7 shear 1e7 c 1e10 f 15 tension 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solveprop bulk 3e7 shear 1e7 c 10e3 f 15 ten 0solveplo con szngen zone brick size 1 1 2model mohrprop bulk 3e7 shear 1e7 coh 10e3 fri 15 ten 0 fix z ran z 0 fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000set grav 0 0 -10solve elasplo con sznewgen zone brick size 1 1 2model mohrprop bulk 3e7 shear 1e7 coh 10e3 fri 15 ten 0 fix z ran z 0 fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000ini szz -40e3 grad 0 0 20e3 ran z 0 2ini syy -20e3 grad 0 0 10e3 ran z 0 2ini sxx -20e3 grad 0 0 10e3 ran z 0 2set grav 0 0 -10solveplo con szngen zon bri size 1 1 2model mprop bulk 3e7 shear 1e7 c 10e10 f 15 ten 1e10 fix z ran z 0 fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 1ini dens 1500 ran z 1 2ini szz -35e3 grad 0 0 20e3 ran z 0 1ini syy -17.5e3 grad 0 0 10e3 ran z 0 1ini sxx -17.5e3 grad 0 0 10e3 ran z 0 1ini szz -15e3 grad 0 0 15e3 ran z 1 2ini syy -7.5e3 grad 0 0 7.5e3 ran z 1 2ini sxx -7.5e3 grad 0 0 7.5e3 ran z 1 2ini pp 10e3 grad 0 0 -10e3 ran z 0 1set grav 0 0 -10solveplo con szngen zon bri size 1 1 2model mprop bulk 3e7 shear 1e7 c 10e10 f 15 ten 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 2ini szz -50e3 grad 0 0 20e3 ran z 0 1ini syy -30e3 grad 0 0 10e3 ran z 0 1ini sxx -30e3 grad 0 0 10e3 ran z 0 1ini pp 30e3 grad 0 0 -10e3 ran z 0 2app nstress -10e3 ran z 2set grav 0 0 -10solveplo con sznewgen zone brick p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150 & size 6 6 10model elaspro bulk 10e10 she 10e10ini den 2500apply sxx -1e9 grad 0 0 1.1111111e7 range x -.1 .1 apply sxx -1e9 grad 0 0 6.6666666e6 range x 59.9 60.1 apply syy -1e9 grad 0 0 8.3333333e6 range y -.1 .1 apply syy -1e9 grad 0 0 8.3333333e6 range y 59.9 60.1 apply szz -1e8 grad 0 0 8.3333333e5 ran z 0 120set grav 0 0 -10step 30000ini xdisp 0 ydisp 0 zdisp 0ini xvel 0 yvel 0 zvel 0plo cont szznewgen zone brick p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150 & size 6 6 10model elaspro bulk 10e10 she 10e10ini den 2500ini sxx -1e9 grad 0 0 1.1111111e7 range x -.1 .1ini sxx -1e9 grad 0 0 6.6666666e6 range x 59.9 60.1ini syy -1e9 grad 0 0 8.3333333e6 range y -.1 .1ini syy -1e9 grad 0 0 8.3333333e6 range y 59.9 60.1ini szz -1e8 ran z -.1 .1fix x y z ran z -.1 .1set grav 0 0 -10solveini xdisp 0 ydisp 0 zdisp 0ini xvel 0 yvel 0 zvel 0plo cont szz。

FLAC3D命令流(整理版)

FLAC3D命令流(整理版)

1、怎样查看模型?答:plot grid 可以查看网格,plot grid num 可以查看节点号。

2、请问在圆柱体四周如何施加约束条件?答:可以用fix ... ran cylinder end1 end2 radius r1 cylinder end1 end2 radius r2 not,其中r2<r1,其实就是选择range的时候选两个圆柱的差,即得到边界。

命令流如下:fix x range end1 1 0 0 end2 1 4 0 rad 1 end1 1 0 0 end2 1 4 0 rad 13、怎么能把一个PLOT的图像数据导出来以便用其他软件绘图?答:用set log on 命令,把数据导出来,转到excel里处理一下,然后用surfer或者什么作图软件绘制就行了。

4、用命令建立模型后,如何显示点的坐标?答:使用plo blo gro gpnum on命令5、关于gauss_dev对性质进行高斯正态分布的问题?答:根据手册上的说明:下面的命令设定一个平均摩擦角为40度,标准方差是±5%。

则命令如下:prop friction 40 gauss_dev 2 问题:请问gauss_dev 2中的2是如何计算的?如果把±5%改为±10%,则命令应如何写?40×5%=26、 reflect问题问:gen zone radbrick &p0 (0,0,0) p1 (10,0,0) p2 (0,10,0) p3 (0,0,10) &size 3,5,5,7 &ratio 1,1,1,1.5 &dim 1 4 2 fill plot surfgen zone reflect dip 0 dd 90 (对xy面做镜像)gen zone reflect dip 90 dd 90 (对yz面做镜像)(1)dd表示y轴正向顺时针到那条射线的夹角,dip表示对称参照面与xy平面的夹角,对称参照面与xy平面的夹角在xy平面的投影是一条射线。

FLAC3D命令流(整理版)

FLAC3D命令流(整理版)

1、怎样查看模型答:plotgrid可以查看网格,plotgridnum可以查看节点号。

2、请问在圆柱体四周如何施加约束条件答:可以用fix...rancylinderend1end2radiusr1cylinderend1end2radiusr2not,其中r2<r1,其实就是选择range的时候选两个圆柱的差,即得到边界。

命令流如下:fixxrangeend1100end2140rad1end1100end2140rad13、怎么能把一个PLOT的图像数据导出来以便用其他软件绘图答:用setlogon命令,把数据导出来,转到excel里处理一下,然后用surfer或者什么作图软件绘制就行了。

4、用命令建立模型后,如何显示点的坐标答:使用ploblogrogpnumon命令5、关于gauss_dev对性质进行高斯正态分布的问题答:根据手册上的说明:下面的命令设定一个平均摩擦角为40度,标准方差是±5%。

则命令如下:propfriction40gauss_dev2问题:请问gauss_dev2中的2是如何计算的如果把±5%改为±10%,则命令应如何写40×5%=26、reflect问题问:genzoneradbrick&p0(0,0,0)p1(10,0,0)p2(0,10,0)p3(0,0,10)&size3,5,5,7&rati o1,1,1,&dim142fillplotsurfgenzonereflectdip0dd90(对xy面做镜像)genzonereflectdip90dd90(对yz面做镜像)(1)dd表示y轴正向顺时针到那条射线的夹角,dip表示对称参照面与xy平面的夹角,对称参照面与xy平面的夹角在xy平面的投影是一条射线。

首先应该按照dd 的方向大体确定这个面的朝向,dd指的是从y轴正方向按顺时针(clockwise)方向转向所要确定面的法线方向在xy平面上的投影的夹角,然后再确定dip,dip指的是从xy平面转向所要确定的平面的角.(及z轴负方向转过角度)(2)命令:reflectnormalxyzoriginxyz(根据法线和过一点建的面)最常用,至于实际使用过程中有人问道:normal-100与normal100的区别,我试过两者的效果是一样的,没区别,虽然方向不同,但表达的是同一个面。

FLAC3D命令流(挺实用)

FLAC3D命令流(挺实用)

1、怎样查看模型?答:plot grid 可以查看网格,plot grid num 可以查看节点号。

2、请问在圆柱体四周如何施加约束条件?答:可以用fix ... ran cylinder end1 end2 radius r1 cylinder end1 end2 radius r2 not,其中r2<r1,其实就是选择range的时候选两个圆柱的差,即得到边界。

命令流如下:fix x range end1 1 0 0 end2 1 4 0 rad 1 end1 1 0 0 end2 1 4 0 rad 13、怎么能把一个PLOT的图像数据导出来以便用其他软件绘图?答:用set log on 命令,把数据导出来,转到excel里处理一下,然后用surfer或者什么作图软件绘制就行了。

4、用命令建立模型后,如何显示点的坐标?答:使用plo blo gro gpnum on命令5、关于gauss_dev对性质进行高斯正态分布的问题?答:根据手册上的说明:下面的命令设定一个平均摩擦角为40度,标准方差是±5%。

则命令如下:prop friction 40 gauss_dev 2问题:请问gauss_dev 2中的2是如何计算的?如果把±5%改为±10%,则命令应如何写?40×5%=26、reflect问题问:gen zone radbrick &p0 (0,0,0) p1 (10,0,0) p2 (0,10,0) p3 (0,0,10) &size 3,5,5,7 &ratio 1,1,1,1.5 &dim 1 4 2 fillplot surfgen zone reflect dip 0 dd 90 (对xy面做镜像)gen zone reflect dip 90 dd 90 (对yz面做镜像)(1)dd表示y轴正向顺时针到那条射线的夹角,dip表示对称参照面与xy平面的夹角,对称参照面与xy平面的夹角在xy平面的投影是一条射线。

FLAC3D命令流

FLAC3D命令流

命令流1gen zone bri p0 0 0 0 pl 10 0 0 p2 0 10 0 p3 0 0 10 &p4 15 15 0 p5 0 15 15 p6 15 0 10 p7 20 20 20 &size 10 10 10 rat 1.0 0.9 1.1 group brick_1gen zone bri p0 20 0 0 p1 add 10 0 0 p2 add 0 20 0 p3 add 0 0 15 &size 10 10 10 rat 1.0 0.9 1.1 group brick_2gen zone bri p0 40 0 0 edge 10 size 10 10 10 rat 1.00.91.1 group brick_3plot sur2-1newgen zon bri size 3 3 3model elasprop bulk 3e8 shear 1e8ini dens 2000fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1fix y ran y 2.9 3.1set grav 0 0 -10solveapp n stress -10e4 ran z 3 x 1 2 y 1 2hist gp vel 0 0 3hist gp vel 0 3 3plo hist 1 redplo add hist 2 bluesolve3-1; ---------------------- 工程信息;Project Record Tree export;Title:Simple test ; -------------------- 计算第一步;... STATE: STATE1 ....configgrid 10,10model elasticgroup 'User:Soil' notn ullmodel elastic notnull group 'User:Soil'prop den sity=1500.0 bulk=3E6 shear=1E6 not null group 'User:Soil'fix x y j 1fix x i 1fix x i 11set gravity=9.81history 999 un bala needsolvesave state1.sav; -------------------- 计算第二步;... STATE: STATE2 ....in itial xdisp 0 ydisp 0in itial xvel 0 yvel 0model null i 4 7 j 8 10group 'n ull' i 4 7 j 8 10group delete 'n ull'history 1 xdisp i=4, j=11solvesave state2.sav; ------------------- 绘图命令;*** plot comma nds ****;plot n ame: syyplot hold grid syy fill;plot n ame: Un bala need forceplot hold history 999;plot n ame: gridplot hold grid magnify 20.0 lred grid displaceme nt ;plot n ame: Xdis-Aplot hold history 1 line5- 1new;定义球体半径和半径方向上单元网格数 def parmrad=10.0 rad_size=5 end parm ;建立八分之一球体外接立方体网格gen zone pyramid p0 rad 0 0 p1 rad 0 rad p2 rad rad 0 p3 0 0 0 &p4 rad rad rad size rad_size rad_size rad_size group 1 gen zone pyramid p0 0 rad 0 p1 rad rad 0 p2 0 rad rad p3 0 0 0 &p4 rad rad rad size rad_size rad_size rad_size group 2 gen zone pyramid p0 0 0 rad p1 0 rad rad p2 rad 0 rad p3 0 0 0 &p4 rad rad rad size rad_size rad_size rad_size group 3 ; 利用 FISH 语言将内部立方体节点调整到球面Jdef make_spherep_gp=gp_headloop while p_gp#null; 获取节点点坐标值: P=(px,py,pz) px=gp_xpos(p_gp) py=gp_ypos(p_gp) pz=gp_zpos(p_gp)dist=sqrt(px*px+py*py+pz*pz)if dist>0 then; 节点位置调整maxp=max(px,max(py,pz))k=(maxp/rad)*(rad/dist) gp_xpos(p_gp)=k*pxgp_ypos(p_gp)=k*py gp_zpos(p_gp)=k*pz end_ifp_gp=gp_next(p_gp)end_loopendmake_sphere gen zone refgen zone ref dip 90gen zone ref dip 90 dd 90J; 显示球体网格plot surf pl set back wh pl bl gr5- 3ngen zon bri size 1 1 2 group soil ran z 1 1 group rock ran z 0 1 expgrid 1.flac3d6- 1gen zon bri size 3 3 3 model mohrprop bu 3e6 sh 1e6 coh 10e3 fric 15fix z ran z -.1 .1fix x ran x -.1 .1fix x ran x 2.9 3.1fix y ran y -.1 .1 fix y ran y 2.9 3.1 ini dens 2000 hist unbal set grav 10 solve elastic save 6-1.sav6- 2rest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2 solve save 6-2.sav6- 3rest 6-1.savini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2hist id=2 gp zdis 1 1 3hist id=3 gp zdis 1 1 2hist id=4 gp xdis 1 1 3hist id=5 gp xdis 1 1 3hist id=6 zone szz 1 1 3hist id=7 zone szz 1.5 1.5 2.5hist id=8 zone sxz 1.5 1.5 2.5; 利用镜像生成完整球体网格solve save 6-3.sav6- 4 rest 6-3.sav set log on set logfile 6-2.log print zone stress print gp dis set log off6- 5 rest 6-1.sav ini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0 app nstress -100e3 ran z 2.9 3.1 x 1 2 y 1 2 plot set rot 20 0 30 plot con szz ou on magf 10 plot add hist 1set movie avi step 1 file 6-5.avi movie start solve movie finish7- 1 n gen zon bri size 1 1 2 model elas prop bulk 3e7 shear 1e7 fix z ran z 0 fix x ran x 0 fix x ran x 1 fix y ran y 0 fix y ran y 1 ini dens 2000 set grav 0 0 -10 solve plo con sz7- 2 n gen zon bri size 1 1 2model mohrprop bulk 3e7 shear 1e7 c 1e10 f 15 tension 1e10 fix z ran z 0fix x ran x 0 fix x ran x 1 fix y ran y 0 fix y ran y 1 ini dens 2000 set grav 0 0 -10 solve prop bulk 3e7 shear 1e7 c 10e3 f 15 ten 0 solve plo con sz7- 3 n gen zone brick size 1 1 2 model mohr prop bulk 3e7 shear 1e7 coh 10e3 fri 15 ten0 fix z ran z 0 fix x ran x 0 fix x ran x1 fix y ran y 0 fix y ran y 1 ini dens 2000 set grav 0 0 -10 solve elas plo con sz7- 4 new gen zone brick size 1 1 2 model mohr prop bulk 3e7 shear 1e7 coh 10e3 fri 15 ten 0 fix z ran z 0 fix x ran x 0 fix x ran x 1 fix y ran y 0 fix y ran y 1 ini dens 2000ini szz -40e3 grad 0 0 20e3 ran z 0 2 ini syy -20e3 grad 0 0 10e3 ran z 0 2 ini sxx -20e3 grad 0 0 10e3 ran z 0 2set grav 0 0 -10 solve plo con sz7- 5ngen zon bri size 1 1 2model mprop bulk 3e7 shear 1e7 c 10e10 f 15 ten 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 1ini dens 1500 ran z 1 2ini szz -35e3 grad 0 0 20e3 ran z 0 1 ini syy -17.5e3 grad 0 0 10e3 ran z 0 1 ini sxx -17.5e3 grad 0 0 10e3 ran z 0 1 ini szz -15e3 grad 0 0 15e3 ran z 1 2ini syy -7.5e3 grad 0 0 7.5e3 ran z 1 2 ini sxx -7.5e3 grad 0 0 7.5e3 ran z 1 2ini pp 10e3 grad 0 0 -10e3 ran z 0 1 set grav 0 0 -10 solve plo con sz7-6ngen zon bri size 1 1 2model mprop bulk 3e7 shear 1e7 c 10e10 f 15 ten 1e10 fix z ran z 0fix x ran x 0fix x ran x 1fix y ran y 0fix y ran y 1ini dens 2000 ran z 0 2ini szz -50e3 grad 0 0 20e3 ran z 0 1 ini syy -30e3 grad0 0 10e3 ran z 0 1 ini sxx -30e3 grad 0 0 10e3 ran z 01 ini pp 30e3 grad 0 0 -10e3 ran z 02 app nstress -10e3 ran z 27-7 new gen zone brick p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150& size 6 6 10 model elas pro bulk 10e10 she 10e10 ini den 2500apply sxx -1e9 grad 0 0 1.1111111e7 range x -.1 .1 apply sxx -1e9 grad 0 0 6.6666666e6 range x 59.9 60.1 apply syy -1e9 grad 0 0 8.3333333e6 range y -.1 .1 apply syy -1e9 grad 0 0 8.3333333e6 range y 59.9 60.1 apply szz -1e8 grad 0 0 8.3333333e5 ran z 0 120 set grav 0 0 -10 step 30000ini xdisp 0 ydisp 0 zdisp 0 ini xvel 0 yvel 0 zvel 0 plo cont szz7-8 new gen zone brick p0 0 0 0 p1 60 0 0 p2 0 60 0 p3 0 0 90 & p4 60 60 0 p5 0 60 90 p6 60 0 150 p7 60 60 150 & size 6 6 10 model elaspro bulk 10e10 she 10e10 ini den 2500ini sxx -1e9 grad 0 0 1.1111111e7 range x -.1 .1 ini sxx -1e9 grad 0 0 6.6666666e6 range x 59.9 60.1 ini syy -1e9 grad 0 0 8.3333333e6 range y -.1 .1 ini syy -1e9 grad 0 0 8.3333333e6 range y 59.9 60.1 ini szz -1e8 ran z -.1 .1 fix x y z ran z -.1 .1 set grav 0 0 -10 solve ini xdisp 0 ydisp 0 zdisp 0 ini xvel 0 yvel 0 zvel 0 plo cont szzset grav 0 0 -10solve plo con sz7-9newgen zone brick p0 0 0 -50 p1 27.5 0 -50 p2 0 5 -50 p3 0 0 -10 size 8 1 10 group claygen zone brick p0 27.5 0 -50 p1 100 0 -50 p2 27.5 5 -50 p3 27.5 0 -10 ratio 1.1 1 1 size 12 1 10 group clay gen zone brick p0 0 0 -10 p1 27.5 0 -10 p2 0 5 -10 p3 0 0 0 ratio 1 1 0.8 size 8 1 4 group soilgen zone brick p0 27.5 0 -10 p1 100 0 -10 p2 27.5 5 -10 p3 27.5 0 0 ratio 1.1 1 0.8 size 12 1 4 group soil gen zone brick p0 0 0 0 p1 27.5 0 0 p2 0 5 0 p3 0 0 5 p4 27.5 5 0 &p5 0 5 5 p6 20 0 5 p7 20 5 5 size 8 1 5 group damfix x y z ran z -49.9 -50.1fix x ran x -.1 .1fix x ran x 99.9 100.1fix ymodel mohr ran z -50 0model null ran z 0 5prop bulk 7.8e6 shear 3.0e6 coh 10e10 tension 1e10 ran group soilini dens 1500 ran group soilprop bulk 3.91e6 shear 1.5e6 coh 10e10 tension 1e10 ran group clayini dens 1800 ran group clay set grav 0 0 -9.8 hist id=1 unbal solveprop bulk 7.8e6 shear 3.0e6 coh 10e3 fric 15 ran group soilprop bulk 3.91e6 shear 1.5e6 coh 20e3 fric 20 ran group clay solvesave elastic.sav ;将节点位移清零;将节点速度清零;记录地基顶部中心点的沉降;记录路基坡脚处的沉降hist id=4 gp xdis 27.5 0 0 ;记录路基坡脚处的水平位移model elastic ran z 0 1 ; ;激活 0 m ~ 1 m 的单元 prop bulk 7.8e6 shear 3.0e6 ran z 0 1 ini dens 1500 ran z 0 1 solve ; 按软件默认精度求解save fill-1.savmodel elastic ran z 1 2prop bulk 7.8e6 shear 3.0e6 ran z 1 2ini dens 1500 ran z 1 2solvesave fill-2.savmodel elastic ran z 2 3prop bulk 7.8e6 shear 3.0e6 ran z 2 3ini dens 1500 ran z 2 3solvesave fill-3.savmodel elastic ran z 3 4prop bulk 7.8e6 shear 3.0e6 ran z 3 4ini dens 1500 ran z 3 4solvesave fill-4.savmodel elastic ran z 4 5prop bulk 7.8e6 shear 3.0e6 ran z 4 5ini dens 1500 ran z 4 5solvesave fill-5.savpau;plo bl gr;gen zone brick p0 0 0 0 p1 100 0 0 p2 0 5 0 p30 0 5 sizegen zone brick p0 0 0 -50 p1 27.5 0 -50 p2 0 5 -50 p3 0 0 -10 size 8 1 10 group claygen zone brick p0 27.5 0 -50 p1 100 0 -50 p2 27.5 5 -50 p3 27.5 0 -10 ratio 1.1 1 1 size 12 1 10 group clay gen zone brick p0 0 0 -10 p1 27.5 0 -10 p2 0 5 -10 p3 0 0 0 ratio 1 1 0.8 size 8 1 4 group soilgen zone brick p0 27.5 0 -10 p1 100 0 -10 p2 27.5 5 -10 p3 27.5 0 0 ratio 1.1 1 0.8 size 12 1 4 group soil gen zone brick p0 0 0 0 p1 27.5 0 0 p2 0 5 0 p3 0 0 5ini xdis 0 ydis 0 zdis 0ini xvel 0 yvel 0 zvel 0 hist id=2 gp zdis 0 0 0 hist id=3 gp zdis 27.5 0 0p4 27.5 5 0 &p5 0 5 5 p6 20 0 5 p7 20 5 5 size 8 1 5 group dam endcommandendloopend7-10set log on ;打开 log 记录set logfile 1.log ;设置记录文件名为: 1.log restore fill-1.sav ;调用保存的文件print gp dis range id 517 any id 533 any ; 输出两个节点的变形值restore fill-2.savprint gp dis range id 517 any id 533 any restore fill-3.savprint gp dis range id 517 any id 533 any restore fill-4.savprint gp dis range id 517 any id 533 any restore fill-5.savprint gp dis range id 517 any id 533 any set log off ;关闭 log 记录8- 1 def abcabc = 1 + 2 * 3abcd = 1.0 / 2.0 end abc print fish8- 2 def abcif aa < 0 thenabc = 0.0 elseabc = 2.0 * aaendif end abc8- 3def abcloop aa (1, 2.5) command print aa8- 4 new gen zon bri size 3 3 3 model elastic prop bu 3e7 sh 1e7 ini dens 2000 fix x y z ran z -.1 .1 fix x ran x -.1 .1 fix x ran x 2.9 3.1 fix y ran y -.1 .1 fix y ran y 2.9 3.1 set grav 10 solve ini xd 0 yd 0 zd 0 xv 0 yv 0 zv 0 save 8-4.sav8- 5 rest 8-4.sav def E_modifyp_z = zone_head d_k = 704 d_n = 0.38 d_pa =101325.0 ;// 标准大气压 loop while p_z # null sigma_3 = -1.0 * z_sig1(p_z)E_new = d_k * d_pa * (sigma_3 / d_pa) A d_n z_prop(p_z,'young') = E_new p_z = z_next(p_z) endloopend E_modify8-6 rest 8-5.sav table 1 name load_settlement def add_loadp_gp = gp_near(2,1,3)loop n (1,5)app_load = n * (-1000e3) file_name ='7-6_add_step' + string(n) + '.sav' commandapp nstress app_load ran z 2.9 3.1 x 1 2 y 1 2 solve save file_name endcommand xtable(1,n) = -1.0 * app_load ytable(1,n) = gp_zdisp(p_gp) endloopend add_load save 8-6.sav8-7 rest 8-6.sav def find_max_disp p_gp = gp_head maxdisp_value = 0.0 maxdisp_gpid = 0 loop while p_gp # nulldisp_gp = sqrt(gp_xdisp(p_gp) A2 + gp_ydisp(p_gp) A 2 + gp_zdisp(p_gp) A 2)if disp_gp > maxdisp_value maxdisp_value = disp_gp maxdisp_gpid = gp_id(p_gp) endifp_gp = gp_next(p_gp) endloop end find_max_disp print maxdisp_value maxdisp_gpidrest 8-6.sav config zextra 1 def get_sigma_dif p_z = zone_head loop while p_z # nullsigma_dif = z_sig3(p_z) - z_sig1(p_z)z_extra(p_z,1) = sigma_dif p_z = z_next(p_z) endloop end get_sigma_dif plot con zextra 19- 1移来移去法接触面的建立ngen zone radcyl p0 (0,0,0) p1(8,0,0) p2 (0,0,-5) p3 (0,8,0) &p4 (8,0,-5) p5 (0,8,-5) p6 (8,8,0) p7 (8,8,-5) & p8 (.3,0,0) p9 (0,.3,0) p10 (.3,0,-5) p11 (0,.3,-5) & size 3 10 6 15 ratio 1 1 1 1.15 gen zone radcyl p0 (0,0,-5) p1 (8,0,-5) p2 (0,0,-8) p3 (0,8,-5) &p4(8,0,-8) p5 (0,8,-8) p6 (8,8,-5) p7 (8,8,-8) & p8 (.3,0,-5) p9 (0,.3,-5) p10 (.3,0,-8) p11 (0,.3,-8) & size 3 6 6 15 ratio 1 1 1 1.15 fill gen zone reflect dd 270 dip 90 group clayJinterface 1 face range cylinder end1 (0,0,0) end2 (0,0,-5.1) radius .31 &cylinder end1 (0,0,0) end2 (0,0,-5.1) radius .29 not interface 2 face range cylinder end1 (0,0,-4.9) end2 (0,0,-5.1) radius .31Jpausegen zone cyl p0 (0,0,6) p1 (.3,0,6) p2 (0,0,1) p3 (0,.3,6) &p4 (.3,0,1) p5 (0,.3,1) &size 3 10 6gen zone cyl p0 (0,0,6.1) p1 (.3,0,6.1) p2 (0,0,6) p3 (0,.3,6.1) &p4 (.3,0,6) p5 (0,.3,6) &size 3 1 6gen zone reflect dd 270 dip 90 range z 1 6.1group pile range z 1 6.1 pauseini z add -6.0 range group pile save pile_geom.sav9- 2.旦丰旦土洼导来导去法ngen zone brick size 3 3 3 group 2 range x 1 2 y 1 2 z 1 2group 1 range gr 2 notsave 1.savdel ran group 2 notinterface 1 face range x 1 y 1 2 z 1 2 interface 1 face range x 2 y 1 2 z 1 2 interface 1 face range x 1 2 y 1 z 1 2 interface 1 face range x 1 2 y 1 2 z 1 interface 1 face range x 1 2 y 1 2 z 2rest 1.sav del ran group 2 expgrid 1.fac3dimpgrid 1.flac3dmodel elafix x y z ran z 0 ini den 2000 set grav 0 0 -10 interface 1 prop kn 20e6 ks 20e6 coh 10e3 fri 15 app nstr -200e3 ran x 0 1 y 1 2 z 3 solve9- 3 ;切割模型法 ngen zone brick size 3 3 3 group 1 range x 1 2 y 1 2 z 2 3 group 2 range group 1 not gen separate 1 int 1 wrap 1 2int 1 maxedge 0.5plo int red9- 4; Create Material Zones gen zone brick size 5 5 5 & p0 (0,0,0) p1 (3,0,0) p2 (0,3,0) p3 (0,0,5)& p4 (3,3,0) p5 (0,5,5) p6 (5,0,5) p7 (5,5,5)gen zone brick size 5 5 5 p0 (0,0,5) edge 5.0group Material ; Create Bin Zones gen zonebrick size 1 5 5 &p0 (3,0,0) p1 add (3,0,0) p2 add (0,3,0) &p3 add (2,0,5) p4 add (3,6,0) p5 add (2,5,5)&p6 add (3,0,5) p7 add (3,6,5) gen zone brick size 1 5 5 &p0 (5,0,5) p1 add (1,0,0) p2 add (0,5,0) &p3 add (0,0,5) p4 add (1,6,0) p5 add (0,5,5)&p6 add (1,0,5) p7 add (1,6,5)gen zone brick size 5 1 5 &p0 (0,3,0) p1 add (3,0,0) p2 add (0,3,0) &p3 add (0,2,5) p4 add (6,3,0) p5 add (0,3,5)&p6 add (5,2,5) p7 add (6,3,5) gen zone brick size 5 1 5 &p0 (0,5,5) p1 add (5,0,0) p2 add (0,1,0) &p3 add (0,0,5) p4 add (6,1,0) p5 add (0,1,5) & p6 add (5,0,5) p7 add (6,1,5) group Bin range group Material not ; Create named range synonyms range name=Bin group Bin range name=Material group Material ; Assign models to groups model mohr range Material model elas range Bingen separate Material interface 1 wrap Material Bin range plane ori 0 0 0 normal 1 -1 0 aboveinterface 2 wrap Material Bin range plane ori 0 0 0 normal 1 -1 0 below int 1 maxedge 0.55 int 2 maxedge 0.55; Assign properties prop shear 1e8 bulk 2e8 fric 30 range Material prop shear 1e8 bulk 2e8 range Binini den 2000 int 1 prop ks 2e9 kn 2e9 fric 15 int 2 prop ks 2e9 kn 2e9 fric 15 ; Assign Boundary Conditions fix x range x -0.1 0.1 any x 5.9 6.1 any fix y range y -0.1 0.1 any y 5.9 6.1 any fix z range z -0.1 0.1 Binsolve rat 1.e-6 save pile1.savrest pile_geom.savmodel mohr range group clayprop bulk 8.333e7 shear 3.846e7 coh 30000 fric 0 range group claymodel elas range group pile prop bulk 8.333e7 shear 3.846e7 range group pile interface 1 prop kn 1e8 ks 1e8 fric 20 coh 30000 interface 2 prop kn 1e8 ks 1e8 fric 20 coh 30000Jini dens 1230 range group clayini dens 1230 range group pilemodel null range z -0.1 0.15Jfix z range z -8.1 -7.9fix x range x -8.1 -7.9fix x range x 7.9 8.1fix y range y -.1 .1fix y range y 7.9 8.1set grav 0 0 -10ini szz 0. grad 0 0 12300. range z -5.5 0.ini szz 17600 grad 0 0 15500 range z -8 -5.5ini sxx 0. grad 0 0 5271.4 range z -5.5 0.ini sxx 7542.86 grad 0 0 6642.86 range z -8 -5.5ini sxx add 31428.6 grad 0 0 5714.3 range z -8 -5.5 ini syy 0. grad 0 0 5271.4 range z -5.5 0.ini syy 7542.86 grad 0 0 6642.86 range z -8 -5.5ini syy add 31428.6 grad 0 0 5714.3 range z -8 -5.5 rest pile1.sav ;调用保存文件ini state 0 ini xdis 0.0 ydis 0.0 zdis 0.0 位移清零apply szz -0.4e6 range z 0.05 0.15 group pile 桩顶加第一级荷载solvesave app0.4.savprint gp disp range id 1 ; 输出第一级荷载下的桩顶位移,假定桩顶中心的 id 号为 1apply szz -0.6e6 range z 0.05 0.15 group pile 桩顶加第二级荷载solve save app0.6.sav print gp disp range id 1 输出第二级荷载下的桩顶位移依次加载,直到桩破坏;速度加载法 rest pile1.sav ini state 0 ini xdis 0 ydis 0 zdis 0def zs_top ;检测桩顶竖向荷载 ad = top_head zftot = 0.0 loop while ad # null gp_pnt = mem(ad+1) zf = gp_zfunbal(gp_pnt)zftot = zftot + zf ad = mem(ad) endloop zs_top = zftot / 0.1414 endfix z range z 0.05 .15 group pile ; 固定桩顶速度,用速度来确定位移 def rampwhile_stepping if step < ncut thenudapp = float(step) * udmax / float(ncut) elseudapp = udmax endif ad = top_head loop while ad # nullgp_pnt = mem(ad+1) gp_zvel(gp_pnt) = udapp ad = mem(ad) endloop end hist gp zdis 0,0,0 hist gp zvel 0,0,0 hist zs_top hist zone szz 0,0,-.1 set mech damp comb set; Monitor histories hist unbal hist gp zdisp (6,6,10) hist gp zdisp (0,0,10) hist gp zdisp(0,0,0); Settings set large set grav 0,0,-10; Cycling step 4000 save bin.sav water density 1000water table origin 0,0,-5.5 normal 0 0 -1ini dens 1550 range z -8 -5.5hist unbalsolve rat1.e-6savepile0.savmodel elas propbulk 13.9e9 inidens 2500 callfind_add.fisshear 10.4e9range group pilerange group pilerange group pile9-5udmax = -1e-8 ncut 30000 step 225000 save pile2.sav;位移控制法def solve_stepsloop n (1,21)save_file = string(n) + '-step.sav'commandstep 40000save save_filepri zone stress ran id 2381 a id 2361 a id 2341 a ; 输出桩顶网格单元的应力endcommandendloopendsolve_steps10- 1sel beam beg 0 0 0 end 2 0 0 nseg 2 sel beam beg 2 0 0 end 4 0 -1 nseg 3 sel beam id=2 beg 4 0 -1 end 5 0 -2 nseg 2 plot sel geo id on nod on scale 0.04 plot ad ax10- 2sel node id=1 0 0 0sel node id=2 2 0 0sel node id=3 4 0 -1sel node id=4 5 0 -2sel beamsel id=1 cid=1 node 1 2 sel beamsel id=1 cid=2 node 2 3 sel beamsel id=1 cid=3 node 3 4 plot sel geo id on nod on scale 0.04 plot ad ax10- 3def set_valsptA = 25.0 * sin( 40.0*degrad )ptB = 25.0 * cos( 40.0*degrad )end set_valsgen zone cylinder p0=( 0.0, 0.0, 0.0 ) &p1=( ptA, 0.0, ptB ) & p2=( 0.0,25.0, 0.0 ) & p3=( 0.0, 0.0, 25.0 )& p4=( ptA, 25.0, ptB ) & p5=( 0.0,25.0, 25.0 ) & size=(1, 2, 2) sel shell id=5 range cylinder end1=(0.0, 0.0,0.0) & end2=(0.0,25.0,0.0) radius=24.5 not plot blo gro plot ad sel geom black black cid on scale=0.03plot ad axpaudelete ; delete all zones10- 5 ;非全长锚固、预紧力锚杆(锚索)模拟 ;方法 1、通过删除-建立 link 链接来模拟托盘new gen zone radtun p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3gen zone brick size 6 8 8 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio 1 1 1 1.1 fill model mohr gen zone reflect normal 1 0 0 ori 0 0 0prop bulk 1e8 shear 0.3e8 fric 35 gen zone reflect normal 0 0 1 ori 0 0 0prop coh 1e10 tens 1e10 mo mohrset grav 0 0 -9.81 pro bulk 2.2e9 she 1.3e9 fric 30 cohini dens 1000 1.3e6 ten 1.5e5fix x range x -0.1 0.1 ini dens 2000fix x range x 5.9 6.1fix y range y -0.1 0.1 fix x range x -25.1,-24.9fix y range y 7.9 8.1 fix x range x 24.9 25.1fix z range z -0.1 0.1 fix y range y 49.9 50.1hist n 5 fix z range z -25.1 -24.9hist unbal fix z range z 24.9 25.1set mech force 50solve sel cable id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10save beam-brace0.sav sel cable id=1 beg 0,29,0 end 0,35,0 nseg 6J sel cable id=1 prop emod 2e10 ytension 310e3 xcarea prop coh 1e3 tens 1e3 0.0004906 &model null range x 2 4 y 2 6 z 5 10gr_coh 1 gr_k 1 gr_per 0.0785 range cid 1,10sel cable id=1 prop emod 2e10 ytension 310e3 xcarea 0.0004906 &sel beam begin=( 2, 4, 8) end=( 4, 4, 8) nseg=2sel beam prop emod=2.0e11 nu=0.30sel beam prop XCArea=6e-3 XCIz=200e-6 XCIy=200e-6 XCJ=0.0hist gp zdisp 4 4 8 gr_coh 10e5 gr_k 2e7 range cid 11,17sel delete link range id 1sel link id=100 1 target zonesel link attach xdir=rigid ydir=rigid zdir=rigid xrdir=rigid yrdir=rigid zrdir=rigid range id 100sel cable id=1 pretension 60e3 range cid 1,10plot create GravVplot set plane dip 90 dd 0 origin 3 4 0plot set rot 15 0 20plot set center 2.5 4.2 4.0plot set cap size 25plot add cont disp plane behind shade onplot add sel beam force fxplot add sel geom black black node=off shrinkfac=0.0 plot add axesplot showstep 2000sav 10-5.sav 10- 6;非全长锚固、预紧力锚杆(锚索)模拟;方法2、通过设置极大锚固剂参数模拟托盘gen zone radtun p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio 1 1 1 1.1 fill gen zone reflect normal 1 0 0 ori 0 0 0 gen zone reflect normal 0 0 1 ori 0 0 0 mo mohrpro bulk 2.2e9 she 1.3e9 fric 30 coh 1.3e6 ten 1.5e5 ini dens 2000fix x range x -25.1,-24.9fix x range x 24.9 25.1sel node init zpos add -25.010-4set largeini xdis 0 ydis 0 zdis 0solvesave beam-brace1.savfix y range y 49.9 50.1fix z range z -25.1 -24.9fix z range z 24.9 25.1sel cable id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10sel cable id=1 beg 0,29,0 end 0,35,0 nseg 6sel cable prop emod 2e10 ytension 310e3 xcarea 0.0004906 &gr_coh 1 gr_k 1 gr_per 0.0785 range cid 2,10sel cable prop emod 2e10 ytension 310e3 xcarea 0.0004906 &gr_coh 10e5 gr_k 2e7 range cid 11,17sel cable prop emod 2e10 ytension 310e3 xcarea 0.0004906 &gr_coh 10e8 gr_k 2e10 range cid 1,1sel cable id=1 pretension 60e3 range cid 1,10step 2000sav 10-6.sav10- 7;非全长锚固、预紧力锚杆(锚索)模拟;方法 3:借助别的结构单元 (如 liner 单元) 来模拟托盘gen zone radtun p0 0,0,0 p1 25,0,0 p2 0,50, 0 p3 0,0,25 size 4 25 4 10 dim 4 4 4 4 ratio 1 1 1 1.1 fill gen zone reflect normal 1 0 0 ori 0 0 0 gen zone reflect normal 0 0 1 ori 0 0 0 mo mohrpro bulk 2.2e9 she 1.3e9 fric 30 coh 1.3e6 ten 1.5e5 ini dens 2000fix x range x -25.1,-24.9fix x range x 24.9 25.1fix y range y 49.9 50.1fix z range z -25.1 -24.9fix z range z 24.9 25.1sel cable id=1 beg 0, 0, 0 end 0 ,29, 0 nseg 10sel cable id=1 beg 0,29,0 end 0,35,0 nseg 6 sel cable id=1 prop emod 2e10 ytension 310e3 xcarea 0.0004906 & gr_coh 1 gr_k 1 gr_per 0.0785 range cid 1,10sel cable id=1 prop emod 2e10 ytension 310e3 xcarea 0.0004906 &gr_coh 10e5 gr_k 2e7 range cid 11,17sel liner range y=-.1, .1 x=-1,1 z=-1,1sel liner PROP iso=( 25e9, 0.15) thick=0.1 ; concrete sel liner PROP cs_nk=8e8 cs_sk=8e8 &cs_ncut=0.0 cs_scoh=0.0 cs_scohres=0.0 cs_sfric=0.0 sel delete link range id 1sel link id=100 1 target node tgt_num 18sel link attach xdir=rigid ydir=rigid zdir=rigidxrdir=rigid yrdir=rigid zrdir=rigid range id 100sel cable id=1 pretension 60e3 range cid 1,10step 2000sav 10-7.sav10-8ntitle Structure_dynamic_analysis_lakewaterconfig dynsel pile id=1 beg 0 0 0 end 0 0 1sel pile prop dens 2400 &Emod 1.0e10 Nu 0.3 XCArea 0.3 &XCJ 0.16375 XCIy 0.00625 XCIz 0.01575 &Per 2.8 &CS_sK 1.3e11 CS_sCoh 0.0 CS_sFric 10.0 &CS_nK 1.3e11 CS_nCoh 0.0 CS_nFric 0.0 CS_nGap offdef f1whilesteppingf0=10000*sin(10*dytime)np = nd_headloop while np # nullif nd_pos(np,1,3)=1nd_apply(np,1)=f0endifnp = nd_next(np)endloopendsel node fix x y z xr yr zr ran id=1sel set damp combinedplo cre pileplo current pileplo set back black fore white mag 0.8plo add sel geo id on sca .04 magf 1e3plo add sel fapp lgreen magf 1e3plo add sel pile mom my lblue lred magf 1e3 axe yelset movie avi step 100 file pile.avi movie start sol age 1movie finish set dyn multi onsolve age 1.0print tim 输出计算时间 printdyn savemult1.sav;设置动态多步;输出动力计算相关信息11-1newconf dyn ;打开动力计算功能gen zone brick size 10 5 10mod elasmod null range x=0,5 z=5,10 fix z range x=-.1 .1 z=.1 10.1;删除部分网格;设置静力边界条件fix z range x=9.9,10.1 z=.110.1fix y range y=-.1 .1fix y range y=4.9 5.1prop bulk 2e8 shear 1e8 ; 设置土体参数prop bulk 4e9 shear 2e9 range x=5,6 z=5,10 ;设置墙体参数(土体参数的 20 倍)ini dens 2000def setupfreq = 1.0omega = 2.0 * pi * freq old_time = clock end setup def wave ;设置密度;动荷载中的变量赋值wave = sin(omega * dytime);执行变量赋值;定义动荷载函数;定义动荷载变量endapply xvel = 1 hist wave range z=-.1 .1 ;施加动荷载apply zvel = 0 range z=-.1 .1hist gp xvel 5,2,0hist gp xvel 5,2,10hist gp zvel 5,2,10hist dytimedef tim ;估算程序运行的时间11-2 new config dyn gen zone brick size 1,1,50 model elas prop shear 1e7 bulk 2e7 ini dens 1000def setupomega = 2.0 * pi * freq pulse = 1.0 / freq endset freq=4.0 setup def waveif dytime > pulse wave = 0.0elsewave = 0.5 * (1.0 - cos(omega * dytime))endif endrange name bottom z=-.1 .1fix z range z=.5 55 ;将上部网格都施加数值向约束apply dquiet squiet range bottomapply sxz -2e5 hist wave syz 0.0 szz 0.0bottom ;-2e5 的系数来源于的值apply nvel 0 plane norm 0,0,1 range bottom hist gp xvel 0,0,0 histgp xvel 0,0,25 hist gp xvel 0,0,50 hist dytime hist wave plot create hhh plot add hist 1 2 3 vs 4 plot show solve age 2rangetim = 0.01 * (clock -old_time)end11- 3 new ;第一步:静力计算阶段config dyn set dyn off gen zone brick size 6 3 2 gen zone brick size 2 3 2 p0 0 0 2 gen zone brick size 2 3 2 p0 4 0 2 gen zone wedge size 1 3 2 p0 2 0 2 gen zone wedge size 1 3 2 p0 4 3 2 p1 3 3 2 p2 4 0 2 p3 4 3 4 &p4 3 0 2 p5 4 0 4 model elasticprop bulk 66667 shear 40000ini dens 0.0025set grav 0 0 -10fix x range x -0.01 0.01fix x range x 5.99 6.01fix y range y -0.01 0.01fix y range y 2.99 3.01fix z range z -0.1 0.1hist unbalsolve save 11-3_1.sav;第二步:动力计算阶段set dyn ondef iniwaveper = 0.01endiniwavedef wavewave = 0.5 * (1.0 - cos (2*pi*dytime/per))endfree x y z ran z -0.1 0.1 ; 去掉模型底部原有的静力条件apply nquiet squiet dquiet ran z -0.1 0.1 ; 静态边界条件apply dstress 1.0 hist wave ran z -0.1 0.1 ; 加动力荷载 apply ff ; 施加自由场边界条件group ff_cornergroup ff_side ran x 0 6group ff_side ran y 0 3 group main_grid ran x 0 6 y 0 3 set dyn time = 0 ;设置动力计算从 0s 开始hist reset ;清空已有的历史信息hist unbalhist dytime ; 主体网格hist gp xvel 2 1 0 hist gp xvel 2 1 5.0 ; 柱体网格hist gp xvel -1 -1 0hist gp xvel -1 -1 5 ; 平行于y 方向的二维自由场网格hist gp xvel -1 0 0hist gp xvel -1 0 5.0;平行于 x 方向的二维自由场网格hist gp xvel 2 -1 0hist gp xvel 2 -1 5.0 solve age 0.015 save 11-3_2.sav11- 4conf dygen zone brick size 3,3,3model elasprop bulk 1e8 shear 0.3e8ini dens 1000fix z range z -.1,.1set dyn=on, grav 0 0 -10, hist_rep=1hist gp zdisp 3.0,1.5,3.0hist dytimeplot create hhplot add his 1 vs 2save 11-4_1.sav ;保存文件,在后续计算中需调用该文件cyc 15011- 5;(1)质量分量和刚度分量共同作用 rest 11-4_1.savset dyn damp rayleigh 1 22.8solve age=0.2titlevertical displacement versus time (mass & stiffness damping) plot showpause;( 2)只有质量分量rest 11-4_1.savset dyn damp rayleigh 2 22.8 masssolve age=0.08titlevertical displacement versus time (mass damping only)plot show pause;( 3)只有刚度分量rest 11-4_1.savset dyn damp rayleigh 2 22.8 stiffnesssolve age=0.08titlevertical displacement versus time (stiffness damping only) plot show11- 6rest 11-4_1.savset dyn damp rayleigh 0.05 22.8set hist_rep=5solve age=0.5titlevertical displacement versus time (5% Rayleigh damping) plot showpauserest 11-4_1.savset dyn damp local 0.1571 ; = pi * 0.05set hist_rep=5solve age=0.5titlevertical displacement versus time (5% Local damping) plot show11- 7 ;振动台试验的例子 new config dynamic fluid def model_dim h_R = 0 h_R1 = h_R + 1.0 end model_dimgen zon bri p0 0 0 -10 p1 30 0 -10 p2 0 1 -10 p3 0 0 0 p430 1 -10 p5 0 1 0 p6 30 0 h_R p7 30 1 h_R size 30 1 10 group sandgen zon bri p0 0 0 0 p1 30 0 h_R p2 0 1 0 p3 0 0 1 p4 30 1 h_R p5 0 1 1 p6 30 0 h_R1 p7 30 1 h_R1 size 30 1 1 group top;gen zon bri p0 0 0 -.5 p1 3 0 -.5 p2 0 1 -.5 p3 0 0 0 p4 31 -.5 p5 0 1 0 p6 3 0 0 p7 3 1 0 size 30 1 10 model elastic prop bulk=3e7 shear=1e7 fric=35 ini dens 2000 model fl_iso prop poro 0.5 perm 1e-8 ini fmod 2e8 fdens 1000 ini pp 0 grad 0 0 -10e3 ran z 0 -10.0fix z ran z -9.9 -10.1 fix x ran x -.1 .1 fix x ran x 29.9 30.1 fix y set grav 10 set fluid off dyn off ini fmod 0 set mech rat 1e-6 solve def ini_conf _k0 = 1.0pnt = zone_head loop while pnt # nullval = _k0 * z_szz(pnt) + (_k0-1.) * z_pp(pnt)z_sxx(pnt) = val z_syy(pnt) = val pnt=z_next(pnt) end_loopend ini_conf solve save 11-7.sav11- 8 rest 11-7.sav set dyn on fluid on ini fmod 2e8 set fluid pcut on model finn ran gro sandprop bulk=3e7 shear=1e7 fric=35 ran gro sand ini dens 2000 ran gro sand prop ff_latency=50 ff_switch = 0ff_c1=0.8 ff_c2=0.79 ff_c3=0.45 ff_c4=0.73 ran gro sand ;扭剪试验结果 def setupfreq=5.0 ampl=2 omega = 2.0 * pi * freq end setup def sine_wavevv = 9.36e-2 * sin(omega*dytime) if dytime < 2.0 sine_wave = dytime / 2.0 * vvelse if dytime < 20.0 sine_wave = vv else if dytime <= 30.sine_wave = (30.0 - dytime) / 10.0 * vv endif endifendifif dytime > 30.0 sine_wave = 0.0endif end free x apply xvel = 1.0 hist sine_wave ran z -9.9 -10.1 apply xvel = 1.0 hist sine_wave ran x -.1 .1 apply xvel = 1.0 hist sine_wave ran x 29.9 30.1 set dyn damp local .314 call ppr.dat set hist_rep 100 set large ;set dyn dt 3e-4 set mech rat 1e-20 def solve_ages loop n(1,39)save_file = '11-8_'+string(n)+'s.sav' command sol age n ;save save_fileendcommandendloop end solve_ages save save_file hist write 20 21 22 23 24 30 31 32 33 34 vs 2 file 10-8_Outfile_pp.txt hist write 40 41 42 43 44 vs 2 file 10-8_Outfile_xdis.txt。

flac3d 基坑降水 流固耦合命令流

flac3d 基坑降水 流固耦合命令流
;------------------------------------------------------
config fluid ;
; --- geometrical model --- 建立模型
gen zone brick p1 18 0 0 p2 0 18 0 p3 0 0 18 size 18 18 18 rat 1 1 1
; --- fluid flow model ---
model fl_iso ;各项同性流体
prop perm 1e-12 poro 0.3 ;设置渗透系数和??比 or ??率
ini fdensity 1e3 ; 初始化水密 度
ini fmod 2.0e9 ftens -1e-3 ; 初始化水的体积模量 及 ??
cyc 9000 ;循环
save exc3.sav ;保存
plot create excav ;建立一个 显示的视图 一下内容都是显示内容
plot set rot 200 0 195
plot set cent 6 6 6
plot set dist 39.18
plot set magn 0.8
soil dry density, ρd 1200 kg/m3 土的密度
water density, ρw 1000 kg/m3 水的密度
wall density, ρwal 1500 kg/m3 档土墙的密度
permeability, k 10?12 m2/Pa-s 渗透系数
porosity, n 0.3 孔隙率
录水平位移
hist gp xdis 4 2 0
hist gp zdis 0 0 5 ;记录竖向位移

Flac3D常用命令流

Flac3D常用命令流

Flac3D常用命令流FLAC3D 常用命令流;模型镜像gen zone radcylinder size 25 1 25 25gen zone reflect normal -1 0 0 origin x y z(面上一点);沿X轴镜像,通过对称平面法线向量确定对称面gen zone reflect normal 0 0 -1 ;沿z轴镜像;绘图控制pl contour szz outline on;在模型中显示位移-应变曲线hist gp ydisp 0,0,0hist zone syy 0,1,0hist zone syy 1,1,0pl his -2 -3 vs 1 ;在plot hist m vs n的形式里,m代表y轴,n代表x轴(不管m,n的正负); "-"表示对其值作"mirror";对模型进行压缩实验的方法;即在模型两侧施加相反方向的速度ini yvel 1e-7 range y -.1 .1ini yvel -1e-7 range y 1.9 2.1;修改模型的坐标值ini x add -100 y add -100 z add -100;显示云图的同时也显示模型网格轮廓plot add cont disp outline on ;gradient更精确;输入角度、弧度方法pi=π,90°为90.0*degraddef set_valsptA = 25.0 * sin(pi/2);ptA=25.0ptB = 25.0 * cos( 60.0*degrad );ptB=12.5ptC=pi;ptC=3.1415926endset_valsprint ptA ptB ptC;施加结构单元方法sel shell id=5 range cylinder end1=(0.0, 0.0,0.0) &end2=(0.0,25.0,0.0) radius=24.5 notplot add sel geom black black cid on scale=0.03sel node init zpos add -25.0;如何显示某一平面plot create name_planeplot set plane origin 3 4 0 normal 1 0 0plot add cont disp plane behind shade onplot add sel geom blackplot add axes redplot current name_planeplot show;如何施加法向应力并显示所施加的力apply nstress -3.0E7 range cylinder end1 0 -1 0 end2010 radius 39.9 not;柱体外表面施加法向力apply nstress -5.0E6 range cylinder end1 0 -1 0 end2010 radius 2.1;柱体内表面施加法向力plot grid green fap black;显示施加的力;获取某网格点的ID,坐标值def aaget_id=gp_id(gp_near(3,0,0))endaaprint get_idprint gp position range id 3;保存命令流文件set log onset logfile hua.log;文件存放的路径与调用的文本路径相同......set log off;fish函数的说明与解释def find_add ;定义fish函数find_addhead = null ;给head赋值p_gp = gp_head ;第一个网格结点的指针赋给p_gploop_while p_gp # null ;当p_gp值不为null时作循环x_pos = gp_xpos(p_gp) ;将指针为p_gp的结点的x坐标值赋给x_posif x_pos = 10.0 then ;如果x_pos = 10.0 则(执行)new = get_mem(2) ;从主内存空间里得到2个fish变量对象并返回第一个对象的开始地址mem(new) = head ;将head类型和数值置于地址为new的fish 变量mem(new+1)=p_gp ;第二个变量存储符合条件的zone地址head = new ;将new值赋给headendifp_gp = gp_next(p_gp) ;将结点指针为p_gp的下一个结点的指针赋给p_gp endloop;结束循环end ;结束fish函数;实际上这个fish函数为满足条件(x坐标为10的)的zone的地址开辟一定的地址空间,各地址之间存在一定的联系;找到第一个符合条件的zone地址后,用new = get_mem(2) 从主内存空间里得到2个fish变量对象并返回第一个对象的开始地址,并用;下面的mem(new) = head ,将第一次开辟的两个变量的第一个变量存储地址head(注意第一次head =null),第二个变量存储第一;个符合条件的zone地址,并将第一个变量的地址赋予head(head =new),第一次循环结束;下次循环,同样开辟两个变量对象,第;一个变量对象记录上次循环开辟的第一个变量的地址,第二个记录第二个符合条件的zone地址,其余循环依次类推,这样子就建立了;一个符合条件的zone地址链条,方便以后使用。

Flac3D命令--完整经典版

Flac3D命令--完整经典版

27. ID号查询通过标题栏查看或者执行【Plotitems】/【1 Block group】/【Modify】命令中
grid_point ID’s 28. 建立接触面单元的各类方法(桩的接触面桩端和桩侧最好采用不同id号的接触面单元) 接触面参数的选取见文件155页9.51。接触面有关的常用命令9.7 162页。 ① 移来移去法:两个模型分开,一个建立接触面单元,然后移动使两个模型合并。
PLOT block group 查看计算模型 Ctrl+G 变成灰色图像
25. 采用 2 种方式观察网格节点速度: : HIST gpvel<x y z>记录某个节点的速度; PLOT
vel 命令绘制完整的速度矢量场图;力平衡时,由于网格节点力不为零就存在网
格节点速度,仍有可能产生较大位移。 26. 初始地应力场:通常用的是以下三种方法,即弹性求解法、改变参数的弹塑性求解法
定义群组方法!
Gen zone brick size 3 3 3 ; group 2 range x 1 2 y 1 2 z 1 2 ; group 1 range group 2 not
删除其它群组 只保留群组2
del ran group 2 not
Plot blo gro range group dam只显示dam组的单元
6 5 所以 xx 为: xx =-10 10 +10 z ;原点(0,0,0)
14. free x range x -.1 .1 z 6.9 10.1放松x=0 平面上,z=7,10 这一部分在x 方向的约 束(可以在此处产生破坏) 15. 体积模量K和剪切模量G与杨氏模量及泊松比v之间的转换关系如下:
之后重新打开6-2.log

flac3D模拟地面曲面方程命令流

flac3D模拟地面曲面方程命令流

newgen zone brick p0 0,167.0072,0 p1 0,0,0 p2 242.6586,167.0072,0 p3 0,167.0072,32.0 size 56,81,11;;定义地面曲面方程DEF eqn537ARRAY c(45),cx(12),cy(12),v(70)c(1)=30.33465961749452c(2)=0.3768529280014758c(3)=-1.411874011262434c(4)=-0.4466983009380354c(5)=0.02498771591159658c(6)=-0.6225933592839830c(7)=-0.5572409253529970c(8)=0.2594590432443336c(9)=-0.2154254299775080c(10)=0.05611608056180144c(11)=-0.3573754488804990c(12)=0.02174566734976303c(13)=0.4051641051840550c(14)=0.1744265369646383c(15)=0.1147014441688443c(16)=-0.2088509864184064c(17)=0.1493365036211442c(18)=0.4311419368791974c(19)=0.008961362272148653c(20)=-0.07774920998867369c(21)=0.1811142002504400c(22)=-0.1519527001982752c(23)=0.07915472779033880c(24)=0.2559732910968667c(25)=0.1026065146630541c(26)=-0.2819625969135452c(27)=-0.09027129904676756c(28)=0.1130183438471391c(29)=-0.02169639756233838c(30)=0.1907291399047935c(31)=0.1297366637584324c(32)=0.08806739336824376c(33)=-0.2260336878126227c(34)=-0.2115733057775976c(35)=0.1148217058529207c(36)=-0.06508949301229160c(37)=-0.04511427839772801c(38)=0.1632228872577737c(39)=0.1931691979495782c(40)=0.08562312402296863c(41)=0.01872590692817278c(42)=-0.04198182565657024c(43)=0.04502760175694480c(44)=0.1160322072269608c(45)=-0.07952377661820480order%=44x=(x-(0.000000000000000))/(77.24063134751799) y=(y-(0.000000000000000))/(53.16004282387357) IF x<0.0 THENx=0.0END_IFIF x>3.14159265358979323846 THENx=3.14159265358979323846END_IFIF y<0.0 THENy=0.0END_IFIF y>3.14159265358979323846 THENy=3.14159265358979323846END_IFnc%=8cx(1)=1.0cy(1)=1.0LOOP j% (1,nc%)cx(j%+1)=COS(j%*x)cy(j%+1)=COS(j%*y)END_LOOPiv%=1LOOP j% (1,nc%+1)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v(iv%)=cx(m%%)*cy(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c(j%)*v(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn537就可以得到X,Y对应的Z;;定义第1层底面曲面方程DEF eqn566ARRAY c1(36),cx1(12),cy1(12),v1(70)c1(1)=28.62060766890477c1(2)=0.2866834946597056c1(3)=-0.8353575191107516c1(4)=-0.04915431878961194c1(5)=0.4039755560498526c1(6)=-0.3362136646742352c1(7)=-0.2665446036102640c1(8)=0.01228084747342192c1(9)=-0.2228703607987686c1(10)=-0.1056397207500379c1(11)=-0.01267143831082441c1(12)=-0.1996293677009942c1(13)=-0.06064874974162015c1(14)=-0.2080253561904090c1(15)=0.03108780356779321c1(16)=0.05965985858539676c1(17)=0.04285379002151423c1(18)=0.3260634131778066c1(19)=0.03617992023477324c1(20)=0.02800173263537663c1(21)=0.05300528967296362c1(22)=-0.07147038182113627c1(23)=0.09423171997760518c1(24)=-0.008003820958046695c1(25)=0.03654771159807278c1(26)=0.04195809554079616c1(27)=0.01776731215338432c1(28)=0.07995229437423655c1(29)=0.01184899721780239c1(30)=0.1914904626951018c1(31)=-0.03834379592630702c1(32)=-0.04935320463957614c1(33)=-0.04246583589991888c1(34)=-0.07508761240626857c1(35)=0.08511394861034457c1(36)=0.03158468483322942order%=35x=(x-(0.000000000000000))/(77.24063134751799)y=(y-(0.000000000000000))/(53.16004282387357)IF x<0.0 THENx=0.0END_IFIF x>3.14159265358979323846 THENx=3.14159265358979323846END_IFIF y<0.0 THENy=0.0END_IFIF y>3.14159265358979323846 THENy=3.14159265358979323846END_IFnc%=7cx1(1)=1.0cy1(1)=1.0LOOP j% (1,nc%)cx1(j%+1)=COS(j%*x)cy1(j%+1)=COS(j%*y)END_LOOPiv%=1LOOP j% (1,nc%+1)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v1(iv%)=cx1(m%%)*cy1(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c1(j%)*v1(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn536就可以得到X,Y对应的Z;;定义第2层底面曲面方程DEF eqn607ARRAY c2(45),px(12),py(12),v2(70)c2(1)=26.40374776302957c2(2)=-1.292234879166614c2(3)=-0.9987652673592940c2(4)=0.08847151489382983c2(5)=-6.524125629419486c2(6)=0.4002923561445450c2(7)=0.3031713620939287c2(8)=0.9293011989675050c2(9)=1.028374487465087c2(10)=0.7894526930446397c2(11)=-0.2710341955836033c2(12)=-1.833585849910791c2(13)=-0.6799558584481914c2(14)=1.202068992799922c2(15)=-0.6569131952237344c2(16)=1.079058946133437c2(17)=1.286040305186933c2(18)=0.3587835487607498c2(19)=-0.3055218324008147c2(20)=1.320108378629063c2(21)=1.360836777714370c2(22)=-1.086438562691549c2(23)=2.885522086015947c2(24)=-0.6574447894560952c2(25)=1.428461008364791c2(26)=0.8792263637632590c2(27)=0.3263370530986411c2(28)=-0.8544593089642435c2(29)=0.8177299018417186c2(30)=-0.8210160246224562c2(31)=0.2959394968085911c2(32)=-0.1081689772714739c2(33)=-1.546682781919654c2(34)=-0.8887755964444086c2(35)=-0.1826536331301314c2(36)=0.01080252224961026c2(37)=-0.2510335500991192c2(38)=1.172841958315430c2(39)=0.1775850816862299c2(40)=-2.437087642643127c2(41)=0.7305789703698950c2(42)=0.3321145625443073c2(43)=0.9669041422660922c2(44)=0.3462785144789184c2(45)=0.7677956032753429order%=44x=(x-(121.3293000000000))/(121.3293000000000) y=(y-(83.50360000000001))/(83.50360000000001) pcnt%=9px(1)=1.0py(1)=1.0px(2)=xpy(2)=yLOOP j% (3,pcnt%)ctr=-1.0+(j%-2)*(2.0/((pcnt%)-1.0))px(j%)=-1.0+2.0/(1.0+EXP(-(x-ctr)/0.12))py(j%)=-1.0+2.0/(1.0+EXP(-(y-ctr)/0.12))END_LOOPiv%=1LOOP j% (1,pcnt%)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v2(iv%)=px(m%%)*py(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c2(j%)*v2(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn607就可以得到X,Y对应的Z;;定义第3层底面曲面方程DEF eqn609ARRAY c3(66),px1(12),py1(12),v3(70)c3(1)=21.82428275547068c3(2)=2.221561754167763c3(3)=-1.581903359451976c3(4)=-2.316827507113655c3(5)=-2.703947398487063c3(6)=-1.246037280331843c3(7)=3.972251865856556c3(8)=-2.339997159259053c3(9)=-4.751446231799969c3(10)=2.238112737137326c3(11)=-2.307007727942070c3(12)=2.704352656458496c3(13)=6.218021412068429c3(14)=6.082322362020687c3(15)=-1.781025552909750c3(16)=1.595374835381855 c3(17)=5.083409370236106 c3(18)=-12.05561353031727 c3(19)=-8.149539051933758 c3(20)=0.4629435785333617 c3(21)=3.854808615283558 c3(22)=-3.172213655564220 c3(23)=-7.493360842439101 c3(24)=18.03955724690294 c3(25)=15.92195138603906 c3(26)=5.276624705110507 c3(27)=4.834416374228492 c3(28)=-2.941631600267834 c3(29)=3.061011978625018 c3(30)=6.894707465545384 c3(31)=-19.55553399652331 c3(32)=-25.47011892985832 c3(33)=-8.508414420882716 c3(34)=-4.573107121770635 c3(35)=-2.159206741489122 c3(36)=3.630405781581091 c3(37)=-1.716300833677144 c3(38)=-1.710288020840512 c3(39)=13.39520120547237 c3(40)=26.62167851961098 c3(41)=9.133569050067894 c3(42)=2.465816025684572 c3(43)=5.760745683031747 c3(44)=3.387751985565470 c3(45)=-1.998506978790600 c3(46)=-0.1436671749659344 c3(47)=2.673753603392002 c3(48)=-3.414672834039968 c3(49)=-15.30717986499453 c3(50)=-5.830362201304671 c3(51)=-3.098553183952314 c3(52)=-3.214301500075056 c3(53)=-5.189989905517706 c3(54)=-2.615833247036465 c3(55)=-1.193013094987004 c3(56)=-0.7338348280336195 c3(57)=-3.104568370286748 c3(58)=2.461134976780746 c3(59)=-0.1212695917749639c3(61)=0.1069957611943741c3(62)=0.08016486985274109c3(63)=1.469897902470722c3(64)=2.589098244341164c3(65)=-0.3343748291798312c3(66)=0.2399906858052758order%=65x=(x-(121.3293000000000))/(121.3293000000000)y=(y-(83.50360000000001))/(83.50360000000001)pcnt%=11px1(1)=1.0py1(1)=1.0px1(2)=xpy1(2)=yLOOP j% (3,pcnt%)ctr=-1.0+(j%-2)*(2.0/((pcnt%)-1.0))px1(j%)=-1.0+2.0/(1.0+EXP(-(x-ctr)/0.12))py1(j%)=-1.0+2.0/(1.0+EXP(-(y-ctr)/0.12))END_LOOPiv%=1LOOP j% (1,pcnt%)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v3(iv%)=px1(m%%)*py1(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c3(j%)*v3(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn609就可以得到X,Y对应的Z;;定义第4层底面曲面方程DEF eqn647ARRAY c4(45),px2(12),py2(12),v4(70)c4(1)=16.51574728830774c4(2)=8.481819615214282c4(3)=-3.667837893737652c4(4)=-1.010147677874144c4(6)=2.859596834356271c4(7)=-3.646520516107740c4(8)=6.321542247566494c4(9)=0.9468885466021906c4(10)=-2.603128658488296c4(11)=2.789255550847234c4(12)=-5.063391313325403c4(13)=-7.816811*********c4(14)=0.1179808634447021c4(15)=2.183144891755160c4(16)=-4.880258774727156c4(17)=6.932711951371074c4(18)=8.356668622385615c4(19)=9.728015975384804c4(20)=4.111909*********c4(21)=-1.067831605989066c4(22)=-0.1492474908243882c4(23)=-1.475387582767732c4(24)=-8.540236196208839c4(25)=-7.607350382812288c4(26)=-6.131205607437898c4(27)=-1.798402860158502c4(28)=2.013777718075667c4(29)=1.004780625897299c4(30)=0.5983682412217969c4(31)=6.653166108229425c4(32)=4.912044038754614c4(33)=4.128322384700006c4(34)=1.441712593628123c4(35)=3.682787289784820c4(36)=-0.1607561542756254c4(37)=-3.350598621739896c4(38)=-0.5955339631950143c4(39)=-0.9334402508338080c4(40)=-4.554640680702316c4(41)=-2.239292821308058c4(42)=-1.044957813184814c4(43)=-1.191203261160415c4(44)=-1.074332064607540c4(45)=-1.236508*********order%=44x=(x-(121.3293000000000))/(121.3293000000000) y=(y-(83.50360000000001))/(83.50360000000001)pcnt%=9px2(1)=1.0py2(1)=1.0px2(2)=xpy2(2)=yLOOP j% (3,pcnt%)ctr=-1.0+(j%-2)*(2.0/((pcnt%)-1.0))px2(j%)=-1.0+2.0/(1.0+EXP(-(x-ctr)/0.12))py2(j%)=-1.0+2.0/(1.0+EXP(-(y-ctr)/0.12))END_LOOPiv%=1LOOP j% (1,pcnt%)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v4(iv%)=px2(m%%)*py2(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c4(j%)*v4(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn607_1就可以得到X,Y对应的Z;;定义第5层底面曲面方程DEF eqn539ARRAY c5(66),cx2(12),cy2(12),v5(70)c5(1)=12.46757433030045c5(2)=-0.1837401970732732c5(3)=0.1244718313263216c5(4)=1.360317789691377c5(5)=0.03670244940378286c5(6)=-0.3929288675455578c5(7)=0.6813414126058451c5(8)=-1.243793371076291c5(9)=0.1571385882502009c5(10)=0.8645657477077630c5(11)=-0.07721013570066108c5(12)=-0.8246000899025887c5(13)=-0.7667478702687463c5(14)=-0.4238495669916415c5(15)=-0.3470164206453290 c5(16)=-0.2308008353067150 c5(17)=0.3047332867694997c5(18)=0.04786487233421352 c5(19)=0.02437885997197733 c5(20)=1.005335160651844c5(21)=0.1347086174908364c5(22)=0.1827288378125155c5(23)=0.4512476378885094c5(24)=-0.2086195570817916 c5(25)=0.01841241922208219 c5(26)=-0.2161606755645438 c5(27)=-0.1377323700049860 c5(28)=0.06939079925847355 c5(29)=-0.03701940385138101 c5(30)=0.04525820353666137 c5(31)=0.2527778339295889c5(32)=-0.2849534792975533 c5(33)=-0.4064798704432816 c5(34)=0.1439473561975002c5(35)=-0.08144447064803531 c5(36)=-0.1083941716069668 c5(37)=-0.09191814108869532 c5(38)=-0.07623913186584340 c5(39)=0.1872123003713900c5(40)=0.2937085387189336c5(41)=0.3246583416330606c5(42)=0.1056024996775832c5(43)=0.02694070604772956 c5(44)=-0.01994123610332108 c5(45)=0.04503556233487070 c5(46)=-0.1597645291308264 c5(47)=0.09346743212175132 c5(48)=0.1068950871101664c5(49)=-0.1664265430835872 c5(50)=-0.2983469687870644 c5(51)=-0.08662206908082925 c5(52)=0.01151032186140416 c5(53)=0.002366112743592199 c5(54)=-0.05313250153282422 c5(55)=-0.03471919282692038 c5(56)=-0.07838388113408310 c5(57)=-0.2368158638409404 c5(58)=-0.009811188385974126c5(59)=0.1127955556809826c5(60)=-0.01051517059592323c5(61)=-0.1348723131263226c5(62)=-0.03857247913426454c5(63)=0.02789473346061746c5(64)=-0.05791922373046805c5(65)=0.1349455338511324c5(66)=0.05096980433853915order%=65x=(x-(0.000000000000000))/(77.24063134751799) y=(y-(0.000000000000000))/(53.16004282387357) IF x<0.0 THENx=0.0END_IFIF x>3.14159265358979323846 THENx=3.14159265358979323846END_IFIF y<0.0 THENy=0.0END_IFIF y>3.14159265358979323846 THENy=3.14159265358979323846END_IFnc%=10cx2(1)=1.0cy2(1)=1.0LOOP j% (1,nc%)cx2(j%+1)=COS(j%*x)cy2(j%+1)=COS(j%*y)END_LOOPiv%=1LOOP j% (1,nc%+1)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v5(iv%)=cx2(m%%)*cy2(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c5(j%)*v5(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn539就可以得到X,Y对应的Z;;定义第6_1层顶曲面方程DEF eqn667ARRAY c6(45),px3(12),py3(12),v6(70)c6(1)=7.624187785003617c6(2)=-3.050916365466655c6(3)=4.715623565682071c6(4)=1.150203685511211c6(5)=19.78854449764394c6(6)=-0.8591110280959800c6(7)=-1.836446279164688c6(8)=-2.198068880043667c6(9)=-2.344035766639244c6(10)=0.5054660054735412c6(11)=4.745678110931020c6(12)=-6.574483438042562c6(13)=0.4400781354642950c6(14)=-0.06928018588294413c6(15)=-1.019323558120959c6(16)=-2.214601*********c6(17)=4.275290862973770c6(18)=1.126192256012648c6(19)=-2.466365976736742c6(20)=-0.5207542531518413c6(21)=0.2940883297455446c6(22)=4.918667322336324c6(23)=-7.195391066222033c6(24)=-2.382568946375032c6(25)=3.644931434258130c6(26)=3.217351831862294c6(27)=-1.833453928443330c6(28)=-0.2672257089517018c6(29)=-6.653964867165826c6(30)=-2.205782882099073c6(31)=2.784608367766540c6(32)=-2.344465916240516c6(33)=-3.875388919191354c6(34)=-2.809373409966955c6(35)=-0.9380865554250778c6(36)=0.2226848974840235c6(37)=7.018393083172316c6(38)=-0.2589127357750816c6(40)=0.5868395958804969c6(41)=1.513338906997458c6(42)=3.334284254830453c6(43)=0.8170291048263185c6(44)=0.4206511965965143c6(45)=0.4768734245101601order%=44x=(x-(121.3293000000000))/(121.3293000000000)y=(y-(34.31660000000000))/(34.31660000000000)pcnt%=9px3(1)=1.0py3(1)=1.0px3(2)=xpy3(2)=yLOOP j% (3,pcnt%)ctr=-1.0+(j%-2)*(2.0/((pcnt%)-1.0))px3(j%)=-1.0+2.0/(1.0+EXP(-(x-ctr)/0.12))py3(j%)=-1.0+2.0/(1.0+EXP(-(y-ctr)/0.12))END_LOOPiv%=1LOOP j% (1,pcnt%)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v6(iv%)=px3(m%%)*py3(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c6(j%)*v6(j%)END_LOOPEND;;地面曲面方程定义完毕;;找出节点坐标后只要给出X,Y,然后调用eqn667就可以得到X,Y对应的Z;;定义第6_1层底曲面方程DEF eqn536ARRAY c7(36),cx3(12),cy3(12),v7(70)c7(1)=1.774342487947716c7(2)=-2.158530750953510c7(3)=-0.8993291094523696c7(4)=0.3127732432393986c7(6)=0.4938117350156593c7(7)=0.4052145775896955c7(8)=-1.457655313430669c7(9)=-0.5213406753605253c7(10)=-0.2371223066326000c7(11)=0.3144755738926887c7(12)=0.9870034107674036c7(13)=0.1802001324375446c7(14)=0.3067028686143818c7(15)=0.1032107194028478c7(16)=-0.8759378120079421c7(17)=-0.4797277324755136c7(18)=-0.2047195193131083c7(19)=-0.1959743777703360c7(20)=-0.1054725853615441c7(21)=-0.04762465368855919c7(22)=0.7436428060349178c7(23)=0.2774606788980370c7(24)=0.09013262111206960c7(25)=0.1099648154666769c7(26)=0.03221158011598174c7(27)=0.05372176211518076c7(28)=0.02847824393486886c7(29)=-0.2367714251555818c7(30)=-0.2176270816351072c7(31)=0.2174022974201222c7(32)=0.01904982353914875c7(33)=-0.008666938977962124c7(34)=-0.03669352556518482c7(35)=-0.01818192316785202c7(36)=-0.02887275864448221order%=35x=(x-(0.000000000000000))/(77.24063134751799) y=(y-(0.000000000000000))/(21.84662608042934) IF x<0.0 THENx=0.0END_IFIF x>3.14159265358979323846 THENx=3.14159265358979323846END_IFIF y<0.0 THENy=0.0END_IFIF y>3.14159265358979323846 THEN y=3.14159265358979323846END_IFnc%=7cx3(1)=1.0cy3(1)=1.0LOOP j% (1,nc%)cx3(j%+1)=COS(j%*x)cy3(j%+1)=COS(j%*y)END_LOOPiv%=1LOOP j% (1,nc%+1)m%%=j%+1LOOP m% (1,j%)m%%=m%%-1v7(iv%)=cx3(m%%)*cy3(j%-m%%+1)iv%=iv%+1END_LOOPEND_LOOPz=0.0LOOP j% (1,order%+1)z = z + c7(j%)*v7(j%)END_LOOPEND;下面的代码调整地层界限DEF DiCengpnt=gp_headloop while pnt # nullx0=gp_xpos(pnt)y0=gp_ypos(pnt)z0=gp_zpos(pnt)x=x0y=y0eqn537IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn566IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn607IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn609IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn647IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn539IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn667IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFx=x0y=y0eqn536IF abs(z-z0)<1.0 thengp_zpos(pnt)=zEND_IFpnt=gp_next(pnt)END_LOOPENDDiCeng;;6_1层底曲面方程eqn536 ;;6_1层顶曲面方程eqn667 ;;5层底面曲面方程eqn539;;4层底面曲面方程eqn647;;3层底面曲面方程eqn609;;2层底面曲面方程eqn607;;1层底面曲面方程eqn566;;;;;地面曲面方程eqn537;下面的代码读取zone的中心点坐标,如果z在两个面之间,则可相应的把该zone归为相应的groupDEF Zupnt=zone_headloop while pnt # nullx0=z_xcen(pnt)y0=z_ycen(pnt)z0=z_zcen(pnt)xuhao=z_id(pnt);**********************************************; x=x0; y=y0; eqn537 ;地面; z1=z; if z0>z1 then; if z1<32.0 then;**********************************************;判断是否为第①层土x=x0y=y0eqn566 ;1层底面z2=zif z0>z2 thenif z0<32.0 thencommandgroup a1 range id xuhaoendcommandend_ifend_if;**********************************************;判断是否为第②层土x=x0y=y0eqn607 ;2层底面z1=zif z0>z1 thenif z0<z2 thencommandgroup a2 range id xuhaoendcommandend_ifend_if;********************************************** ;判断是否为第③层土x=x0y=y0eqn609 ;3层底面z2=zif z0>z2 thenif z0<z1 thencommandgroup a3 range id xuhaoendcommandend_ifend_if;********************************************** ;判断是否为第④层土x=x0y=y0eqn647 ;4层底面z1=zif z0>z1 thenif z0<z2 thencommandgroup a4 range id xuhaoendcommandend_ifend_if;********************************************** ;判断是否为第⑤层土x=x0y=y0eqn539 ;5层底面z2=zif z0>z2 thenif z0<z1 thencommandgroup a5 range id xuhaoendcommandend_ifend_if;**********************************************;判断是否为第⑥_1层土;;6_1层底曲面方程eqn536;;6_1层顶曲面方程eqn667x=x0y=y0eqn667z1=zx=x0y=y0eqn536z2=zif z2<z1 thenif z0>z2 thenif z0<z1 thenif y0<82.0 thencommandgroup a61 range id xuhaoendcommandend_ifend_ifend_ifend_if;*********************************************** pnt=z_next(pnt)end_loopendZugroup a6 range group a1 not &group a2 not &group a3 not &group a4 not &group a5 not &group a61 not &group jk1 not &group jk2 not &group jk3 not &group jk4 not &group jk5 not &group jk6 not &group jk7 notplot bl group。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

第1部分命令流按照顺序进行2-1定义一个FISH函数newdef abcabc = 25 * 3 + 5Endprint abc2-2使用一个变量newdef abchh = 25abc = hh * 3 + 5EndPrint hhPrint abc2-3对变量和函数的理解newdef abchh = 25abc = hh * 3 + 5Endset abc=0 hh=0print hhprint abcprint hhnewdef abcabc = hh * 3 + 5endset hh=25print abcset abc=0 hh=0print hhprint abcprint hh2-4获取变量的历史记录newgen zone brick size 1 2 1model mohrprop shear=1e8 bulk=2e8 cohes=1e5 tens=1e10fix x y z range y -0.1 0.1apply yvel -1e-5 range y 1.9 2.1plot set rotation 0 0 45plot block groupdef get_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_addef loadload=gp_yfunbal(ad1)+gp_yfunbal(ad2)+gp_yfunbal(ad3)+gp_yfunbal(ad4) endhist loadhist gp ydis 0,2,0step 1000plot his 1 vs -22-5用FISH函数计算体积模量和剪砌模量newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25deriveprint b_modprint s_mod2-6 在FLAC输入中使用符号变量Newdef derives_mod = y_mod / (2.0 * (1.0 + p_ratio))b_mod = y_mod / (3.0 * (1.0 - 2.0 * p_ratio))endset y_mod = 5e8 p_ratio = 0.25derivegen zone brick size 2,2,2model elasticprop bulk=b_mod shear=s_modprint zone prop bulkprint zone prop shear2-7 控制循环Newdef xxxsum = 0prod = 1loop n (1,10)sum = sum + nprod = prod * nend_loopendxxxprint sum, prodnewgen zone brick p0 (0,0,0) p1 (-10,0,0) p2 (0,10,0) p3 (0,0,-10) model elasplot set rotation 0 0 45plot block groupdef installpnt = zone_headloop while pnt #nullz_depth = -z_zcen(pnt)y_mod = y_zero + cc * sqrt(z_depth)z_prop(pnt, ’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_loopendset p_ratio=0.25 y_zero=1e7 cc=1e8install2-8 拆分命令行new ;example of a sum of many thingsdef long_sumtemp = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 long_sum = temp + v11 + v12 + v13 + v14 + v15end2-9 变量类型newdef haveoneaa = 2bb = 3.4cc = ’Have a nice day’dd = aa * bbee = cc + ’, old chap’endhaveoneprint fish2-10 IF条件语句newdef abcif xx > 0 thenabc = 1000elseabc = -1000end_ifendset xx = 10print abcset xx = 0print abc2-11 索单元自动生成newgen zone brick size 10 3 5plot set rotation 0 0 45plot block groupdef place_cablesloop n (1,5)z_d = float(n) - 0.5commandsel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7 end_commandend_loopendplace_cablesplot grid sel geom rednewgen zone brick size 10 3 5plot set rotation 15 0 60plot block groupmod mohrprop bulk 1e8 shear .3e8 fric 35prop coh 1e3 tens 1e3ini dens 1000set grav 0,0,-10fix x y z range z -.1 .1fix y range y -.1 .1fix y range y 2.9 3.1fix x range x -.1 .1fix x range x 9.9 10.1set largehist unbalsolvesave cab_str.savini xdis 0 ydis 0 zdis 0hist gp xdisp 0,1,5def place_cablesloop n (1,5)z_d = 5.5 - float(n)z_t = z_d + 0.5z_b = z_d - 0.5commandfree x range x -.1,.1 z z_b z_tsolvesel cable beg 0.0,0.5,z_d end 7.0,0.5,z_d nseg 7sel cable beg 0.0,1.5,z_d end 7.0,1.5,z_d nseg 7sel cable beg 0.0,2.5,z_d end 7.0,2.5,z_d nseg 7sel cable prop emod 2e10 ytension 1e8 xcarea 1.0 &gr_k 2e10 gr_coh 1e10 gr_per 1.0end_commandend_loopendplace_cablessave cab_end.savplot sketch sel cable force red2-12圆形隧道开挖模拟计算;建立模型gen zon radcyl p0 0 0 0 p1 6 0 0 p2 0 1 0 p3 0 0 6 &size 4 2 8 4 dim 3 3 3 3 rat 1 1 1 1.2 group outsiderockgen zone cshell p0 0 0 0 p1 3 0 0 p2 0 1 0 p3 0 0 3 &size 1 2 8 4 dim 2.7 2.7 2.7 2.7 rat 1 1 1 1 group concretliner fill group insiderock gen zon reflect dip 90 dd 90 orig 0 0 0gen zon reflect dip 0 dd 0 ori 0 0 0gen zon brick p0 0 0 6 p1 6 0 6 p2 0 1 6 p3 0 0 13 size 4 2 6 group outsiderock1 gen zon brick p0 0 0 -12 p1 6 0 -12 p2 0 1 -12 p3 0 0 -6 size 4 2 5 group outsiderock2 gen zon brick p0 6 0 0 p1 21 0 0 p2 6 1 0 p3 6 0 6 size 10 2 4 group outsiderock3 gen zon reflect dip 0 dd 0 orig 0 0 0 range group outsiderock3gen zon brick p0 6 0 6 p1 21 0 6 p2 6 1 6 p3 6 0 13 size 10 2 6 group outsiderock4gen zon brick p0 6 0 -12 p1 21 0 -12 p2 6 1 -12 p3 6 0 -6 size 10 2 5 group outsiderock5 gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z 6.1 13.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x -0.1 6.1 z -6.1 -12.1gen zon reflect dip 90 dd 90 orig 0 0 0 range x 6.1 21.1 z -12.1 13.1;绘制模型图plot block groupplot add axes red;plot set rotation 0 0 45 用于显示三维模型;设置重力set gravity 0 0 -10;给定边界条件fix z range z -12.01,-11.99fix x range x -21.01,-20.99fix x range x 20.99,21.01fix y range y -0.01 0.01fix y range y 0.99,1.01;求解自重应力场model mohrini density 1800 ;围岩的密度prop bulk=1.47e8 shear=5.6e7 fric=20 coh=5.0e4 tension=1.0e4 ;体积、剪切、摩擦角、凝聚力、抗拉强度set mech ratio=1e-4solvesave Gravsol.savplot cont zdisp outl onplot cont szz;毛洞开挖计算initial xdisp=0 ydisp=0 zdisp=0model null range group insiderock any group concretliner anyplot block groupplot add axes redset mech ratio=5e-4solvesave Kaiwsol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;模筑衬砌计算model elas range group concretliner anyplot block groupplot add axes redini density 2500 range group concretliner any ;衬砌混凝土的密度prop bulk=16.67e9,shear=12.5e9 range group concretliner any ;衬砌混凝土的体积弹模、剪切弹模set mech ratio=1e-4solvesave zhihusol.savplot cont zdispplot cont sdispplot cont szzplot cont xzz;完成计算分析。

相关文档
最新文档