/com, b_therm.mac
!  builds 3 D thermal model 
!  2D model is saved to therm2d.db
!
!  arg1 = name of parameter file in single quotes
!
/out,b_therm,out
/nerr,0,1e5
fini
/cle,all
/inp,%arg1%,des
abbr,,mabbr,mac
stator
esel,,mat,,5
*get,elmx,elem,,count
machthr1
save,therm2d,db

*if,_err,eq,0,then
 macht3d
*endif