First Law of Thermodynamics
The first law of thermodynamics says that energy is conserved. For a closed system whose bulk kinetic and potential energies stay constant, ΔU = Q − W. Heat entering adds energy. Work done by the system carries energy out. The difference is the change in stored internal energy.
Try the energy balance calculatorOn this page
First law equation and sign conventions
Draw the system boundary first. For a closed system, the same mass stays inside. The full balance is ΔU + ΔKE + ΔPE = Q − Wby. All terms have energy units, such as joules. When speed and elevation changes are negligible, only ΔU remains on the left.
Work done by the system
Common in engineering. Expansion against a load gives positive Wby. Compression gives negative boundary work.
Work done on the system
Common in chemistry. The same expansion gives negative won. Compression gives positive work input.
Translate signs once. Both conventions count heat entering as positive. For the same interaction, won = −Wby. A gas that loses 90 J as heat while receiving 140 J of compression work gains 50 J of internal energy. In engineering notation that is −90 − (−140). In chemistry notation it is −90 + 140.
What do internal energy, heat and work actually measure?
Internal energy, U, is a state property. It includes microscopic kinetic and interaction energies. Heat, Q, is energy crossing the boundary because of a temperature difference. Work, W, includes transfers such as moving a piston, turning a shaft or passing electric current across the boundary. Q and W depend on the path; ΔU depends only on the endpoints. A gas contains internal energy. Heat and work describe how energy gets there or leaves.
Worked example: a gas lifts a piston
A sealed gas absorbs 500 J and expands from 1.0 L to 2.0 L against a constant external pressure of 200 kPa. Assume a frictionless piston, negligible changes in bulk speed and elevation, and only pressure–volume work.
- Find the work. Wby = PextΔV = 200 kPa × (2.0 − 1.0) L = 200 J. One kPa·L equals one joule.
- Balance the energy. ΔU = 500 − 200 = +300 J. Of the energy supplied, 200 J left through piston motion.
- Check the result. The gas gained energy despite doing work. To calculate a temperature change you would also need its mass and an appropriate property model.
If the resisting pressure changes during expansion, use the area under the actual pressure–volume path, Wby = ∫ Pext dV, for this piston model. A single endpoint pressure can give the wrong area.
First law of thermodynamics calculator
Find internal energy change, heat, or work for a closed system with negligible changes in kinetic and potential energy. Enter signed values. Switch conventions to see the same process written both ways.
Which terms disappear in common processes?
For each closed-system case below, take work by the system as positive and neglect bulk kinetic and potential energy changes.
| Process | Balance | When it applies |
|---|---|---|
| Adiabatic | ΔU = −Wby | Q = 0. Compression can raise the temperature even with no heat input. |
| Constant volume | ΔU = Q if all work is zero | A rigid boundary eliminates expansion work. A paddle wheel or electrical connection can still supply work. |
| Isothermal ideal gas | Q = Wby | For a fixed amount of ideal gas of fixed composition, internal energy depends only on temperature. A phase change at constant temperature can change U in a real substance. |
| Constant pressure | Q = ΔH | For a simple compressible system at constant pressure with only quasi-static pressure–volume work. H = U + PV. |
| Complete cycle | Qnet = Wnet,by | All state properties return to their starting values. Heat and work transfers over the cycle may each be nonzero. |
Compare adiabatic and isothermal processes: the first fixes heat transfer at zero, while the second holds temperature constant.
Open systems: when mass carries energy
Draw the boundary around a running turbine. Steam enters and leaves, carrying energy with it. For steady flow with one inlet (1) and one outlet (2), the mass flow rate is the same at both ports. The energy balance per unit mass is
Here q is heat added per unit mass, ws,by is shaft work delivered per unit mass, h is specific enthalpy, V is speed, and z is elevation. Enthalpy already includes flow work through h = u + pv, where v is specific volume. With speeds in m/s and elevation in m, divide the kinetic and gravitational terms by 1,000 to combine them with enthalpy in kJ/kg.
Example: turbine shaft power
Steam enters an insulated turbine at 3,200 kJ/kg and exits at 2,800 kJ/kg. Neglect speed and elevation changes. The enthalpy drop gives 400 kJ/kg of shaft work out. At 2 kg/s, the power is 2 × 400 = 800 kW. A nozzle can use an enthalpy drop to accelerate a jet instead, so the kinetic term matters there.
A filling tank accumulates mass and energy. Use an unsteady control-volume balance for that case. A steady-flow equation would omit the very change you want to predict.
How to check an energy balance that looks wrong
- Sketch the boundary and arrows. A heater inside a sealed tank can receive electrical work across the tank boundary. Draw the boundary around the fluid alone, and energy from the heater surface enters the fluid as heat.
- Put every measurement on the same basis. A 2 kW heater running for 30 s delivers 60 kJ. Compare that energy with a change in kJ. Compare power in kW with other rates.
- Classify the result. A positive ΔU tells you energy was stored. For water boiling at a fixed pressure, some added energy can change the phase while the temperature stays constant.
Check feasibility separately. An engine absorbing 100 J from a single reservoir and producing 100 J of net work each cycle could close an energy balance on paper. The second law of thermodynamics rules out that cycle. Conservation alone cannot tell you which direction a process will run.
First law questions
How do you state the first law in one sentence?
The change in a system’s total energy equals the energy entering its boundary minus the energy leaving it, including energy carried by mass when the boundary is open.
Can the internal energy change when no heat is added?
Yes. If an insulated gas receives 80 J of compression work and its bulk motion and elevation stay constant, ΔU = 0 − (−80) = +80 J. Work alone can increase internal energy.
When is work negative?
With work by the system defined as positive, work entering the system is negative. A piston pushing inward on a gas is an example. If a problem defines work on the system as positive, reverse the sign of the work term and use the plus form.
Is heat added always equal to the change in internal energy?
Only under the appropriate conditions. For a fixed mass with no net work and no change in bulk kinetic or potential energy, Q = ΔU. An expanding gas can pass part of the incoming energy to the surroundings as work.
What is the difference between ΔU and ΔE?
ΔU is a change in internal energy. ΔE includes changes in the system’s kinetic and potential energy as well. Lifting a sealed vessel can raise its gravitational potential energy while its internal energy stays the same.
Sources and further reading
- OpenStax University Physics — First law of thermodynamics · Heat, work, internal energy and sign conventions.
- OpenStax Physics — Thermal energy and work · Piston displacement and pressure–volume work.
- MIT Unified Engineering — Steady flow energy equation · Flow work, enthalpy and moving fluid streams.
For the broader picture, compare the four laws of thermodynamics. To follow energy through a repeating process, explore thermodynamic cycles.