Ansys Employee

I have a command snippet which does something along these lines. It gets the temperature at a control node, and uses that temperature in an equation to specify the internal heat generation for the next solve. You would place this command snippet under the analysis branch where loads and supports are seen. It is heavily commented to help you out. There is a large cost in using this approach. In order to check at each time point to control the next point, you have to have a heavy-handed control over the time stepping. That means it enforces one substep per load step, and you can't use the automatic time step adjusting. I suppose you could use automatic time stepping within each load step if you only cared about checking the control node temperature at the end of each load step.

! If materials or other setup makes the model non-linear, you should do many susteps here to reduce error since the load function cannot be updated for each iteration within each substep.
! In newer Ansys versions, the *do loop is not needed.  You can set multiple load steps and set the command snippet to be evaluated at all load steps in its Details.  In this case, you also don't need the solve command.
!/config,noeldb,0   ! write database during solution
! Turn off auto time stepping in Analysis Settings
!autots,off    ! turn off automatic time stepping
! only works with one load step
*get,nsubstep,common,,stepcm,,int,25    ! Gets number of substeps set in Analysis Settings for the load step set in the command snippet details.
nsub,1,1,1    ! ensure 1 substep per *do loop solve, which is 1 substep per load step.
*get,endtime,common,,stepcm,,real,2   ! Gets end time set in Analysis Settings for the load step set in the command snippet details.
timeinc = (endtime+0.0)/nsubstep
! Control_node is named selection containing one node or vertex
! Heat_generation_body must be a named selection containing bodies or elements
node_num = ndnext(0)
allsel    ! selected elements and nodes cannot chance during analysis
  /gopr     ! prints out values for each loop iteration for debugging
    *get,control_temp,common,,bfcom,,real,1    ! get initial uniform temp for 1st solve, or specifially set temperature load applied to the node (if step applied)
    control_temp=temp(node_num)   ! get temperature of control node after 1st solve.  Get functions can be used without switching to /post1 processor and the lswrite/lsread complications of switching back to /solu processor
  bfe_val= 5*control_temp    ! specify function for heat generation
  ! for NMM units, heat generation values in W/mm^3 are scaled by 1000 in input file (MPA units), so divide value by 1000 and enter into GUI to compare
  ! to values set in command snippet.  For initial temp of 22 C, 5*22 = 110 for heat generation.  Specify 0.11 in GUI, step applied. 
  ! for MKS system, enter same values (no scaling)
  ! final solve is automatically issued by Mechanical after command snippet, so skip it here