Joule's Law is the relationship between current flow through a resister for a length of time which creates heat.
H = Heat Generated
I = Current
R = Resistance
T = Time of Current Flow
Joule's Law and Ohm's Law are the physicss behind resistance welding.
Ohm's Law can be found in the article:
Reference: RWMA Resistance Welding Manual 4th Edition