level 1
def ax_str
str = 0 ;不平衡力变量
pnt = gp_head ; 头单元
loop while pnt # null ;循环语句,遍历节点指针
if gp_ypos(pnt) < 0.1 then ;节点y坐标小于0.1 对于这个模型来说,小于0.1的只有点y=0
str = str + gp_yfunbal(pnt) ;累加不平衡力,累加y=0平面上的所有点的不平衡力
endif
pnt = gp_next(pnt) ;指针指向下一节点
endloop
ax_str = str / pi ; cylinder radius = 1,应力=力/面积
end
hist n 1 ;每迭代一步 记录一次,记录的频次
hist gp ydisp 0,0,0
hist ax_str
hist gp xdisp 1,1,0
plot hist -2 vs 1 ;axial stress vs axial disp. 给出轴向应力与轴向位移之间的关系曲线
2020年04月22日 06点04分