  To study temperature dependent elastic constants, a new computational method
is proposed by combining continuum elasticity theory and first principles
calculations. A Gibbs free energy function with one variable with respect to
strain at given temperature and pressure was derived, hence the full
minimization of the Gibbs free energy with respect to temperature and lattice
parameters can be put into effective operation by using first principles.
Therefore, with this new theory, anisotropic thermal expansion and temperature
dependent elastic constants can be obtained for crystals with arbitrary
symmetry. In addition, we apply our method to hexagonal beryllium, hexagonal
diamond and cubic diamond to illustrate its general applicability.
