Ab initio thermodynamics of metals: Al and W