The electrical enclosure mfrs. have these formulas and discussions in their catalogs (Hoffman & Hammond, amongst others). You will need to know the wattage dissipated inside the JB, and its surface area. The formula will be able to give a temperature rise above ambient (TRAA). Looking at the Hoffman, they supply a linear relation depicted in a chart, that can be summarized as:
TRAA(degs F) = 4.375 degs. F / sq.ft. (1)
So if you have a 48" X 36" X 16" enclosure that has 300 watts being dissipated within it, this would mean that:
2[(48x36)+(48x16)+36x16)] / 144 = 42 sq.ft. (2)
300 watts/42 sq.ft. =~ 7.1 watts/sq.ft. (3)
from (1) we get: 7.1 X 4.375 =~ 31 degs. F. rise
Hope this helps.
bklauba@airmatic.com