Internal Energy & First Law
Track energy crossing a system boundary as heat or work, and use that transfer to account for the change in internal energy.
When energy crosses a system boundary, how much stays inside?
Internal energy changes when energy enters or leaves. Heat transfer and mechanical work are two ways energy can cross the boundary. The first law is the accounting rule that keeps those transfers consistent.
Positive Q enters the system. Positive W_by leaves the system as work done by the system. Equivalently, .
Push energy across the boundary and watch the ledger close.
Positive heat input increases the system's energy unless an equal or larger amount leaves as work.
Expansion often means the system does positive work on its surroundings. Compression means the surroundings do work on the system, so W_by is negative.
U belongs to the system state. Heat and work describe paths by which energy crossed the boundary during a process.
Some texts use work done on the system instead. Both conventions are valid when used consistently.
Q = 0 only says no heat crosses the boundary. Work alone can still raise or lower internal energy.