Exergy analysis of thermal, chemical and metallurgical processes