佟彬1103 发表于 2013-2-6 10:42:17

总是算不过去..请大侠们指点

写了一段算动力的程序,总是算不过去。出现弹出下面错误的提示,请大侠们指点 是怎么回事,该如何避免?
Math error:
Zero divide invalid
File: .\Cycle.cpp
Line: 446

enochwang 发表于 2013-2-6 12:17:36

关闭重新开始,多试几次

佟彬1103 发表于 2013-2-6 12:21:55

enochwang 发表于 2013-2-6 12:17 static/image/common/back.gif
关闭重新开始,多试几次

又试了两次,每次都是在hist之前就停止了,看别人说有可能是有单元没有赋值? 不过错误提示说在line 446? 到哪里去看这个 LINE 446?

enochwang 发表于 2013-2-6 12:40:14

佟彬1103 发表于 2013-2-6 12:21 static/image/common/back.gif
又试了两次,每次都是在hist之前就停止了,看别人说有可能是有单元没有赋值? 不过错误提示说在line 446 ...

应该是你原来的数据文件的第446行,或是你这一次计算载入的运行命令的446行。

佟彬1103 发表于 2013-2-6 12:46:57

enochwang 发表于 2013-2-6 12:40 static/image/common/back.gif
应该是你原来的数据文件的第446行,或是你这一次计算载入的运行命令的446行。 ...

刚刚那个问题,我发现时边界上的水压设置有问题,刚改了一下,就没有这个提示了..不过有出现了新的提示说“zero volume tet in zone 60”。不太确定是什么意思?.我把程序贴出来,帮我看一下吧..也是新手,十分感谢enochwang,不吝指教。
rest initial2.sav
ini xd 0 yd 0 zd 0
ini fmod 0.0
ini fdens 1000
set fluid pcut on
set mech ratio 1e-3
set mech substep 100 auto
set fluid substep 1
ini pp 570000 grad 0 0 -10e4 range z -60 -3
; dynamic analysis
set dyn on fluid on
model fl_iso
prop perm 1.0e-10 poros 0.30 range group dense_sand
prop perm 1.0e-7 poros 0.45 range group loose_sand
prop perm 1.0e-12 poros 0.45 range group nc_clay
prop perm 1.0e-15 poros 0.45 range group compacted_clay
set dyn mult on
ini state 0
model finn
prop ff_switch=0 ff_latency=50 ff_c1=0.8 ff_c2 0.79 ff_c3=0.45 ff_c4=0.73 range group loose_sand any group nc_clay any group dense_sand any group compacted_clay any
prop bulk 16e6 shear 10e6 fric 40 coh 0 tens 8.66e7 range group dense_sand
prop bulk 25e6 shear 16e6 fric 25 coh 0 tens 8.66e6 range group loose_sand
prop bulk 20e6 shear 16e6 coh 15e3 tens 8.66e6 range group nc_clay
prop bulk 25e6 shear 16e6 coh 15e3 tens 8.66e6 range group compacted_clay
ini dens 2040 range group dense_sand
ini dens 1960 range group loose_sand
ini dens 1880 range group nc_clay
ini dens 2000 range group compacted_clay
set dyn damp local 0.314
set dyn damp rayleigh 0.05 1
free x range z -60
table 1 read elcentro1.txt
apply xacc 1.0 hist table 1 range z -60
set large
set dyn time 0
solve age 15
save dynamic.sav

enochwang 发表于 2013-2-7 01:14:37

这个应该是你设置了大变形(倒数第四行set large),而造成id=60的单元号变形过大吧。
你可以把set large去掉看看还会不会出现这个问题。

佟彬1103 发表于 2013-2-7 05:24:07

enochwang 发表于 2013-2-7 01:14 static/image/common/back.gif
这个应该是你设置了大变形(倒数第四行set large),而造成id=60的单元号变形过大吧。
你可以把set large去 ...

去掉以后还是会出现之前的那个错误提示
Math error:
Zero divide invalid
File: .\Cycle.cpp
Line: 446

不知道是什么原因,我把完整的贴下来,求指导!
new
gen zone brick size 12 1 9 p0 0 0 0 p1 12 0 0 p2 0 1 0 p3 0 0 9 group dense_sand         ; material No.4
gen zone brick size 12 1 2 p0 0 0 9 p1 12 0 9 p2 0 1 9 p3 0 0 11 group loose_sand          ; material No.3
gen zone brick size 12 1 2 p0 0 0 11 p1 12 0 11 p2 0 1 11 p3 0 0 13 group nc_clay          ; material No.2
gen zone brick size 3 1 3 p0 0 0 13 p1 3 0 13 p2 0 1 13 p3 0 0 16 group compacted_clay1    ; material No.1
gen zone wedge size 3 1 3 p0 3 0 13 p1 6 0 13 p2 3 1 13 p3 3 0 16 p4 6 1 13 p5 3 1 16 ratio 1 1 1 group compacted_clay2 ; material No.1
group compacted_clay range group compacted_clay1 any group compacted_clay2 any

; boundary conditions
fix x range x 0
fix x range x 12
fix y range y 0
fix y range y 1
fix z range z 0

; initial condition
ini dens 2040 range group dense_sand ; all dens as saturate weight
ini dens 1960 range group loose_sand
ini dens 1880 range group nc_clay
ini dens 2000 range group compacted_clay
ini szz -60000 grad 0 0 20000 range z 13 16   
ini szz -97600 grad 0 0 18800 range z 11 13
ini szz -136800 grad 0 0 19600 range z 9 11
ini szz -320400 grad 0 0 20400 range z 0 9
ini pp 120000 grad 0 0 10e3 range z 0 12
set grav 0 0 -10

; properties
model mohr
prop bulk 16e6 shear 10e6 coh 1e20 range group dense_sand
prop bulk 25e6 shear 16e6 coh 1e20 range group loose_sand
prop bulk 20e6 shear 16e6 coh 1e20 range group nc_clay
prop bulk 25e6 shear 16e6 coh 1e20 range group compacted_clay
set mech ratio 1e-6
solve
save initial1.sav
; *******************************************************************************************
rest initial1.sav
model mohr
ini state 0
prop bulk 16e6 shear 10e6 fric 40 coh 0 range group dense_sand
prop bulk 25e6 shear 16e6 fric 25 coh 0 range group loose_sand
prop bulk 20e6 shear 16e6 coh 15e3 range group nc_clay
prop bulk 25e6 shear 16e6 coh 15e3 range group compacted_clay
ini dens 2040 range group dense_sand
ini dens 1960 range group loose_sand
ini dens 1880 range group nc_clay
ini dens 2000 range group compacted_clay
ini pp 120000 grad 0 0 -10e3 range z 0 12
set grav 10
set mech ratio 1e-6
solve
save initial2.sav
; *******************************************************************************************

; dynamic
initial state 0
config fluid dynamic
set fluid on dynamic on
ini fmod 0.0
ini fdens 1000
set fluid pcut on
prop bulk 16e6 shear 10e6 fric 40 coh 0 tens 8.66e7 range group dense_sand
prop bulk 25e6 shear 16e6 fric 25 coh 0 tens 8.66e6 range group loose_sand
prop bulk 20e6 shear 16e6 coh 15e3 tens 8.66e6 range group nc_clay
prop bulk 25e6 shear 16e6 coh 15e3 tens 8.66e6 range group compacted_clay
prop perm 1.0e-10 poros 0.30 range group dense_sand
prop perm 1.0e-7 poros 0.45 range group loose_sand
prop perm 1.0e-12 poros 0.45 range group nc_clay
prop perm 1.0e-15 poros 0.45 range group compacted_clay
set dyn mult on
model finn range group loose_sand any nc_clay any
prop ff_switch=0 ff_latency=50 ff_c1=0.8 ff_c2 0.79 ff_c3=0.45 ff_c4=0.73 range group loose_sand any group nc_clay any group dense_sand any group compacted_clay any
set dyn damp local 0.314
set dyn damp rayleigh 0.05 1
free x range z 0
table 1 read elcentro1.txt
apply xacc 1.0 hist table 1 range z 0
apply ff
history reset
set dyn time 0
solve age 15

cheveny 发表于 2013-2-7 18:10:58

关注中。

佟彬1103 发表于 2013-2-7 23:11:27

cheveny 发表于 2013-2-7 18:10 static/image/common/back.gif
关注中。

有人说或许是版本的问题要多试几次,你的版本上遇到同样的问题了吗,还是只是我的版本不对?

cheveny 发表于 2013-2-8 19:10:44

佟彬1103 发表于 2013-2-7 23:11 static/image/common/back.gif
有人说或许是版本的问题要多试几次,你的版本上遇到同样的问题了吗,还是只是我的版本不对? ...

过完年我去办公室试试。调程序遇到这些问题很正常,稍安毋躁~:)

h1985m 发表于 2013-3-18 14:29:32

不错的问题

MMCHUL 发表于 2013-4-2 21:16:00

LZ 我也遇到类似问题啊 指路http://forum.simwe.com/forum.php?mod=viewthread&tid=1072939&extra=

请问你解决了没有?怎么弄的

佟彬1103 发表于 2013-4-2 22:48:31

MMCHUL 发表于 2013-4-2 21:16 static/image/common/back.gif
LZ 我也遇到类似问题啊 指路http://forum.simwe.com/forum.php?mod=viewthread&tid=1072939&extra=

请问 ...

一般是忘了赋值了,你仔细检查一下 你的参数,看有没有把哪些group遗漏了

s_akilla 发表于 2013-5-19 19:33:35

不用设动力边界条件的吗?
页: [1]
查看完整版本: 总是算不过去..请大侠们指点