finish
/post1
! Adjust temperature result by +459.67 degrees.
! Method using vectorized commands.
! This adjustment is undone by a SET command.
*get,min_node,node,,num,min
*get,max_node,node,,num,max
! Perform some basic error checking
*if,max_node,eq,0,then
*MSG,ERROR
No nodes are selected. Stopping.
*return,-1
/EOF
*endif
*get,dummytemp,node,min_node,temp
*if,_STATUS,ge,2,then
*MSG,ERROR,min_node
No temperature result, node %G. Stopping.
*return,-1
/EOF
*endif
! Prepare
*del,tempvec,,nopr ! In case it exists
*del,my_mask,,nopr
*del,toffset,,nopr
*dim,tempvec,array,max_node-min_node+1
*dim,toffset,array,max_node-min_node+1
*dim,my_mask,array,max_node-min_node+1
*vget,my_mask(1),node,min_node,nsel
*vfill,toffset(1),ramp,459.67
! Add the temperature offset, *VPUT into result
*vmask,my_mask(1)
*vget,tempvec(1),node,min_node,temp
*vmask,my_mask(1)
*voper,tempvec(1),tempvec(1),ADD,toffset(1)
*vmask,my_mask(1)
*vput,tempvec(1),node,min_node,temp
! Clean up and plot
*del,tempvec,,nopr
*del,my_mask,,nopr
*del,toffset,,nopr
*del,dummytemp
*del,min_node
*del,max_node
/title,Temperatures were offset.
plnsol,temp
/com, .
/com, Warning--temperature results of selected nodes were raised.
/com,
Source : http://www.simutechgroup.com