# Thermodynamics

The study of thermodynamics resulted from the desire during the industrial revolution to understand and improve the performance of heat engines such as the steam engine and late the internal combustion engine.
This section contains many references to heat and temperature so it is important to define these terms. Strictly speaking:

When heat energy is supplied to a gas two things may happen:
(a) the internal energy of the gas may increase
(b) the gas may do external work
Considering this in another way, the internal energy of a gas will increase if either:
(a) heat energy is added to it by heating it or
(b) work is done on the gas by compressing it

This leads us to a proposal know as the First Law of thermodynamics.

## The First Law of Thermodynamics:

The first law of thermodynamics is basically a statement of the conservation of energy. Very simply the first law of thermodynamics states that:

Put a little more formally:

This means that there is a finite amount of energy in the Universe and although this energy can be changed from one form to another the total amount never changes – if we want to use energy in one form then we have to 'pay for it' by converting it from energy in another form.

If we consider the First Law in equation form as it applies to a gas then:

Increase in internal energy (dU) = Heat energy supplied (dQ) + Work done on the gas (dW)

Note that dU represents both the change in the internal kinetic energy of the gas (an increase in molecular velocity) and the increase in the internal potential energy (due an increase in energy overcoming intermolecular forces due to separation of the molecules). The potential energy increase is zero for ideal gases and negligible for most real gases except at temperatures near liquefaction and/or at very high pressures.

### Work done by an ideal gas during expansion

Consider an ideal gas at a pressure P enclosed in a cylinder of cross sectional area A.
The gas is then compressed by pushing the piston in a distance dx, the volume of the gas decreasing by dV. (We assume that the change in volume is small so that the pressure remains almost constant – at P).

Work done on the gas during this compression = dW

Force on piston = PA
So the work done during compression = dW = PAdx = PdV

The first law of thermodynamics can then be written as:

In the PV diagram net work is done by the gas if it expands at the higher temperature and net work is done on the gas if is compressed at the higher temperature.