Nitrogen gas is contained in a rigid 1-m3 tank, initially at 5bar, 300 K. Heat transfer to the contents of the tank occurs untilthe temperature has increased to 400 K. During the process, apressure-relief valve allows nitrogen to escape, maintainingconstant pressure in the tank. Neglecting kinetic and potentialenergy effects, and using the ideal gas model with constantspecific heats evaluated at 350 K, determine (a) the mass ofnitrogen that escapes, in kg, and (b) the amount of energy transferby heat, in kJ.