I am considering a thermally isolated system of constant pressure. Where 10kg of air at 1000K (assume $Cp_{air}=0.98$ kJ/kgK, denote this as the hot reservoir by H) is connected to 10kg of water at 300K (assume $Cp_{water}=$4.2 KJ/kgK and denote this as the cold reservoir by C). The heat engine has a maximum thermal efficiency of 50%.
I know I should consider equilibrium in terms of entropy change. i.e. when
$\Delta S_{system} = 0$
I understand how to do this problem when the heat engine is reversible. Since then $\frac{\delta Q_H}{T_H} = \frac{\delta Q_H}{T_H} $ leading to
$\Delta S_{system} = (mC_P)_{air}\ln(\frac{T_f}{T_H}) + (mC_P)_{water}\ln(\frac{T_f}{T_C}) = 0$
$\Rightarrow T_f =$ equilibrium temperature of system = 376.7K.
However I can't work out how to take account of the fact that the thermal efficiency of the heat engine is only 50%. I have done the following so far:
$\eta_{th} = \frac{\delta W_E}{\delta{Q_H}} = 0.5$
$\Rightarrow \delta W_E = 0.5\delta{Q_H}$
Since 1st law $ \Rightarrow dU=\delta{Q}-\delta{W} $ and for a heat engine completing a cycle, $dU=0$ and hence $\delta{Q_C}=-0.5\delta{Q_H}$. But I know this is only for the maximal case, and I know the thermal efficiency will reduce as the two temperatures equalize.