/nopr
!  putht3d.mac
!  Applies heat generation to selected elements for a specified 
!  heat (Watt) input.
!
!     arg1 = total heat load
!     arg9 = 0 , no action
!          = 1 , The user is prompted for the current input
_inamp=arg1
*if,arg9,eq,1,then
  *ask,_inamp,Enter Total Heat (W):,0
*endif
*get,_elmx,elem,,num,max
*set,_mskv
*set,_area
*dim,_mskv,,_elmx
*dim,_area,,_elmx
    *vget,_mskv(1),elem,,esel       !  12/15/94
    *voper,_mskv(1),_mskv(1),ge,0       !  12/15/94
    *vmask,_mskv(1)       !  12/15/94
    *vget,_area(1),elem,1,geom       !  12/15/94
    *vmask,_mskv(1)       !  12/15/94
    *vscfun,_tarea,sum,_area(1)       !  12/15/94
bfe,all,hgen,1,_inamp/_tarea
*get,_mnu,active,,menu
*get,_elnum,elem,,count
/out,put_heat,sum
*msg,info
___________APPLICATION OF Heat (W)___________
*msg,info

*msg,info,_inamp
Total Heat (W):________________ %g
*msg,info,_tarea
volume of conductor (m^3):____________ %g
*msg,info,_inamp/_tarea
Heat density (W/m^3):__________ %g
*msg,info,_elnum
Number of elements in conductor:____ %i

/out
*if,_mg1,eq,0,then
*if,_mnu,ne,0,then
 *uili,put_heat,sum
*else
 *list,put_heat,sum
*endif
*endif

*set,_mskv
*set,_area
_inamp=   $   _tarea=    $ _mnu=    $ _elnum=
/gopr