Thermodynamics: The First Law, Work and Heat

This section we will discuss the fundamental concepts of thermodynamics which are the zeroth and first law of thermodynamics. Besides that, we will also have a discussion about two important points related to the first law which are heat and work.
To begin with, we will start by encountering the basic concepts or vocabularies in thermodynamics. Firstly, in thermodynamics we should define the system and there are 3 types of system in thermodynamics. Firstly, the open system is a system that allows the exchange of energy and matter with surroundings such as an open cup of water. Secondly is a closed system which is a system that allows the exchange of heat with surroundings only such as water in a bottle with a lid on it. The last type is isolated system which is a system that cannot exchange energy or matter such as a perfectly insulated flask. Moreover, it is important to reiterate about state itself. A state does not just mean solid, liquid, or gas; moreover a state can mean a thing at a specific temperature. Hence, a change of state can be just raising the temperature.
The diagram about systems in thermodynamics
Open (left), closed (centre), and isolated system (right)
Then, there are 2 main important points related to the discussion about thermodynamics which is energy and heat. In the simplest way, energy is the capacity to do the work. If you do work on a system its energy increases; for example is if you compress gas, you increase its energy. Meanwhile, heat is a form of energy and there 2 types of boundary related to heat transfer. A diathermic boundary is a boundary that allows heat to transfer. In the other sides, if a boundary does not allow heat to transfer is called adiabatic. As we mentioned earlier, a system can do work if it has energy, so the big question is what actually work is.

In general, work is done when you move something against an opposing force, which means if no force means no work. The force in this case could be friction, gas pressure, gravity, coulombic, or any forces. If force does not oppose but helps then the force does work and the systems energy increases. The work done is done on the system not by the system in this case.

In the heat transfer, there are 2 types of heat transfer, exothermic and endothermic. Exothermic means the system gives out heat and endothermic means the system takes in heat. If this occurs in a diathermal system heat flows from the surrounding to the system, so the temperature remains the same. Hence, in an adiabatic system the temperature falls. Another big question is appeared, what temperature is.

Basically, temperature is related to heat transferred. If 2 things are at the same temperature, so no hear or energy is transferred. This case means they are in thermal equilibrium, but the mass can be transferred. Besides that, if they are not at the same temperature, heat will pass between them until they reach thermal equilibrium. A perfect diathermic boundary will allow an infinite amount of heat to pass through instantly. A perfect adiabatic boundary will allow zero heat to transfer in infinite time, so there are no truly adiabatic and diathermic systems in nature but they are useful concepts.


Another case, if an exothermic reaction takes place in a vessel with adiabatic walls, then the temperature will rise. Therefore, it has more energy and can do more work than it could before the reaction took place. In the other sides, if an exothermic reaction takes place in a vessel with diathermic walls, the the energy escapes as heat and the temperature does not rise. The system after the reaction has completed has the same amount kinetic energy as when it started (because its at the same temperature but has lost potential energy.


In earlier part, heat is mentioned repeatedly but we have not discussed it yet. In general, heat is molecular vibrations and these vibrations are random in size and direction. The hotter something is the bigger the vibrations. For example, if you put 2 things, that are different temperatures, in thermal contact, so the energy from vibrations in the hotter one transfer to the colder one, so the system reaches thermal equilibrium. Hence, if heat is random motion what is work then?
Heat (left) and work (right)
In general, work is non-random motion, the picture on the right side shows all the atoms acting together. Then, all you need to perform work is a net number of atom pushing in one direction not all of them are needed to push together which means the ones doing work are the ones pushing together.


Zeroth law of thermodynamics
The first concept in thermodynamics is related to the zeroth law of thermodynamics. This law concerns temperature and it sounds very obvious. If A is in thermal equilibrium with B and B is in thermal equilibrium with C then A and C are in thermal equilibrium, and they are all at the same temperature.


An illustration of internal energy as a state function
James Prescott Joule
Then, as we discussed earlier that energy of a system is the ability to do work, so the total energy of a system is the internal energy (U). This means internal energy is the total of the kinetic energy (KE) and potential energy (PE) of all the things that make up the system, therefore it is an extensive property. For your information, extensive property is related to the amount of substance. Besides that, internal energy is a state function, this means it only depends on what its state is now not how it got there. The unit of energy is measured in Joule. 1 Joule (1 J) is equivalent to 1 kg ms-2 or 1 Nm. A Joule is quite a small unit (a heart beat is about a joule); the changes in internal energy brought about by chemical changes are usually kilo Joules (kJ). 

As most of acknowledge that energy can neither be created nor destroyed only converted from one form to another. Therefore, the internal energy of a system can be increased by heating it or by doing work on it and the internal energy can be written as
However, q and w is changes not absolutes value, perhaps it would be better to express this as
Moreover, the first law states that the internal energy of an isolated system is constant. Therefore internal energy can be increased by heating or doing work. Then, internal energy is the available energy within a system, then if you put energy in (e.g. heat) you can get it out as work and vice versa. If you take energy out as either work or heat the amount of work it can do decreases. If you keep taking energy out eventually you will get no more out (no perpetual motion).

For an adiabatic system, if you do work on it you change its state. It does not matter how you do this work the internal energy changes by the same amount as its path independent. This statement is another way of stating the first law. In another words, the work needed to change an adiabatic system from one state to another is the same however the work is done. Then, if energy is transferred to the system the internal energy goes up so either q or w must be positive, or if energy is lost then q or w must be negative. For example if a gas expands and does -17 kJ of work then the system does work on the surroundings, and its internal energy has gone down by 17 kJ.


As we back to heat a again, for a diathermal system extra energy will be required to increase the temperature above ambient. Therefore, more work is needed to raise the internal energy from one state to another compared to adiabatic. Hence, somewhere along the process we "loose" energy and this lost energy is heat. The difference between the adiabatic and diathermal cases is defined as the heat absorbed by the system and this is mechanical equivalence of heat.
This statement was proved by Joule's experiment where a falling weight's potential energy converted to mechanical energy converted water to heat in the water. It does work on the water and it heats up. A perfectly insulated (adiabatic) and the temperature rises the most above ambient.
Joule's experiment

As we saw earlier about the definition of internal energy, then if we make very small (infinitesimal) changes to work and heat then this is stated mathematically as:
This is mathematically more useful than before as the terms are now differential and can be used as continous changes. In general, thermodynamics is discussed in terms of doing mechanical work as it is the easiest to visualise.

The first thing we want to discuss is about expansion work, and if we want to compress a gas energy is required. Therefore, an expanding gas can do work and the expansion of a gas is what does work in a car engine.

In general, work can be defined as force times displacement, and if the force is in the opposite direction to the motion, so:
From the equation above, both force (F) and displacement (dz) are vectors, so it is the product that we should use.
Then in our case, if a gas expands, the work done must be negative, its internal energy goes down and the internal pressure will change as the volume increase for a fixed mass of gas. Therefore, we need to calculate work, so we need force and distance.

As most of us acknowledge, force is given by:
Where, p is pressure (Pa), F is force (N), and A is cross-sectional area (m2); furthemore distance can be defined as dz. Therefore, work is:
As you notice, there is minus sign in the equation and the reason is the gas does work against external force and it is internal energy goes down (displacement opposite direction to the force).

For general case, dw is the work done in a tiny, infinitesimal step change in volume dV and to get the total work we need to add all the little dw's up. This can be done by using integration, so the total work done is:
This equation is the general expression for expansive work and we will look at some special cases.

The first case is about free expansion where in free expansion there is no opposing force. Hence, no force means no work done, and that is all. 

In second case, the expansion happens against constant pressure. If the piston expands against constant then external pressure does not change. This is the more usual case the volume changing (ΔV) is different from the dV in that ΔV means a big in change and dV means a infinitesimally small change.
 In this case, ΔV is the total change in volume, so pexΔV is the area under the curve of p versus V. The pexV is an "indicator diagram" and the area bounded by the lines representing the transitions, gives the work done. Hence, work done is area under pV curve.
The p and V curve in constant pressure (above)
with the diagram of gas expansion in a piston
In the third case the expansion happens reversibly. In thermodynamics, reversible means that it can go backwards and the changes are infinitesimal. This means that the internal pressure and the external pressure are the same and obviously in practice this would result in no motion, so imagine the has sand on top of it and one by one the grains of sand were removed.This would allow a small difference in pressure to allow motion (neglecting friction and the mass of the piston).  

One of the type of reversible expansion is the isothermal reversible expansion which means the expansion happens in constant temperature. To start with, the work is given by:
As the temperature is constant, V increases means p decreases, so by using the ideal gas equation we can calculate p. Hence, the equation become:
From the equation, it implies that in a reversible system the work done is greater than in a constant pressure expansion and this is because the area under the curve is bigger. Moreover, because the external pressure was increased by the mass on the piston.
The p and V curve of reversible expansion

Comments