I'm trying to implement volumetric heat source in a domain. The sources are not constant and they change with temperature. For constant terms, I've used ustssc.f90 with:
You should be able to code pwatt directly in the ustssc routine. This routine has access to the rtp, rtpa and propce arrays which store the following:
rtp - all flow variables at the cell centres at the current time step / iteration
rtpa - all flow variables at the cell centres at the previous time step / iteration
propce - physical properties at the cell centres
Hence, once you have identified the cells with the source term you will have access to the temperature in these cells via the rtp and rtpa arrays and you can then code the equation for pwatt.
To see how rtp, rtpa and propce are structured, please refer to §3.9.3.3 of the V3.2.1 user manual.