First law. Energy can be neither created nor destroyed; it only changes form. The change in a system's energy equals the energy that crosses its boundary as heat and work.
Closed system
Energy balance, closed system\[ \Delta U + \Delta KE + \Delta PE = Q - W \]
\(U\) is the internal energy: the energy of the molecules themselves. For most closed systems the kinetic and potential energy changes are negligible and the balance is simply \(\Delta U = Q - W\).
Sign convention. Here \(Q\) is heat added to the system and \(W\) is work done by the system, the usual engineering convention. Chemistry texts often take work done on the system as positive and write \(\Delta U = Q + W\). Same physics, different signs: check which a source uses.
Boundary (piston) work\[ W_b = \int_{V_1}^{V_2} p\,dV \qquad \begin{aligned} &\text{constant } p:\; W_b = p\,(V_2 - V_1) \\ &\text{ideal gas, constant } T:\; W_b = mRT\ln\frac{V_2}{V_1} \end{aligned} \]
Over a complete cycle the system returns to its starting state, so \(\Delta U = 0\) and the net work out equals the net heat in: \(W_{\text{net}} = Q_{\text{net}}\).
Open system (steady flow)
For a device with fluid flowing through it, the energy carried in and out by the flow is added to the balance. The flow work \(pv\) needed to push fluid across the boundary combines with \(u\) into the enthalpy:
Enthalpy\[ h = u + p\,v \]
Steady-flow energy equation (one inlet, one outlet)\[ \dot Q - \dot W = \dot m \left[ (h_2 - h_1) + \frac{V_2^{\,2} - V_1^{\,2}}{2} + g\,(z_2 - z_1) \right] \]
Steady-Flow Control Volume
- Turbine, compressor, pump: usually adiabatic with small velocity and height changes, so \(\dot W = \dot m\,(h_1 - h_2)\).
- Heat exchanger, boiler: no shaft work, so \(\dot Q = \dot m\,(h_2 - h_1)\).
- Nozzle, diffuser: no work, little heat: enthalpy is traded for velocity.
- Throttling valve: \(h_2 = h_1\).
For an ideal gas \(\Delta u = c_v\,\Delta T\) and \(\Delta h = c_p\,\Delta T\). In US units, divide the velocity and height terms by \(g_c = 32.174\ \text{lbm·ft/(lbf·s}^2)\) and by 778.17 ft·lbf/Btu to keep everything in Btu/lbm.