!
!---------------------------------------------------------------------------
!       Rev -   08/16/2000      J. Rinaldi
!       Rev A   08/18/2000      D. Edwards <dee.engineering@usa.net>
!               Added solve section.
!---------------------------------------------------------------------------
!
!   This macro tests the concept of angularly intermittent stress relief
!   cuts for thermally dissimilar metals of cylindrical shape and assembled
!   concentrically.
!
!   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.  Material and Element Type
!   4.  Solid Model
!       4.1  Outer Cylinder
!       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
!   6.  Solve
!   7.  Post Processing
!
!
!***************************** END Table of Contents ************************
!
!
!
!************************** Model Assembly Preparation **********************


mod_assemb_prep                 ! prepare database for assembly

/title,Concentric Cylinders with Intermittent Thermal-Stress Relief Cuts


!**************************** End Model Preparation *************************
!
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>


thermal_collapse.parm


!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>


mod_coord_system,0,0,0,0,0,0,0


!<<<<<<<<<<<<<<<<<<<< 3.  Material and Element Type >>>>>>>>>>>>>>>>>>>
!
!---------------------- Material Properties --------------------
!
alum=1                  ! Material:  Aluminum A356-T6 azimuth gimbal
cres=2                  ! 440C CRES inner race

mp,EX,alum,10.4E6
mp,dens,alum,.097/386.4
mp,nuxy,alum,0.33
mp,alpx,alum,11.1E-6

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

!---------------------------------------------------------------


!------------------------- Element Type ------------------------
!
ET,1,plane82,,,0

!---------------------------------------------------------------


!<<<<<<<<<<<<<<<<<<<<<<<<<<< 4.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>

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

!------------------------- 4.1  Outer Cylinder ------------------------

csys,CS11

*do,i,0,270,90
    k,,r_fem_o,i,0
*enddo

create_area,1

*do,i,0,270,90
    k,,r_fem_i,i,0
*enddo

create_area,1

asba,am-1,am,,delete,delete

init_entity_num
a1=am

lplot

!---------------------- 4.2  Surface Cut Patterns ---------------------

*if,n,ne,0,then

    ! HOLE_PATTERN, csnum, rpat, zpos, numh, anginc, stang, patang, dhole

    rpat=r_fem_i-(r_cut-dpth_cut)

    HOLE_PATTERN,CS11,rpat,0,n,,0,,2*r_cut

    init_entity_num

    asel,s,area,,am-(n-1),am,1
    cm,aset1,area

    init_entity_num

    asba,a1,aset1,,delete,delete

    init_entity_num

    lplot
*endif
!
!------------------------- 4.3  Inner Cylinder ------------------------

csys,CS11

*do,i,0,270,90
    k,,r_mal_o,i,0
*enddo

create_area,1

*do,i,0,270,90
    k,,r_mal_i,i,0
*enddo

create_area,1

asba,am-1,am,,delete,delete

init_entity_num

aglue,am-3,am

init_entity_num

lplot

!-------- 4.4  Create Separate Areas with Coincident Entities ---------

csys,CS11

csn=csn+1
clocal,csn,1,0,0,0,0,0,0

csys,CS11
atran,csn,am,,,,0,0
adele,am,,,1

init_entity_num

lplot

!-------------------- 4.5  Create Section Symmetry --------------------
!
a=360/(2*n)

asel,s,area,,am-5,am,5
cm,aset1,area

csys,CS11

k,,1.5*r_fem_o,a,0
k,,1.5*r_fem_o,a+180,0

create_lines

asbl,aset1,lm,,delete,delete

init_entity_num

asel,s,loc,x,0.65*r_mal_i,1.5*r_fem_o
asel,r,loc,y,a,a+180
asel,r,loc,z,0

adele,all,,,1

init_entity_num

asel,s,loc,x,0.50*r_mal_i,1.5*r_fem_o
asel,r,loc,y,-(360-(a+180)),a
asel,r,loc,z,0

cm,aset1,area

:skip3
k,,1.5*r_fem_o,0,0
k,,1.5*r_fem_o,180,0

create_lines

asbl,aset1,lm,,delete,delete

init_entity_num

asel,s,loc,x,0.50*r_mal_i,1.5*r_fem_o
asel,r,loc,y,a+180,360
asel,r,loc,z,0

adele,all,,,1

init_entity_num

lplot
!*go,:skip
!<<<<<<<<<<<<<<<<<<<<<<<<<<<< 5.  FE Model >>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
!--------------------------- 5.1  Mesh Areas --------------------------

csys,CS11

!asel,s,loc,x,0.50*r_mal_i,r_fem_o
!asel,r,loc,y,0,a
!asel,r,loc,z,0

get_max_entity
a1=am
get_min_entity
a2=a_min

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

asel,s,area,,a2
MSH_ALGORITHM,1,1,,0,,0,1,,0.02,0.08,cres,,13,,,,

asel,s,area,,a1
MSH_ALGORITHM,1,1,,0,,0,1,,0.02,0.08,alum,,13,,,,

init_entity_num

lplot

!*go,:skip
!----------------------- 5.2  Apply Constraints -----------------------
!
csys,CS11
nsel,s,loc,x,r_mal_i,r_fem_o
!nsel,r,loc,y,0,a
nsel,r,loc,y,0,180
nsel,r,loc,z,0
cm,ndset1,node
nrotat,all

init_entity_num

nsel,s,node,,ndset1
nsel,r,loc,y,0

d,all,uy

init_entity_num

nsel,s,node,,ndset1
!nsel,r,loc,y,a-0.20,a+.20
nsel,r,loc,y,180

d,all,uy

*go,:skip4

nsel,s,loc,x,r_mal_i
nsel,r,loc,y,90
d,all,all
:skip4

init_entity_num

cpintf,ux,.0001

lplot

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

antype,0
tunif,Ttest
tref,Troom

solv

fini

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

/post1
rsys,1          ! Use cylindrical coordinates to get radial displacements

/dscale,1,10        ! Set the deflection scale

/eface,1
avprin,0,0
plnsol,U,X,2,1  ! Show radial displacements

:skip