# ANSYS在类似网壳结构分析中如何将构件应力比用云图显示

!计算构件应力比–强度复核

!单层网壳–梁单元计算

!根据《钢标》3.5.1确定宽厚比等级，截面等级为S1

Rm=1.15

!净截面模量、净面积计算

!325×12

Ab1=(325-12*2)/325

Wn1=3.14*325**3*(1-Ab1**4)/32

An1=3.14/4*325**2*(1-Ab1**2)

!325×10

Ab2=(325-10*2)/325

Wn2=3.14*325**3*(1-Ab2**4)/32

An2=3.14/4*325**2*(1-Ab2**2)

!325×8

Ab3=(325-8*2)/325

Wn3=3.14*325**3*(1-Ab3**4)/32

An3=3.14/4*325**2*(1-Ab3**2)

!=================

esel,s,ename,,188

*get,ele_max,elem,0,count

*dim,Mz_i,,ele_max

*dim,Mz_j,,ele_max

*dim,My_i,,ele_max

*dim,My_j,,ele_max

*dim,Axial_i,,ele_max

*dim,Axial_j,,ele_max

*dim,Stress_ratio,,ele_max

*dim,Ele_xuhao,char,ele_max

*do,i,1,ele_max

Ele_xuhao(i)=chrval(i)

!获取单元的实常数编号确定截面类型

*get,Real_num,elem,i,attr,real

*if,Real_num,eq,1,then

An=An1

Wn=Wn1

*elseif,Real_num,eq,2,then

An=An2

Wn=Wn2

*elseif,Real_num,eq,3,then

An=An3

Wn=Wn3

*endif

!获取单元i、j节点 X、Y方向的弯矩

*get,Mz_i(i),elem,i,smisc,3

*get,Mz_j(i),elem,i,smisc,16

*get,My_i(i),elem,i,smisc,2

*get,My_j(i),elem,i,smisc,15

Mzy_i=(Mz_i(i)**2+My_i(i)**2)**0.5

Mzy_j=(Mz_j(i)**2+My_j(i)**2)**0.5

!获取单元的i、j的轴力

*get,Axial_i(i),elem,i,smisc,1

*get,Axial_j(i),elem,i,smisc,14

!计算应力比，注意Q345对应的抗拉强度设计值为305Mpa

fn=305

Stress_ratio_i=abs(Axial_i(i))/An/fn+Mzy_i/rm/Wn/fn

Stress_ratio_j=abs(Axial_j(i))/An/fn+Mzy_j/rm/Wn/fn

Stress_ratio(i)=max(Stress_ratio_i,Stress_ratio_j)

*enddo

esel,s,ename,,188

etable,ZL,smisc,1

pletab,ZL

*do,i,1,ele_max

*vput,Stress_ratio(i),elem,i,etab,ZL

*enddo

pletab,ZL

ANSYS结构院

2023.1.30