  The thermodynamics framework of an interacting quantum gas trapped by an
arbitrary external potential is reviewed. We show that for each confining
potential, in the thermodynamic limit, there emerge "generalized" volume and
pressure variables ${\cal V}$ and ${\cal P}$, that replace the usual volume and
hydrostatic pressure of a uniform system. This scheme is validated with the
derivation of the virial expansion of the grand potential. We show that this
approach yields experimentally amenable procedures to find the equation of
state of the fluid, ${\cal P} = {\cal P}({\cal V}/N,T)$ with $N$ the number of
atoms, as well as its heat capacity at constant generalized volume $C_{\cal V}
= C_{\cal V}({\cal V},N,T)$. With these two functions, all the thermodynamics
properties of the system may be found. As specific examples we study weakly
interacting Bose gases trapped by harmonic and by linear quadrupolar potentials
within the Hartree-Fock approximation. Comparisons with experimental results of
a $^{23}$Na ultracold gas are also presented. We claim that this route should
provide an additional and useful tool to analyze both the thermodynamic
variables of a trapped gas as well as its elementary excitations.
