a much more realistic modeling of the grain emission under all circumstances. The stochastic heating code needs a grain enthalpy function. Supported functions are taken from @Guhathakurta1989, @Dwek1997, and @Draine2001.

The grain physics includes the advances discussed by @Weingartner2001a and @Weingartner2006. The latter provides a realistic model for grains in X-ray environments, including Auger emissions by the grains. The grain model has a detailed treatment of the photoelectric effect and collisional processes, and includes thermionic emissions. The charge for each grain constituent is determined self consistently with the local radiation field and gas properties, using the hybrid grain charge model described by @VanHoof2001 and @VanHoof2004. The grain charge is included in the overall charge balance of the system, which has a significant effect on the modeling results for molecular regions [@Abel2008]. Charge exchange on grain surfaces is treated following @Draine1987 assuming that electrons will be exchanged between the grain and the colliding particle until a minimum energy state is reached. The grain drift velocity w.r.t. the gas is calculated using the theory from @Draine1979.

Extensive comparisons in collaboration with Joe Weingartner done in 2001 show that the photoelectric heating rates and collisional cooling rates predicted by  agree very well with 