# Newton's law of cooling , divergence of heatflux

The thermal diffusion eq is

according to my book, Where J is heat flux, C is heat capacity per unit volume.

The, to the Newton's cooling law,

and

what I don't understand here is, the first eq part of (10.54). why is the divergence of heat flux JA ?

The divergence of the heat flux is not $$JA$$.
Somewhere you’ve switched from $$\boldsymbol{J}$$ being a vector field of heat flux in a region (that one can take the divergence of, as in the first equation, which tells us the rate at which thermal energy is stored in that region) to $$J$$ being a scalar heat flux perpendicular to a surface with area $$A$$ (Eq. 10-54) exposed to some heat transfer mechanism that follows Newton’s law of cooling (Eq. 10-53). An energy balance tells us that such internal outward heat flow must equal the rate of thermal energy being removed. The final result (Eq. 10-54) is subject to the assumptions and limitations of the lumped-capacitance model, including the assumption of a constant temperature $$T$$ over the area $$A$$.
(As Chet notes, one way to switch from $$\boldsymbol{J}$$ to $$J$$ is to take the dot product with an outward vector $$\hat n$$ normal to the surface of interest: $$\boldsymbol J\cdot \hat n=J$$.)
You also switched from $$C$$ being the volumetric heat capacity (the first equation) to the total heat capacity (Eq. 10-54). This can be identified by comparing the units.
If you integrate the first equation over the volume of the body, you get $$-\int{(\nabla\centerdot J)dV}=CV\frac{d\bar{T}}{dt}$$where $$\bar{T}$$ is the average temperature over the volume. If you apply the divergence theorem to the left hand side of the equation, you then obtain:$$CV\frac{d\bar{T}}{dt}=-\int{(J\centerdot n)}dA$$where n is an outwardly directed normal from the surface of the body. But, locally at the surface of the surface of the body, $$J\centerdot n=h(T-T_{air})$$. Therefore, the relationship becomes $$CV\frac{d\bar{T}}{dt}=-\int{h(T-T_{air})dA}$$If the temperature is nearly constant throughout the body volume, this equation reduces to: $$CV\frac{dT}{dt}=-\bar{h}A(T-T_{air})$$where $$\bar{h}$$ is the heat transfer coefficient averaged over the surface of the body.