!   TITLE:  housing_sleeve.mac (ISS)
!
!---------------------------------------------------------------------------
!       Rev -       08/23/2000      J. Rinaldi
!---------------------------------------------------------------------------
!
!   This macro builds the housing sleeve, P/N 375A069, found in the OGA
!   recirculation pump motor assembly.
!
!               End Unit:   CU09616051
!
!   CShs0:      Cartesian Housing Sleeve Coordinate System
!   CShs1:  Cylindrical Housing Sleeve Coordinate System
!   CShs2:  Spherical Housing Sleeve Coordinate System
!
!
!******************************* TABLE OF CONTENTS **************************
!
!       Model Assembly Preparation
!
!   1.  Parameter List
!   2.  Model Coordinate System
!   3.  Material and Element Type
!   4.  Solid Model
!
!
!***************************** END Table of Contents ************************
!
!
!
!************************** Model Assembly Preparation **********************
!
!
mod_assemb_prep                 ! prepare database for assembly
!
!
/title,Housing Sleeve with Wire Housing Tube / 375A069, 553A134
!
!
/units,bin                      ! British/inch
!
!
!**************************** End Model Preparation *************************
!
!
!
!<<<<<<<<<<<<<<<<<<<<<<<< 1.  Parameter List >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
housing_sleeve.parm             ! name of parameter file
!
!
!<<<<<<<<<<<<<<<<<<<< 2.  Model Coordinate Systems >>>>>>>>>>>>>>>>>>>>
!
!
mod_coord_system,CSstr0,0,0,h100,0,0,0
!
!
!<<<<<<<<<<<<<<<<<<<< 3.  Material and Element Type >>>>>>>>>>>>>>>>>>>
!
!---------------------- Material Properties --------------------
!
UIMP,2,EX, , ,29.0E6,           ! Material:  304L CRES
UIMP,2,DENS, , ,.286/386.4,
UIMP,2,NUXY, , ,0.27,
!
!---------------------------------------------------------------
!
!
!------------------------- Element Type ------------------------
!
ET,1,shell93
ET,2,solid95
!
!---------------------------------------------------------------
!
!
!<<<<<<<<<<<<<<<<<<<<<<<<<<< 4.  Solid Model >>>>>>>>>>>>>>>>>>>>>>>>>>
!
!
!---------------------- 4.1  Cylindrical Sections ---------------------
!
!
!-------------------- 4.1.1  1st Cylindrical Sections -----------------
!
csys,CShs1
!
create_cs,0,'CS1st1',1,0,0,l2,0,0,0
!
hollow_cylinder,CS1st1,0,2*r2,2*r1,,,360
!
!
!-------------------- 4.1.2  2nd Cylindrical Section ------------------
!
csys,CShs1
!
create_cs,0,'CS2nd1',1,0,0,l3,0,0,0
!
hollow_cylinder,CS2nd1,0,2*r2,2*r1,,,360
!
create_cs,0,'CS2nd0',0,0,0,0,0,0,0
!
create_cs,0,'CSbos0',0,l12,l14,0,0,0,0   ! create mounting screw boss profile
!
k,,0,0,0
k,,0,-(l14-l13),0
k,,l7-l12,-(l14-l13),0
k,,l7-l12,0,0
!
create_area
!
csys,CS2nd0
!
create_cs,0,'fil1cs',1,l10,l11,0,0,0,0
!
k,,rfil1,270,0
!
csys,CSbos0
!
k,,0,0,0
k,,0,-(l14-l13),0
k,,-l12,-(l14-l13),0
!
create_cs,0,'CSbos1',1,0,0,0,0,0,0
!
k,,l12,(2*rtangle)+phi1,0
!
create_area
!
isolate_areas
!
csys,CS2nd0
!
arsym,y,am-1,am,1,,0,0
!
init_entity_num
asel,selv,loc,z,0
aadd,all                    ! integrate areas
!
init_entity_num
!
asel,s,area,,am             ! store lines associated with new profile
lsla,s
cm,lset1,line
!
init_entity_num
!
adele,am
!
lfillt,lm-16,lm-12,rfil2
lfillt,lm-17,lm-9,rfil2
lfillt,lm-14,lm-8,rfil3
lfillt,lm-15,lm-11,rfil3
!
init_entity_num
!
csys,CS2nd1             ! recreate areas
!
isolate_lines
lsel,r,loc,x,0.90*r2,r1
lsel,r,loc,y,180,270
lsel,r,loc,z,0
!
lstr,km-35,km-39
lstr,km-38,km-34
!
al,all
!
init_entity_num
lm_1=lm
!
isolate_lines
lsel,a,line,,lm_1-1,lm_1,1
!
al,all
!
init_entity_num
asel,selv,loc,z,0
aadd,all
!
init_entity_num
!
csys,CS2nd1                ! bore out center hole
!
*do,i,0,270,90
    k,,r2,i,0
*enddo
!
create_area,1
!
isolate_areas
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
lplot
!
!--------------------- 4.1.3  3rd Cylindrical Section -----------------
!
csys,CShs1
!
create_cs,0,'CS3rd1',1,0,0,l5,0,0,0
!
hollow_cylinder,CS3rd1,0,2*r2,2*r1,,,360
!
create_cs,0,'CS3rd0',0,0,0,0,0,0,0
!
k,,l9,l2,0                  ! create rectangular section
k,,l9,l8,0
k,,0,l8,0
k,,0,l2,0
!
create_area
!
csys,CS3rd0                ! create fillet on area section
!
create_cs,0,'fil2cs',1,l10,l11,0,0,0,0
!
*do,i,0,270,90
    k,,rfil1,i,0
*enddo
!
create_area,1
!
isolate_areas
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
csys,CS3rd0                 ! reflect filleted rectangular section
!
arsym,x,am,,,,0,0
!
init_entity_num
!
isolate_areas
!
init_entity_num
asel,selv,loc,z,0
aadd,all
!
init_entity_num
!
csys,CS3rd0                 ! create mounting screw boss rectangular profile
!
create_cs,0,'CSbos0',0,l12,l14,0,0,0,0
!
k,,0,0,0
k,,0,-(l14-l13),0
k,,l7-l12,-(l14-l13),0
k,,l7-l12,0,0
!
create_area
!
csys,fil2cs                 ! create area profile connecting boss to cylinder
!
k,,rfil1,270,0
!
csys,CSbos0
!
k,,0,0,0
k,,0,-(l14-l13),0
k,,-l12,-(l14-l13),0
!
create_cs,0,'CSbos1',1,0,0,0,0,0,0
!
k,,l12,(2*rtangle)+phi1,0
!
create_area
!
isolate_areas
!
csys,CS3rd0
!
arsym,y,am-1,am,1,,0,0
!
init_entity_num
asel,selv,loc,z,0
aadd,all                    ! integrate areas
!
init_entity_num
!
asel,s,area,,am             ! store lines associated with new profile
lsla,s
cm,lset1,line
!
init_entity_num
!
csys,fil2cs                 ! create filleted lines in new profile
!
adele,am
!
lsel,s,line,,lset1
lsel,r,loc,x,rfil1,rfil1+0.5*rfil1
lsel,r,loc,y,360-abs(ky(km-35)),270
lsel,r,loc,z,0
!
ldele,all,,,1
!
l,km-35,km-21
!
init_entity_num
!
lsel,s,line,,lset1
lsel,a,line,,lm
cm,lset1,line
!
lfillt,lm-16,lm-12,rfil2
lfillt,lm-9,lm-17,rfil2
lfillt,lm-8,lm-15,rfil3
!
init_entity_num
!
ldele,lm-52,,,1
ldele,lm-46,,,1
ldele,lm-44,,,1
!
csys,CS3rd0
!
k,,-l9,l8,0
!
init_entity_num
!
lstr,km,km-49
lstr,km,km-35
!
init_entity_num
!
lfillt,lm,lm-49,rfil3
!
init_entity_num
!
csys,CS3rd1                 ! recreate areas
!
isolate_lines
lsel,r,loc,x,0.90*r2,r1
lsel,r,loc,y,180,270
lsel,r,loc,z,0
!
lstr,km-55,km-59
lstr,km-58,km-54
!
al,all
!
init_entity_num
lm_1=lm
!
isolate_lines
lsel,a,line,,lm_1-1,lm_1,1
!
al,all
!
init_entity_num
!
init_entity_num
asel,selv,loc,z,0
aadd,all                    ! integrate areas
!
init_entity_num
!
csys,CS3rd0                 ! fillet left side
!
create_cs,0,'lftfilcs',1,-l10,l11,0,0,0,0
!
*do,i,0,270,90
    k,,rfil1,i,0
*enddo
!
create_area,1
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
csys,CS3rd1                 ! bore out center hole
!
*do,i,0,270,90
    k,,r2,i,0
*enddo
!
create_area,1
!
isolate_areas
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
lplot
!
!--------------------- 4.1.4  4th Cylindrical Section -----------------
!
csys,CShs1
!
create_cs,0,'CS4th1',1,0,0,l4,0,0,0
!
hollow_cylinder,CS4th1,0,2*r2,2*r1,,,360
!
create_cs,0,'CS4th0',0,0,0,0,0,0,0
!
k,,l9,l2,0                  ! create rectangular section
k,,l9,l8,0
k,,0,l8,0
k,,0,l2,0
!
create_area
!
arsym,x,am,,,,0,0
!
init_entity_num
!
init_entity_num
asel,selv,loc,z,0
aadd,all                    ! integrate areas
!
init_entity_num
!
adele,am
!
lfillt,lm-9,lm-7,rfil3
lfillt,lm-5,lm-8,rfil3
!
init_entity_num
!
csys,CS4th0
!
a,km-20,km-16,km-17,km-21
!
init_entity_num
!
isolate_lines
!
lsel,a,line,,lm+1,lm+2,1
!
al,all
!
init_entity_num
!
isolate_areas
!
init_entity_num
asel,selv,loc,z,0
aadd,all                    ! integrate areas
!
init_entity_num
!
csys,CS4th0                ! create fillet on area section
!
create_cs,0,'fil2cs',1,l10,l11,0,0,0,0
!
*do,i,0,270,90
    k,,rfil1,i,0
*enddo
!
create_area,1
!
isolate_areas
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
csys,CS4th0                 ! fillet left side
!
create_cs,0,'lftfilcs',1,-l10,l11,0,0,0,0
!
*do,i,0,270,90
    k,,rfil1,i,0
*enddo
!
create_area,1
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
csys,CS4th1                ! bore out center hole
!
*do,i,0,270,90
    k,,r2,i,0
*enddo
!
create_area,1
!
isolate_areas
!
asba,am-1,am,,delete,delete
!
init_entity_num
!
lplot
!
!------------------ 4.1.5  Integrate Cross_Sections -------------------
!
csys,CS1st1             ! move 1st area section to 3rd c.s.
!
asel,selv,loc,z,0
get_max_entity
atran,CS3rd1,am,,,,0,1
!
init_entity_num
!
!
csys,CS2nd1             ! move 2nd area section to 3rd c.s.
!
asel,selv,loc,z,0
get_max_entity
atran,CS3rd1,am,,,,0,1
!
init_entity_num
!
!
csys,CS4th1             ! move 4th area section to 3rd c.s.
!
asel,selv,loc,z,0
get_max_entity
atran,CS3rd1,am,,,,0,1
!
init_entity_num
!
isolate_areas
!
aovlap,all                  ! integrate areas
!
init_entity_num
!
!
csys,CS3rd1             ! partition areas into quarters
!
k,,1.5*r3,0,0
k,,1.5*r3,180,0
!
create_lines
!
k,,1.5*r3,90,0
k,,1.5*r3,270,0
!
create_lines
!
lsel,s,line,,lm-1,lm
cm,lset1,line
!
init_entity_num
!
isolate_areas
!
asbl,all,lset1,,delete,delete
!
init_entity_num
!
!
csys,CS3rd1
!
k,,1.5*r1,ky(km-47),0
k,,0,0,0
k,,1.5*r1,ky(km-18),0
!
theta=ky(km-47)-ky(km-18)           ! retrieve angle of inside surface KP
!
create_lines,,1
!
asel,selv,loc,x,0,r1
asel,r,loc,y,0,180
asel,r,loc,z,0
cm,aset1,area
!
init_entity_num
!
lsel,s,line,,lm-1,lm,1
cm,lset1,line
!
asbl,aset1,lset1,,delete,delete
!
init_entity_num
!
lcomb,lm-3,lm-19
lcomb,lm-20,lm-15
lcomb,lm,lm-16
lcomb,lm-20,lm-16
!
init_entity_num
!
lcomb,lm-20,lm-175
lcomb,lm-16,lm-175
!
init_entity_num
!
lplot
!
!------------------------ 4.1.6  Create Volumes -----------------------
!
!
!------------------ 4.1.6.1  1st Extrude / Section 3 ------------------
!
csys,CS3rd0
!
asel,selv,loc,z,0
!
extrude_aset,(l4-l3)-(l5-l3)
!
init_entity_num
!
lplot
!
!------------------ 4.1.6.2  2nd Extrude / Section 2 ------------------
!
csys,CS3rd0
!
asel,s,loc,z,0
asel,u,area,,am-85,am-84,1
asel,u,area,,am-91
!
extrude_aset,-(l5-l3)
!
init_entity_num
!
lplot
!
!------------------ 4.1.6.3  3rd Extrude / Section 1 ------------------
!
csys,CS2nd1
!
asel,s,loc,z,0
asel,r,loc,x,0,r1
!
extrude_aset,-(l3-l2)
!
init_entity_num
!
lplot
!
!------------------ 4.1.6.4  4th Extrude / Section 4 ------------------
!
csys,CS4th1
!
asel,s,loc,z,0
asel,u,area,,am-165
asel,u,area,,am-160
asel,u,area,,am-150
!
extrude_aset,l6-l4
!
init_entity_num
!
lplot
!
!------------------ 4.1.6.5  5th Extrude / Section 5 ------------------
!
csys,CShs1
!
create_cs,0,'CS5th1',1,0,0,l6,0,0,0
!
asel,s,loc,z,0
asel,r,loc,x,0,r1
!
extrude_aset,(l1-l2)-l6
!
init_entity_num
!
lplot
!
!------------------------- 4.1.7  End Flanges -------------------------
!
csys,CShs1
!
hollow_cylinder,CShs1,1,2*r2,2*r3,,,360,l2     ! front flange
!
asel,s,loc,z,l2
!
aovlap,all
nummrg,kp
!
init_entity_num
!
asel,s,loc,z,l2
!
extrude_aset,-l2
!
init_entity_num
!
!
!
create_cs,0,'rearflcs',1,0,0,l1-l2,0,0,0
!
hollow_cylinder,rearflcs,1,2*r2,2*r3,,,360      ! rear flange
!
asel,s,loc,z,0
!
aovlap,all
nummrg,kp
!
init_entity_num
!
asel,s,loc,z,0
!
extrude_aset,l2
!
init_entity_num
!
nummrg,kp
!
init_entity_num
!
lplot
!
!--------------------------- 4.2  Wire Tube ---------------------------
!
csys,CShs0
!
create_cs,0,'tube1cs',1,0,l8,l17,0,-90,0
!
hollow_cylinder,tube1cs,1,2*r5,2*r4,,l19-l8,360         ! tube flange
!
!
create_cs,0,'tube2cs',1,0,0,l19-l8,0,0,0
!
hollow_cylinder,tube2cs,1,2*r6,2*r4,,l15-l16,360,w1     ! tube
!
!
create_cs,0,'tube3cs',0,0,0,l15-l16+w1,0,0,0            ! tube end flange
!
k,,l20,l20,0
k,,-l20,l20,0
k,,-l20,-l20,0
k,,l20,-l20,0
!
create_lines
!
lfillt,lm-3,lm-2,rfil4
lfillt,lm-2,lm-1,rfil4
lfillt,lm-1,lm,rfil4
lfillt,lm,lm-3,rfil4
!
init_entity_num
!
isolate_lines
!
al,all
!
init_entity_num
!
asel,selv,loc,z,0
!
aovlap,all
!
init_entity_num
!
adele,am-3,,,1
!
init_entity_num
!
asel,selv,loc,z,0
!
extrude_aset,l16
!
init_entity_num
!
!
cir_bore,3,tube1cs,2*r5,1.00,0          ! center bore
!
init_entity_num
!
lplot
!
finalize_model_data