!   TITLE:  band_drive.mac (AAAV)
!
!---------------------------------------------------------------------------
!   Rev -   RELEASED    07/12/2001      J. Rinaldi
!---------------------------------------------------------------------------
!
!   This macro builds a section of the band drive for the AAAV.
!
!   The purpose of this macro is to compare the effects of having
!   two holes instead of one in the band.  It was found that the second
!   hole has an insignificant effect.
!
!                   P/N SK303A005
!
!   This is used in the AAAV assembly, end unit CU01715076.
!
!   CSban0:     Cartesian Motor Cap Coordinate System
!   CSban1:     Cylindrical Motor Coordinate System
!   CSban2:     Spherical Motor Cap 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
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
band_drive.parm
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate System >>>>>>>>>>>>>>>>>>>>>
!
mod_coord_system,acs,xc,yc,zc,rotxyc,rotyzc,rotzxc
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 3.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
k,km+1,x1,y1,z1              ! km + 1
k,km+2,x2,y2,z2              ! km + 2
k,km+3,x3,y3,z3              ! km + 3 (center)
k,km+4,x4,y4,z4              ! km + 4
k,km+5,x5,y5,z5              ! km + 5
k,km+6,x6,y6,z6              ! km + 6 (center)
k,km+7,x7,y7,z7              ! km + 7
k,km+8,x8,y8,z8              ! km + 8
k,km+9,x9,y9,z9              ! km + 9 (center)
k,km+10,x10,y10,z10          ! km + 10
k,km+11,x11,y11,z11          ! km + 11
k,km+12,x12,y12,z12          ! km + 12
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
k,km+19,x19,y19,z19          ! km + 19
k,km+20,x20,y20,z20          ! km + 20
k,km+21,x21,y21,z21          ! km + 21 (center)
k,km+22,x22,y22,z22          ! km + 22
k,km+23,x23,y23,z23          ! km + 23
k,km+24,x24,y24,z24          ! km + 24
!

larc,km+4,km+5,km+6,r2       ! lm + 2
larc,km+7,km+8,km+9,r3       ! lm + 3
L,km+8,km+10                 ! lm + 4
L,km+5,km+11                 ! lm + 5
L,km+12,km+13                ! lm + 6
L,km+14,km+15                ! lm + 7
L,km+13,km+15                ! lm + 8
L,km+12,km+14                ! lm + 9
larc,km+10,km+4,km+6,r7      ! lm + 13
larc,km+11,km+7,km+9,r8      ! lm + 14
larc,km+19,km+20,km+21,r9    ! lm + 15
larc,km+22,km+23,km+21,r10   ! lm + 16
larc,km+20,km+22,km+21,r11   ! lm + 17
larc,km+23,km+19,km+21,r12   ! lm + 18

*if,nh,eq,2,then
    larc,km+1,km+2,km+3,r1       ! lm + 1
    larc,km+16,km+17,km+3,r4     ! lm + 10
    larc,km+2,km+16,km+3,r5      ! lm + 11
    larc,km+17,km+1,km+3,r6      ! lm + 12
*endif


! Turn on KP and line numbers & switch to front view.
/pnum,kp,1
/pnum,line,1
/view,1,,,1
/ang, 1
/rep,fast
lplot
!

lsel,s,loc,x,-r1,r2
lsel,r,loc,y,y19,y7
cm,lcuts,line           ! Group the hole(s) and slot together

lsel,inve               ! Select the rectangular perimeter
al,all

lsel,s,loc,x,-r1,r2
lsel,r,loc,y,-r1,r1
al,all                  ! Lower hole

*if,nh,eq,2,then
    lsel,s,loc,x,-r1,r2
    lsel,r,loc,y,dh-r1,dh+r1
    al,all                  ! Upper hole
*endif

lsel,s,line,,lcuts
lsel,u,loc,y,-r1,dh+r1
al,all                  ! Slot area

asba,am+1,all,,delete,delete

init_entity_num

!                  (1)     (2)     (3)   (4)    (5)    (6)    (7)  (8)   (9)
!MSH_AREA, mstyp, mshdens, etpa, elmnl, elmxl, lszmsh,  mat, real, ecs
! The model solves in 40 sec with the following mesh:
!msh_area, 0    , 0      , 1   , r1/5 , r1   ,       ,c17_4,1

! Solve time: 3 min 28 sec
msh_area, 0    , 0      , 1   , r1/8 , r1/8   ,       ,c17_4,1

! Constrain the model
nsel,s,loc,y,y13        ! Bottom edge
d,all,all

nsel,s,loc,y,y12,y12+.005   ! Top edge
d,all,uy,.001

alls

finish


!******************
!*** Powerdynamics
!******************

/solu

antype,0
! eqslv,pcg,1E-6

tstart

solve

tstop

finish

/post1


! finalize_model