!   TITLE:  cal_nhbb.mac (AAAV)
!
!-----------------------------------------------------------------------
!       Rev -   04/04/2001  D. Edwards
!-----------------------------------------------------------------------
!
!   Based on the deflection obtained from raceo_top_mpb.mac, determine
!   the inner radius of a uniform annulus needed to give the same
!   deflection.
!
!   This model takes the inner radius as an input argument:
!
!       Usage:  cal_mpb,r_inner
!
!   CS10:   Cartesian Coordinate System
!   CS11:   Cylindrical Coordinate System
!   CS12:   Spherical Coordinate System
!
!
!************************** TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Solid Model
!
!
!********************* Model Assembly Preparation **********************
!
!
mod_assemb_prep
!
/title,NHBB Upper Azimuth Race Inner Radius Calibration
!
/units,bin
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
r_inner=arg1

raceo_top_nhbb.parm
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
mod_coord_system,CS10,0,0,0,0,0,0
!
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 3.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!

/VIEW, 1 ,,,1
/ANG, 1

csys,CS10

! Create the outer race
cyl4,0,0,r_inner,0,x2,90

! Create the outer annulus of aluminum
cyl4,0,0,x2,0,r_outer,90

init_entity_num

lplot

!
!            (1)     (2)     (3)   (4)    (5)    (6)    (7)  (8)   (9)
! MSH_AREA, mstyp, mshdens, etpa, elmnl, elmxl, lszmsh, mat, real, ecs
!

! Mesh the race
asel,s,area,,am-1
msh_area,0,0,2,esize,esize,,c440C

! Mesh the aluminum ring
asel,s,area,,am
msh_area,0,0,2,esize,esize,,alum


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

! Couple the Outer Race to the Sleeve
csys,CS11               ! Rotate all radial coupled nodes
nsel,s,loc,x,x2
nrotat,all
cpintf,ux


! Constrain horizontal edge
nsel,s,loc,y,0,-1
d,all,uy

! Constrain vertical line of symmetry in the hoiz. direction
csys,CS10
nsel,s,loc,x,0

csys,CS11
nrotat,all              ! Make all nodal CS's on symm plane the same!

csys,CS10
d,all,uy                ! Contrain in horizontal direction

alls

fini

!
!----------------------- Solve -----------------------
!
/solu

antype,0
tunif,Ttest
tref,Troom

solv

fini

!
!----------------------- Postprocess -----------------------
!

! Return yzero = max deflection at inner surface
/post1

csys,CS10
rsys,CS11
ni=node(r_inner,0,0)
*get,yzero,node,ni,u,x

:skip