Each of three bodies has a temperature-independent heat capacity C. The three bodies have initial temperatures of T1, T2, and T3 . What is the maximum amount of work that can be extracted leaving the three bodies at a common final temperature?
I'll assume that C is the total heat capacity. If the heat capacity is a specific heat capacity (per unit mass, per mole, etc.), then multiply it by the mass, the amount of moles etc. of the bodies.
In this problem we have to deal with two processes: Heat flow and performed work. The heat flow is entirely between the bodies and leaves the total internal energy of the three bodies together unchanged. The performed work by the system is energy that leaves the system of the three bodies. If we denote by U_i the total internal energy at the beginning and by U_f the final total internal energy, then we have:
U_f = U_i - W (1)
where W is the work ...
We derive a formula for the maximum work that can be performed by a system of three bodies with equal heat capacities at different initial temperatures. The formula can be easily generalized for the case of an arbitrary number of bodies with unequal heat capacities.