# How exactly does thermodynamic pressure relate to mechanical pressure?

I would have liked to get some details on the relation between the mechanical and thermodynamical definitions of pressure. I have read that $$p_\mathrm{mech}=p_\mathrm{therm}-\operatorname{div}\left(\mathbf v\right)\cdot\left(\frac2 3\cdot\mu+\lambda\right)$$ (let us only consider newtonian fluids), where $$\mathbf v$$ is the fluid velocity field, $$\mu$$ is the dynamic viscosity and $$\lambda$$ is the bulk viscosity. To the best of my knowledge, I understand this equation and how it is derived. The problem I have with it is that the derivation I've seen (on this StackExchange question) just called $$p_\mathrm{therm}$$ the expression $$\frac1 3\cdot\operatorname{Tr}\left(\mathbf\sigma\right)$$, where $$\mathbf\sigma$$ is the stress tensor of the fluid. I understand $$p_\mathrm{therm}$$ as defined by $$p_\mathrm{therm}=-\left(\frac{\partial U}{\partial V}\right)_{S,\,N=\mathrm{cst}}$$ or by some other equivalent formula (using another thermodynamic potential than the internal energy $$U$$).

But what is the proof that $$-\left(\frac{\partial U}{\partial V}\right)_{S,\,N=\mathrm{cst}}=\frac1 3\cdot\operatorname{Tr}\left(\sigma\right)$$?

I find this particularly interesting as on the left hand side are only quantities that can be defined through a statistical physics approach, and on the right hand side is a quantity defined in continuum mechanics.

Usually, in introductory classes on thermodynamics, you learn the $$-p\cdot\mathrm dV$$ term in the thermodynamic identity $$\mathrm dU=-p\cdot\mathrm dV+T\cdot\mathrm dS$$ (for a number $$N=\mathrm{cst}$$ of particles) through the following proof: you write out the first principle for a infinitesimally small transformation ($$\mathrm dU=\delta W+\delta Q$$, where $$\delta W$$ is the work and $$\delta Q$$ the heat) and you state that $$\delta W$$ is the work of pressure forces. Thoses forces act on each surface element $$\mathrm d\mathbf\Sigma$$ of the system on a length $$\mathrm d\mathbf l\left(\mathrm d\mathbf\Sigma\right)=\mathbf r_{\mathrm d\mathbf\Sigma}\left(t+\mathrm dt\right)-\mathbf r_{\mathrm d\mathbf\Sigma}\left(t\right)$$, where $$\mathbf r_{\mathrm d\mathbf\Sigma}\left(t\right)$$ is the position of the surface element $$\mathrm d\mathbf\Sigma$$ a time $$t$$ relative to an arbitrary origin. Integrating, you get: $$\delta W=\iint_\mathbf\Sigma-p\mathrm d\mathbf l\cdot\mathrm d\mathbf\Sigma=-p\cdot\left(\iint_\mathbf\Sigma\mathbf r_{\mathrm d\mathbf\Sigma}\left(t+\mathrm dt\right)\cdot\mathrm d\mathbf\Sigma-\iint_\mathbf\Sigma\mathbf r_{\mathrm d\mathbf\Sigma}\left(t\right)\cdot\mathrm d\mathbf\Sigma\right)=-p\cdot\left(V\left(t+\mathrm dt\right)-V\left(t\right)\right)=-p\cdot\mathrm dV$$. I have several problems with this proof:

1. It appears $$p$$ in this proof refers to the thermodynamical pressure, as the result $$\mathrm dU=-p\cdot\mathrm dV+\dots$$ indicates. In the proof though, should $$p$$ not be the one in $$p=\frac F S$$, that is, the mechanical pressure? I get that they are equal if the fluid doesn't move, but here it necessarily moves as the volume changes. I expect complications because of the out of equilibrium situation due to the transformation.
2. What allows you to take $$p$$ out of the integral?
3. You are considering a transformation where the volume changes. What if you cannot do that, because you study a system occupying a box of given volume (for example in the canonical ensemble)? In those cases, how should you make sense of the derivative $$\left(\frac{\partial U}{\partial V}\right)_{S,\,N=\mathrm{cst}}$$?
4. This is more of an open question, but what if your system does not actually have a given bounding surface (for instance if your system is the set of all molecules of one particular type in a mix of several types of molecules) or volume? Can you still define pressure in that case, for this particular system?

That was a big question, huge thanks to anyone who can give an answer to one of the four questions or give another proof for the identity $$-\left(\frac{\partial U}{\partial V}\right)_{S,\,N=\mathrm{cst}}=\frac1 3\cdot\operatorname{Tr}\left(\sigma\right)$$.

• I don't think that there is a proof that the thermodynamic pressure is equal to 1/3 the trace of the stress tensor, because that it not the case. What you call the mechanicsl pressure is, however. Commented May 7, 2020 at 20:17
• Oh.. So how does $p_\mathrm{therm}$ appear in the formula $p_\mathrm{mech}=p_\mathrm{therm}-\operatorname{div}\left(\mathbf v\right)\cdot\left(\frac2 3\cdot\mu+\lambda\right)$ ? Commented May 7, 2020 at 20:35
• It is determined from the equation of state evaluated at the local specific volume and temperature. Commented May 7, 2020 at 20:41
• So if I understand correctly, thermodynamic pressure is defined as $p_\mathrm{therm}=\left(\frac{\partial U}{\partial V}\right)_{S,\,N=\mathrm{cst}}$ and through statistical physics you link it with the other thermodynamical variables of the system to get an equation of state, and those variables appear in the mechanical calculation so you can replace them with $p_\mathrm{therm}$ and get a relation between thermodynamical and mechanical pressures? Commented May 7, 2020 at 20:52
• I don't exactly know what you mean. But, for an ideal gas as an example, you would use $p_{therm}=RT/v=\rho RT$ Commented May 7, 2020 at 21:42

OK. For a Newtonian fluid, the extensive stress tensor is expressed as $$\tau_{i,j}=-p\delta_{ij}+\mu(u_{i,j}+u_{j,i})+\delta_{ij}\lambda u_{k,k}$$where p is the thermodynamic pressure $$p=p_{therm}$$. The viscous stress term can be rewritten as follows: $$\mu(u_{i,j}+u_{j,i})=2\mu\frac{(u_{i,j}+u_{j,i})}{2}=2\mu \left[\frac{(u_{i,j}+u_{j,i})}{2}-\frac{u_{k,k}}{3}\delta_{i,j}+\frac{u_{k,k}}{3}\delta_{i,j}\right]$$where $$u_{k,k}$$ is the divergence of the velocity vector (and also the trace of the rate of deformation tensor), and where $$(u_{i,j}+u_{j,i})){2}-\frac{u_{k,k}}{3}\delta_{i,j}=\epsilon^*_{i,j}$$ is the deviatoric (traceless) rate of deformation tensor. So the equation for the viscous stress then becomes:$$\mu(u_{i,j}+u_{j,i})=2\mu \epsilon^*_{i,j}+\frac{2\mu}{3}u_{k,k}\delta_{i,j}$$So the original equation now becomes:$$\tau_{i,j}=-\left(p-\frac{2\mu}{3}u_{k,k}-\lambda u_{k,k}\right)\delta_{i,j}+2\mu \epsilon^*_{i,j}$$ The term in brackets is the isotropic part of the stress tensor and the term involving the deviatoric rate of deformation tensor is the anisotropic part. In this equation, the term in parenthesis is called the (isotropic) mechanical pressure $$p_{mech}=p-\frac{2\mu}{3}u_{k,k}-\lambda u_{k,k}$$
• Thank you very much for that but it seems I have troubles communicating my question right - please forgive me for that. What I meant is, why does $\tau_{ij}$ equal $-p_\mathrm{therm}\delta_{ij}+\mu(u_{i,\,j}+u_{j,\,i})+\delta_{ij}\lambda u_{k,\,k}$? How is this equation derived from the definition of $\tau_{ij}$ and the definition of $p_\mathrm{therm}=-\frac{\partial U}{\partial V}$ i.e. the $p$ in the equation of state? Commented May 8, 2020 at 18:32