  A first-principles approach called the {\it{self-consistent quasiharmonic
approximation}} (SC-QHA) method is formulated to calculate the thermal
expansion, thermomechanics, and thermodynamic functions of solids at finite
temperatures with both high efficiency and accuracy. The SC-QHA method requires
fewer phonon calculations than the conventional QHA method, and also
facilitates the convenient analysis of the microscopic origins of macroscopic
thermal phenomena. The superior performance of the SC-QHA method is
systematically examined by comparing it with the conventional QHA method and
experimental measurements on silicon, diamond, and alumina. It is then used to
study the effects of pressure on the anharmonic lattice properties of diamond
and alumina. The thermal expansion and thermomechanics of Ca$_3$Ti$_2$O$_7$,
which is a recently discovered important ferroelectric ceramic with a complex
crystal structure that is computationally challenging for the conventional QHA
method, are also calculated using the formulated SC-QHA method. The SC-QHA
method can significantly reduce the computational expense for various
quasiharmonic thermal properties especially when there are a large number of
structures to consider or when the solid is structurally complex. It is
anticipated that the algorithm will be useful for a variety of fields,
including oxidation, corrosion, high-pressure physics, ferroelectrics, and
high-throughput structure screening when temperature effects are required to
accurately describe realistic properties.
