# Second Law Efficiency

A power plant receives two heat inputs, 25 kW at 825°C and 50 kW at 240°C, rejects heat to the environment at 20°C, and produces power of 12 kW. Calculate the second-law efficiency of the power plant.


```python
from pint import UnitRegistry
ureg = UnitRegistry()
Q_ = ureg.Quantity
```

The second law efficiency is

$$
\eta_2 = \frac{\text{exergy of desired output}}{\text{exergy supplied}} \\
\eta_2 = \frac{\dot{W}}{\dot{X}_{Q_{HT}} + \dot{X}_{Q_{MT}}} \;,
$$

where the exergy input due to heat transfer is
\begin{equation}
\dot{X}_{Q_i} = \dot{Q}_i \left( 1 - \frac{T_0}{T_i} \right)
\end{equation}


```python
heat_in_hot = Q_(25, 'kW')
temp_hot = Q_(825, 'degC').to('K')

heat_in_med = Q_(50, 'kW')
temp_med = Q_(240, 'degC').to('K')

temp_out = Q_(20, 'degC').to('K')

work_out = Q_(12, 'kW')
```


```python
exergy_heat_hot = heat_in_hot * (1.0 - (temp_out / temp_hot))
exergy_heat_med = heat_in_med * (1.0 - (temp_out / temp_med))

eta_2 = work_out / (exergy_heat_hot + exergy_heat_med)

print(f'second law efficiency: {100*eta_2.magnitude: .1f}%')
```

    second law efficiency:  30.2%


Let's compare to the first-law efficiency:

$$
\eta = \frac{\dot{W}}{\dot{Q}_{HT} + \dot{Q}_{MT}}
$$


```python
eta = work_out / (heat_in_hot + heat_in_med)
print(f'first law efficiency: {100*eta.magnitude: .1f}%')
```

    first law efficiency:  16.0%


b1ee773257d5c44a7a7fb73ffebf043b5e55b521
ipynb
Jupyter Notebook
book/content/exergy/second-law-efficiency.ipynb
kyleniemeyer/computational-thermo
3f0d1d4a6d4247ac3bf3b74867411f2090c70cbd
CC-BY-4.0 BSD-3-Clause
2020-04-01T05:52:06.000Z
2022-03-27T20:25:59.000Z
book/content/exergy/second-law-efficiency.ipynb
kyleniemeyer/computational-thermo
3f0d1d4a6d4247ac3bf3b74867411f2090c70cbd
CC-BY-4.0 BSD-3-Clause
2020-04-28T04:02:05.000Z
2020-04-29T17:49:52.000Z
book/content/exergy/second-law-efficiency.ipynb
kyleniemeyer/computational-thermo
3f0d1d4a6d4247ac3bf3b74867411f2090c70cbd
CC-BY-4.0 BSD-3-Clause
2020-04-03T14:52:24.000Z
2022-03-29T02:29:43.000Z
Qwen/Qwen-72B
1. YES
2. YES