For the following problem... I found the second pressure by solving P1V1/T1 = P2V2/T2. The Volumes is const so those cancel and then i am able to find the P2. From there i looked at the 1st law and came up with delt U = Qin which = mCvdelta T but that is where I am stuck. Can anyone give me a push?
3.3 A closed rigid tank with a volume of 2 m3 contains hydrogen gas initially at 320 K and 180 kpa. Heat transfer from a reservoir at 500 K takes place until the gas temperature reaches 400 K.
a) Calculate the entropy change (kJ/K) and entropy generation (kJ/K) for the hydrogen gas during the process if the boundary temperature for the gas is the same as the as the gas temperature throughout the process. (0.6264, 0 kJ/K)
b) Determine the entropy generation (kJ/K) for an enlarged system which includes the tank and the reservoir (0.1772 kJ/K)
c) Explain why the entropy generation values differ for parts a) and b)
d) Find the entropy generation for the gas and the total value (kJ/kg) if the system boundary temperature is 450 K throughout the process. (0.1273, 0.1772 kJ/K)
e) The hydrogen gas process is repeated, but paddle-wheel work is used instead of heat transfer. Calculate the entropy generation is this case. (0.6264 kJ/K)
f) Compare the relative irreversibility of processes a), d.) or e)

Here is some help with parts (a) and (b). I hope you will be able to follow the thought process and do most of the rest yourself.

Since the heat transfer at the boundary of the fluid occurs with no temperature difference at the boundary, the heat transfer process is reversible in this case and there is no net entropy generation for the "universe". That is why the second answer is 0 kJ/K.

In case (b), you are asked what the net entropy generation is if the heat comes from the 500 K reservoir. The heat transferred is
Q = M Cv (delta T = 225.2 kJ
The entropy lost by the reservoir is
Q/Treservoir = 225.2/500 = 0.450 kJ/K

The gas in the tank gains more entropy that the tank loses, and the net entropy gain is 0.628-0.450 = 0.178 kJ/K