2.1 First and Second Laws of Thermodynamics & Open/Closed System Energy Balances

Key Takeaways

  • Closed systems (control mass) exchange energy but not mass with surroundings; boundary work for polytropic processes ($P V^n = C$) requires specific integration depending on whether $n=1$ (isothermal ideal gas) or $n \ne 1$.
  • Steady-State Steady-Flow (SS-SF) open systems balance mass $\sum \dot{m}_{in} = \sum \dot{m}_{out}$ and energy $\dot{Q} - \dot{W}_{cv} = \sum \dot{m}_{out}(h_{out} + \frac{V_{out}^2}{2} + g z_{out}) - \sum \dot{m}_{in}(h_{in} + \frac{V_{in}^2}{2} + g z_{in})$.
  • Throttling valves and expansion devices operate isenthalpically ($h_1 = h_2$) with negligible heat transfer, work, and kinetic/potential energy changes, producing temperature drops via the Joule-Thomson effect.
  • Isentropic efficiency quantifies irreversibilities: for compressors and pumps $\eta_c = \frac{h_{2s} - h_1}{h_2 - h_1} = \frac{w_s}{w_a} \le 1.0$, while for turbines $\eta_t = \frac{h_1 - h_2}{h_1 - h_{2s}} = \frac{w_a}{w_s} \le 1.0$.
  • The Second Law dictates that entropy is generated ($S_{gen} \ge 0$) in all real processes; isentropic processes represent the ideal reversible and adiabatic benchmark.
Last updated: August 2026

2.1 First and Second Laws of Thermodynamics & Open/Closed System Energy Balances

Thermodynamic energy balances form the core of every calculation on the PE Mechanical: HVAC and Refrigeration exam. Whether analyzing a 500-ton centrifugal chiller, a steam heating coil, an air handler economizer, or a thermal expansion valve, engineers must systematically define control volumes, track energy and mass flows, apply property relations, and account for second-law irreversibilities.


1. Thermodynamic System Definitions & Sign Conventions

Before writing an energy equation, clearly classify the system boundary:

  1. Closed System (Control Mass): A fixed quantity of matter. No mass crosses the boundary ($m = \text{constant}$), but energy crosses as heat ($Q$) and work ($W$). Examples include a sealed refrigerant storage cylinder or a rigid refrigerant charging cylinder.
  2. Open System (Control Volume): A designated region in space through which mass flows. Mass, heat, and work can all cross the control surface. Examples include compressors, evaporators, cooling towers, fans, pumps, and mixing boxes.
  3. Isolated System: Neither mass nor energy crosses the boundary (e.g., an adiabatic rigid container).

Standard Sign Convention (NCEES Reference Handbook)

In standard mechanical engineering thermodynamics:

  • Heat Transfer ($Q$, $\dot{Q}$): Positive ($+$) when heat is transferred INTO the system from the surroundings; Negative ($-$) when heat is transferred OUT OF the system to the surroundings.
  • Work Transfer ($W$, $\dot{W}$): Positive ($+$) when work is done BY the system on the surroundings (e.g., turbine shaft work output); Negative ($-$) when work is done ON the system by the surroundings (e.g., compressor or pump power input).

ΔEsystem=QinWout=Qnet,inWnet,out\Delta E_{system} = Q_{in} - W_{out} = Q_{net,in} - W_{net,out}

dEcvdt=Q˙W˙+m˙in(h+V22+gz)inm˙out(h+V22+gz)out\frac{dE_{cv}}{dt} = \dot{Q} - \dot{W} + \sum \dot{m}_{in} \left(h + \frac{V^2}{2} + gz\right)_{in} - \sum \dot{m}_{out} \left(h + \frac{V^2}{2} + gz\right)_{out}


2. Closed System Energy Balances & Polytropic Processes

For a stationary closed system (where changes in macroscopic kinetic and potential energy are zero, $\Delta KE = \Delta PE = 0$), the First Law reduces to:

QW=ΔU=m(u2u1)Q - W = \Delta U = m (u_2 - u_1)

Where $u$ is specific internal energy ($\text{Btu/lb}_m$ or $\text{kJ/kg}$). For an ideal gas with constant specific heats, $\Delta u = c_v (T_2 - T_1)$ and $\Delta h = c_p (T_2 - T_1)$.

Boundary Work ($P,dV$ Work)

Boundary work done during a quasi-equilibrium expansion or compression process is:

Wb=12PdVW_b = \int_1^2 P \, dV

Polytropic processes follow the pressure-volume relationship $P V^n = C$, where $n$ is the polytropic index:

Process TypePolytropic Exponent ($n$)Boundary Work Equation ($W_b$)Ideal Gas Property Relations
Isobaric (Constant Pressure)$n = 0$$W_b = P (V_2 - V_1) = m P (v_2 - v_1)$$\frac{V_1}{T_1} = \frac{V_2}{T_2},\quad Q = m c_p (T_2 - T_1) = m (h_2 - h_1)$
Isochoric / Isometric (Constant Volume)$n = \infty$$W_b = 0$$\frac{P_1}{T_1} = \frac{P_2}{T_2},\quad Q = m c_v (T_2 - T_1) = m (u_2 - u_1)$
Isothermal (Constant Temperature, Ideal Gas)$n = 1$$W_b = P_1 V_1 \ln\left(\frac{V_2}{V_1}\right) = m R T \ln\left(\frac{P_1}{P_2}\right)$$P_1 V_1 = P_2 V_2,\quad \Delta U = 0 \implies Q = W_b$
Polytropic (General, $n \ne 1$)$n \ne 1$$W_b = \frac{P_2 V_2 - P_1 V_1}{1 - n} = \frac{m R (T_2 - T_1)}{1 - n}$$P_1 V_1^n = P_2 V_2^n,\quad \frac{T_2}{T_1} = \left(\frac{P_2}{P_1}\right)^{\frac{n-1}{n}} = \left(\frac{V_1}{V_2}\right)^{n-1}$
Isentropic (Reversible Adiabatic, Ideal Gas)$n = k = \frac{c_p}{c_v}$$W_b = \frac{P_2 V_2 - P_1 V_1}{1 - k} = \frac{m R (T_2 - T_1)}{1 - k} = -m c_v (T_2 - T_1)$$P_1 V_1^k = P_2 V_2^k,\quad Q = 0 \implies W_b = -\Delta U$

NCEES Exam Strategy — Polytropic Index Sign Traps: When computing $W_b = \frac{P_2 V_2 - P_1 V_1}{1 - n}$, ensure consistent units. In US Customary units, $P$ is often in $\text{psia}$ (or $\text{lb}_f/\text{in}^2$) and $V$ is in $\text{ft}^3$. You must multiply by $144 \text{ in}^2/\text{ft}^2$ to convert pressure to $\text{lb}_f/\text{ft}^2$ before evaluating work in $\text{ft}\cdot\text{lb}_f$, and then divide by $778.17 \text{ ft}\cdot\text{lb}_f/\text{Btu}$ if the question asks for work in $\text{Btu}$!


3. Open System Steady-State Steady-Flow (SS-SF) Energy Balances

Most HVAC and refrigeration equipment operates under steady-state steady-flow (SS-SF) conditions, meaning fluid properties at any spatial point within the control volume do not change over time ($\frac{dm_{cv}}{dt} = 0$, $\frac{dE_{cv}}{dt} = 0$).

Conservation of Mass

m˙in=m˙out\sum \dot{m}_{in} = \sum \dot{m}_{out}

m˙=ρAV=AVv=V˙v\dot{m} = \rho A V = \frac{A V}{v} = \frac{\dot{V}}{v}

Where $\dot{m}$ is mass flow rate ($\text{lb}_m/\text{s}$ or $\text{lb}_m/\text{hr}$), $\dot{V}$ is volumetric flow rate ($\text{CFM}$ or $\text{ft}^3/\text{min}$), $v$ is specific volume ($\text{ft}^3/\text{lb}_m$), $A$ is cross-sectional area ($\text{ft}^2$), and $V$ is velocity ($\text{ft/s}$).

Conservation of Energy (First Law for Open Systems)

Q˙W˙cv=m˙out(hout+Vout22gc+gzoutgc)m˙in(hin+Vin22gc+gzingc)\dot{Q} - \dot{W}_{cv} = \sum \dot{m}_{out} \left(h_{out} + \frac{V_{out}^2}{2 g_c} + \frac{g z_{out}}{g_c}\right) - \sum \dot{m}_{in} \left(h_{in} + \frac{V_{in}^2}{2 g_c} + \frac{g z_{in}}{g_c}\right)

In US Customary units, kinetic energy $\frac{V^2}{2 g_c}$ with $V$ in $\text{ft/s}$ has units of $\text{ft}\cdot\text{lb}_f/\text{lb}_m$. To convert to $\text{Btu/lb}_m$, divide by $778.17 \text{ ft}\cdot\text{lb}_f/\text{Btu}$:

Specific Kinetic Energy (Btu/lbm)=V22×32.174×778.17=V250,073\text{Specific Kinetic Energy (Btu/lb}_m\text{)} = \frac{V^2}{2 \times 32.174 \times 778.17} = \frac{V^2}{50,073}

In most HVAC components (pumps, compressors, coils, valves), kinetic and potential energy changes ($\Delta ke$ and $\Delta pe$) are negligible compared to enthalpy changes ($\Delta h$), reducing the energy equation for single-inlet single-outlet devices to:

q˙wcv=hehi    Q˙W˙cv=m˙(hehi)\dot{q} - w_{cv} = h_e - h_i \implies \dot{Q} - \dot{W}_{cv} = \dot{m} (h_e - h_i)

Energy Balances for Primary HVAC/R Equipment

+-----------------------+------------------------+---------------------------------------------+
| Component             | Simplifying Assumption | Governing Energy Balance                    |
+-----------------------+------------------------+---------------------------------------------+
| Compressor / Pump     | Adiabatic (\dot{Q}=0)  | \dot{W}_{in} = \dot{m}(h_{out} - h_{in})    |
| Turbine / Expander    | Adiabatic (\dot{Q}=0)  | \dot{W}_{out} = \dot{m}(h_{in} - h_{out})   |
| Heat Exchanger (Coil) | No Shaft Work (\dot{W}=0)| \dot{Q} = \dot{m}(h_{out} - h_{in})       |
| Throttling Device (TXV)| Adiabatic & Rigid      | h_{out} = h_{in}  (Isenthalpic)             |
| Mixing Chamber / Box  | Adiabatic & Rigid      | \sum \dot{m}_{in} h_{in} = \dot{m}_{out} h_{out} |
| Nozzle / Diffuser     | Adiabatic (\dot{Q}=\dot{W}=0)| h_{in} + \frac{V_{in}^2}{2} = h_{out} + \frac{V_{out}^2}{2} |
+-----------------------+------------------------+---------------------------------------------+

4. Second Law of Thermodynamics, Entropy & Isentropic Efficiency

The First Law establishes that energy is conserved; the Second Law dictates the direction of spontaneous processes and establishes theoretical limits on efficiency and performance.

Classical Statements of the Second Law

  1. Kelvin-Planck Statement: It is impossible for any device operating on a thermodynamic cycle to receive heat from a single thermal reservoir and produce a net amount of work (i.e., thermal efficiency $\eta_{th} < 100%$).
  2. Clausius Statement: It is impossible to construct a device that operates in a cycle and produces no effect other than the transfer of heat from a lower-temperature body to a higher-temperature body without external work input (i.e., refrigeration COP is finite and requires compressor power).

Entropy and the T-ds Equations

Entropy ($S$) is a thermodynamic state property defined for a reversible process by $dS = \left(\frac{\delta Q}{T}\right)_{rev}$. For any real (irreversible) process:

dS=δQT+δSgenwhere δSgen>0dS = \frac{\delta Q}{T} + \delta S_{gen} \quad \text{where } \delta S_{gen} > 0

For a closed system undergoing an adiabatic process ($\delta Q = 0$), $\Delta S = S_{gen} \ge 0$. Entropy can be generated, but it can never be destroyed.

The fundamental differential property relations (Gibbs equations) hold for all processes (reversible or irreversible):

Tds=du+PdvT\,ds = du + P\,dv

Tds=dhvdPT\,ds = dh - v\,dP

For an ideal gas with constant specific heats:

s2s1=cvln(T2T1)+Rln(v2v1)s_2 - s_1 = c_v \ln\left(\frac{T_2}{T_1}\right) + R \ln\left(\frac{v_2}{v_1}\right)

s2s1=cpln(T2T1)Rln(P2P1)s_2 - s_1 = c_p \ln\left(\frac{T_2}{T_1}\right) - R \ln\left(\frac{P_2}{P_1}\right)

For an isentropic process ($s_2 = s_1$, reversible and adiabatic) of an ideal gas:

T2T1=(P2P1)k1k=(v1v2)k1\frac{T_2}{T_1} = \left(\frac{P_2}{P_1}\right)^{\frac{k-1}{k}} = \left(\frac{v_1}{v_2}\right)^{k-1}

Isentropic Efficiency

In actual turbomachinery, fluid friction, turbulence, and heat leakage generate entropy, causing real expansion and compression paths to deviate from the ideal vertical line on a $T-s$ or $h-s$ (Mollier) diagram.

Turbine Isentropic Efficiency: ηt=Actual WorkIsentropic Work=waws=h1h2ah1h2s\text{Turbine Isentropic Efficiency: } \eta_t = \frac{\text{Actual Work}}{\text{Isentropic Work}} = \frac{w_a}{w_s} = \frac{h_1 - h_{2a}}{h_1 - h_{2s}}

Compressor / Pump Isentropic Efficiency: ηc=Isentropic WorkActual Work=wswa=h2sh1h2ah1\text{Compressor / Pump Isentropic Efficiency: } \eta_c = \frac{\text{Isentropic Work}}{\text{Actual Work}} = \frac{w_s}{w_a} = \frac{h_{2s} - h_1}{h_{2a} - h_1}

Enthalpy (h) / Temperature (T)
      ^
      |                  2a (Actual: higher h, s2a > s1)
      |                 / 
      |         2s     /  (Compressor Path: w_actual = h2a - h1 > w_s = h2s - h1)
      |          |    /   eta_c = (h2s - h1) / (h2a - h1)
 P2 --+----------+---/----
      |          |  /
      |          | /
      |          1 (Inlet)
 P1 --+----------+---------------------> Entropy (s)
                 s1 = s2s

5. Worked Example: Compressor Power with Heat Loss and Isentropic Efficiency

Problem: An industrial R-134a refrigeration compressor receives saturated vapor at $20 \text{ psia}$ ($h_1 = 105.30 \text{ Btu/lb}_m$, $s_1 = 0.2248 \text{ Btu/lb}m\cdot^\circ\text{R}$) and compresses it to a discharge pressure of $140 \text{ psia}$. At $140 \text{ psia}$, an isentropic compression to $s{2s} = 0.2248 \text{ Btu/lb}m\cdot^\circ\text{R}$ gives an ideal enthalpy of $h{2s} = 124.80 \text{ Btu/lb}m$. The compressor has an isentropic efficiency of $\eta_c = 0.78$. During operation, the compressor loses heat to the ambient air at a rate of $\dot{Q}{loss} = 1.80 \text{ Btu/lb}_m$ of refrigerant circulated. The mass flow rate of refrigerant is $\dot{m} = 120 \text{ lb}_m/\text{min}$.

Find:

  1. The actual specific work input ($w_{actual}$) required by the compressor in $\text{Btu/lb}_m$.
  2. The actual discharge enthalpy ($h_{2a}$) of the refrigerant exiting the compressor in $\text{Btu/lb}_m$.
  3. The total electrical/brake horsepower ($HP$) required if the mechanical-electrical drive train efficiency is $\eta_{mech} = 0.92$.

Step-by-Step Solution:

Step 1: Calculate isentropic work and actual work. ws=h2sh1=124.80105.30=19.50 Btu/lbmw_s = h_{2s} - h_1 = 124.80 - 105.30 = 19.50 \text{ Btu/lb}_m

By definition of compressor isentropic efficiency: wa=wsηc=19.50 Btu/lbm0.78=25.00 Btu/lbmw_a = \frac{w_s}{\eta_c} = \frac{19.50 \text{ Btu/lb}_m}{0.78} = 25.00 \text{ Btu/lb}_m

Step 2: Apply the open system First Law energy balance to find actual discharge enthalpy $h_{2a}$. q˙net,inwa=h2ah1\dot{q}_{net,in} - w_a = h_{2a} - h_1 Here, heat is lost from the control volume, so $\dot{q}{net,in} = -\dot{q}{loss} = -1.80 \text{ Btu/lb}_m$. Work is done on the fluid, so $w_a = -25.00 \text{ Btu/lb}_m$ under the sign convention $\dot{q} - w = \Delta h$, or directly writing an energy balance: h1+waqloss=h2ah_1 + w_a - q_{loss} = h_{2a} h2a=105.30+25.001.80=128.50 Btu/lbmh_{2a} = 105.30 + 25.00 - 1.80 = 128.50 \text{ Btu/lb}_m

Step 3: Calculate the total power requirement in Horsepower. W˙fluid=m˙×wa=(120lbmmin)×(25.00Btulbm)=3,000Btumin\dot{W}_{fluid} = \dot{m} \times w_a = \left(120 \frac{\text{lb}_m}{\text{min}}\right) \times \left(25.00 \frac{\text{Btu}}{\text{lb}_m}\right) = 3,000 \frac{\text{Btu}}{\text{min}}

Convert $\text{Btu/min}$ to Horsepower ($1 \text{ HP} = 42.418 \text{ Btu/min} = 2,544.4 \text{ Btu/hr} = 0.7457 \text{ kW}$): W˙fluid,HP=3,000 Btu/min42.418 Btu/minHP=70.72 HP\dot{W}_{fluid, HP} = \frac{3,000 \text{ Btu/min}}{42.418 \text{ Btu/min}\cdot\text{HP}} = 70.72 \text{ HP}

Accounting for mechanical drive train efficiency ($\eta_{mech} = 0.92$): W˙brake=W˙fluid,HPηmech=70.72 HP0.92=76.87 HP76.9 HP\dot{W}_{brake} = \frac{\dot{W}_{fluid, HP}}{\eta_{mech}} = \frac{70.72 \text{ HP}}{0.92} = 76.87 \text{ HP} \approx 76.9 \text{ HP}


6. NCEES Reference Handbook Navigation & Exam Traps

  • Section 1.3: Thermodynamics: Find the general steady-state control volume equation, isentropic efficiency formulas, ideal gas relations, and polytropic work expressions.
  • Unit Conversion Trap ($P,dV$): Never multiply $\text{psia}$ by $\text{ft}^3$ without multiplying by $144 \text{ in}^2/\text{ft}^2$. $\text{psia} \times \text{ft}^3 \ne \text{ft}\cdot\text{lb}_f$.
  • Isentropic Efficiency Inversion: Candidates frequently invert the numerator and denominator. Remember that real compressors always consume more work than ideal ($w_a = w_s / \eta_c > w_s$), while real turbines always produce less work than ideal ($w_a = \eta_t w_s < w_s$). Both efficiencies must be $\le 1.0$.
Loading diagram...
Steady-Flow Control Volume Energy and Mass Balance
Test Your Knowledge

An air compressor takes in 450 CFM of ambient air at 14.7 psia and 70°F and compresses it isentropically to 120 psia. Assuming air behaves as an ideal gas with k = 1.40, gas constant R = 53.35 ft-lbf/(lbm-°R), and constant specific heat cp = 0.240 Btu/(lbm-°F), what is the theoretical power required to drive this compressor in horsepower?

A
B
C
D
Test Your Knowledge

A steady-state air conditioning mixing box receives two airstreams: Stream 1 carries 4,000 CFM of outdoor air at 95°F dry-bulb and 14.7 psia (density = 0.0718 lbm/ft^3, specific enthalpy = 42.5 Btu/lbm). Stream 2 carries 12,000 CFM of return air at 75°F dry-bulb and 14.7 psia (density = 0.0745 lbm/ft^3, specific enthalpy = 28.2 Btu/lbm). Assuming the mixing box is perfectly insulated and operates at constant atmospheric pressure, what is the specific enthalpy of the mixed supply airstream exiting the box?

A
B
C
D
Test Your Knowledge

A liquid water pump operating at steady state receives 250 GPM of saturated liquid water at 180°F (specific volume vf = 0.01651 ft^3/lbm, density = 60.57 lbm/ft^3) at an inlet pressure of 10 psia and boosts it to a discharge pressure of 125 psia. If the pump isentropic efficiency is 72%, what is the actual fluid pumping power in brake horsepower (BHP)?

A
B
C
D
Test Your Knowledge

Which of the following processes represents a strictly isenthalpic process in standard HVAC and refrigeration systems?

A
B
C
D