A cycle is a process in which the initial and final points coincide.

Let us first consider a closed system. It will be remembered that δQ=dU+δW. The integral of this equation is denoted by ∮δQ=∮dU+∮δW, where ∮ denotes the integral around a cycle. Because internal energy is a function of state, the amount transferred when the system moves from one point to another is returned when the system returns to its original point, so ∮dU=0. For a cycle, therefore, ∮δQ=∮δW. This states that the net heat transfer is equal to the net work transfer. However, it does not say that all the heat can be converted to work.

A power station is an example of a closed system. The boiler, turbine, condenser and pump are arranged in a cycle. Heat is supplied to the boiler, which converts water into steam. The turbine turns a wheel in order to generate electricity. Then wet steam comes out. Another example of a closed system is a gas cylinder with a piston.

An open system has an inlet (denoted as point 1) and an outlet (point 2). Under steady flow conditions, the inflow and outflow are equal. An amount δm of substance flows through, δQ of heat is supplied to it, and it does δW of work. The work required to force fluid into the system at point 1 is equal to pdV. Given that dV=(δm)V_{1}, where V is the specific volume, the work required is δm(p_{1}V_{1}). Note that the subscripts refer to the point in question.

It will be remembered that δW=Fdx. δW is also equal to -dV, which equals the change in potential. From Newton's Second Law of Motion, we can derive the equation F=ma, where a=acceleration. Therefore, -dV = m a dx. For our purposes, this becomes -dV = -δm g dz, where g is the acceleration due to gravity (approximately -9.81m/s²) and z=height. Multiplying both sides of this equation by -1 then integrating gives V=δmgz+k, where k is a constant.

We now know that the potential energy (PE) at the inlet is equal to δmgz_{1}. If the velocity of the fluid at that point is denoted by c_{1}, the kinetic energy KE=0.5δmc_{1}². Obviously, for the outlet 2 would be used as the subscript.

The energy possessed by the fluid at the outlet equals the energy it possesses at the inlet plus the change in energy. δQ is supplied to the system, and δW is lost. Given also that the internal energy change is equal to δmdU, we can write δm(p_{1}V_{1}+U_{1}+gz_{1}+0.5c_{1}²)+δQ-δW=δm(p_{2}V_{2}+U_{2}+gz_{2}+0.5c_{2}²).

Subtracting the energy at the input from both sides of this equation gives δQ-δW=δm(p_{2}V_{2}+U_{2}+gz_{2}+0.5c_{2}²)-δm(p_{1}V_{1}+U_{1}+gz_{1}+0.5c_{1}²). Given that h=U+pV, δQ-δW=δm{h_{2}-h_{1}+g(z_{2}-z_{1})+0.5(c_{2}²-c_{1}²)}. Finally, dividing both sides by dt gives dQ/dt-dW/dt=(dm/dt){h_{2}-h_{1}+g(z_{2}-z_{1})+0.5(c_{2}²-c_{1}²)}. This is the steady flow energy equation. In a closed system, there is no kinetic energy or change in potential energy; the equation for that kind of system is therefore δQ-δW=dU+0PE+0KE.

If we divide both sides of the equation by δm instead of dt, it becomes δQ_{12}/δm-δW_{12}/δm=h_{2}-h_{1}+0.5(c_{2}²-c_{1}²)+g(z_{2}-z_{1}), or δQ_{12}/δm-δW_{12}/δm=Δh+0.5Δ(c²)+gΔz.

Let us turn to some examples of open systems. In the throttling process, liquid passes along a tube through a valve. The pressure at the inlet is greater than that at the outlet. The valve should be thermally insulated, in which case there will be no heat transfer. There is also no work transfer, and the changes in kinetic energy and potential energy are negligible.

The equation for this process becomes 0-0=(dm/dt)(h_{2}-h_{1}+0+0). This simplifies to 0=(dm/dt)(h_{2}-h_{1}). Because there must be a flow of matter, it follows that h_{2}=h_{1}. The enthalpy is therefore constant, and the process is termed isenthalpic.

In the case of a boiler, liquid goes in, δQ of heat is supplied to it, and steam comes out. There is no work transfer, and negligible changes in kinetic energy and potential energy. The equation for this system becomes δQ_{12}/δt-0=(δm/δt)(h_{2}-h_{1}+0+0). This simplifies to δQ_{12}/δt=(δm/δt)(h_{2}-h_{1}).

For a condenser, vapour goes in and liquid comes out. The channel through which the substance passes is in contact with one carrying coolant.

In a rocket nozzle, fluid passes through a thermally insulated tube. Hot vapour emerges, generating a thrust. δQ/δt and δW/δt both equal 0, and there is negligible change in potential energy. The equation for this system becomes 0-0=(δm/δt){Δh+0.5Δ(c²)+0}. Because there must be a flow of matter, 0.5(c_{2}²-c_{1}²)+h_{2}-h_{1}=0. This leads to 0.5c_{2}²=h_{1}-h_{2} and c_{2}²=2(h_{1}-h_{2}).