!   therm_analysis.mac
!
!   This analysis is the ANSYS thermal tutorial, 'Solidification of a Casting'.
!
mod_assemb_prep
view,'f'
!
elsiz=0.60
!
keyw,pr_therm,1
!
!------------------------------ Solid Model ------------------------------
!
csys,0
!
k,,0,0,0
k,,22,0,0
k,,10,12,0
k,,0,12,0
!
/triad,off
!
create_area
!
k,,4,4,0
k,,22,4,0
k,,22,8,0
k,,4,8,0
!
create_area
!
aovlap,all
!
init_entity_num
!
adele,am-2,,,1
!
init_entity_num
!
lplot
!
!-------------------------- Material Properties ----------------------------
!
mat_select,'sand'
!
mptemp,1,0,2643,2750,2875
mpdata,kxx,2,1,1.44,1.54,1.22,1.22
mpdata,enth,2,1,0,128.1,163.8,174.2
!
!------------------------------ Define Mesh -------------------------------
!
et,1,plane55
!
asel,s,area,,am-1
msh_area,,,1,elsiz,elsiz,,2
!
asel,s,area,,am
msh_area,,,1,elsiz,elsiz,,1
!
eplot
!
!-------------------------------- Loads ----------------------------------
!
lsel,s,line,,lm-14
lsel,a,line,,lm-12,lm-11
!
sfl,all,conv,0.014,,80
!
init_entity_num
!
lplot
!
!------------------------- Define Analysis Type --------------------------
!
/solu
!
antype,4
trnopt,full
lumpm,0
!
lplot
!
!----------------------- Apply Initial Conditions ------------------------
!
asel,s,area,,am-1
nsla,s,1
!
ic,all,temp,2875
!
!
asel,s,area,,am-1
nsla,u,1
!
ic,all,temp,80
!
init_entity_num
!
!------------------------------ Time Steps -------------------------------
!
time,4
autots,-1
deltim,.01,.001,.25,1
kbc,1
!  
tsres,erase
!
!---------------------------- Output Controls ----------------------------
!
outres,all,all
!
!------------------------------- Solution --------------------------------
!
/status,solu
solve
!
!----------------------------- Postprocessing ----------------------------
!
csys,0
!
nsel,s,loc,x,15.333-0.1,15.333+0.1
nsel,r,loc,y,6.667-0.1,6.667+0.1
!
get_max_entity
cntr_pt=nm
!
init_entity_num
!
/post26
! 
nsol,2,38,temp,,center
!
plvar,2
!
/post1
set,first
!
!----------------------------- Animation Set-Up --------------------------
!
/cval,1,2643,2750,3000,0,0,0,0,0
/replot
!
!-------------------------------- Animation ------------------------------
!
/post1
set,first
!
eplot
!
/cval
!/cval,1,2643,2750,3000,0,0,0,0,0
/replot
!
plns,temp,
antime,30,0.5,,0,0,0,0