!
!   TITLE:  ea_sol_modal.mac (AAAV)
!
!   Before running this macro, run these:
!
!       elev_axis_assy
!       ea_mesh
!
!   Read in Ansys DB file "ea_mesh.db", apply boundary conditions
!   and perform a static analysis.
!
!   The applied boundary conditions are for determining the torsional
!   stiffness about the axis of rotation.
!
!   D. Edwards 10/23/00
!

finish
/clear,start
resume,ea_mesh,db
!
/out,ea_sol_modal,out

/prep7

tstart

/pbc,all, ,0        ! Turn off symbols until after nrotat command

! Determine if a torsional or bending modal analysis should be run
parm_val,'mir_supt','f_bend','f_bend'
parm_val,'mir_supt','EXTD2','extd2'
parm_val,'mir_supt','EXTD3','extd3'
parm_val,'mir_supt','EXTD5','extd5'
parm_val,'mir_supt','L18','l18'
parm_val,'mir_supt','D1','d1'


*if,f_bend,eq,1,then
!
csys,CSm_res1
d,node(0,0,extd2-extd3),all

csys,CSm_trq1
d,node(0,0,extd5+l18/2),ux,,,,,uy
!
rigid,rotz
!
*else

!
! Constrain for torsional modal frequency
! Constrain the torquer bearing journal in all directions
!
csys,CSm_trq1

asel,s,loc,z,1.05*extd5,.95*(l18+extd5)
asel,r,loc,x,0,d1/2
da,all,all,0,1
alls

! Constrain band drive journal to rotate only
csys,CSm_res1

parm_val,'mir_supt','EXTD4','extd4'
parm_val,'mir_supt','TSIDE','tside'
parm_val,'mir_supt','DOS','bRadius'
bRadius=bRadius/2       ! [in]    Radius of band drive journal

nsel,s,loc,z,tside,tside+extd4
nsel,r,loc,x,bRadius

nrot,all
d,all,ux
alls

*endif


*get,ncnt,node,0,count
*msg,info,ncnt,ncnt*3
There are %G nodes and %G degrees of freedom in this model

/PBC,ALL, ,1
aplot
!
FINISH
/config,fsplit,250

/solu

!******************************
!*** Powerdynamics - PCG Solve
!******************************
antype,2
modopt,subsp,3,10,2000
mxpand,4
lumpm,on
eqslv,pcg,1E-6

solve

tstop

finish
/post1

rsys,CSm_res1

/title,Elevation Axis Assy - Modal Analysis
/out
:skip