mod_assemb_prep,arg1,arg2,arg3
str_tube_analysis_375a109.parm
mod_coord_system,acs,xc,yc,zc,rotxyc,rotyzc,rotzxc
csys,CSst01
k,,r1,0,0
k,,r3,0,0
k,,r3,0,h5
k,,r4,0,h5
k,,r4,0,(h5+h6)
k,,r5,0,(h5+h6)
k,,r5,0,h5+h7
k,,r8,0,h5+h7
k,,r8,0,(h5+h8)
k,,r9,0,(h5+h8)
k,,r9,0,(h5+h11)
k,,r6-tol2/2,0,(h5+h11)
k,,r6-tol2/2,0,(h12-tol1)+h5
k,,0,0,(h12-tol1)+h5
k,,0,0,(h13+tol4)+h5
k,,r7+tol3/2,0,(h13+tol4)+h5
k,,r7+tol3/2,0,(h5-h10)
k,,r1,0,(h5-h10)
create_lines
ln_fillet,km-2,rfil3-tol1
ln_fillet,km-2,rfil7
ln_fillet,km-11,rfil6
ln_fillet,km-12,rfil6
ln_fillet,km-20,rfil1
ln_fillet,km-20,rfil2
ln_fillet,km-27,rfil4
chamfer_area,1,lm-24,lm-23,chmf1
chamfer_area,1,lm-14,lm-13,chmf2
chamfer_area,1,lm-23,lm-22,chmf3
create_area-lines
lplot
csys,CSst00
create_cs,0,,0,0,0,0,0,90,0
ara_create_part,csn+1,90,r5+rfil1
ara_create_part,csn+1,90,r7-1.5*rfil3
ara_create_part,csn+1,0,h5+h11+rfil6,,,,0.6
ara_create_part,csn+1,0,h5+(h13+tol4)-(rfil3-tol1)
*if,sym_,eq,1/2,then
csys,CSst00
asel,s,loc,z,h5+h11+rfil6,h5+h12
adele,all,,,1
init_entity_num
*endif
lplot
*if,enable,eq,'3d',then
*if,sym_,eq,1/2,then
adele,am-5,,,1
*else
adele,am-7,,,1
*endif
isolate_areas
revolve_aset,CSst01,ptang,1
flng_ptrn_1,CSst01,rbp,h5,nh,rtangle,rtangle,dbh,rbf,rfout,r5+rfil1,rbh,rff
csys,CSst00
isolate_areas
ara_create_part,CSst00,0,0,,,h5
isolate_areas
ara_create_part,CSst00,ptang,0,,,h5
nummrg,kp
csys,CSst01
init_entity_num
isolate_areas
asel,r,loc,y,ptang,360
adele,all,,,1
init_entity_num
isolate_areas
asel,r,loc,x,rbp
cm,aset1,area
isolate_areas
asel,u,area,,aset1
extrude_aset,-h6
isolate_areas
extrude_aset,h6
nummrg,kp
init_entity_num
lplot
*if,yn_mesh,eq,1,then
csys,CSst01
asel,selv,loc,y,0
asel,r,loc,z,0,h5+h8
asel,r,loc,x,r7,r5
vsla,s
cm,vset1,volu
*if,sym_,eq,1/12,then
msh_algorithm,1,3,0,0,,,2,3,0.020,0.020,1,,,,r5,ptang,
*else
msh_algorithm,1,3,0,0,,,2,3,0.015,0.015,1,,,,r5,ptang,
*endif
z=ellhndof
vsel,s,volu,,vset1
aslv,s
asel,r,loc,z,h5
cm,aset1,area
asel,selv,loc,z,h5
asel,u,area,,aset1
*if,sym_,eq,1/12,then
msh_algorithm,1,3,0,0,nint(h6/z),,2,3,0.6*z,0.6*z,1,,,,,,
*else
msh_algorithm,1,3,0,0,nint(h6/z),,2,3,0.6*z,0.6*z,1,,,,,,
*endif
*if,sym_,ne,1/2,then
csys,CSst01
asel,selv,loc,y,0
asel,r,loc,z,(h5+h11+rfil6),(h13-rfil3)
*if,sym_,eq,1/12,then
msh_algorithm,1,3,0,1,,,2,3,0.065,0.070,1,,,,r5,ptang,
*else
msh_algorithm,1,3,0,1,,,2,3,0.065,0.070,1,,,,r5,ptang,0.040
*endif
*endif
*if,sym_,ne,1/2,then
csys,CSst01
asel,selv,loc,y,0
asel,r,loc,z,h5+h13-rfil3,h5+h12
asel,r,loc,x,r7-1.5*rfil3,r6
*if,sym_,eq,1/12,then
msh_algorithm,1,3,0,0,,,2,3,0.030,0.040,1,,,,r5,ptang,
*else
msh_algorithm,1,3,0,0,,,2,3,0.045,0.050,1,,,,r5,ptang,
*endif
*endif
*if,sym_,ne,1/2,then
csys,CSst01
asel,s,loc,z,(h12-tol1)+h5
asel,r,loc,x,0,r7-1.5*rfil3
calc_l=nint(((h12-tol1)-(h13+tol4))/ellhndof)
*if,sym_,eq,1/12,then
msh_algorithm,1,3,0,0,calc_l,,2,3,0.040,0.040,1,,,,,,
*else
msh_algorithm,1,3,0,0,calc_l,,2,3,0.040,0.040,1,,,,,,
*endif
*endif
init_entity_num
nummrg,node
init_entity_num
eplot
*endif
*endif
*if,enable,eq,'2d',then
*if,yn_mesh,eq,1,then
view,'f'
asel,s,area,,am-7,am-5,2
asel,a,area,,am-1
msh_area,1,0,1,esz_2dm,esz_2dm
asel,s,area,,am-2,am,2
msh_area,0,0,1,esz_2df,esz_2df
*endif
*endif
init_entity_num
*if,enable,eq,'3d',then
*if,sym_,eq,1/2,then
csys,CSst00
vsymm,y,all,,,0,0,0
init_entity_num
nummrg,node
nummrg,kp
init_entity_num
*endif
*endif
lplot
*if,enable,eq,'2d',then
csys,CSst00
*if,ptyp,eq,'i',then
lsel,u,line,,lm-10
lsel,u,line,,lm-5,lm-2,5-2
ln_group,km-36,km-6,km-50
*elseif,ptyp,eq,'x',then
lsel,u,line,,lm-15,lm-10,15-10
lsel,u,line,,lm-5,lm-2,5-2
ln_group,km-37,km-7,km-46
*endif
*if,pload,ne,0,then
sfl,all,pres,pload
*endif
init_entity_num
eplot
*if,yn_mesh,eq,1,then
csys,CSst00
nsel,selv,loc,x,0
d,all,ux
init_entity_num
nsel,selv,loc,z,(h5+h6)
nsel,r,loc,x,(rbp-rbh),(rbp+rbh)
nsel,r,loc,y,0
d,all,all
init_entity_num
nsel,selv,loc,z,h5
*if,ptyp,eq,'x',then
nsel,r,loc,x,r3+3*rfil4,r4
*elseif,ptyp,eq,'i',then
nsel,r,loc,x,(rbp-rbh),(rbp+rbh)
*endif
nsel,r,loc,y,0
d,all,all
init_entity_num
eplot
*endif
*endif
*if,enable,eq,'3d',then
*if,sym_,ne,1/2,then
csys,CSst00
lsel,s,loc,y,0
lsel,u,loc,x,r7-1.5*rfil3
lsel,u,loc,z,h5+(h13+tol4)-(rfil3-tol1)
lsel,u,loc,z,h5+h11+rfil6
ks=kp(0,0,h13+tol4)
kd=kp(r7-1.5*rfil3,0,h13+tol4)
ke=kp(r1,0,0)
ar_group,ks,kd,ke
asel,u,loc,y,0
*if,pload,ne,0,then
sfa,all,,pres,pload
*endif
init_entity_num
eplot
*if,yn_mesh,eq,1,then
csys,CSst01
create_cs,0,'CSbh01',1,rbp,ptang,0,0,0,0
nsel,selv,loc,z,h5
nsel,r,loc,x,0,rbf
nsel,r,loc,y,315,360
d,all,uz
init_entity_num
csys,CSst01
asel,selv,loc,z,h5
asel,a,loc,z,h5+h6
asel,r,loc,x,rbp
asel,r,loc,z,h5+h6
asum
*get,b_area,area,,area
f_pres=(pi*(r1**2))*pload
b_pres=(f_pres/b_area)/(2*nh)
b_forc=b_pres*b_area*(2*nh)
sfa,all,,pres,b_pres
init_entity_num
*if,sym_,eq,1/2,then
csys,CSst00
nsel,selv,loc,x,0
d,all,ux
*elseif,sym_,eq,1/12,then
csys,CSst01
nsel,s,loc,y,0
nsel,a,loc,y,ptang
nsel,u,loc,x,0
nrotat,all
dsym,symm,y,CSst01
d,all,uy
nsel,s,loc,x,0
d,all,ux
d,all,uy
*endif
init_entity_num
eplot
*endif
*else
csys,CSst01
asel,s,loc,z,h5+h11+rfil6
a_top=pi*((r6-tol2/2)**2-(r7+tol3/2)**2)
f_cpres=(pi*(r7**2))*pload
c_pres=f_cpres/a_top
sfa,all,,pres,-c_pres
lsel,s,loc,y,0
ar_group,km-275,km-274,km-309
asel,u,loc,y,0
sfa,all,,pres,pload
init_entity_num
csys,CSst00
nsel,s,loc,x,0
d,all,ux
init_entity_num
*do,i,270,270+2*bang,bang
csys,CSst01
create_cs,0,,1,rbp,i,0,0,0,0
asel,s,loc,x,0,rbh
asel,r,loc,z,h5
nsla,s,1
d,all,all
asel,s,loc,x,0,rbh
asel,r,loc,z,h5+h6
nsla,s,1
d,all,all
*enddo
init_entity_num
*if,bolts,eq,1,then
cm,vtube,volu
ddele,all
csys,CSst00
nsel,s,loc,x,0
d,all,ux
init_entity_num
*do,i,270,270+2*bang,bang
csys,CSst01
create_cs,0,'CSbh%i%',1,rbp,i,0,0,0,0
f_rad=0.70*((dbh/2)-0.9*(dbh/2))
k,,0.5*f_rad,0,h5+h6+(0.75*h6)
k,,rbh,0,h5+h6+(0.75*h6)
k,,rbh,0,h5+h6
k,,dbh/2,0,h5+h6
k,,0.90*(dbh/2),0,h5+h6
k,,0.90*(dbh/2),0,h5
k,,0.5*f_rad,0,h5
create_lines
ln_fillet,km-2,f_rad
create_area-lines
isolate_areas
revolve_aset,CSbh%i%,360,4
*enddo
csys,CSst00
vsel,u,loc,x,0,dfl
vdele,all,,,1
init_entity_num
cmsel,u,vtube
aslv,s
lsla,s
ksll,s
nummrg,kp
init_entity_num
*do,i,270,270+2*bang,bang
csys,CSbh%i%
cshold=CSbh%i%
cmsel,u,vtube
aslv,s
asel,r,loc,y,0
rotate_volm_msh,cshold,0,0,,2,3,0.6*z,0.6*z,inc718,,,rbh,90
*enddo
init_entity_num
*do,i,270,270+2*bang,bang
csys,CSbh%i%
cmsel,s,vtube
aslv,s
asel,r,loc,x,0,rbh
asel,r,loc,z,h5+h6
cm,sa,area
init_entity_num
cmsel,u,vtube
aslv,s
asel,r,loc,x,0,rbh
asel,r,loc,z,h5+h6
cm,ta,area
init_entity_num
cpl_nodes,'sa','ta',CSst00,0.010,'all'
*enddo
csys,CSst00
cmsel,u,vtube
aslv,s
asel,r,loc,z,h5
nsla,s,1
d,all,all
*endif
*endif
*endif
init_entity_num
eplot
*if,slv_,eq,1,then
finish
/config,fsplit,250
/solu
eqslv,iter,5,3
solve
cmsel,s,vtube
eslv,s
finish
/post1
/eface,1
avprin,0,0,
plnsol,s,eqv,0,1
/eface,1
avprin,0,0,
*if,enable,eq,'2d',then
csys,CSst01
nsel,s,loc,x,0,1.1*(r6-tol2/2)
esln,s
plnsol,s,eqv,0,1
*endif
*get,Smax,plnsol,,max
round_num,Sy/Smax,3
SFy=num_
round_num,Su/Smax,3
SFu=num_
round_num,(Sy/(FSyR*Smax))-1,3
MSy=num_
round_num,(Su/(FSuR*Smax))-1,3
MSu=num_
round_num,Smax,0
Smax=num_
s=Smax
p=pload
y=SFy
u=SFu
*if,enable,eq,'2d',then
*if,ptyp,eq,'i',then
/title,%p% psi Internal, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*elseif,ptyp,eq,'x',then
/title,%p% psi External, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*endif
*else
/title,%p% psi Internal, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*endif
view,'f'
*endif
*go,:skip1
Smax=182824
round_num,Sy/Smax,3
SFy=num_
round_num,Su/Smax,3
SFu=num_
round_num,(Sy/(FSyR*Smax))-1,3
MSy=num_
round_num,(Su/(FSuR*Smax))-1,3
MSu=num_
s=Smax
p=pload
y=SFy
u=SFu
*if,enable,eq,'2d',then
*if,ptyp,eq,'i',then
/title,%p% psi Internal, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*elseif,ptyp,eq,'x',then
/title,%p% psi External, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*endif
*else
/title,%p% psi Internal, Smax=%s%, SFy=%y%, MSy=%MSy%, SFu=%u%, MSu=%MSu%
*endif
view,'f'
:skip1