The role of second-law analysis (SLA) is discussed and several developm ents needed to extend and improve SLA are identified and addressed. The m ain approaches to SLA (exergy, physical-exergy, exergy-consumption, negentropy and entropy analyses) are identified and discussed, and an EXCEM (exergy, cost, energy and mass) analysis methodology and code are developed. The EXCEM code is developed by enhancing Aspen Plus, a state-of-the-art process simulation code, for EXCEM analysis. Several engineering processes (production of electricity, hydrogen and hydrogen-derived fuels) are analyzed with the code. Several findings pertinent to the EXCEM analysis methodology and code and the applications are discussed. The sensitivities of the results of energy and exergy analyses to the choice of the dead-state properties are investigated, as are the relations between exergy loss and capital cost, and exergy and environm ental impact. Results of a generalizable nature relating to the concepts, developments and applications presented in the dissertation are highlighted, and conclusions and recom m endations given.