木海琼宇 发表于 2015-2-3 15:11:18

flac3d fish函数find_u的含义

config dynamic
gen zo bri p0 0 0 -200 p1 add 30 0 0 p3 add 0 0 200 p2 add 0 15 0 ...
size 2 1 15
group zone Bottom
gen zo bri p0 0 0 1 p1 add 30 0 0 p3 add 0 0 201 p2 add 0 15 0 ...
size 2 1 15
group zone Top range group Bottom not
interface 1 face range plane norm 0 0 1 origin 0,0,0 dist 0.1
ini zpos add -1.0 range group Top
;---
model mech elastic
def setup
global mat_shear = 10000.0
global mat_dens = 0.00265
local freq = 1.0
global tload = 10.0
global w = 2.0 * pi * freq
end
def fsin
if dytime <= tload
fsin = sin(w*dytime)
else
fsin = 0.0
end_if
end
def common
command
hist reset
set dyn time=0
ini xv=0 yv=0 zv=0 xdis=0 ydis=0 zdis=0 xfob=0 yfob=0 zfob=0
ini sxx=0 syy=0 szz=0 sxz=0 syz=0 sxy=0
int 1 sstress (0,0,0) nstress 0
apply remove
apply nquiet squiet dquiet range z -201 -199
apply nquiet squiet dquiet range z 199 201
apply dstr 2 his @fsin range z -201 -199
hist n 10
hist add unbal
hist add dytime
hist add dt
hist add gp xvel 0 0 -200
hist add gp xvel 0 0 200
hist add zone sxz id 1
hist add zone sxz id 60
hist add fish @fsin
hist add gp xdisp (15,7.5,-200)
solve age 5
end_command
end
def find_u
command
hist write 9 vs 2 table 4
end_command
local pnt = get_table(4)
local s = table_size(pnt)
local i
local max_disp = 0.0
local min_disp = 1e20
loop i (1,s)
local time = xtable(pnt,i)
if time >= 1.0 then
if time <= 2.0 then
local val = abs(ytable(pnt,i))
max_disp = max(max_disp,val)
min_disp = min(min_disp,val)
end_if
end_if
end_loop
global UUU = (max_disp - min_disp) * 0.5
end
以上一段程序中,
def find_u
command
hist write 9 vs 2 table 4
end_command
local pnt = get_table(4)
local s = table_size(pnt)
local i
local max_disp = 0.0
local min_disp = 1e20
loop i (1,s)
local time = xtable(pnt,i)
if time >= 1.0 then
if time <= 2.0 then
local val = abs(ytable(pnt,i))
max_disp = max(max_disp,val)
min_disp = min(min_disp,val)
end_if
end_if
end_loop
global UUU = (max_disp - min_disp) * 0.5
end
的含义是什么,time = xtable(pnt,i)中,table-x不是表示sin(w*dytime)的值吗,为什么会大于1,谢谢
页: [1]
查看完整版本: flac3d fish函数find_u的含义