First Law of Thermodynamics

Understand how heat, work, and internal energy are balanced in real thermodynamic systems.

By Turn2Engineering Editorial Team Updated April 27, 2026 10 min read

Key Takeaways

  • Core idea: The First Law of Thermodynamics is conservation of energy applied to thermal systems.
  • Engineering use: Engineers use it to analyze engines, turbines, compressors, heat exchangers, refrigeration systems, and power cycles.
  • What controls it: The answer depends on system boundary, heat transfer, work transfer, internal energy change, mass flow, and sign convention.
  • Practical check: Most mistakes come from mixing sign conventions, ignoring boundary work, or using a closed-system equation on an open-flow device.
Table of Contents

    Introduction

    The First Law of Thermodynamics states that energy cannot be created or destroyed in a thermodynamic system; it can only be transferred or converted. For a closed system, the change in internal energy equals the heat added to the system minus the work done by the system, making it the core energy-balance tool behind engines, compressors, turbines, HVAC equipment, and power cycles.

    How the First Law of Thermodynamics Works

    Diagram showing the First Law of Thermodynamics as an energy balance between heat added, work output, and change in internal energy
    The First Law is an accounting rule for energy: heat and work cross the system boundary, while internal energy changes inside the system.

    Notice the system boundary first. In thermodynamics, the boundary determines whether energy is being counted as heat transfer, work transfer, stored internal energy, or flow energy in a control volume.

    What is the First Law of Thermodynamics?

    The First Law of Thermodynamics is the energy conservation principle written for thermodynamic systems. It says that if energy enters a system as heat or work, that energy must either be stored in the system, leave the system, or be converted into another form. It is not a statement about efficiency by itself; it is a statement about energy bookkeeping.

    In mechanical engineering, the law is used to evaluate thermal systems where temperature, pressure, volume, mass flow, and work output interact. A piston-cylinder, a compressor, a turbine, a boiler, and a refrigeration loop all obey the same conservation principle, but the correct equation form depends on whether the engineer is analyzing a closed system, an open control volume, or a complete cycle.

    Heat, Work, and Internal Energy

    The law works by separating energy into two transfer mechanisms and one stored property. Heat and work are energy crossing the system boundary. Internal energy is energy stored within the system because of molecular motion, intermolecular forces, phase, and temperature.

    Heat transfer is energy caused by temperature difference

    Heat is not something a system “contains” as a stored substance. Heat is energy in transit because one region is hotter than another. In engineering problems, heat may come from combustion, electrical resistance, solar radiation, hot exhaust gas, a boiler tube wall, or a surrounding environment.

    Work transfer is energy caused by force, motion, or shaft input

    Work can appear as piston boundary work, shaft work, electrical work, pump work, compressor input, or turbine output. A gas pushing a piston outward does work on the surroundings. A compressor shaft forcing refrigerant into a smaller volume does work on the fluid.

    Internal energy is the stored thermal energy state

    Internal energy changes when the microscopic energy stored in the substance changes. For an ideal gas, internal energy is mainly tied to temperature. For real fluids, phase changes, pressure effects, and property tables may matter, especially near saturation or critical conditions.

    Where Engineers Use the First Law

    Engineers use the First Law any time they need to understand where energy goes. The law helps distinguish useful work output from heat loss, stored thermal energy, pressure-volume work, and energy carried by flowing mass.

    • Heat engines: estimate how much heat input becomes useful work and how much must be rejected.
    • Compressors and pumps: relate shaft work input to pressure rise, temperature change, and heat loss.
    • Turbines: connect fluid enthalpy drop to shaft power output and mechanical losses.
    • Heat exchangers: track energy transferred between fluids without assuming work output.
    • Refrigeration and HVAC systems: follow energy through compressors, condensers, expansion devices, and evaporators.
    Engineering check

    Before solving a first-law problem, identify the system boundary. A fixed mass in a piston-cylinder is a closed system; a turbine, compressor, pump, nozzle, or heat exchanger is usually treated as an open control volume.

    Key Factors That Control the Energy Balance

    A first-law calculation is only as good as the system model behind it. The same physical equipment can produce different equations depending on the boundary, time period, flow condition, property model, and sign convention.

    FactorWhy it mattersEngineering implication
    System boundaryDefines what is inside the system and what crosses the boundary.Determines whether heat, work, mass flow, and storage terms belong in the equation.
    Sign conventionDifferent courses and textbooks define work direction differently.Mixing conventions can reverse the meaning of work input, work output, and internal energy change.
    Process typeConstant volume, constant pressure, isothermal, adiabatic, and cyclic processes simplify the law differently.Choosing the wrong simplification can remove a term that is physically important.
    Fluid propertiesIdeal gases, steam, refrigerants, liquids, and two-phase mixtures store energy differently.Real systems often require property tables, charts, or software instead of ideal-gas shortcuts.
    Steady vs. unsteady behaviorStartup, shutdown, charging, and draining processes can accumulate energy over time.Transient systems may need a time-dependent energy balance rather than a steady-flow equation.

    First Law of Thermodynamics Equation

    For a closed system using the common engineering and physics convention, heat added to the system is positive and work done by the system is positive. With that convention, the first law is:

    $$ \Delta U = Q – W $$

    This form is especially useful for piston-cylinder problems, ideal-gas processes, and introductory energy-balance calculations. If heat enters a gas and the gas expands against a piston, some of the heat may increase internal energy and some may leave as boundary work.

    Key variables
    • \(\Delta U\) Change in internal energy, usually in J, kJ, Btu, or kJ/kg for specific internal energy.
    • \(Q\) Net heat transfer into the system. Positive when heat is added under this convention.
    • \(W\) Net work done by the system. Positive when the system pushes, expands, or produces work output.

    Why some sources use \(\Delta U = q + w\)

    Many chemistry texts define \(w\) as work done on the system, not work done by the system. With that convention, work input increases internal energy and the equation is commonly written as \(\Delta U = q + w\). The physics and chemistry forms are not contradictions; they are different sign conventions.

    Sign convention warning

    Do not memorize only the symbols. Memorize the meaning of the signs. A positive work term may mean work output in one convention and work input in another.

    How the Equation Changes for Common Processes

    Thermodynamic processes often simplify the first law because one term becomes zero or a property returns to its original value. These shortcuts are powerful, but only when the stated process condition is actually valid.

    ProcessConditionFirst-law resultPractical meaning
    Constant volumeNo boundary movement\(W_b = 0\), so \(\Delta U = Q\)Heat added mainly changes internal energy.
    Constant pressurePressure stays approximately constantBoundary work often equals \(P\Delta V\)Useful for piston-cylinder heating and enthalpy discussions.
    Isothermal ideal gasTemperature is constant\(\Delta U = 0\), so \(Q = W\)Heat input is balanced by work output for an ideal gas.
    AdiabaticNo heat transfer\(Q = 0\), so \(\Delta U = -W\)Work changes the stored internal energy.
    CyclicSystem returns to initial state\(\Delta U_{cycle} = 0\)Net heat transfer equals net work over a complete cycle.

    First Law Problem-Solving Workflow

    A good first-law solution starts with modeling discipline, not with plugging numbers into an equation. Use this workflow to avoid the most common errors in thermodynamics homework, design reviews, and equipment energy checks.

    Practical workflow

    Define the system boundary → classify the system as closed or open → choose the sign convention → identify heat, work, and mass flow terms → simplify only terms that are physically zero → solve the balance → check whether the answer makes engineering sense.

    Check or decisionWhat to look forWhy it matters
    Boundary checkDoes mass cross the selected boundary?If yes, a closed-system equation may be incomplete.
    Direction checkIs heat entering or leaving, and is work done by or on the system?This prevents sign errors that flip the physical meaning of the result.
    Process checkIs the process truly adiabatic, isothermal, constant volume, or cyclic?These assumptions remove terms from the balance and must be justified.
    Magnitude checkDoes the result have the expected units and a reasonable size?A huge internal energy change from a small heat input usually signals a unit or sign mistake.

    Worked Example: Heat Added to a Piston-Cylinder

    A gas in a piston-cylinder receives \(500 \, \text{J}\) of heat. During expansion, the gas does \(200 \, \text{J}\) of work on the piston. Using the engineering convention where work done by the system is positive, the energy balance is:

    $$ \Delta U = Q – W = 500 \, \text{J} – 200 \, \text{J} = 300 \, \text{J} $$

    Assumptions

    The gas is treated as a closed system, the piston-cylinder boundary contains the same mass throughout the process, and the reported work is boundary work done by the gas on the surroundings.

    Engineering meaning

    The internal energy increases by \(300 \, \text{J}\). Not all added heat stayed inside the gas because \(200 \, \text{J}\) left the system as useful expansion work. This is the central idea behind many thermal machines: heat input can be split between stored energy change and work output.

    Engineering Judgment and Field Reality

    Real equipment rarely behaves like a perfectly insulated, frictionless textbook system. Compressors reject heat to their surroundings, turbines have mechanical losses, heat exchangers have pressure drops, and engine cylinders experience friction, leakage, incomplete combustion, and nonuniform temperatures.

    Experienced engineers treat the First Law as the starting balance, then add the details needed for the equipment being studied. In a design calculation, that may mean using enthalpy instead of internal energy, adding kinetic and potential energy terms, accounting for heat loss, or separating shaft work from flow work.

    Field reality

    A first-law balance can prove that energy is accounted for, but it does not prove that a process is efficient, reversible, economical, safe, or practical. Those questions require second-law analysis, equipment constraints, and engineering judgment.

    When This Breaks Down

    The First Law itself does not break down under normal engineering conditions, but simplified versions of the equation can become unreliable when the assumptions behind them are not true.

    • Using a closed-system equation on flow equipment: turbines, pumps, compressors, and nozzles usually need control-volume terms.
    • Assuming ideal-gas behavior for real fluids: steam, refrigerants, dense gases, and two-phase mixtures often require property data.
    • Ignoring heat loss: equipment that appears adiabatic in a diagram may still exchange meaningful heat in the field.
    • Forgetting kinetic or potential energy: high-speed nozzles, jets, and elevation-driven flow systems may need additional energy terms.
    • Confusing energy balance with efficiency: the first law tracks quantity of energy, not quality or useful availability.

    Common Mistakes and Practical Checks

    Most mistakes with the First Law come from treating the equation as a memorized formula instead of a physical energy balance. The symbols are less important than the system boundary and sign definitions.

    • Mixing work conventions: decide whether positive work means work by the system or work on the system.
    • Calling heat a stored property: heat is energy transfer, not energy contained inside a system.
    • Removing terms too early: do not assume \(Q = 0\), \(W = 0\), or \(\Delta U = 0\) unless the process condition supports it.
    • Ignoring units: keep J, kJ, Btu, kJ/kg, and mass-specific values consistent.
    • Forgetting the time basis: power problems use rates such as kW, while closed-system examples often use total energy such as kJ.
    Common mistake

    If a result says internal energy increased even though heat left the system and the system also did work, recheck the signs. The energy direction probably has been reversed.

    Useful References and Engineering Context

    The First Law of Thermodynamics is a foundational engineering principle rather than a project-specific code requirement. These references help engineers apply the law with the right assumptions, property data, and equipment context.

    • Thermodynamics textbooks: Standard engineering thermodynamics texts cover closed systems, control volumes, property tables, cycles, and energy balances in a structured sequence.
    • Steam tables and refrigerant property data: Real fluids often require tabulated or software-based properties instead of ideal-gas simplifications.
    • ASME performance test context: Performance testing of turbines, boilers, compressors, and power equipment commonly relies on careful energy and mass balances, even when the detailed procedure is equipment-specific.
    • ASHRAE HVAC references: HVAC and refrigeration analysis uses first-law thinking to evaluate coils, compressors, heat exchangers, and building energy systems.

    Frequently Asked Questions

    The First Law of Thermodynamics means energy is conserved. In a thermodynamic system, energy can enter as heat, leave as work, or be stored as internal energy, but it is not created from nothing or destroyed.

    For a closed system using the common engineering and physics sign convention, the equation is ΔU = Q − W, where ΔU is the change in internal energy, Q is heat added to the system, and W is work done by the system.

    Some chemistry sources define work as work done on the system, while many engineering and physics sources define work as work done by the system. Both forms can be correct, but the sign convention must be used consistently.

    Engineers use the First Law of Thermodynamics to track energy in engines, turbines, compressors, boilers, heat exchangers, refrigeration systems, HVAC equipment, and power cycles. It helps determine how heat, work, and stored energy change across a system.

    Summary and Next Steps

    The First Law of Thermodynamics is the foundation of thermodynamic energy accounting. It connects heat transfer, work transfer, and internal energy change so engineers can understand where energy goes in a system.

    The most important practical steps are to define the system boundary, choose a sign convention, identify heat and work directions, simplify only justified terms, and check whether the final result makes physical sense.

    Where to go next

    Continue your learning path with related Turn2Engineering resources.

    Scroll to Top