licoon 发表于 2010-8-14 14:47:17

如何获取监视点数据

比如之前设置了监视点

hist gp zdisp51 25 0

计算完后,怎么获取这个点数据,即每步或几步计算得数据。用什么命令?

应该是用print,但是不知道print后面怎么写了?

知道的请回答一下,十分感谢!!!

jihezhilv 发表于 2010-8-15 07:37:28

本帖最后由 jihezhilv 于 2010-8-16 08:38 编辑

=============================================
set log on
set logfile output_hist_str.txt
def output_hists
loop str_num(1,9)
    tab_num=str_num
    sx=str_num+1
    sz=sx+9
    velx=sx+18
    velz=sx+27
    vels=sx+36
    ;定义table的名字为:“开挖边界第XX个监测单元/监测点XXX应力/速度曲线”
    table_name_sx='开挖边界第'+string(tab_num)+'个监测单元X向应力曲线'
    table_name_sz='开挖边界第'+string(tab_num)+'个监测单元Z向应力曲线'
    table_name_velx='开挖边界第'+string(tab_num)+'个监测点X向速度曲线'
    table_name_velz='开挖边界第'+string(tab_num)+'个监测点Z向速度曲线'
    table_name_vels='开挖边界第'+string(tab_num)+'个监测点速度曲线'
    command
    ;每隔20步将监测点/单元的数值写入table文件
      hist write sx skip 2 table sx      
      hist write sz skip 2 table sz
      hist write velx skip 2 table velx
      hist write velz skip 2 table velz
      hist write vels skip 2 table vels
      ;将table命名为上述的名字:table_name_XXX   
      table sx name table_name_sx
      pr table sx
      table sz name table_name_sz
      pr table sz
      table velx name table_name_velx
      ;pr table velx
      table velz name table_name_velz
      ;pr table velz
      table vels name table_name_vels
      ;pr table vels
      ;将记录在table中的数值绘制出来,曲线题目由:alias定义,X轴及Y轴的名称使用:xlabel、ylable定义。
      pl table sx both alias '开挖边界监测单元X向应力变化曲线' xlabel '运算时步' ylabel '监测单元X向应力(Pa)'
      pl table sz both alias '开挖边界监测单元Z向应力变化曲线' xlabel '运算时步' ylabel '监测单元Z向应力(Pa)'
      pl table velx both alias '开挖边界监测点X向速度变化曲线' xlabel '运算时步' ylabel '监测点X向速度'
      pl table velz both alias '开挖边界监测点Z向速度变化曲线' xlabel '运算时步' ylabel '监测点Z向速度'
      pl table vels both alias '开挖边界监测点速度变化曲线' xlabel '运算时步' ylabel '监测点速度'
    endcommand
endloop
end
output_hists
set log off
=====================================================

以上代码可以将监测数据每隔20步写入table中,并以图形绘出(同时可以将监测数据使用print 打印出来记录在log文件中)。要求在之前对监测点进行id编号
eg.;设置监测单元
history id=1 unbal
;一级开挖边界sxx
history id=2 zone sxx id=776
history id=3 zone sxx id=794
history id=4 zone sxx id=1889
;二级开挖边界sxx
history id=5 zone sxx id=1862
history id=6 zone sxx id=1835
history id=7 zone sxx id=1805

jihezhilv 发表于 2010-8-15 07:57:11

类似的问题我以前好像回答过,建议楼主搜索下本论坛。

tm_zjp 发表于 2010-8-15 07:59:31

print gp dis range id

yiqing 发表于 2010-8-15 10:33:43

table_name_sx='开挖边界第'+string(tab_num)+'个监测单元X向应力曲线'
pl table sx both alias '开挖边界监测单元X向应力变化曲线' xlabel '运算时步' ylabel '监测单元X向应力(Pa)'
,请问一下这个是什么意思?应结合例子说明一下哦,谢谢

jihezhilv 发表于 2010-8-16 08:39:16

5# yiqing
已经做解释了,自己看看吧
页: [1]
查看完整版本: 如何获取监视点数据