找回密码
 注册
Simdroid-非首页
查看: 438|回复: 21

[命令/FISH] fish里面不能调用restore 1.sav,怎么在fish里实现?

[复制链接]
发表于 2008-3-24 23:07:47 | 显示全部楼层 |阅读模式 来自 天津
fish里面不能调用restore 1.sav,
不能用以下命令:
command
rest 1.sav
endcommand
怎么实现在fish里面调用restore 1.sav?谢谢,想了两个星期都没有解决,清高手回答,谢谢
发表于 2008-4-1 12:35:32 | 显示全部楼层 来自 北京
Simdroid开发平台
Flac3D中规定,New与restore不允许在一个fish函数中被调用,因此你的这种做法是错误的,其原文如下:
The New and Restore commands are not permitted to be invoked from within a fish function.
回复 1 不支持 0

使用道具 举报

发表于 2008-3-25 01:27:03 | 显示全部楼层 来自 湖南湘潭
要达到什么目的的呢?应可以调用的吧!
如:01.fis文件如下:
---------------------------------
restore 1.sav
--------------------------

txt文件如下:
new
call 01.fis
回复 1 不支持 0

使用道具 举报

 楼主| 发表于 2008-3-25 10:22:53 | 显示全部楼层 来自 天津
01.fis如下:
..........
call 1.sav
............

a.txt命令流文件如下:
............
def jisuan
  command
  call 01.fis
  ini xdis=0.0 ydis=0.0 zdis=0.0
  mo mohr
  prop bulk 1e8 shear 0.3e8 coh 1e4 ten 1e4
  apply nstress -5000 range z 14.9 15.1 x 5.9 7.9
  solve
  endcommand
end
jisuan
................
怎么不计算呢?为什么呀?谢谢楼上.
回复 不支持

使用道具 举报

 楼主| 发表于 2008-3-26 21:31:19 | 显示全部楼层 来自 天津
请大家帮我,急死了.
回复 不支持

使用道具 举报

发表于 2008-3-29 22:48:32 | 显示全部楼层 来自 江苏徐州
这个问题不难解决,你只要把那个1.sav的完整路径写出来就可以实现了,比如:它的完整路径是:E:\FLAC3D\01.sav,那么你这样写restore E:\FLAC3D\01.sav,那么就可以调出你所想要结过了!
回复 不支持

使用道具 举报

 楼主| 发表于 2008-3-30 13:22:57 | 显示全部楼层 来自 天津
01.fis如下:
..........
res 1.sav
............

a.txt命令流文件如下:
............
def jisuan
  command
  call d:\01.fis
  ini xdis=0.0 ydis=0.0 zdis=0.0
  mo mohr
  prop bulk 1e8 shear 0.3e8 coh 1e4 ten 1e4
  apply nstress -5000 range z 14.9 15.1 x 5.9 7.9
  solve
  endcommand
end
jisuan
................
还是不行?为什么呀?谢谢楼上.
回复 不支持

使用道具 举报

 楼主| 发表于 2008-3-30 13:25:41 | 显示全部楼层 来自 天津
01.fis如下:
..........
res d:\1.sav
............

a.txt命令流文件如下:
............
def jisuan
  command
  call d:\01.fis
  ini xdis=0.0 ydis=0.0 zdis=0.0
  mo mohr
  prop bulk 1e8 shear 0.3e8 coh 1e4 ten 1e4
  apply nstress -5000 range z 14.9 15.1 x 5.9 7.9
  solve
  endcommand
end
jisuan
................
这样也不行?为什么呀?谢谢楼上.
回复 不支持

使用道具 举报

发表于 2008-3-31 14:06:25 | 显示全部楼层 来自 香港
你的command ..........endcommand 命令用的有错误!

检查一下其中的逻辑关系,尤其是你call的fish 文件,看是否存在矛盾或死循环或终止的情况.

[ 本帖最后由 haiyangzhou 于 2008-3-31 14:15 编辑 ]
回复 不支持

使用道具 举报

 楼主| 发表于 2008-3-31 20:33:20 | 显示全部楼层 来自 天津
01.fis
............
res d:\ori.sav
............
a.txt命令流文件如下:
..................
new
def jisuan
     dz1=-0.01
     ratio=0.2
  loop while ratio>0.0001
      ratio=ratio-0.01
      tidu=ratio*9000    ;支护力梯度
      force1=ratio*135000
     if dz1>-2.0e-2 then  ;如果最大地表位移<0.02m,减小支护力
        command
        call d:\01.fis
        ini xdis=0.0 ydis=0.0 zdis=0.0
        mo mohr
        pro bulk 2.604e7 she 9.328e6 fric 25 coh 0 ten 0
        ;开挖
        model null range group kaiwa y 0,25
        ;liner
        SEL shell id=1  range cylinder  end1 0 0 0 end2 0 24.9999 0 rad 3
        sel node fix lsys range x -0.1 0.1 ;自动更新节点局部坐标
        sel node fix x yr zr range x -0.1 0.1
        sel node fix y xr zr range y -0.1 0.1
        sel shell pro density,2450, iso=(3.450e9,0.17),thickness=0.35
        ini ydis=0.0  range group kaiwa y 24.9 25.1
        apply syy=force1 range group kaiwa y 24.9 25.1 z -3.0 3.0
        set large
         solve
        save shixunhuan.sav
        call d:\get_gp_maxminzdispyong.fis  ;搜索出地表最大位移dz1
        endcommand
     else
        exit
     endif
  endloop
end
jisuan
.................

[ 本帖最后由 qiaoer 于 2008-3-31 20:35 编辑 ]
回复 不支持

使用道具 举报

 楼主| 发表于 2008-3-31 20:45:20 | 显示全部楼层 来自 天津
麻烦版主给看看。真不知道怎么回事?谢谢
回复 不支持

使用道具 举报

发表于 2008-3-31 21:05:26 | 显示全部楼层 来自 湖北武汉
restore把FLAC3D在内存中的数据全部冲掉了,也就是说一旦resd:\ori.sav模型,你定义的FISH函数jisuan以及其他的乱七八糟的东西就全不在了。
回复 不支持

使用道具 举报

 楼主| 发表于 2008-4-2 09:47:16 | 显示全部楼层 来自 天津
The New and Restore commands are not permitted to be invoked from within a fish function.我也见了,可是怎么实现在fish里面调用res 1.sav的目的呢?我把1.sav里面的状态存到put的fish函数,用get这个fish函数调用,还是不行,get还是不能在我编的fish里面调用.
例:
  我用以下程序:
new
set log on
res 1.sav
def put   ;把1.sav写进put里面
oo = open('state.bin',1,0)
p_z = zone_head
loop while p_z # null
ret = z_statesave(p_z)
.
.
.
endloop
end
def get  ;把1.sav调出来
oo = open('state6.bin',0,0)
p_z = zone_head
loop while p_z # null
ret = z_staterest(p_z)
.
.
.
endloop
end
put
get
def jisuan
     ratio=1.0
  loop while ratio>0.001
       ratio=ratio-0.01
       force1=-1*ratio*5.5e4
     if abs(dz1)>1.0e-2 then
         get ;调出1.sav
        command
        ini xdis=0.0 ydis=0.0 zdis=0.0
        mo mohr
        prop bulk 1e8 shear 0.3e8 coh 1e4 ten 1e4
        apply nstress force1 range z 14.9 15.1 x 5.9 7.9
        set large
        plot add con zdis
        solve
        save 12.sav
        call d:\get_gp_maxzdisp.fis   ;搜索出地表最大位移dz1
        endcommand
     else
        exit
     endif
  endloop
end
jisuan


可是这样也不行,get放在fish里面那种效果,调不出来1.sav,放在jisuan这个fish外面可以调出1.sav,不知道为什么?请教大家
回复 不支持

使用道具 举报

发表于 2009-5-26 10:41:15 | 显示全部楼层 来自 江苏南京
老兄,最后问题解决了嘛??
我也在做这个
回复 不支持

使用道具 举报

发表于 2009-5-28 18:24:26 | 显示全部楼层 来自 江苏南京
12楼的正解,这个问题是不可能解决的,因为这是软件本身的游戏规则。
回复 不支持

使用道具 举报

发表于 2009-5-29 17:35:02 | 显示全部楼层 来自 江苏扬州
恩,对,这个在里面调用是不行的,只有结合程序的思路,想其他的办法来解决。
楼上 跟我生日相同
回复 不支持

使用道具 举报

发表于 2009-6-10 10:30:14 | 显示全部楼层 来自 北京工业大学
顶一下,过目必须顶!!
回复 不支持

使用道具 举报

发表于 2009-6-11 19:10:59 | 显示全部楼层 来自 湖北武汉
可以,不过要把文件的路径写清楚
回复 不支持

使用道具 举报

发表于 2013-3-28 16:10:39 | 显示全部楼层 来自 湖北武汉
遇到同样的问题
回复 不支持

使用道具 举报

发表于 2015-11-20 00:11:44 | 显示全部楼层 来自 陕西西安
zhangchuancheng 发表于 2009-6-11 19:10
可以,不过要把文件的路径写清楚

怎么弄,请指教
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-10-6 07:18 , Processed in 0.054755 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表