*.How does the principle of conservation of energy apply to the analysis of thermal systems in mechanical engineering, particularly in terms of the first law of thermodynamics, and what are the key theoretical considerations when analyzing energy transformations within closed and open systems?