Properties and behavior of a pure substance. First law and second law analysis applied to different system and control volumes, availability and irreversibility.