  Using thermodynamic relations and dimensional analysis we derive a general
formula for the thermodynamical trace $2\mathcal{E}-DP$ for non-relativistic
systems and $\mathcal{E-DP}$ for relativistic systems, where $D$ is the number
of spatial dimensions, in terms of the microscopic scales of the system within
the grand canonical ensemble. We demonstrate the formula for several cases,
including anomalous systems which develop scales through dimensional
transmutation. Using this relation, we make explicit the connection between
dimensional analysis and the virial theorem. This paper is focused mainly on
the non-relativistic aspects of this relation.
