Elastic and thermal properties of hexagonal perovskites