嘻嘻 发表于 2011-5-30 15:54:26

fish求应变

def ax_strain
str1 = 0
n=1
pnt1 = gp_head
loop while pnt1 # null
if gp_zpos(pnt1)<0.000001then
str1= str1 + gp_zdisp (pnt1)
endif
pnt1 = gp_next(pnt1)
n=n+1
endloop
ax_strain = 10*str1 / n ;   试件高度为10cm
end
ax_strain
上面是我用fish语言编写的求在单轴压缩过程中求应变的程序,不知道其中有没有错误,
如果有的话,希望大家给予指正。
页: [1]
查看完整版本: fish求应变