- 积分
- 0
- 注册时间
- 2007-5-18
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2008-10-11 21:31:45
|
显示全部楼层
来自 江苏徐州
用节点号提取节点位移
;第一步,提取想要范围你的节点号
;例如,219<y<221,1.8<z<2.3范围内的节点号
def find_xgid
array c(1)
status=open('filename.txt',1,1)
c(1)='id'+' '+'x'+' '+'y'+' '+'z'
status=write(c,1)
pnt=gp_head
loop while pnt # null
zby=gp_ypos(pnt)
zbz=gp_zpos(pnt)
if zby>219 then
if zby<221 then
if zbz> 1.8 then
if zbz<2.3 tehn
c(1)=string(gp_id(pnt))
c(1)=c(1)+' '+string(gp_xpos(pnt))
c(1)=c(1)+' '+string(gp_ypos(pnt))
c(1)=c(1)+' '+string(gp_zpos(pnt))
status=write(c,1)
end_if
end_if
end_if
end_if
pnt=gp_next(pnt)
end_loop
status=close
end
find_xgid
;提取节点的位移
def getdate
array c(1)
status=open('600-5m煤柱dd220-2.txt',1,1)
c(1)='id'+' '+'xdis'+' '+'ydis'+' '+'zdis'+' '+'x'+' '+'y'+' '+'z'
status=write(c,1)
loop m(1,k);k,节点数目
a=n_wydd(1,m);n_wydd(1,m),节点数组
p_gp=find_gp(a)
c(1)=string(a)
c(1)=c(1)+' '+string(gp_xdisp(p_gp))
c(1)=c(1)+' '+string(gp_ydisp(p_gp))
c(1)=c(1)+' '+string(gp_zdisp(p_gp))
c(1)=c(1)+' '+string(gp_xpos(p_gp))
c(1)=c(1)+' '+string(gp_ypos(p_gp))
c(1)=c(1)+' '+string(gp_zpos(p_gp))
status=write(c,1)
end_loop
status=close
end
dd;dd,节点数组名
getdate |
|