Entropy production in isolated system

My question relates to the stereotypical example for understanding the first and second laws: an isolated system filled with a gas of non-interacting molecules with constant ($$E$$,$$V$$,$$N$$) has two subsystems that can only exchange energy.

There is entropy production associated with the energetic exchange. Since entropy is additive: $$d S=d S_1 + d S_2=d Q(\frac{1}{T_{cold}}-\frac{1}{T_{hot}})>0$$. Where $$d S$$ is the change in entropy of the total system.

I don't understand how this is coherent with the first principle applied to the total system. Naively, I would say that $$dU=TdS=0$$ (since the system is energetically isolated with the rest of the universe). So $$dS=0$$.

P.D.: Despite having read several posts related to this, I didn't get the feeling that my specific question was answered. (e.g. Why can the entropy of an isolated system increase?, entropy in isolated system).

Edit 1: Trying to remove some ambiguities, I was not thinking in thermal reservoirs but on two separate halves of an isolated system that are allowed to exchange energy. In the beginning, both parts have well-defined temperatures $$T_ {cold}$$ and $$T_ {hot}$$. The expected final state of the system is an equilibrium state in which the whole system has the same temperature ($$T = T_1 = T_2$$).

$$dU=TdS$$ is true for a reversible process, but allowing systems to mix (thermally, chemically, etc) is usually irreversible, so $$dU \ne TdS$$ for an irreversible process. You can, however, find a reversible process that follows $$dU = TdS$$ to have the same initial and final states of an irreversible process.

It's entirely possible, and common, to have an irreversible process of an isolated system where $$\Delta U=0$$ and $$\Delta S \ne 0$$.

Consider your example of two ideal gases (same species) of different temperature in an isolated container separated by a membrane, and the membrane breaks. You'll have some finite $$\Delta S$$ due to thermal equilibration, but $$\Delta U = 0$$.

• For a single pure substance not experiencing a change of phase, the variations in U, S, and V between two closely neighboring thermodynamic equilibrium states are related to one another by dU=TdS-PdV irrespective of any process path between these neighboring equilibrium states; the complexity of the process path (i.e., how tortuous the path may be) and whether the path is reversible or irreversible is irrelevant. – Chet Miller Jan 24 at 23:03
• @ChetMiller, yes $dU=TdS$ connects any two points on the $(U,S,T)$ surface, regardless of reversibility. But an irreversible process does not actually follow that path. – Drew Jan 24 at 23:10
• Huh?? An irreversible process does not actually follow what path? If two thermodynamic equilibrium states are differentially neighboring, how can any process path, either reversible or irreversible, matter with regard to the relationship between dU, dS, and dV? – Chet Miller Jan 25 at 1:56
• @ChetMiller, I'm talking about some path on the $(U,S)$ surface, those paths are only for reversible processes. Although we represent irreversible processes as some equivalent reversible process when plotting a T-s diagram for example. To answer your last question: because a differential irreversible process generates an infinitesimal about of entropy, right? Otherwise it's not irreversible. I'm curious what you think about the top answer here: chemistry.stackexchange.com/questions/86478/… – Drew Jan 25 at 2:44
• I really don't follow what you're saying. If you have two neighboring thermodynamic equilibrium states of a system, one at (U,S,V) and the other at (U+dU, S+dS, and V), then dU and dS must be related to one another by dU=TdS, irrespective any process that caused the system to transition between these two end states, whether reversible or irreversible. Regarding the top answer at the reference you cited, I obviously disagree with it. – Chet Miller Jan 25 at 3:04

I don't understand how this is coherent with the first principle applied to the total system. Naively, I would say that 𝑑𝑈=𝑇𝑑𝑆=0 (since the system is energetically isolated with the rest of the universe). So 𝑑𝑆=0.

You are thinking entropy is only produced if there is heat transfer.

An example of entropy production in an isolated system (as system that exchanges neither heat, work, or mass with its surroundings) is the irreversible expansion of a gas into a vacuum in an insulated rigid vessel.

You have a chamber with a gas in one half and a vacuum in the other separated by a rigid partition with a covered opening. The opening is uncovered allowing the gas to expand into the vacuum. There is no heat (or work) transfer with the surroundings yet entropy is produced because the expansion is irreversible (the gas will not spontaneously return to the original side). How much entropy is produced can be calculated by imagining a convenient reversible process to return the system to its original state, in this case a reversible isothermal compression. In this imagined reversible isothermal process the heat transferred out of the gas divided by the constant temperature of the gas equals the entropy produced during the irreversible expansion.

Hope this helps.

What is the $$T$$ in your equation $$dU = TdS$$? Your system has 2 parts at different temperatures $$T_{hot}$$ and $$T_{cold}$$, so it does not have a temperature. The problem here is that your combined system is not in thermodynamic equilibrium at the start of the process and so we simply cannot apply equilibrium thermodynamics to it. We may be able to reasonably approximate the 2 parts separately as being in equilibrium at the start and end of the process and then use standard methods to find how they change, but the combined system only approaches equilibrium at the end of the process, so we cannot apply standard thermodynamics.

The correct equations for this system should be: $$dU_H=T_HdS_H=-dQ$$and $$dU_C=T_CdS_C=+dQ$$where dQ is the heat transferred from the hot gas to the cold gas. If we add these two equations together, we obtain, as required $$dU_H+dU_C=0$$

Application of the Clausius relationship to this system breaks down like this: $$dS_H=-\frac{dQ}{T_H}=-\frac{dQ}{T_B}+d\sigma_H$$and$$dS_C=+\frac{dQ}{T_C}=\frac{dQ}{T_B}+d\sigma_C$$where $$T_B$$ is the average temperature at the boundary between the hot gas and the cold gas during the heat transfer ($$T_C, $$\sigma_H>0$$ is the entropy generated in the hot gas, and $$\sigma_C>0$$ is the entropy generated in the cold gas. (Note that the Clausius relationship calls for use of the temperature at the interface of a system where the heat transfer is occurring). If we add these two equations together, we obtain: $$dS_H+dS_C=\sigma_h+\sigma_C>0$$ In addition, since ($$T_C), we have $$d\sigma_H=dQ\left(\frac{1}{T_B}-\frac{1}{T_H}\right)>0$$ and $$d\sigma_C=dQ\left(\frac{1}{T_C}-\frac{1}{T_B}\right)>0$$

• My doubt was rather related to an apparent formal inconsistency: While I completely understand the validity of the first principle (and the consequent computable entropy production) on both separate parts, I didn't understand how this reality was compatible with the first principle applied to the whole system. Nevertheless, thanks for the detailed computation. – Javi Jan 25 at 17:08
• The compatibility with the 1st principle is given by my 3rd equation, which, when combined with my first two equations reads: $$dU=dU_H+dU_C=T_HdS_H+T_CdS_C=0$$What is the problem with that? – Chet Miller Jan 25 at 18:03
• I agree with that. But I first thought that it would be possible to write an expression like $dU=TdS=T(dS_1+dS_2)$. As was pointed out, I cannot do that because there is only a well-defined temperature for the whole system in the end of the process, when both parts are in thermal equilibrium ($T=T_1=T_2$). – Javi Jan 26 at 10:19