The rod is placed on a substrate which is also at constant T. The heat equation is "CdT/dt=+heat generation term due to Joule (I^2R)-thermal conduction term due to thermal conductivity (K)-heat evacuation term to the substrate". Right hand side can be written as "dF/dT". Now using variational principle with small variation in temperature (T+delta T), "F" comes out to be minimum for stable temperature profile and maximum for unstable temperature profile. But "F" has unit "Joule.Kelvin/Sec". How can 'F' be converted to energy?