The viscous contribution to the total stress is
where
and divergence is neglected since we only model slightly compressible flows.
Viscous heat generation
The viscous energy loss is turned into heat rate per unit volume :
See group_materi_viscosity_heatgeneration.