!   TITLE:  cover.mac (HONEYWELL TRPS)
!
!-----------------------------------------------------------------------
!       Rev -   11/27/2002      D. Edwards
!-----------------------------------------------------------------------
!
!   COVER & CONNECTOR ADAPTER ASSY  315A133 (CU01715103)
!   COVER, MODIFIED                 315A132
!
!   This analysis determines the stresses in the cover near the laser weld
!   where the section discontinity occurs.
!
!   Axisymmetric model with non-axisymmetric loading using a constant
!   G load in the global +X direction.
!
!   An equivalent mass of the connecors and their mounting block is modeled
!   as uniform ring around the cover.
!
!   CS_0:       Cartesian axis Coordinate System
!   CS_1:       Cylindrical axis Coordinate System
!   CS_2:       Spherical axis Coordinate System
!
!
!************************** TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Solid Model
!
!********************* Model Assembly Preparation **********************
!
mod_assemb_prep,arg1,arg2,arg3      ! prepare database for assembly
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
cover.parm
!
*if,f_cont,eq,1,then
    /title,%Gload% g's on 315A133 with %gapS% gap
*else
    /title,%Gload% g's on 315A133 with no gap
*endif
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate System >>>>>>>>>>>>>>>>>>>>>
!
mod_coord_system,acs,xc,yc,zc,rotxyc,rotyzc,rotzxc
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 3.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!

!
! Keypoint Definitions from cover.parm
!
k,km+1,x1,y1,z1                      ! km + 1
k,km+2,x2,y2,z2                      ! km + 2
k,km+3,x3,y3,z3                      ! km + 3
k,km+4,x4,y4,z4                      ! km + 4
k,km+5,x5,y5,z5                      ! km + 5
k,km+6,x6,y6,z6                      ! km + 6
k,km+7,x7,y7,z7                      ! km + 7
k,km+8,x8,y8,z8                      ! km + 8
k,km+9,x9,y9,z9                      ! km + 9
k,km+10,x10,y10,z10                  ! km + 10
k,km+11,x11,y11,z11                  ! km + 11
k,km+12,x12,y12,z12                  ! km + 12 (center)
k,km+13,x13,y13,z13                  ! km + 13
k,km+14,x14,y14,z14                  ! km + 14
k,km+15,x15,y15,z15                  ! km + 15
k,km+16,x16,y16,z16                  ! km + 16
k,km+17,x17,y17,z17                  ! km + 17
k,km+18,x18,y18,z18                  ! km + 18 (center)

!
! Line Definitions
!
L,km+1,km+2                          ! lm + 1
L,km+3,km+4                          ! lm + 2
L,km+5,km+6                          ! lm + 3
L,km+5,km+3                          ! lm + 4
L,km+1,km+7                          ! lm + 5
L,km+8,km+9                          ! lm + 6
L,km+10,km+11                        ! lm + 7
larc,km+11,km+6,km+12,r1             ! lm + 8
larc,km+9,km+4,km+12,r2              ! lm + 9
L,km+13,km+14                        ! lm + 10
L,km+15,km+13                        ! lm + 11
L,km+8,km+14                         ! lm + 12
L,km+16,km+15                        ! lm + 13
L,km+10,km+16                        ! lm + 14
L,km+17,km+10                        ! lm + 15
L,km+2,km+16                         ! lm + 16
larc,km+7,km+17,km+18,r3             ! lm + 17

lplot

view,'f'

! Create areas in fine and course mesh regions
lsel,s,loc,y,y1,y10
al,all

init_entity_num

lsel,s,loc,y,y10,y3
al,all

init_entity_num

!
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 4.  Meshing >>>>>>>>>>>>>>>>>>>>>>>>>>
!

!MSH_AREA, mstyp, mshdens, etpa, elmnl, elmxl, lszmsh, mat, real, ecs
asel,s,area,,am-1
msh_area,0,0,1,hmesh,hmesh,,c316L

asel,s,area,,am
msh_area,0,0,1,hmesh*10,hmesh*50,,c316L

!
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 5.  Constraints >>>>>>>>>>>>>>>>>>>>>>>>
!

! Fix nodes at weld
nsel,s,loc,y,y1-.001,y1

*if,gapS,lt,0,then
    d,all,ux,-gapS
    d,all,uy
*else
    d,all,all
*endif

! Apply contact elements along length of overlap
lsel,s,line,,5
nsll,s,1                    ! All nodes
nsel,r,loc,y,y1,.300

*if,f_cont,eq,0,then
    *if,gapS,lt,0,then
        d,all,ux,-gapS
    *else
        d,all,ux
    *endif
*else
    !NGEN, ITIME, INC, NODE1, NODE2, NINC, DX, DY, DZ, SPACE
    ngen,2,nm+1,all,,,-.001    ! Copy nodes down the correct gap distance

    type,2
    mat,2
    real,2

    !EINTF, TOLER, K, TLAB, KCN, DX, DY, DZ, KNONROT
    eintf,,,low,0,-.001,0,0

    nsll,u,1
    !d,all,ux,,,,,uy
    d,all,all
*endif

init_entity_num,1

fini

!
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 6.  Solution >>>>>>>>>>>>>>>>>>>>>>>>
!

/sol

antype,0

*if,f_gload,eq,1,then
    acel,g_bin*Gload,0,-g_bin*Gload     ! [in/sec^2*G] Peak G loading

    !MODE, MODE, ISYM
    mode,1,1
*endif


*if,f_cont,eq,1,then
    solcontrol
    !autots,on
    !nsub,20
*endif

solv

fini

/post1

/dscale,,1

! Plot displacement along overlap
lsel,s,line,,5
nsll
!fcn1='gapS-'
rplot_nodal,0,'y','U','x'

! Plot stress along weld
!lsel,s,line,,1
!nsll,s,1
!nsle,r,corner
!rplot_nodal,0,'x','s','eqv'

avprin,0,0,
plnsol,s,eqv,2,1