Moran and Shapiro Fundamentals of Engineering Thermodynamics (p147) has a worked example:
Steam at a pressure of $15$ bars and a temperature of $320^{\circ}C$ is contained in a large tank. Connected to the tank through a valve is a turbine followed by a small initially evacuated vessel with a volume of $0.6m^3$. The valve is opened and the vessel; fills with steam until the pressure is $15$ bars and the temperature $400^{\circ}C$. The valve is then closed. The filling process takes place adiabatically and kinetc and potential energy effects are negligible. Determine the amount of work developed by the turbine in kJ ...
The solution is then given but in a comment at the end they add:
If the turbine were removed and steam allowed to flow adiabatically into the smaller vessel without doing work, the final steam temperature in the vessel would be $477^{\circ}C$, as may be verified
How do you find the temperature without the turbine?
They start by observing that with their assumptions the energy rate balance reduces to:
$$\frac{dU_{cv}}{dt} = -\dot{W} + \dot{m_i}h_i$$
and integrating this and re-arranging they have:
$$ W_{cv} = h_i\Delta m_{cv} - \Delta U_{cv}$$
Because the smaller vessel is initially evacuated the changes are just the final values which they indicate with the subscript 2
:
\begin{eqnarray*} W_{cv}&=& h_i\Delta m_{cv} - \Delta U_{cv}\\ &=& h_i m_2 - m_2 u_2\\ &=& m_2(h_i - u_2)\\ &=& 386.6 kJ \end{eqnarray*}
They have:
steamtables(400C, 15bar, v) = $0.203\,m^3/kg$ (use for mass)
steamtables(400C, 15bar, $u_2$) = $2951.3\,kJ/kg$
steamtables(320C, 15bar, $h_i$) = $3081.9\,kJ/kg$
What is the temperature of the steam in the second question