# Entropy of Van der Waals fluid

Given the thermal equation of state of van der Waals gas as $$(p-an^2/V^2)(V-nb)=nRT$$ how can its entropy be calculated?

• Are you saying the entropy definition is not derived from the ideal gas law? Commented Dec 29, 2022 at 14:18
• I am not sure that we can obtain the entropy function for the van der walls fluid.
– wawa
Commented Dec 29, 2022 at 14:20
• I'm not sure what you are trying to prove. The entropy definition has nothing to do with the equation of state for a gas. Commented Dec 29, 2022 at 14:32
• It is possible to prove in complete generality that the entropy defined through $\Delta S = Q/T$ is a function of state. Using the ideal gas is not necessary. Sometimes it is used as an exercise. It is also possible to recover the entropy corresponding to the van der Waals equation of state. However, one should also provide the equation for the energy as a function of temperature. Commented Dec 29, 2022 at 14:42
• GiorgioP: You can prove that the entropy is a state variable (function) by using the second law of thermodynamics. However, this is not satisfactory in my opinion. My question is how would you show that S is a state function for vdw if the equation of state is given.
– wawa
Commented Dec 29, 2022 at 14:56

Start with $$TdS=dU+pdV$$, substitute $$p=\frac{nRT}{V-nb}-\frac{an^2}{V^2}$$, divide by $$T$$, you get: $$dU=TdS-\left(\frac{nRT}{V-nb}-\frac{an^2}{V^2}\right)dV$$ Let the caloric equation be $$\delta Q = C_vdT$$ where $$C_v=C_v(T,V)$$ so that $$dU=C_vdT+T\frac{\partial S}{\partial V}-\left(\frac{nRT}{V-nb}-\frac{an^2}{V^2}\right)dV\tag{**}$$ but you also have in general that $$dU=C_vdT+\left(T\frac{\partial p}{\partial T}-p\right)dV$$ and because $$dU$$ is a perfect differential $$\frac{\partial C_v}{\partial V}=\frac{\partial}{\partial T}\left(T\frac{\partial p}{\partial T} -p\right)=T\frac{\partial^2p}{\partial T^2}$$ But this is $$0$$ for the van der Waals gas, that is $$\frac{\partial C_v}{\partial V}=0$$, therefore $$C_v=C_v(T)$$ and $$\delta Q=TdS=dU+pdV\\ C_vdT+\frac{RT}{V-nb}dV$$ or $$dS=\frac{C_v}{T}dT+\frac{nR}{V-nb}dV$$ and $$S-S_0=\int_{T_0}^T\frac{C_v}{T}dT+nR\int_{T_0}^T\frac{1}{V-nb}dV$$and $$S(T,V)=S_0+\int_{T_0}^T\frac{C_v(T)}{T}dT+nR \rm{ln} \left( \frac {V-nb}{V_0-nb} \right)$$

** thanks to @Chemomechanics for pointing out that the 2nd term $$T\frac{\partial S}{\partial V}$$ was missing; it was correctly shown in the next equation as consequence of Maxwell's relation.

Addendum: A similar result can be derived for a somewhat more general thermal equation of state such as $$p(T,V)=Tf(V)+g(V)$$. (for the vdW fluid $$f(V)=\frac{nR}{V-nb}$$ and $$g(V)=\frac{an^2}{V^2}$$)

Let $$S=S(T,V)$$ then $$dU=TdS-pdV=T\left(\frac{\partial S}{\partial T}dT+\frac{\partial S}{\partial V}dV\right)-pdV\\ =T\frac{\partial S}{\partial T}dT+\left(T\frac{\partial S}{\partial V}-p \right)dV$$ Now use Maxwell's equation $$\frac{\partial S}{\partial V}=\frac{\partial p}{\partial T}$$ and write $$C_v=T\frac{\partial S}{\partial T}$$: $$dU=C_vdT+\left(T\frac{\partial p}{\partial T}-p \right)dV$$ For this gas $$\frac{\partial p}{\partial T}=f(V)$$ and also $$\frac{\partial^2 p}{\partial T^2}=0$$. Now use the equality of mixed partial derivatives for $$dU$$ to be exact differential, that is $$\frac{\partial C_v}{\partial V} = \frac{\partial}{\partial T}\left(T\frac{\partial p}{\partial T}-p \right) =\frac{\partial T}{\partial T}\frac{\partial p}{\partial T} + T \frac{\partial^2 p}{\partial T^2}-\frac{\partial p}{\partial T}=0$$ Wee that $$C_v=C_v(T)$$ independently of $$V$$. We can integrate the entropy by noting that $$T\frac{\partial p}{\partial T} = Tf$$, therefore $$dU=C_vdT+(Tf-p)dV=C_vdT-gdV$$: $$dS=\frac{1}{T}dU+\frac{p}{T}dV\\ \frac{C_v}{T}dT+\frac{p-g}{T}dV=\frac{C_v}{T}dT+fdV$$ and $$S-S_0=\int_{T_0}^T \frac{C_v(T)}{T}dT + \int_{V_0}^V f(V)dV$$

• Thank you for this derivation.
– wawa
Commented Dec 29, 2022 at 15:17
• The caloric equation is more complex for a van der Waals fluid, though. The expression $dU=c_VdT+\left(T\frac{\partial P}{\partial T}-P\right)dV$ Is always true, as you note. By replacing $T\,dS$ with $c_VdT$ in $dU=T\,dS-P\,dV$, you’ve implicitly assumed that $\frac{\partial P}{\partial T}$ is zero, which isn’t the case for this material. Commented Dec 29, 2022 at 17:00
• @Chemomechanics $\frac{\partial}{\partial T} \left(T\frac{\partial p}{\partial T} -p \right) = \frac{\partial T}{\partial T} \frac{\partial p}{\partial T} + T\frac{\partial ^2 p}{\partial T^2}-\frac{\partial p}{\partial T}=T\frac{\partial ^2 p}{\partial T^2}$; also $T$ and $V$ are independent variables hence $\frac{\partial p}{\partial T}=\frac{nR}{V-nb}$ Commented Dec 29, 2022 at 17:10
• I agree that $\frac{\partial P}{\partial T}$ is not zero for this material. You wrote $dU=c_VdT-P\,dV$ in your answer (second equation). Since we can always write $dU=c_VdT+\left(T\frac{\partial P}{\partial T}-P\right)dV$, you’ve implicitly assumed $\frac{\partial P}{\partial T}=0$ there, yes? Commented Dec 29, 2022 at 17:53
• @Chemomechanics write $S=S(T,V)$ and $dU=T(\partial S/\partial T dT+\partial S/\partial V dV)-pdV = T\partial S/\partial T dT + (T\partial S/\partial V -p)$ and remember Maxwell $\partial S/\partial V = \partial p/\partial T$ and and let $C_v =T \partial S/\partial T$ Commented Dec 29, 2022 at 18:06