!   TITLE:  raceo_top_nhbb.mac (AAAV)
!
!---------------------------------------------------------------------------
!       Rev -   03/26/2001  D. Edwards
!---------------------------------------------------------------------------
!
!   This macro computes the equivalent thickness ring for a temperature test
!   in an aluminum assembly.
!
!   First the actual race deflection is computed with an arbitrary thickness
!   aluminum sleeve assembled outside of the race.  The race deflection at the
!   ball contact points (use the minimum algebraic value) is used to find an
!   equivalent uniform ring which compresses the same amount when assembled
!   with the aluminum sleeve.
!
!
!   CS10:   Cartesian central Coordinate System
!   CS11:   Cylindrical central Coordinate System
!   CS12:   Spherical central Coordinate System
!
!
!******************************* TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Solid Model
!
!
!************************** Model Assembly Preparation **********************
!
!
mod_assemb_prep
!
tstart
!
/title,NHBB Upper Azimuth Outer Race (490A045-101)
!
!
/units,bin
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
raceo_top_nhbb.parm                 ! name of parameter file
!
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
mod_coord_system,CS10,0,0,0,0,0,0
!
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 3.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!

/view,1,,,1
/ang,1


!
! Keypoint Definitions from raceo_top_nhbb.parm
!

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

ktop=km+17
kbot=km+14

!
! Race geometry
! Line definitions from nhbb_u.igs
!

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

al,all


!
! Add a uniform section of aluminum
!

init_entity_num

k,,x6,y6,z6                  ! Define surface to couple to
k,,x5,y5,z5


k,,x5,y5-extra               ! Extra mtrl below chamfer
k,,r_outer,y5-extra
k,,r_outer,y6
k,,x11,y6

create_area


!                  (1)      (2)     (3)     (4)      (5)       (6)     (7)   (8)
! MSH_ALGORITHM, perflsz, perfmsh, mstyp, mshdens, elmszovr, atargov, etpa, etpv,
!
!                elmnl, elmxl, mtrl, rl, ecs, volsel
!                 (9)    (10)  (11) (12) (13)  (14)


!
! Mesh the race
!
asel,s,area,,am-1
msh_algorithm,1,1,0,0,,,1,,.02,.03,c440C,CS10


!
! Mesh the aluminum ring
!
asel,s,area,,am
msh_algorithm,1,1,0,0,,,1,,.02,.03,alum,CS10


!
!------------------- Apply Boundary conditions -------------------------
!

! Couple the interface nodes in x direction only

! Contrain OD/ID interface radially
nsel,s,loc,x,x5
nsel,r,loc,y,y5,y6
cpintf,ux

! Contrain bearing flange to top of ring
nsel,s,loc,y,y6
nsel,r,loc,x,x6,x11
cpintf,uy


! Tie down the aluminum sleeve
nsel,s,loc,y,y5-extra
d,all,uy

alls

!*go,:skip
!
!----------------------- 6  Solve -----------------------
!
fini
/solu

antype,0
tunif,Ttest
tref,Troom

solv

fini

/post1

ksel,s,kp,,ktop
nslk,s
*get,ntop,node,0,num,max
*get,uxctt,node,ntop,u,x            ! Total movement of top node

! Compensate for thermal shrinkage of race by itself (no alum ring)
uxct=uxctt-nx(ntop)*(Ttest-Troom)*ALPX440C

ksel,s,kp,,kbot
nslk,s
*get,nbot,node,0,num,max
*get,uxctb,node,nbot,u,x            ! Total movement of top node

! Compensate for thermal shrinkage of race by itself (no alum ring)
uxcb=uxctb-nx(nbot)*(Ttest-Troom)*ALPX440C

! Worst case deflection
*if,uxctt,le,uxctb,then
    maxdef=uxctt
*else
    maxdef=uxctb
*endif

/nopr
/out,raceo_top_nhbb,sum
*msg
Net radial deflection of ball contact points with outer race:

*msg

*msg
  For use in raceo_top_nhbb.tkw to determine equivalent ring thickness:

*msg,,uxct,uxcb
  dri(top) =  %g,  dri(bottom) = %g

*msg

*if,uxct,le,uxcb,then
*msg
  Plug the "top" deflection into Tk-Solver
*else
*msg
  Plug the "bottom" deflection into Tk-Solver
*endif

*msg

*msg
Total radial deflection of ball contact points:

*msg,,uxctt,uxctb
  dri(top) = %g,  dri(bottom) = %g

/out
/gopr
*uilist,raceo_top_nhbb,sum

!
! Build a planar model and iterate on it to find the equivalent
! race inner radius dimension
!
! Find: f(r_inner) = maxdef

zero,'cal_nhbb',1.5,x2-.05,maxdef,1e-7

tstop