quality:corruption
Entropy balance equation for open systems

In chemical engineering, the principles of thermodynamics are commonly applied to " open systems ", i.e. those in which heat, work, and mass flow across the system boundary. In general, flow of heat Q ˙ {\textstyle {\dot {Q}}}, flow of shaft work W ˙ S {\textstyle {\dot {W}}_{\mathsf {S}}} and pressure-volume work P V ˙ {\textstyle P{\dot {V}}} across the system boundaries cause changes in the entropy of the system. Heat transfer entails entropy transfer Q ˙ / T {\textstyle {\dot {Q}}/T}, where T {\textstyle T} is the absolute thermodynamic temperature of the system at the point of the heat flow. If there are mass flows across the system boundaries, they also influence the total entropy of the system. This account, in terms of heat and work, is valid only for cases in which the work and heat transfers are by paths physically distinct from the paths of entry and exit of matter from the system.

To derive a generalized entropy balanced equation, we start with the general balance equation for the change in any extensive quantity θ {\textstyle \theta } in a thermodynamic system, a quantity that may be either conserved, such as energy, or non-conserved, such as entropy. The basic generic balance expression states that d θ / d t {\textstyle \mathrm {d} \theta /\mathrm {d} t}, i.e. the rate of change of θ {\textstyle \theta } in the system, equals the rate at which θ {\textstyle \theta } enters the system at the boundaries, minus the rate at which θ {\textstyle \theta } leaves the system across the system boundaries, plus the rate at which θ {\textstyle \theta } is generated within the system. For an open thermodynamic system in which heat and work are transferred by paths separate from the paths for transfer of matter, using this generic balance equation, with respect to the rate of change with time t {\textstyle t} of the extensive quantity entropy S {\textstyle S}, the entropy balance equation is: d S d t = ∑ k = 1 K M ˙ k S ^ k + Q ˙ T + S ˙ g e n {\displaystyle {\frac {\mathrm {d} S}{\mathrm {d} t}}=\sum _{k=1}^{K}{{\dot {M}}_{k}{\hat {S}}_{k}+{\frac {\dot {Q}}{T}}+{\dot {S}}_{\mathsf {gen}}}} where ∑ k = 1 K M ˙ k S ^ k {\textstyle \sum _{k=1}^{K}{{\dot {M}}_{k}{\hat {S}}_{k}}} is the net rate of entropy flow due to the flows of mass M ˙ k {\textstyle {\dot {M}}_{k}} into and out of the system with entropy per unit mass S ^ k {\textstyle {\hat {S}}_{k}}, Q ˙ / T {\textstyle {\dot {Q}}/T} is the rate of entropy flow due to the flow of heat across the system boundary and S ˙ g e n {\textstyle {\dot {S}}_{\mathsf {gen}}} is the rate of entropy generation within the system, e.g. by chemical reactions, phase transitions, internal heat transfer or frictional effects such as viscosity.

In case of multiple heat flows the term Q ˙ / T {\textstyle {\dot {Q}}/T} is replaced by ∑ j Q ˙ j / T j {\textstyle \sum _{j}{{\dot {Q}}_{j}/T_{j}}}, where Q ˙ j {\textstyle {\dot {Q}}_{j}} is the heat flow through j {\textstyle j} -th port into the system and T j {\textstyle T_{j}} is the temperature at the j {\textstyle j} -th port.

The nomenclature "entropy balance" is misleading and often deemed inappropriate because entropy is not a conserved quantity. In other words, the term S ˙ g e n {\textstyle {\dot {S}}_{\mathsf {gen}}} is never a known quantity but always a derived one based on the expression above. Therefore, the open system version of the second law is more appropriately described as the "entropy generation equation" since it specifies that: S ˙ g e n ≥ 0 {\displaystyle {\dot {S}}_{\mathsf {gen}}\geq 0} with zero for reversible process and positive values for irreversible one.