Does thermal energy include the energy of thermal radiation as part of its definition? I can't get a simple answer to this simple question online, so I thought I'd ask here.
Thermal radiation is usually meant to be the energy associated with a given temperature of a material body. Now certain radiation called thermal radiation can be assigned a well-defined temperature as well. Thus, it seems it seems that the energy of the radiation should be counted as thermal energy.
Is this true or not or is this a matter of semantics because the tern "thermal energy" is underspecified?
Suppose I have a blackbody in an isolated room with perfect reflector walls. Say the body has $3\text{ J}$ of thermal energy (as the sum of kinetic energies of the particles wrt the rest frame of the object/room) and the blackbody radiation surrounding the body (in equilibrium) has $6\text{ J}$ of radiation energy. What is the total thermal energy of the isolated room?
 A: Blackbody radiation can be viewed without any relation to a nearby body - as a photon gas in thermal equilibrium. The energy density of this radiation is then given by Planck's law.
Appendix
Let us consider a free photon gas in thermal equilibrium. If $n_{\mathbf{k},\nu}$ is the number of photons in mode characterized by wave number $\mathbf{k}$ and polarization $\nu$, then the energy contained in this mode is $\hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}$. The average energy contained in mode $\mathbf{k},\nu$ is thus
$$
\langle \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}\rangle=
Z_{\mathbf{k},\nu}^{-1}\sum_{n_{\mathbf{k},\nu}=0}^\infty \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}e^{-\beta \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}},
$$
where
$$
Z_{\mathbf{k},\nu}=\sum_{n_{\mathbf{k},\nu}=0}^\infty e^{-\beta \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}}=
\frac{1}{1-e^{-\beta \hbar\omega_{\mathbf{k},\nu}}}$$
and $\beta=1/(k_BT)$ is the inverse temperature.
We thus have
$$
\langle \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}\rangle=
-\frac{\partial}{\partial \beta}\log Z_{\mathbf{k},\nu}=
\frac{\hbar\omega_{\mathbf{k},\nu}}{e^{\beta \hbar\omega_{\mathbf{k},\nu}}-1}
$$
The average total energy contained in the field is obtained by summing over all the field modes, that is
$$
\langle U\rangle =
\sum_{\mathbf{k},\nu}\langle \hbar\omega_{\mathbf{k},\nu}n_{\mathbf{k},\nu}\rangle=
\sum_{\mathbf{k},\nu}\frac{\hbar\omega_{\mathbf{k},\nu}}{e^{\beta \hbar\omega_{\mathbf{k},\nu}}-1}
$$
In summing over the modes I assumed periodic boundary conditions in a cube with side $L$, where the wave vectors are quantized as
$$
k_x=\frac{2\pi m_x}{L}, k_y=\frac{2\pi m_y}{L}, k_z=\frac{2\pi m_z}{L},\\
m_x, m_y, m_z=0, \pm 1, \pm 2,...
$$
Passage to integral over continuous spectrum is then performed by formally using that
$$
1=\Delta m_x \Delta m_y \Delta m_z =\left(\frac{L}{2\pi}\right)^3dk_x dk_ydk_z,
$$
that is the energy density is given by
$$
\langle u\rangle = \frac{\langle U\rangle}{L^3}=
\sum_{\nu}\int \frac{d^3\mathbf{k}}{(2\pi)^3}\frac{\hbar\omega_{\mathbf{k},\nu}}{e^{\beta \hbar\omega_{\mathbf{k},\nu}}-1}
$$
We next convert the integral over wave numbers to that over frequencies:
$$
\langle u\rangle = 
\sum_{\nu}\int \frac{d^3\mathbf{k}}{(2\pi)^3}
\int_0^{+\infty}d\Omega\delta(\Omega - \omega_{\mathbf{k},\nu})
\frac{\hbar\omega_{\mathbf{k},\nu}} {e^{\beta \hbar\omega_{\mathbf{k},\nu}}-1}=
\int_0^{+\infty}d\Omega D(\Omega)
\frac{\hbar\Omega} {e^{\beta \hbar\Omega}-1},
$$
where the density-of-states is
$$
D(\Omega)=\sum_{\nu}\int \frac{d^3\mathbf{k}}{(2\pi)^3}\delta(\Omega - \omega_{\mathbf{k},\nu})
$$
Assuming now that mode frequency is given by $\omega_{\mathbf{k},\nu}=ck$ and is independent on the polarization, we obtain
$$
D(\Omega)=2\int \frac{d^3\mathbf{k}}{(2\pi)^3}\delta(\Omega -  c k)=
\frac{2}{(2\pi)^3}4\pi\int_0^{+\infty}dk k^2\delta(\Omega -  c k)=\frac{\Omega^2}{\pi^2 c^3}
$$
Thus, the energy density per unit volume is
$$
\langle u\rangle = 
\int_0^{+\infty}d\Omega \frac{\hbar}{\pi^2 c^3}\frac{\Omega^3} {e^{\beta \hbar\Omega}-1}
\int_0^{+\infty}d\Omega \rho(\Omega),
$$
where
$$
\rho(\Omega)=\frac{\hbar}{\pi^2 c^3}\frac{\Omega^3} {e^{\beta \hbar\Omega}-1},
$$
is the energy density per unit volume per unit frequency, which differs from the Planck's formula for spectral radiance only by a constant coefficient.
A: It looks like you use the loose term thermal energy as internal energy. In such a case, it is not only the sum of the kinetic energies but also the interaction potential energy between particles contributes.
Therefore, if the only contribution to the energy of the inner of your isolated container is due to the body and radiation, independently of any consideration about thermal equilibrium, the total thermal (internal energy) is always the sum of the two (additivity of the energy).
Notice, however, that the energy of blackbody radiation is not part of the body's internal energy.
A: Expanding from GiorgioP's answer and your follow-up comment question:
We will be able to sum across the parts of the chamber if and only if we used a consistent reference state for the whole interior of the chamber. If the reference state for the solid sample is its equilibrium state in the vacuum chamber when the solid sample is at 200K, then we can sum across the parts after equilibrating at some higher temperature if and only if the reference state for the vacuum is its equilibrium state when the solid sample is at 200K.
If, as we heat a substance from a reference state, it changes state in a reversible way, and that state change has an associated potential energy component, then we likely want to know, and have the means to measure or at least define, how much total energy we'll get out if we let the sample return to the reference state. Some examples of such state change include phase changes, magnetization, and changes in shape of a solid. This will probably not equal total kinetic energy (because of a potential energy component) and will probably not have absolute zero as a reference state.
A: Heat is energy transferred between a system and its surroundings by virtue of a temperature difference only.
Thus, the question you asked, with $3\rm J$ and $6\rm J$ of thermal energy being mentioned, cannot be answered as there is no mention of temperature.
Just because one body has more thermal energy than another does not necessarily mean that it is a higher temperature.
Using the definition of heat I gave at the start, the flow of energy between two bodies at differing temperatures, in the form of (infra-red) radiation, can be called heat.
