!   TITLE:  mirror.mac
!
!---------------------------------------------------------------------------
!       Rev -   03/14/2000  J. Rinaldi
!---------------------------------------------------------------------------
!
!   This is a macro that builds the AAAV mirror.  It is current for ANSYS
!   5.6.  The model is built off of a set of local coordinate systems:
!
!   CSm0:       Cartesian Mirror Coordinate System
!   CSm1:       Cylindrical Mirror Coordinate System
!   CSm2:       Spherical Mirror Coordinate System
!
!
!******************************* TABLE OF CONTENTS **************************
!
!      Model Assembly Preparation
!
!   1. Model Coordinate System
!   2. Material and Element Type
!   3. Parameter List
!   4. Solid Model
!       4.1  Create Center Boss Volume
!           4.1.1  Create Boss Area Profile
!       4.2  Create Center Section
!           4.2.1  Create Center Section Area Profile
!       4.3  Create Outer Mirror Volumes
!       4.4  Volume Symmetry Reflection
!
!
!************************** Model Assembly Preparation **********************
!
!
mod_assemb_prep             ! prepare database for assembly
!
!
/title,AAAV Mirror Construction
!
!
/units,bin                  ! British/inch
!
!
!**************************** End Model Preparation *************************
!
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
mirror.parm             ! name of parameter file
!
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
!mod_coord_system,CSmirsp0,0,0,0,0,0,0

mod_coord_system,CSar0,0,0,-adap_l1
!
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
!
!<<<<<<<<<<<<<<<<<<<< 3.  Material and Element Type >>>>>>>>>>>>>>>>>>>
!
!
!---------------------- Material Properties --------------------
!
UIMP,2,EX, , ,9.9E6,        ! Aluminum A356
UIMP,2,DENS, , ,.097/386.4,
UIMP,2,NUXY, , ,0.33,
!
!---------------------------------------------------------------
!
!------------------------- Element Type ------------------------
!
ET,1,SOLID95
ET,2,SHELL93
!
!---------------------------------------------------------------
!
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 4. Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>
!
!
!----------------- 4.1  Create Center Boss Volume -----------------
!
!
!----------------- 4.1.1  Create Boss Area Profile ----------------
!
csys,CSm1
!
k,,0,0,0
!
*do,i,0,((pi/2)*dconv),((pi/2)*dconv)
    k,,dboss/2,i,0
*enddo
!
create_area,1
!
asel,s,area,,am
!
extrude_aset,l1
!
init_entity_num
!
lplot
!
!-------------------- 4.2  Create Center Section --------------------
!
!
!------------- 4.2.1  Create Center Section Area Profile ------------
!
csys,CSm0
!
k,,l2,0,l1
k,,l2,h1,l1
k,,0,h1,l1
k,,0,0,l1
!
create_area
!
asba,am,am-4,,delete,keep
!
init_entity_num
!
asel,selv,loc,z,l1
!
extrude_aset,l3
!
init_entity_num
!
lplot
!
!------------------ 4.3  Create Outer Mirror Volumes ----------------
!
csys,CSm0
!
k,,l4/2,0,(l1+l3)
k,,l4/2,0,(l1+l3-l5)
!
k,,l4/2,h2/2,(l1+l3)
k,,l4/2,h2/2,(l1+l3-l5)
!
k,,0,h2/2,(l1+l3)
k,,0,h2/2,(l1+l3-l5)
!
init_entity_num
!
lstr,km-5,km-4
lstr,km-3,km-2
lstr,km-1,km
lstr,km-5,km-3
lstr,km-3,km-1
!
lstr,km-4,km-2
lstr,km-2,km
lstr,km-4,kp(l2,0,l1)
lstr,km,kp(0,h1,l1)
lstr,km-2,kp(l2,h1,l1)
!
lstr,km-5,kp(l2,0,(l1+l3))
lstr,km-3,kp(l2,h1,(l1+l3))
lstr,km-1,kp(0,h1,(l1+l3))
!
p1=kp(l2,0,(l1+l3))
p2=kp(l2,h1,(l1+l3))
p3=kp(0,h1,(l1+l3))
!
p4=kp(l2,0,l1)
p5=kp(l2,h1,l1)
p6=kp(0,h1,l1)
!
v,km-5,km-4,km-2,km-3,p1,p4,p5,p2
v,km-3,km-2,km,km-1,p2,p5,p6,p3
!
k,,l4/2,(h2/2)-h3,1.2*(l1+l3)
k,,l4/2,(h2/2)-h3,0
k,,(l4/2)-l6,(h2/2),0
k,,(l4/2)-l6,(h2/2),1.2*(l1+l3)
!
init_entity_num
!
a,km-3,km-2,km-1,km
!
init_entity_num
!
vsel,selv,volu,,vm-1,vm,1
!
vol_part_area,am
!
init_entity_num
!
vdele,vm-3,vm-1,2,1
!
init_entity_num
!
lplot
!
!------------------ 4.4  Volume Symmetry Reflection -----------------
!
csys,CSm0
!
vsymm,x,all,,,,1,0
vsymm,y,all,,,,1,0
!
lplot
!
finalize_model

:skip