Problem: There is a piston that is filled with 4 mol of a vdw gas and is locked in place at 1 atm and 50L. It is then released and compresses the gas to 4L. The piston is in a large bath so the temperature remains constant.

Find the entropy of the universe for this.

a=4 L^2 atm mol^-2

b=0.03 L mol^-1

Cp,m = 33 J mol^-1 K^-1

--------------------------------------------------

Here is my attempt at it:

I first calculated T and Pf by using the vdw gas equation:

P= nRT/(V-nb) - (n^2a/V^2)

T= (P+n^2a/V^2) (V-nb)/nR

And I got T=155.86 K with P=1atm and V=50L and Pf=9.185 atm when T=155.86K and V=4L

Since the original process is irreversible I set up a hypothetical scenario where the process is reversible so I can calculate entropy with dS=dq/T:

V1= 50 L

P1= 1 atm

T1= 155.86 K

| - Isochoric process (S1) reversible (heat it up in a rigid piston)

V

V2= 50 L

P2= 9.185 atm

T2= 1399.68 K (Used same equation as for my original T)

| - Isobaric process (S2) reversible (keep external pressure=internal pressure and cool it down)

V

V3= 4 L

P3=9.185 atm

T3=155.86 K

So the entropy for my hypothetical system should be: S=S1+S2

Since Cpm is constant,

Cpm=Cvm+R

dS=dq/T

dS1= nCvm dT/T

dS1= n(Cpm-R) dT/T

S1= n(Cpm-R) ln (T2/T1) = 4*(33-8.3145)*ln (1399.68K/155.86K) = 216.7 JK^-1

and

S2= nCpm ln (T3/T2) = 4*33*ln (155.86K/1399.68K) = -289.7 JK^-1

S=-73.0 JK^-1

After I got stuck here since S was negative I tried doing it starting with an isobaric process then isochoric process and I get:

T= 155.86 K -> 59.11 K -> 155.86 K

P= 1 atm -> 1 atm -> 9.185 atm

V= 50 L -> 4 L -> 4 L

and I get

S1= -128.0 JK^-1

S2= 95.7 JK^-1

S= -32.2 JK^-1

**So my question is what am I doing wrong? I feel like it shouldn't matter which order I go from my initial to final state as long as it is reversible since entropy is a state function. Since my "S" was different for the two ways I did it I'm pretty sure I'm doing something incorrectly. I first thought about Cpm not being constant and **

Cp=Cv + nR/(1-(2na)(V-nb)^2/[(RT)(V^3)]

but the problem is since the question gave Cpm being 33 J mol^-1 K^-1 and not of some other variables, so this isn't the problem. Right now I think I set up my processes wrong and maybe one of them is not possible.

Any help would be appreciated!
Also I forgot, for my Ssurroundings I used the equation:

S=nRln((V2-nb)/(V1-nb))=-84.9 JK^-1