新人求问大神一些问题

浏览:1219 回答:5

当我把宏文件导入到ANSYS后出现下面问题

CXTKJ(LOIB}UC)]E$AU2LHP.png

附上宏文件命令:

/prep7

*del,all

cmsel,s,longgu_line

pai=3.1415926

e_tan=2.1e5

f_y=235

lmd_y=1.05

lmd_z=1.05

*get,lmin,line,0,num,min

*get,lnum,line,0,count

*get,lmax,line,0,num,max

ll=lmin

*dim,changxibi,,lunm,4

esll,s

*get,enum,elem,,count

*dim,result,,enum,2

*dim,result_la,,enum,2

*dim,result_ya,,enum,2

num_of_line=0

num_of_line_la=0

num_of_line_ya=0

num_of_ele=0

num_of_ele_la=0

num_of_ele_ya=0

*do,m,1,lnum,1

num_of_line=num_of_line+1

lsel,s,line,,ll,ll,1

*get,length_of_line,line,ll,leng

changxibi(num_of_line,4)=length_of_line

esll,s

/post1

etable,sdi,smisc,31

etable,sbi_yt,smisc,32

etable,sbi_yb,smisc,33

etable,sbi_zt,smisc,34

etable,sbi_zb,smisc,35

etable,axial_f,smisc,1

smax,sbi_y_max,sbi_yt,sbi_yb,1,1

smin,sbi_y_min,sbi_yt,sbi_yb,1,1

smax,sbi_z_max,sbi_zt,sbi_zb,1,1

smin,sbi_z_min,sbi_zt,sbi_zb,1,1

*get,emin,elem,0,num,min

*get,enum,elem,,count

*get,emax,elem,0,num,max

ee=emin

*get,sect_num,elem,ee,attr,secn

*get,area_sec,secp,sect_num,prop,area

*get,iz_sec,secp,sect_num,prop,izz

*get,iy_sec,secp,sect_num,prop,iyy

iyy=sqrt(iy_sec/area_sec)

izz=sqrt(iz_sec/area_sec)

lmd_cxb_y=length_of_line/iyy

lmd_cxb_z=length_of_line/izz

ne_y=(pai**2*e_tan*area_sec)/(1.1*lmd_cxb_y**2)

ne_z=(pai**2*e_tan*area_sec)/(1.1*lmd_cxb_z**2)

changxibi(num_of_line)=ll

lmd_cxb=lmd_cxb_y

*if,lmd_cxb_y,le,lmd_cxb_z,then

*endif

changxibi(num_of_line,2)=lmd_cxb

*get,str_zhou,elem,ee,etab,sdi,,,

*if,str_zhou,gt,1e-8,then

        mark=1

        changxibi(num_of_line,3)=1

        num_of_line_la=num_of_line_la+1

                   fai_wd=0

*elseif,str_zhou,lt,1e-8,then

        mark=2

        changxibi(num_of_line,3)=-1

        num_of_line_ya=num_of_line_ya+1

        lmd_n_y=(lmd_cxb_y/pai)*sqrt(f_y/e_tan)

        *if,lmd_n_y,le,0.215,then

                  fai_wd_y=1-0.65*lmd_n_y**2

        *elseif,lmd_n_y,gt,0.215,then

                  changshu=0.965+0.3*lmd_n_y+lmd_n_y**2

                  fai_wd_y=(changshu-sqrt(changshu**2-4*lmd_n_y**2))/(2*lmd_n_y**2)

        *endif

        lmd_n_z=(lmd_cxb_z/pai)*sqrt(f_y/e_tan)

        *if,lmd_n_z,le,0.215,then

                  fai_wd_z=1-0.65*lmd_n_z**2

        *elseif,lmd_n_z,gt,0.215,then

                  changshu=0.965+0.3*lmd_n_z+lmd_n_z**2

                  fai_wd_z=(changshu-sqrt(changshu**2-4*lmd_n_z**2))/(2*lmd_n_z**2)

        *endif

*endif

fai_wd=fai_wd_y

*if,fai_wd_z,le,fai_wd_y,then

fai_wd=fai_wd_z

*endif

changxibi(num_of_line,4)=fai_wd

*if,mark,eq,1,then

*do,n,1,enum,1

*get,stress_zhou,elem,ee,etab,sdi,,,

*get,stress_wq_y,elem,ee,etab,sbi_y_max,,,

*get,stress_wq_z,elem,ee,etab,sbi_z_max,,,

num_of_ele=num_of_ele+1

num_of_ele_la=num_of_ele_la+1

result(num_of_ele,1)=ee

result(num_of_ele,2)=(stress_zhou+sress_wq_y/lmd_y+sress_wq_z/lmd_z)

result_la(num_of_ele_la,1)=ee

result_la(num_of_ele_la,2)=(stress_zhou+sress_wq_y/lmd_y+sress_wq_z/lmd_z)

ee=elnext(ee)

*enddo

*elseif,mark,eq,2,then

*do,n,1,enum,1

*get,stress_zhou,elem,ee,etab,sdi,,,

*get,stress_wq_y,elem,ee,etab,sbi_y_min,,,

*get,stress_wq_z,elem,ee,etab,sbi_z_min,,,

*get,zhouli,elem,ee,etab,axial_f,,,

num_of_ele=num_of_ele+1

num_of_ele_ya=num_of_ele_ya+1

result(num_of_ele,1)=ee

result(num_of_ele,2)=(stress_zhou/fai_wd+stress_wq_y/(lmd_y*(1.0-0.8*zhouli/ne_y))+stress_wq_z/(lmd_z*(1.0-0.8*zhouli/ne_z)))

result_ya(num_of_ele_ya,1)=ee

result_ya(num_of_ele_ya,2)=(stress_zhou/fai_wd+stress_wq_y/(lmd_y*(1.0-0.8*zhouli/ne_y))+stress_wq_z/(lmd_z*(1.0-0.8*zhouli/ne_z)))

ee=elnext(ee)

*enddo

*endif

cmsel,s,longgu_line

ll=lsnext(ll)

*enddo


大神们能帮我看看错在哪吗?改了好几天,依然毫无头绪!!!不胜感激啊!!

邀请回答 我来回答

全部回答

(1)
默认 最新
力争ANSYS大神
没有大神吗@ANSYS专家
2016年9月15日
评论 4 点赞

没解决?试试专家一对一服务

换一批