!   TITLE:  clamp.mac
!
!---------------------------------------------------------------------------
!       Rev -   11/17/00    D. Edwards
!
!---------------------------------------------------------------------------
!
!   Resolver clamp.
!
!   ct1cs:          Cartesian Coordinate System
!   cyl1cs:         Cylindrical Coordinate System
!   sph1cs:         Spherical Coordinate System
!
!******************************* TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Material and Element Type
!   4.  Solid Model
!       4.1  Outer perimeter
!       4.2  Surface Cut Patterns
!       4.3  Inner Cylinder
!       4.4  Create Separate Areas with Coincident Entities
!       4.5  Create Section Symmetry
!   5.  FE Model
!       5.1  Mesh Areas
!       5.2  Apply Constraints & Coupling
!           5.2.1  Apply Constraints
!           5.2.2  Apply Coupling
!   6.  Solve
!   7.  Post Processing
!
!***************************** END Table of Contents ************************
!
!
!
!************************** Model Assembly Preparation **********************
!
!
mod_assemb_prep                 ! prepare database for assembly

time_start

!
!
/title,Resolver Clamp
!
!
/units,bin                      ! British/inch units
!
!
!**************************** End Model Preparation *************************
!
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
clamp.parm
!
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
mod_coord_system,0,0,0,0,0,0,0

create_cs,0,'cylend',1,0,ycEnd
csys,ct1cs
create_cs,0,'cylbolt',1,0,ycBolt

!
!<<<<<<<<<<<<<<<<<<<< 3.  Material and Element Type >>>>>>>>>>>>>>>>>>>
!
!---------------------- Material Properties --------------------
!
cres=1                  ! 440C CRES inner race

mp,EX,cres,28.0E6
mp,dens,cres,.283/386.4
mp,nuxy,cres,0.27
mp,alpx,cres,5.5E-6

ET,1,shell93
ET,2,solid95
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 4.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>

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

!------------------------- 4.1  Top Profile ------------------------
!
csys,ct1cs
k
k,,xHeel,0
k,,xEnd,.75*ycEnd
k,,0,.75*ycEnd
create_area,1

csys,cylEnd         ! End radius cut
k
*do,i,-90,0,90
    k,,rEnd,i,0
*enddo
create_area,1
asba,am-1,am,,delete,delete
init_entity_num

adele,am
lfillt,lm-1,lm,rCorner
al,all
init_entity_num


! Create bolt head area for contact pressure
csys,cylBolt
k
*do,i,-90,90,45
    k,,rHead,i,0
*enddo
create_area,1
asba,am-1,am,,delete,keep
init_entity_num


! Bolt hole
csys,cylBolt
k
*do,i,-90,90,45
    k,,rBolt,i,0
*enddo
create_area,1

asba,am-2,am,,delete,delete
init_entity_num

voffst,am,-t        ! Extrude the top surface
voffst,am-2,-t-h    ! Extrude the pressure surface

numcmp,line
numcmp,area

init_entity_num
lplot
!*go,:skip
!------------------- 4.2  Bottom Extruded Cut ---------------------
!*go,:skip2
csys,ct1cs
k,,0,t,-t
k,,0,t,-1.1*(t+h)
k,,0,ycEnd,-1.1*(t+h)
k,,0,ycEnd,-t
create_lines,1
lfillt,lm-3,lm,rfi
init_entity_num
create_area,1
voffst,am,rEnd
init_entity_num
vsbv,vm-1,vm,,delete,delete
init_entity_num
lplot
:skip2
!------------------- 4.3  Top Fillet Cut ---------------------

csys,ct1cs
k
k,,0,ycEnd,0
k,,0,ycEnd,.1
k,,0,-t,.1
k,,0,-t,-1.1*(t+h)
k,,0,0,-1.1*(t+h)
create_lines,1

lfillt,lm-5,lm,rfo
init_entity_num
create_area,1

voffst,am,rEnd
init_entity_num
vsbv,vm-1,vm,,delete,delete
init_entity_num
lplot

numcmp,all
init_entity_num
!------------------- 4.4  Heel Angle Extruded Cut ---------------------
*go,:skheel
csys,ct1cs
create_cs,0,,0,xHeel
create_cs,0,,0,0,0,0,-20,0,20
create_cs,0,'ctheel',0,0,-2*xHeel

k
k,,t,0,0
k,,t,0,-2*(t+h)
k,,0,0,-2*(t+h)

create_area,1
voffst,am,2*xHeel+ycEnd
init_entity_num
vsbv,vm-1,vm,,delete,delete

init_entity_num

lplot
:skheel
!
!---------------------- 5.1  Create Mesh ----------------------
!
nummrg,kp

! Create an extra volume for meshing
csys,ct1cs
norm_cut_pln_ct,'y',rfo

asel,s,area,,1
asel,a,area,,28
msh_algorithm,1,3,,,,,1,2,.04/6,.05

asel,s,area,,32
msh_algorithm,1,3,,,7,,1,2,.04/6,.05

aclear,all

!---------------------- 5.2  Apply Constraints ----------------------
!

csys,ct1cs
nsel,s,loc,x,0
!d,all,ux
dsym,symm,x,ct1cs

! Constrain the inner edge of the heel
nsel,s,loc,z,-t-h
nsel,r,loc,y,t
d,all,ux
d,all,uy
d,all,uz

csys,cylEnd
nsel,s,loc,x,rEnd
nsel,r,loc,z,-t
d,all,uz


! Apply the pressure load
!csys,cylBolt
!nsel,s,loc,z,0
!nsel,r,loc,x,0,rHead
!asel,s,area,1
sfa,1,1,pres,100

alls

lplot
!
!----------------------- 6  Solve -----------------------
!

!*go,:skip
fini
/solu

eqslv,iter,5,3

solv

fini

!
!----------------------- 7  Post Processing -----------------------
!

/post1

!/dscale,1,10        ! Set the deflection scale

/eface,1
avprin,0,0
plnsol,u,sum,2,1

time_stop

:skip