Devolatilization equilibria in graphitic systems