Modeling of Thermal Degradation of Polymers