Thermal analysis of coals, oil shales and oil sands