Dynamics of Circumstellar Disks. II. Heating and Cooling