#PFC的一个小问题:关于地震波的导入
直接上代码
table 1 read 地震波数据txt文件
define add_earthquake
whilestepping
rt=mech.age
a=table(1,rt)
wall_xvel=wall_xvel+a*9.81*rt
if rt>t1
wall_xvel=0
endif
wall.vel.x(wp1)=wall_xvel
wall.vel.x(wp2)=wall_xvel
wall.vel.x(wp4)=wall_xvel
end
def make_load
global wall_xvel=0.0
global time_gap=0.02
global t1=table.size(1)*time_gap
global wp1=wall.find(1)
global wp2=wall.find(2)
global wp4=wall.find(4)
command
solve time 35.0
end_command
end
set mech age 0.0
@make_load
每个人具体内容不一样,但导入代码大概这个样子。我碰到的主要问题是在代码 a=table(1,rt) 这一块。结果如下
肯定不对,出现的原因是我在前面建立模型时用了代码 set timestep scale,导致了上述问题,把该代码删除后,结果如下