!   TITLE:  str_tube_slev_375a080.mac (ISS)
!
!---------------------------------------------------------------------------
!       Rev -   RELEASED    11/06/2000      J. Rinaldi
!---------------------------------------------------------------------------
!
!   This macro creates the stator tube sleeve, 375A080, used in the
!   ISS (International Space Station) end unit CU09616052.  The analysis
!   is for stresses due to pressure effects. The analysis is performed
!   for the worst case (minimum material condition) tolerances of the
!   part; under the specified loading conditions.  The tolerances are
!   listed in the parameter section. (See table of contents)
!
!   This analysis consists primarily of an axisymmetric model, but a 3d
!   model may be created to verify results.  The 3d section of code may be
!   disabled for an axissymmetric mode only.  This is done by the 'enable'
!   parameter at the end of section 1. (Parameter List)
!
!   CSstr0: Cartesian Stator Tube Coordinate System
!   CSstr1: Cylindrical Stator Tube Coordinate System
!   CSstr2: Spherical Stator Tube Coordinate System
!
!******************************* TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Material and Element Type
!   4.  Solid Model
!       4.1  Cross-Sectional Area
!           4.1.1  Partition Area
!   5.  FE Model
!
!       Finalize Model Data Storage
!
!   6.  Loading and Constraints
!   7.  Preparation for Solve
!
!************************** Model Assembly Preparation **********************
!
!
mod_assemb_prep             ! prepare database for assembly
!
!
/title,Stator Tube Sleeve 375A080
!
!
/units,bin                  ! British/inch units
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
! The 'enable' parameter determines the type of model to
! create. If enable='3d', then a 3 dimensional solid model
! will be generated, and a 3D analysis performed. For enable=2d,
! an axissymmetric model will be generated and analyzed.
!
*ask,enable,Analyze 2D or 3D model,'2d'
*ask,elordr,high-h or low-l order element,'l'
*ask,ptyp,INTERNAL(i) or EXTERNAL(x) pressure,'i'
*ask,pload,Pressure Load,0
*ask,numel,# of elements along 90 arc,40
*ask,bolt_mis,y 1 bolt missing - n for not,'n'
!
str_tube_slev_375a080.parm
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
mod_coord_system,0,1.00,2.00,3.00,0,-90,0
!
!
!<<<<<<<<<<<<<<<<<<<< 3.  Material and Element Type >>>>>>>>>>>>>>>>>>>
!
!---------------------- Material Properties --------------------
!
UIMP,1,EX, , ,29.0E6,               ! Material:  304L / 316L CRES
UIMP,1,DENS, , ,0.286/g_bin,
UIMP,1,NUXY, , ,0.27,
!
!------------------------- Element Type ------------------------
!
ET,1,plane82,,,1,
!
*if,elordr,eq,'h',then
    ET,2,shell93
    ET,3,solid95
*elseif,elordr,eq,'l',then
    ET,2,shell63
    ET,3,solid45
*endif
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 4.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!
*if,pload,ne,0,then
    *if,ptyp,eq,'i',then
        /title,Stator Tube Sleeve 375A080 @ %pload% psi Internal
    *elseif,ptyp,eq,'x',then
        /title,Stator Tube Sleeve 375A080 @ %pload% psi External
    *endif
*else
    /title,Stator Tube Sleeve 375A080
*endif
!
!---------------------- 4.1  Cross-Sectional Area ---------------------
!
csys,CSstr1
!
k,,r1,0,h1
k,,r3,0,h1
k,,r3,0,h2
k,,r2,0,h2
k,,r2,0,(h2+h3)
!
k,,r3,0,(h2+h3)
k,,r3,0,h5
k,,r5+rfil1,0,h5
k,,r4,0,h5
k,,r4,0,(h5+h6)
!
k,,r5,0,(h5+h6)
k,,r5,0,2*h5
k,,r8,0,2*h5
k,,r8,0,(h5+h8)
k,,r9,0,(h5+h8)
!
k,,r9,0,(h5+h11)
k,,r6,0,(h5+h11)
k,,r6,0,h12
k,,0,0,h12
k,,0,0,h13
!
k,,r7,0,h13
k,,r7,0,(h5-h10)
k,,r1,0,(h5-h10)
!
create_lines
!
ax1=km-4
ax2=km-3
!
lfillt,lm-17,lm-16,rfil4
lfillt,lm-20,lm-19,rfil5
lfillt,lm-19,lm-18,rfil5
lfillt,lm-13,lm-12,rfil1
lfillt,lm-11,lm-10,rfil2
!
lfillt,lm-3,lm-2,rfil3
lfillt,lm-8,lm-7,rfil6
lfillt,lm-7,lm-6,rfil6
lfillt,lm,lm-1,rfil7
!
chamfer_area,1,lm-22,lm-21,chmf1
chamfer_area,1,lm-15,lm-16,chmf2
chamfer_area,1,lm-25,lm-24,chmf3
!
create_area-lines
!
lplot
!
!------------------------ 4.1.1  Partition Area -----------------------
!
csys,CSstr1
!
k,,r5+rfil1,0,0                     ! flange partition line
k,,r5+rfil1,0,h5+h8
!
create_lines,,1
!
k,,r5,0,h13-rfil3                   ! top partition line
k,,0,0,h13-rfil3
!
create_lines,,1
!
k,,r9,0,h5+h11+rfil6                ! bottom partition line
k,,0,0,h5+h11+rfil6
!
create_lines,,1
!
isolate_lines
cm,lset1,line
!
init_entity_num
!
ara_part_line,'lset1'
!
lplot
!
!----------------------------- 5.  FE Model ---------------------------
!
*if,enable,eq,'3d',then
    !
    adele,am-3,,,1
    !
    isolate_areas
    !
    revolve_aset,ax1,ax2,ptang,1
    !
    init_entity_num
    !
    flng_ptrn_1,CSstr1,rbp,h5,nh,rtangle,rtangle,dbh,rbf,rfout,r5+rfil1,rbh,rff
    !
    csys,CSstr1
    !
    max_enty_dim,'l'
    !
    k,,3*max_leng,0,h5
    k,,3*max_leng,180,h5
    !
    create_lines,,1
    !
    k,,3*max_leng,90,h5
    k,,3*max_leng,270,h5
    !
    create_lines,,1
    !
    isolate_lines
    cm,lset1,line
    !
    init_entity_num
    !
    isolate_areas
    !
    ara_part_line,'lset1'
    !
    nummrg,kp
    !
    init_entity_num
    !
    isolate_areas
    !
    asel,r,loc,y,0,270
    adele,all,,,1
    !
    init_entity_num
    !
    asel,s,area,,am-3
    extrude_aset,-h6
    !
    isolate_areas
    extrude_aset,h6
    !
    csys,CSstr1
    !
    asel,selv,loc,y,0                               ! mesh cylinder wall
    asel,r,loc,z,(h5+h11+rfil6),(h13-rfil3)
    msh_algorithm,1,3,1,1,,,2,3,.050,.055,1,,,,r8,90,0.050
    !
    asel,selv,loc,y,0                               ! mesh end cap
    asel,r,loc,z,(h13-rfil3),h12
    msh_algorithm,1,3,0,0,,am-93,2,3,.030,.040,1,,,vm-4,r8,90,0.050
    !
    asel,selv,loc,y,0                               ! mesh seal support
    asel,r,loc,z,0,h5+h8
    asel,r,loc,x,r7,r5
        vsla,s
        cm,vset1,volu
    msh_algorithm,1,3,0,0,,,2,3,.025,.025,1,,,,r8,90,.050
    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
    !
    msh_algorithm,1,3,0,0,nint(h6/z),,2,3,z,.025,1,,,,,,    ! mesh flange
    !
    aclear,all
    !
    nummrg,all
    !
    eplot
    !
*endif
!
!
*if,enable,eq,'2d',then
    !
    /VIEW, 1 ,,,1
    /ANG, 1
    lplot
    !
    asel,s,area,,am-2
    !
    msh_algorithm,1,1,1,,,,1,,0.008,0.013,1,,,,,,
    !
    asel,s,area,,am-3
    asel,a,area,,am-1,am,1
    !
    msh_algorithm,1,1,0,,,,1,,0.008,0.013,1,,,,,,
*endif
!
eplot
!
!
!--------------------- 6.  Loading and Constraints --------------------
!
*if,enable,eq,'2d',then
    !
    *if,ptyp,eq,'i',then
        !
        csys,CSstr1
        !
        lsel,s,loc,y,0
        lsel,r,loc,z,0,h13
        lsel,r,loc,x,0,r3
        !
        lsel,u,line,,lm-4,lm-1,1
        lsel,u,line,,lm-51
        lsel,u,line,,lm-26
        !
        sfl,all,pres,pload
        !
        init_entity_num
        !
        nsel,selv,loc,x,0
        !
        d,all,ux
        !
        init_entity_num
        !
        nsel,selv,loc,z,(h5+h6)         ! constrain top bolt surface
        nsel,r,loc,x,(rbp-rbh),(rbp+rbh)
        nsel,r,loc,y,0
        !
        d,all,all
        !
        init_entity_num
        !
        nsel,selv,loc,z,h5              ! constrain bottom bolt surface
        nsel,r,loc,x,(rbp-rbh),(rbp+rbh)
        nsel,r,loc,y,0
        !
        d,all,all
        !
        init_entity_num
        !
        eplot
        !
    *elseif,ptyp,eq,'x',then
        !
        csys,CSstr1
        !
        lsel,s,loc,y,0
        lsel,r,loc,z,0,h5
        lsel,a,loc,x,0,r7
        lsel,r,loc,z,0,h13
        !
        lsel,a,line,,lm-38
        lsel,a,line,,lm-6,lm-2,2
        cm,lset1,line
        !
        init_entity_num
        !
        lsel,u,line,,lset1
        !
        sfl,all,pres,pload
        !
        init_entity_num
        !
        nsel,selv,loc,x,0
        !
        d,all,ux
        !
        init_entity_num
        !
        nsel,selv,loc,z,(h5+h6)     ! constrain top bolt surface
        nsel,r,loc,x,(rbp-rbh),(rbp+rbh)
        nsel,r,loc,y,0
        !
        d,all,all
        !
        init_entity_num
        !
        nsel,selv,loc,z,h5          ! constrain bottom bolt surface
        nsel,r,loc,x,r3+3*rfil4,r4
        nsel,r,loc,y,0
        !
        d,all,all
        !
        init_entity_num
        !
        eplot
    *endif
*endif
!
!
*if,enable,eq,'3d',then
    !
    csys,CSstr1                 ! select load areas
    !
    lsel,s,loc,y,0
    lsel,r,loc,z,0,h13
    lsel,r,loc,x,0,r3
    !
    lsel,u,line,,lm-283,lm-280,1
    lsel,u,line,,lm-305
    lsel,u,line,,lm-330
    !
    asll,s
    asel,u,loc,y,0
    !
    sfa,all,,pres,pload             ! apply pressure load to areas
    !
    init_entity_num
    !
    asel,s,area,,am-35
    asel,a,area,,am-43
    asel,a,area,,am-15
    asel,a,area,,am-6
    !
    nsla,s,1
    !
    d,all,all
    !
    init_entity_num
    !
    csys,CSstr1
    !
    nsel,s,loc,y,0
    nsel,a,loc,y,3*rtangle
    !
    dsym,symm,y,CSstr1
    !
    init_entity_num
    !
    eplot
*endif
!




*go,:skip2


!--------------------- 7.  Prepararation for Solve --------------------
!
!
*if,bolt_mis,eq,'y',then
    ddele,all
    sfadele,all
    !
    csys,CSstr0
    !
    vsymm,y,all,,,,1,0
    !
    nummrg,all
    !
    nsel,s,loc,x,0
    !
    csys,CSstr1
    !
    dsym,symm,y,CSstr1
    !
    init_entity_num
    !
    csys,CSstr1
    !
    asel,selv,loc,z,h5
    asel,a,loc,z,h5+h6
    asel,r,loc,x,(rbp-rbh),(rbp+rbh)
    asel,r,loc,y,-90,60
    !
    nsla,s,1
    !
    d,all,all
    !
    init_entity_num
    !
    csys,CSstr0
    !
    lsel,selv,loc,x,0
    lsel,r,loc,y,-r3,r3
    lsel,r,loc,z,0,h13
    !
    csys,CSstr1
    !
    lsel,u,loc,x,r6
    !
    lsel,u,line,,lm-456
    lsel,u,line,,lm-454
    lsel,u,line,,lm-420
    lsel,u,line,,lm-174
    lsel,u,line,,lm-168
    !
    lsel,u,line,,lm-97
    lsel,u,line,,lm-433
    lsel,u,line,,lm-136
    !
    asll,s
    asel,u,loc,y,90
    asel,u,loc,y,270
    !
    sfa,all,,pres,pload
    !
    init_entity_num
*endif
!
!
!finalize_model_data
!
!
FINISH
!
/config,fsplit,250
!
/solu
!
eqslv,iter,5,3

solve


:skip2