# Irreversible process involving temperature change

I do get a sense of how intermediate states cannot be defined if pressure and/or volume are changed suddenly, but what if it is the temperature that is being changed suddenly? For instance, what I if I take a closed container full of hot gas and put it in a freezer? My intuition leads me to believe that temperature change is a very continuous process and hence every intermediate state can be plotted on an isochoric curve. But theoretically, I know that since it is not a quasi-static process, it must have undefined intermediate states. Which one is it?

• Can intermediate states not be defined when pressure/volume is changed suddenly? Commented May 31, 2018 at 9:29
• @Steeven from the point of view of thermodynamics alone they can't. Those intermediate states are not equilibrium states (won't satisfy the equation of state etc) and so can't be dealt with. Of course they still exist as states in a mechanical sense. Commented May 31, 2018 at 10:03
• Are you familiar with the transient heat conduction equation.? Would you be willing to accept a surrogate for your problem one in which a rigid solid is placed in contact with an ideal constant temperature bath and the solid is allowed to equilibrate thermally with the bath? Commented May 31, 2018 at 11:25
• @ChesterMiller Since I'm studying thermodynamics in context of gases and their behavior, an alternate describing a rigid solid might not solve the purpose of my question and might just confuse me further. Commented May 31, 2018 at 12:37
• OK. Then are you willing to neglect natural convection flow within the gas by assuming that the heat transfer to the gas takes place in a zero g environment? Commented May 31, 2018 at 12:45

You have a cubical container of gas of side S, initial temperature $T_0$, and number of moles n. Then the initial pressure is $$P_0=\frac{nRT_0}{S^3}$$The vertical sides of the container and the top of the container are insulated. At time t = 0, the temperature of the base of the container is suddenly lowered to $T_1$, and held at that temperature for all subsequent times.

The temperature distribution in the gas as a function of time and vertical position z is described by the transient heat conduction equation: $$\rho C_V\frac{\partial T}{\partial t}=k\frac{\partial^2 T}{\partial z^2}\tag{1}$$where $\rho$ is the gas density, $C_v$ is the heat capacity at constant volume, and k is the thermal conductivity. Boundary and initial conditions on the heat transfer are:

$T=T_0$ for t = 0, all z

$T=T_1$ at z = 0, all t > 0

$\frac{\partial T}{\partial z}=0$ at z = S, all t

One can solve this transient heat conduction equation analytically, subject to the prescribed boundary conditions, to obtain the temperature T of the gas as a function of time and vertical position T(t,z).

Since the temperature is varying with z, the local molar density is also varying with z according to the ideal gas law, applied locally: $$\rho_M(t,z)=\frac{P(t)}{RT(t,z)}\tag{2}$$where P(t) is the pressure at time t. If we integrate this equation over the volume of the container, we must obtain the initial number of moles of gas in the container. Thus: $$S_2\int_0^S{\rho_M(t,z)dz}=S^2\frac{P(t)}{R}\int_0^S{\frac{dz}{T(t,z)}}=n=\frac{P_0S^3}{RT_0}$$Therefore, $$\frac{P(t)}{P_0}=\frac{1}{\frac{T_0}{S}\int_0^S{\frac{dz}{T(t,z)}}}\tag{3}$$ We see from all of this that, even for this spontaneous and irreversible heating process, the details of the temperature distribution and the variation of pressure as a function of time within the gas can be accurately determined. So the intermediate states are not undefined. We can even calculate the overall entropy change at any time and the rate of generation of entropy.

In the case of irreversible expansions and compressions, although the analysis is much more complicated than in the case of just a temperature change, it is likewise possible to estimate the intermediate states by solving the differential energy balance equation in conjunction with the Navier Stokes equations for the gas flow. However, none of this can be done solely based on equilibrium thermodynamics, which applies only to the initial and final thermodynamic equilibrium states of the system.

If we divide Eqn. 1, the transient heat conduction equation, by the local absolute temperature T at position z and time t, we obtain: $$\rho C_V\frac{1}{T}\frac{\partial T}{\partial t}=\frac{k}{T}\frac{\partial^2 T}{\partial z^2}\tag{4}$$The left hand side of this equation is the local rate of entropy change per unit volume of gas: $$\rho C_V\frac{1}{T}\frac{\partial T}{\partial t}=\frac{ds}{dt}$$where $ds=\rho C_Vd{\ln(T)}$. The right hand side of Een. 4 can integrated by parts to obtain:$$\frac{k}{T}\frac{\partial^2 T}{\partial z^2}=-\frac{\partial}{\partial z}\left(\frac{q}{T}\right)+\frac{k}{T^2}\left(\frac{\partial T}{\partial z}\right)^2$$where $q=-k\partial T/\partial z$ is the local heat flux. So, if we combine these equations, we obtain: $$\frac{ds}{dt}=-\frac{\partial}{\partial z}\left(\frac{q}{T}\right)+\frac{k}{T^2}\left(\frac{\partial T}{\partial z}\right)^2\tag{5}$$The first term on the right hand side of Eqn. 5 represents the net entropy transport between adjacent volumes of the gas. This is analogous to the Q/T term in the Clausius inequality.
Finally, if we integrate Eqn. 5 over the volume of our cube of gas, we obtain: $$\frac{dS}{dt}=\frac{\dot{Q_1}}{T_1}+kS^2\int_0^S{\left(\frac{1}{T}\frac{\partial T}{\partial z}\right)^2dz}\tag{6}$$where S is the total entropy of the gas and $\dot{Q}$ is the rate of heat flow into the cube of gas at z = 0 (a negative quantity in the present situation). Eqn. 6 is basically a transient form of the Clausius inequality. Because the second term on the right hand side is positive definite (representing the total rate of entropy generation within the cube of gas), Eqn. 6 can also be expressed in the more familiar form:$$\frac{dS}{dt}\geq\frac{\dot{Q_1}}{T_1}$$