7. (18 points) A rigid tank initially contains 5 kg nitrogen (N2) at 500 kPa and 327 °C (State 1). The N2is gradually cooled to 27 °C (State 2) due to the heat loss from N2 to ambient air at 20 °C, which is considered as boundary temperature of heat transfer. (3p) Please determine the pressure of N2 at state 2. p) Please calculate the change in the total entropy of N2 during this cooling process. 4p) Please find the heat loss from tank to ambient air during this process. (4p) Please determine the entropy generation during this process. p) Is this process reversible, irreversible or impossible?