Thermodynamic analysis of the chemical vapor deposition of diamond films