Work extracted from a pressure cooker How much work can you extract from a turbine connected to a pressure cooker? 
The situation is modeled as a rigid adiabatic tank of volume $V_{tank}$, which initially contains water at a high pressure $P_1$ and quality $x_1$.
A tube connects the tank to a valve that only allows the flow of vapor to an isentropic turbine, which discharges to the atmosphere and produces work $W$. We know that the discharged vapor is a saturated vapor at $P_{atm}$.
The schematic is shown below:

Now, the valve is opened and vapor flows out until all the liquid phase in the tank is evaporated. Then the valve is closed.
Known parameters: $V_{tank}$, $P_1$, $x_1$, $x_2 = 0$, $P_{outlet}$
Unknown parameters: $T_2$, $P_2$, $W$

I begin by performing an energy balance on the whole system:
$$ \Delta U = m(u_{f,1} + x_1 u_{fg,1}) - (m-\Delta m)(u_{f,2})= -W -\Delta m h_{out}$$
where $h_{out}=h_g(P_{atm})$, the mass of water (vapor) loss is given by $\Delta m$, and $u_{f,1}$, $u_{fg,1}$ are tabulated values for water.
Initially, we have mass $m = \frac{V_{tank}}{v_1}$ and $v_1 = v_f + x_1v_{fg}$ is defined from steam tables since state 1 is fully defined.
I think I can assume that the final pressure is $P_{atm}$, once all the steam runs through the turbine, therefore state 2 is fully defined and $u_{f,2} = u_f(P_{atm})$.
Now we have 2 unknowns: $\Delta m$, and $W$.
The amount of mass that we lose, $\Delta m$, is the only other parameter needed to calculate work.
Entropy balance on the entire system adds another equation:
$$ \Delta S = m(s_{f,1} + x_1s_{fg,1}) - (m-\Delta m)s_{f,2} = -\Delta m s_{out} + S_{gen}$$
where $s_{out} = s_g(P_{atm})$, and $s_{f,2} = s_f(P_{atm})$. This adds entropy generation $S_{gen}$ as another unknown, however, and therefore I have 3 remaining unknowns ($\Delta m$, $W$, $S_{gen}$). If I could assume zero entropy generation, I could solve this problem, but I think the steam extraction is irreversible. 
How else can I go about this?
 A: The extra constraint that you've forgotten is the Mass Balance. You should be able to figure out the change in system mass by considering the initial and final states of the tank, which are both well-defined. Note that the question states that the process ends as soon as all of the liquid in the tank evaporates, so the final tank pressure is actually $P_1$ rather than $P_\text{atm}$ (the tank can continue to vent, but that is not considered part of the process under consideration). This makes the math significantly simpler.
It's true that $S_\text{gen}$ can't be zero for the entire system (the throttling process inside the valve is irreversible), but you can deal with this by dividing the entropy generation into a component associated with the valve (which you can calculate) and a component associated with the turbine (which must be zero, if work output is to be a maximum).
A: The trick to this problem is finding the final state in the tank, which is not when the pressure in the tank gets to 1 atm.  It is when no liquid remains in the tank.  To do this, you need to recognize that, at any time during the expulsion process, the liquid and vapor remaining inside the tank has experienced an adiabatic reversible expansion (in pushing the vapor ahead of it out of the tank through the valve).  This means that the entropy per unit mass of the vapor remaining in the tank at the final state is the same as the entropy per unit mass in the tank initially:
$$s_{f,g}(P_f)=s_{1,l}(1-x_1)+s_{1,g}x_1$$
This tells you the final saturation vapor pressure $P_f$ in the tank.  In addition to this, you have the following equation to get the final mass of vapor in the tank:
$$m_fv_{f,g}(P_f)=V_{tank}$$where $v_{v,g}$ is the specific volume of the vapor at saturation vapor pressure $P_f$.  The final internal energy per unit mass in the tank is just $u_v(P_f)$.  This is all you need to provide closure on the problem.
