1 表格创立程序
;----------------CREAT THE TABLE DATA---------------
;In order to employ the topo.fis,several tables are
;required. The style of the table is the same as the
;tables in the file "Topotab.dat"
;---------------------------------------------------
def creat_table
;paremeters list
;TAB_NUM---the number of the tabs created
; the tab_num here equals to the number
; of colums(y).Ref to the topotab.dat
;ROW_NUM,COL_NUM
status = open(Tablefile, IO_WRITE, IO_ASCII)
Index=1
;for debud
n_zone_col=Col_Num
n_zone_row=Row_Num
;prepare for the data to be exported
loop ii (1,ROW_NUM)
loop kk (1,COL_NUM)
n=ii*ROW_NUM+kk
sOut(Index)='Table'+' '+string(ii)+' '+string(x_cor(Index)) + ' ' + string(zg_cor(Index))
Index=Index+1
endloop
endloop
startnum = ROW_NUM + 1
endnum = ROW_NUM*2
totalnum = ROW_NUM*COL_NUM
loop ii (startnum,endnum)
loop kk (1,COL_NUM)
sOut(Index)='Table'+' '+string(ii)+' '+string(x_cor(Index - totalnum)) + ' ' + string(zr_cor(Index - totalnum))
Index=Index+1
endloop
endloop
startnum = ROW_NUM*2 + 1
endnum = ROW_NUM*3
totalnum = ROW_NUM*COL_NUM
loop ii (startnum,endnum)
loop kk (1,COL_NUM)
sOut(Index)='Table'+' '+string(ii)+' '+string(x_cor(Index - 2*totalnum)) + ' ' + string(zk_cor(Index - 2*totalnum))
Index=Index+1
endloop
endloop
TotalWriteNum=n_zone_col*n_zone_row*3
status = write(sOut, TotalWriteNum)
if status >= TotalWriteNum then
oo = out(' Bad number of lines')
endif
status = close
end
2.主程序
new
def para_set
suferfile = 'Sufer_Data.dat' ;File from Sufer which contains the layers' coords.
Tablefile = 'Table_data.dat' ;File which contains the table.
AnsysFile = 'Ansys_Model.dat' ;Ansys Model
D3DECFile = 'D3dec_Model.dat' ;3dec Model
FlacFile = 'Flac3D_Model.dat' ;Flac3D Model
Col_Num = 36 ;number of elements in x-direction
Row_Num = 26 ;number of elements in y-direction
dx_size = 2
dy_size = 2
z_base = 0.0
z_size = 10
xor = 0.0
yor = 0.0
n_zon_col = Col_Num - 1
n_zon_row = Row_Num - 1
xdiv = 1
ydiv = 1
zdiv = 2
end
para_set
;==============================================================
cal 01_Surfer_To_Table.fis
read_data ;------------ [ read sufer network information! ]
cal 02_creat_table.fis
creat_table ;------------ [ creat table " MyTopoTab.dat " ! ]
cal Tablefile
cal 03_Gen_FlacModel.fis
cal 04_Gen_AnsysModel.fis
cal 05_Gen_3DECModel.fis
;===============================================================
new
pause
cal Flac3D_Model.dat
3 FLAC 网格建立程序
; Fish function to generate a model surface
; from a topographic map
;
; FISH variables:
; dx_size : element size in x-direction
; dy_size : element size in y-direction
; n_zon_col : number of elements in x-direction
; n_zon_row : number of elements in y-direction
; z_base : elevation (in z-direction) of base of brick primitive
; z_size : number of elements in z-direction
; xor : minimum x-coordinate
; yor : minimum y-coordinate
; Enter the command TOPO to invoke this function
;
def WriteFlac3D
status = open(FlacFile, IO_WRITE, IO_ASCII)
array Layer1(1)
array Layer2(1)
array Layer3(1)
loop i (1,n_zon_col)
loop j(1,n_zon_row)
x1=xor+dx_size*(i-1)
x2=x1+dx_size
y1=yor+dy_size*(j-1)
y2=y1+dy_size
zg1=table(j,x1)
zg2=table(j+1,x1)
zg3=table(j+1,x2)
zg4=table(j,x2)
zr1=table(j+n_zon_row,x1)
zr2=table(j+n_zon_row+1,x1)
zr3=table(j+n_zon_row+1,x2)
zr4=table(j+n_zon_row,x2)
;command
; ;-------------------------------------------------------------
; gen zon wedge p0 x1 y1 zr1 p1 x1 y2 zr2 p2 x1 y1 zg1 p3 x2 y1 zr4 &
; p4 x1 y2 zg2 p5 x2 y1 zg4 size ydiv zdiv xdiv
; gen zon wedge p0 x2 y1 zr4 p1 x1 y2 zr2 p2 x2 y1 zg4 p3 x2 y2 zr3 &
; p4 x1 y2 zg2 p5 x2 y2 zg3 size ydiv zdiv xdiv
; ;-------------------------------------------------------------
;end_command
Layer1(1) = 'gen zon wedge p0 '+ string(x1) + ' ' + string(y1) + ' ' + string(zr1)
Layer1(1) = Layer1(1) + ' p1 '+ string(x1) + ' ' + string(y2) + ' ' + string(zr2)
Layer1(1) = Layer1(1) + ' p2 '+ string(x1) + ' ' + string(y1) + ' ' + string(zg1)
Layer1(1) = Layer1(1) + ' p3 '+ string(x2) + ' ' + string(y1) + ' ' + string(zr4) + ' & '+ '\n'
Layer1(1) = Layer1(1) + ' p4 '+ string(x1) + ' ' + string(y2) + ' ' + string(zg2)
Layer1(1) = Layer1(1) + ' p5 '+ string(x2) + ' ' + string(y1) + ' ' + string(zg4)
Layer1(1) = Layer1(1) + ' size '+ string(ydiv) + ' ' + string(zdiv) + ' ' + string(xdiv) + ' \n'
Layer1(1) = Layer1(1) + 'gen zon wedge p0 '+ string(x2) + ' ' + string(y1) + ' ' + string(zr4)
Layer1(1) = Layer1(1) + ' p1 '+ string(x1) + ' ' + string(y2) + ' ' + string(zr2)
Layer1(1) = Layer1(1) + ' p2 '+ string(x2) + ' ' + string(y1) + ' ' + string(zg4)
Layer1(1) = Layer1(1) + ' p3 '+ string(x2) + ' ' + string(y2) + ' ' + string(zr3) + ' & '+ '\n'
Layer1(1) = Layer1(1) + ' p4 '+ string(x1) + ' ' + string(y2) + ' ' + string(zg2)
Layer1(1) = Layer1(1) + ' p5 '+ string(x2) + ' ' + string(y2) + ' ' + string(zg3)
Layer1(1) = Layer1(1) + ' size '+ string(ydiv) + ' ' + string(zdiv) + ' ' + string(xdiv)
if i = n_zon_col then
if j = n_zon_row then
Layer1(1) = Layer1(1) + '\n '
Layer1(1) = Layer1(1) + 'group soil '
endif
endif
status = write(Layer1,1)
end_loop
end_loop
loop i (1,n_zon_col)
loop j(1,n_zon_row)
x1=xor+dx_size*(i-1)
x2=x1+dx_size
y1=yor+dy_size*(j-1)
y2=y1+dy_size
zr1=table(j+n_zon_row,x1)
zr2=table(j+n_zon_row+1,x1)
zr3=table(j+n_zon_row+1,x2)
zr4=table(j+n_zon_row,x2)
zk1=table(j+2*n_zon_row,x1)
zk2=table(j+2*n_zon_row+1,x1)
zk3=table(j+2*n_zon_row+1,x2)
zk4=table(j+2*n_zon_row,x2)
;command
; ;-------------------------------------------------------------
; gen zon wedge p0 x1 y1 zk1 p1 x1 y2 zk2 p2 x1 y1 zg1 p3 x2 y1 zk4 &
; p4 x1 y2 zg2 p5 x2 y1 zg4 size ydiv zdiv xdiv
; gen zon wedge p0 x2 y1 zk4 p1 x1 y2 zk2 p2 x2 y1 zg4 p3 x2 y2 zk3 &
; p4 x1 y2 zg2 p5 x2 y2 zg3 size ydiv zdiv xdiv
; ;-------------------------------------------------------------
;end_command
Layer2(1) = 'gen zon wedge p0 '+ string(x1) + ' ' + string(y1) + ' ' + string(zk1)
Layer2(1) = Layer2(1) + ' p1 '+ string(x1) + ' ' + string(y2) + ' ' + string(zk2)
Layer2(1) = Layer2(1) + ' p2 '+ string(x1) + ' ' + string(y1) + ' ' + string(zr1)
Layer2(1) = Layer2(1) + ' p3 '+ string(x2) + ' ' + string(y1) + ' ' + string(zk4) + ' & '+ '\n'
Layer2(1) = Layer2(1) + ' p4 '+ string(x1) + ' ' + string(y2) + ' ' + string(zr2)
Layer2(1) = Layer2(1) + ' p5 '+ string(x2) + ' ' + string(y1) + ' ' + string(zr4)
Layer2(1) = Layer2(1) + ' size '+ string(ydiv) + ' ' + string(zdiv) + ' ' + string(xdiv) + ' \n'
Layer2(1) = Layer2(1) + 'gen zon wedge p0 '+ string(x2) + ' ' + string(y1) + ' ' + string(zr4)
Layer2(1) = Layer2(1) + ' p1 '+ string(x1) + ' ' + string(y2) + ' ' + string(zk2)
Layer2(1) = Layer2(1) + ' p2 '+ string(x2) + ' ' + string(y1) + ' ' + string(zr4)
Layer2(1) = Layer2(1) + ' p3 '+ string(x2) + ' ' + string(y2) + ' ' + string(zk3) + ' & '+ '\n'
Layer2(1) = Layer2(1) + ' p4 '+ string(x1) + ' ' + string(y2) + ' ' + string(zr2)
Layer2(1) = Layer2(1) + ' p5 '+ string(x2) + ' ' + string(y2) + ' ' + string(zr3)
Layer2(1) = Layer2(1) + ' size '+ s
利用SURFER建立滑坡FLAC3D模型源程序.rar_FLAC3D Model_Surfer_flac3D_flac3d滑坡_
版权申诉
89 浏览量
2022-09-24
10:39:03
上传
评论
收藏 2KB RAR 举报
林当时
- 粉丝: 100
- 资源: 1万+
最新资源
- 2-08 http协议和nginx入门
- 基于Java的ADmobile ADSuyi-Flutter插件广告聚合SDK设计源码
- mkl-2021.1.1-py2.py3-none-manylinux1-x86-64.whl
- Drivingnotmessage.apk
- mkl-2021.4.0-py2.py3-none-manylinux1-x86-64.whl
- wiliwili-yoga.zip
- 项目计划书.doc
- mkl-2021.2.0-py2.py3-none-manylinux1-x86-64.whl
- 情侣恋爱相册记录-游玩生活
- 毕业设计项目源码-使用Matlab基于蚁群算法的三维路径规划算法实现.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈