# Total energy of a gas in an external magnetic field

Given the grand thermodynamical potential $$\Omega$$, the particle density $$N$$, the chemical potential $$\mu$$, the temperature $$T$$ and the entropy $$S$$, one can compute the total energy by the well known formula $$E=\Omega+\mu\,N+T\,S.$$

If there is an external magnetic field $$B$$ acting on the gas (let's say constant in the z-direction), is there a term $$B\,M$$ (where $$M$$ is the magnetization of the gas) entering as well in the expression of the energy?