# Thermodynamics

The following is not an in-depth explanation of every aspect of thermodynamic theory, you can find that in any of the publications referenced at the bottom of this page.
It is our attempt to clarify the basics, assemble the principal formulas and simplify their use.

Whilst thermodynamic calculations can be made exceptionally complicated, the accuracy of your results will be totally dependent upon your control over the design, manufacture and operation of the equipment and environment involved and may not therefore be much more reliable than a measured simplistic approach.
Most practical problems can be solved by answering the following simple questions:
1) How much work do I want out of my process?
2) How much energy do I have to put in to get it?

## The Laws

You will find numerous descriptions and explanations for the three laws of thermodynamics, (many of which may appear confusing), but they can be simplified as follows:

The First Law of Thermodynamics: Conservation of energy
I.e. energy can never be lost, it can only be transformed or transferred.

The Second Law of Thermodynamics: Heat will not spontaneously pass from a colder body to hotter body
I.e. a high-energy source (hotter body) will spontaneously lose energy to a low-energy source (colder body) but you must add work if you want energy to transfer in the other direction (up-hill so to speak). This law essentially states that it is impossible to create energy from nothing.
This law also claims that energy can, and in fact is, lost by a system to its surroundings but that the reverse cannot happen i.e. an increase in disorder is an inevitable feature of time.

The Third Law of Thermodynamics: The entropy of a substance approaches zero as its temperature approaches zero (absolute )
I.e. Entropy is the term used to define disorder. The higher a substance's temperature the more disordered will be its atomic structure and the higher its entropy. E.g. gas has a higher entropy than a solid substance.

## The Theory

Whilst the above laws apply to all forms of energy, the theory (calculations) of thermodynamics is all about the transfer or conversion of heat energy. Therefore thermodynamics does not normally apply to unheated systems.

Thermodynamics is a frightening subject for many who have not been exposed to it before.
In this sub-section, CalQlata will try to explain it as simply as possible.
First of all, we will clarify a few points you may find useful when dealing with the formulas:

### The Energies

The principal energies, all of which have the same units (J, cal, N.m, lbf.ft or Btu), in any system are as follows:
Notes:
Remember; the 'system' does not include its 'container'
Lower-case symbols for energy (e.g. s) refer to specific values (e.g. specific entropy) i.e. energy per unit mass
Upper case symbols for energy (e.g. S) refer to total values (e.g. entropy) i.e. specific energy x mass

Entropy (S):
The energy that defines disorder in a system. Disorder rises as entropy rises. Entropy is inherent in the molecules themselves and cannot be converted into work energy (W).
It is defined as follows:
s = KB.Ln(N) per degree per molecule
s = KB.NA.Ln(N) per degree per mole
s = KB.NA.Ln(N)/RAM per degree per unit mass
S = m.KB.NA.Ln(N)/RAM per degree
Where:
KB = Boltzmann's constant
N = the microstate(s) of each molecule in the system and varies with temperature
RAM = relative atomic mass of the system
m = mass of the system

Heat Energy (Q):
The energy in a system from heat (cv & cp) at 1 atmosphere, at the start or end of a process.
It does not include kinetic, magnetic, chemical, gravitational etc. energies
Nor does it include the effects of pressure resulting from containment at this temperature
{Q = Cv x Ṯ}

Internal Energy (U):
The energy in a system that is not imposed by its surroundings and is available for work (W);
'U' includes 'Q' plus other inherent energies in the system kinetic magnetic, chemical, gravitational, etc., e.g. the kinetic energy of a fluid passing through a pipe
but it does not include potential or other energies from, or induced by, its surroundings
{U = Q + Uᴷ + Uˀ + etc.}

Potential Energy (Uᴾ):
The energy in a system induced by its surroundings and is available for work
Potential energy includes the effects of: pressure (p.V or ρ.g.d.V); gravity (m.g.h); etc.
where:
p = pressure induced by a container, such as a pressure vessel or pipe wall as a result of 'U'
V = volume of the system (i.e. the internal volume of its container)
ρ = density of the fluid in its pressurised state
d = depth of the fluid
h = height above a datum (of the system)
m = mass of the system
g = gravitational acceleration

Enthalpy (H):
The sum of internal energy and potential energy
{H = U + Uᴾ}

Work Energy (W):
The energy (mechanical, chemical, electrical, etc.) expended by the system during a process.
e.g. mechanical work: W = power x time = force x distance x time

Surrounding Energy (Uᴱ):
The surroundings comprise energies; kinetic (Uᴷ), potential (Uᴾ) and surface (US).
For the sake of clarity, we shall designate external energy as 'Uᴱ' and the following all hold true:
Uᴱ₁ = Uᴷ₁ + Uᴾ₁ + US₁ (the total energy in the surroundings before the start of the process)
Uᴱ₂ = Uᴷ₂ + Uᴾ₂ + US₂ (the total energy in the surroundings after the end of the process)
Uᴱ = Uᴱ₂ - Uᴱ₁ = Uᴷ₂+Uᴾ₂+US₂-Uᴷ₁ -Uᴾ₁ -US₁ (energy lost to the surroundings during the process)

Total Energy (E): The sum of all the energies in the system and its surroundings
E = H - W + Uᴱ

The Start of a Process
Always assume a state of equilibrium in a system immediately before the start of a process;

U₁ internal energy can be calculated from the known properties of a system;
temperature, mass, specific heat capacity, etc.

Uᴾ₁ potential energy can be calculated from the known properties of a system;
velocity, gravity, head, pressure, volume, gas constant, etc.

W₁ if no work has yet been done; W₁ = 0⁽¹⁾

Q₁ if no heat energy has been added to the system at the start of the process; Q₁ = 0⁽¹⁾

E₁ the total energy is the sum of that in the system and its surroundings; E₁ = H₁ - W₁ + Uᴱ₁
If Uᴱ₁ is unknown or zero, then E₁ = H₁ - W₁ Fig 1. Isolated System (no work)

The End of a Process
Always assume a state of equilibrium in the system immediately after the end of a process;

U₂ internal energy is the sum of the internal energy at the start of the process and the heat energy added during the process, minus the energy expended in work and that lost to the surroundings;
U₂ = (U₁ +Uᴾ₁ ) + (Q₂-Q₁ ) - (W₂-W₁ ) - (Uᴱ₂-Uᴱ₁ )

W₂ mechanical work generated by the system during a process, e.g. on a piston, can be calculated as follows:
W₂ = force x distance (N.m), where 'force' is the pressure behind the piston multiplied by its area and 'distance' is the sum of the distances travelled by the piston during the process. Divide W₂ by the duration of the process (t) and you will have the power (p) generated in the system by the process; p = W₂ ÷ t
Work (W₂) comes only from heat energy (Q₂)
If no work was done during the process (Figs 1 & 2) then W₂ = 0

Q₂ heat energy is the power (J/s or Btu/min) added to the system over the duration of the process, which can be calculated by:
Q₂ = power x time
or from the modifications made to the system during the process:
Q₂= specific heat capacity x mass x temperature (J/kg/K x kg x K)
Any part of 'Q' that is not converted into 'W' will have been lost to Uᴱ and/or added to U₂

E₂ the total energy is the sum of all the energies in the system and its surroundings;
E₂ = H₂ + Uᴱ₂
If Uᴱ₂ is unknown or zero, then E₂ = H₂

During the Process

Because we don't always know the energy of the surroundings, and in most cases we are primarily interested in what happens to the system at the end of a process, its performance is usually calculated using the difference between energies rather than the start and end energy values. This difference is identified in the equations by a 'δ' in front of the energy symbol⁽²⁾, Fig 2. Closed System (no work)

for example:
δE = E₂ - E₁
δU = U₂ - U₁
δQ = Q₂ - Q₁
δW = W₂ - W₁
etc.
and;
δU = U₁ + δQ - δW - δUᴱ
δE = δU + δUᴱ

The symbols: ꭍ or ∑ refer to the sum of energies
The symbol: refers to the sum of energies that occur in a process cycle
(e.g. ꭍδW, ∑δW and δW each mean the sum of all the work energies generated during the process; e.g. such as when a system operates more than one piston)

### The Systems

The system is the matter containing the energy under consideration everything else is the surroundings.
For example; in an autoclave, the steam (or heated gas) is the system. The pressure vessel and its environment are the surroundings.

Isolated System is a system that can lose neither heat nor mass to its surroundings.
Therefore; Uᴱ can be ignored

Closed System is a system that can lose heat energy to its surroundings but not mass.
Therefore, Uᴱ₂ & Uᴱ₁ will need to be considered in your calculations. Fig 3. Closed System (working)

Open System is a system that will lose mass and heat energy to its surroundings, it is therefore unlikely that you will be able to identify Uᴱ₂ & Uᴱ₁ . δUᴱ will therefore have to be subtracted from known values, i.e.; δU, δQ & δW in order to find the efficiency/losses in the system.

Steady-Flow is a system through which a fluid is flowing, the condition of which does not change with time; i.e. the fluid does not lose energy to its boundary (e.g. container).

Unsteady-Flow is a system through which a flowing fluid interacts with its boundary (container) in that it loses energy through heat, friction, turbulence, etc. Fig 4. Open System (working)

### The Processes

A Reversible process is one that can follow a full cycle and be returned to its original state, i.e. U₂ = U₁, however, unless a process is 100% efficient some additional energy will be required to achieve this reversal.
In an isolated system (Fig 1) this reversal can be achieved with little additional energy because, apart from the energy expended in work, all the added heat energy (δQ) will remain within the system throughout the process.
In a closed system (Figs 2 & 3), energy in the form of heat will be lost to its surroundings and this energy will have to be replaced if the process is to be returned to its original state.

Irreversible is a process during which it will be impossible to return the internal energy to its initial condition, irrespective of the energy added to the system; i.e. U₂ ≠ U₁
All processes in open systems are irreversible (Fig 4).

### The Formulas

Notes:
Lower-case symbols for energy (e.g. s) refer to specific values (e.g. specific entropy) i.e. energy per unit mass
Upper case symbols for energy (e.g. S) refer to total values (e.g. entropy) i.e. specific energy x mass

The following universal relationships apply to polytropic processes and ideal gases in which;
p.Vn = a constant:

p.Vn = R.Ṯ
and;
p₁.V₁n = p².V²n
Ṯ²/Ṯ₁ = (V₁/V²)n-1 = (p²/p₁)(n-1)/n
δW = (p₁.V₁ - p².V²) / (n-1) = p₁.V₁ . {1 - (p²/p₁)(n-1)/n} / (n-1)
δQ = m.cn.δṮ
see our Steam (properties) information page for a calculation method to find 'n'

In these formulas, J is the mechanical equivalent of heat which can be ignored if you are using metric units as J = 1
If you are using Imperial units, you will have to allocate a value to J based upon the units you are using.

The following relationships apply to particular types of polytropic processes where n is defined:
Isentropic: p.Vγ = a constant {1}
Isothermal: p.V1 = a constant {2}
Isobaric: p.V0 = a constant {3}
Isochoric: p.V = a constant {4}

Isentropic:
p₁.V₁γ = p₂.V₂γ {5}
δQ = 0
δṮ = (V₁/V₂)γ = (p₁/p₂)(γ-1)/γ {6}
δU = δW/J = m.cv.δṮ {7}
δW = m.Rᵢ.Ṯ.Ln(V₂/V₁) = p₁.V₁.Ln(V₂/V₁) {8}
δs = (p₁.V₁ - p₂.V₂)/(1 - γ) = p₁.V₁.(1 - [p₂/p₁](γ-1)/γ) / (γ - 1) {9}

Isothermal:
p₁.V₁ = p₂.V₂ {10}
δQ = δW/J {11}
δU = 0
δW = m.Rᵢ.Ṯ.Ln(V₂/V₁) = p₁.V₁.Ln(V₂/V₁) {12}
δs = δQ/Ṯ = Rᵢ.Ln(V₂/V₁) {13}

Isobaric:
V₁.Ṯ₂ = V₂.Ṯ₁ {14}
δQ = m.cp.δṮ = δW.γ.(γ - 1)/J {15}
δW = δV.p = R.δṮ = m.Rᵢ.δṮ {16}
δs = cp.Ln(Ṯ₂/Ṯ₁) {17}
Cp.δṮ = Cv.δṮ + R.δṮ {18}

Isochoric:
p₁.Ṯ₂ = p₂.Ṯ₁ {20}
δQ = δU = Cv.δṮ = δp.V / J.(γ - 1) {21}
δW = 0
δs = cv.Ln(Ṯ₂/Ṯ₁) {22}
δu = cv.δṮ {23}

The following relationships are for adiabatic systems:
δQ = 0
δs = 0
p₁.V₁γ = p₂.V₂γ
δW = U₁ - U² = cv.(Ṯ₁ - Ṯ₂) = (p₁.V₁ - p₂.V₂) / (γ-1) = p₁.V₁ . {1 - (p₂/p₁)[(γ-1)/γ]} / (γ-1)
Ṯ₂/Ṯ₁ = (V₁/V₂)γ-1 = (p₂/p₁)[(γ-1)/γ] {24}
and;
δV/V₁ = -Cv/R x δṮ/Ṯ₁ {25}

in an adiababtic, isentropic, reversible process Q² = Q₁ as no heat is lost to the surroundings, so δQ = 0
U = Q - W is only valid for an adiababtic, isentropic system or one where no heat energy is lost to the surroundings, otherwise these energy losses must be included in the formula: U = Q - (W+losses)
in a constant volume process no work will be done as work requires physical movement (N.m), therefore W² = W₁ & δW = 0

### Example Calculation

A steam engine (train) with the following characteristics:
Power (pₒ) = 5000 hp (3728500 W)
Pressure vessel capacity (V) = 200 ft³ (5.6634 m³)
Speed (v) = 100 mph (44.704 m/s)
Wheel diameter (Ø) = 6 ft (1.8288 m)

In order to simplify the calculation, we may assume a 100% efficient, Adiabatic and Isentropic process, i.e. zero losses and fully reversible.

Wheel rotary speed (N) = v ÷ π.Ø = 44.704 ÷ 3.1412 x 1.8288 = 7.781 rps
Work (W) = pₒ ÷ N = 3728500 ÷ 7.781 = 479185.6 J (N.m)
Piston cycle (t) = 1 ÷ 2.N = 1 ÷ 2x7.781 = 0.0643 s {2 cycles per revolution}

Water (mass) = 30 kg
Gas constant (R) = R₁ x mass = 461.52372 x 30 = 13845.71 J/K
Heat (Cv) = cv x mass = 1632.47679 x 30 = 48974.29 J/K
Ratio of specific heats (γ) = 1.2827
Temperature (Ṯ₁ ) = 450°C = (723.15 K)

Coal specific energy (e) = 25000000 J/kg
Fuel = W ÷ t.e = 479185.6 ÷ 0.0643x25000000 = 0.298 kg/s = 1073.81 kg/h

Sizing the piston:
From {7} & {25} we get piston(s) volume⁽³⁾: δV = δW.V₁ ÷ R.Ṯ₁
δV = 479185.6x5.6634 ÷ 13845.71x723.15 = 0.27104 m³

producing the following temperature variation {7} & {25}: δṮ = -R.Ṯ₁ .δV ÷ V₁ .Cv
δṮ = -13845.71x723.15x0.271 ÷ 48974.29x5.663 = -9.7836K

From {1} & {26} the pressure at the end of the cycle: p₂ = R.(Ṯ₁ + δṮ) ÷ (V₁ + δV)γ
p₂ = 13845.71x(723.15 - 9.7836) ÷ (5.6634 + 0.27104)¹.²⁸²⁷ = 1006036.4 N/m² (145.9psi)

From {1} & {27} start pressure needs to be at least: p₁ = p₂.V₂n ÷ V₁ n
p₁ = 1006036.4x(5.6634+0.27104)¹.²⁸²⁷ ÷ 5.6634¹.²⁸²⁷ = 1068210 N/m² (154.93psi)

However, no steam engine operates with zero energy losses, which can be expected from:
Fuel inefficiency (less than expected energy capacity {J/kg})
Unburnt fuel (smoke, slag, ash, etc.)
Heat loss (furnace, heat exchanger, vessel walls, exhaust, leaks, etc.)
Mechanical (friction, vibration, etc.)
Exhaust (pistons, pressure-relief, leaks, etc.)

In fact, in terms of 'fuel-energy to work' conversion, most steam engines are significantly less than 40% efficient so coal consumption in the above engine is likely to be closer 2.7 tonnes per hour than 1.073.

The available energy in the process comes from the mass of water (30kg), reducing the water quantity will reduce the energy available for work and the pressure in the piston, but it will also reduce the energy required to achieve the design temperature (450°C).

The following will give you the greatest efficiency improvements:
Maximise water mass for the pressure carrying capacity of your pressure vessel
Use a fuel that maximises energy recovery rate (minimises waste)
Maximise heat transfer in heat-exchanger
Minimise heat loss through vessel insulation
Exhaust back into the system (where possible)

Whilst the above calculation may look over-simplified, such an approach will produce results very close to reality, given the unknowns and inefficiencies in a steam engine. A more complicated approach (i.e. detailed/in-depth calculations for each stage of the process) may provide more accurate results, but not necessarily more reliable.

### PVRT

p.V = n.Rᵢ. is a well known and recognised formula for determining the properties of a gas.

There are, however, a couple of alternative ways to calculate it from the potential energy in an atom's proton-electron pair population:
p = ρ.PE₁ / mM.Y = T̲.mₑ.ρ / X.Y.mM = kB.T̲.ρ / mM
where: 'ρ' is the gas density, 'PE₁' is the potential energy in the proton and the electron in shell-1 and 'mM' is the molecular mass:
PE = mₑ.vₑ²
vₑ = √[T̲/X]
which provides exactly the same result as the PVRT calculation method but eliminates the need for moles and the ideal gas constant.

p/ρ = KB.Ṯ
p/ρ = PE₁ / m.N.Y
where: n is the number of moles; Ṯ is the gas temperature; R is the gas constant; V is the gas volume; m is the atomic mass; N is the number of atoms in the molecule; PE₁ is the potentential energy in the innermost (electron shell 1) proton-electron pairs in the atom.
Both of which give exactly the same result.

For example:
vₛ = √[γ..R₁] = √[γ./ρ]

Therefore:
R₁.Ṯ = p/ρ (m²/s²)
which can be helpful when dealing with gas calculations.

## Specific Heat Capacity

It is generally accepted today that 'specific heat capacity' varies with temperature, which is the reason there are so many different versions of the calorie and the British thermal unit#; it doesn't.
# e.g. cal(IT), cal(mean), cal(t), Btu(IT), Btu(mean), Btu(t), etc.

To explain ...
Whilst the cal and Btu units are treated as energy equivalents (e.g. cal ≡ Btu ≡ Joule), they actually apply to the energy of a unit of mass (of water) and a unit of temperature, so cal and Btu are actually energies per unit mass per unit temperature; in other words 'specific heat capacity' (cal ≡ Btu ≡ SHC).

Water exists as both liquid and vapour on the earth's surface today between 273.15K and 373.15K (0°C & 100°C or 32°F & 212°F);
and vapour is not a gas, it is a tiny collection of water molecules, the volume of which will vary with 'temperature-dependent' surface tension along with the pressure of the air in which it is suspended.
Therefore, the higher its temperature the greater the percentage of water's mass will exist in the form of vapour, reducing its 'measurable mass'.

The original value for the calorie was cal(15), which is a measurement of the heat required to raise the temperature of one gramme of water from 14.5°C to 15.5°C.
But the 'mass' we measure in scientific experiments today is actually weight; which is not the same. The weight of water at 14.5°C will be slightly different to its weight at 15.5°C.
I.e. the heat required to increase the temperature of one gramme of liquid water at the start of the experiment will be different to that required at its end.
The 'powers that be' therefore declared that the specific heat capacity of matter varies with temperature.
Moreover, for some inexplicable reason, it was declared that a more accurate test for liquid water should be based upon the average value over its entire temperature range (0°C and 100°C), which was designated its 'mean' value. In reality, the mean value is no more accurate and less representative in our daily lives than the original '15' value.
The same problem exists for the British thermal unit.

The problem with this practical (empirical) approach to a theoretical solution is that experimentation does not, and cannot (in many cases), take every variable into account. It is not until we understand how the atom works and the nature of heat that we can actually calculate an accurate value for the specific heat capacity of water. For example;
One molecule of water comprises; one oxygen atom and two hydrogen atoms (RAM = 16+2 = 18). But the hydrogen atoms in a water molecule are lone protons (H⁺).
Therefore; the mass of one water molecule is;
m = 2.6776353875542E-23g + 2 x 1.67262163783E-24g = 3.0121597151202E-23g
One gramme of water contains;
Nº = 1/3.0121597151202E-23 = 3.319877080157E+22 molecules (NA = RAM.Nº = 5.97538412973187E+23)
The specific heat capacity (SHC) of oxygen is 0.53710774626675 J/K/g
Note: the lone protons in a water molecule have no electrons of their own and therefore contribute nothing to its specific heat capacity.

The kinetic energy in an oxygen atom at;
14.5°C; E₁ = 2613.16885550753 J
15°C; E₂ = 2617.71112711453 J
15.5°C; E₃ = 2622.25339872153 J
E₁₅ = E₃ - E₁ = 9.08454321399995 J
E = 2617.71112711453 / (273.15+15) = 9.08454321400149 J

Demonstrating that;
a) specific heat capacity does not vary with temperature, and;
b) the energy required to raise the temperature of one-gramme of natural water through 1°C is;
E = 0.53710774626675 x 9.084543214 x RAMoxy÷RAMH₂O = 4.33722536136461 J {J/K/g . g/J = /K = /°C}.
I.e. according to the above calculation, 1 calorie today should be 1/1.03513218 times its current value.
But, if you eclude ≈3% deuterium and ≈0.5% impurities, this discrepancy becomes 1.00013218

i.e. there is only one real value for the calorie:
1 cal = 4.33722536136461 ÷ (1-3.5%) = 4.18542247371685 Joules
Note: today's value for 1 cal(IT) = 4.1868 Joules
1 Btu = 4.18542247371685 x 1000 ÷ (2.20462262184878 x 1.8) = 1054.70872183582 Joules
Note: today's value for 1 Btu(IT) = 1055.056 Joules

## Thermal Expansion

Coefficients of expansion (linear; α, area; α' and volume; α") are amounts of growth expressed in terms of a fraction of original length (in a given direction) per degree of temperature change.
For example; if a material with a coefficient of expansion (α) of 0.00002358/K in a given direction is heated by 48K, at the increased temperature that dimension will be;
L x (1 + 0.00002358 x 48)

The following table contains the relationship between material lengths, areas and volumes as a consequence of alterations to its temperature:

Length (L) Area (A) Volume (V)
Relationship:
L₁/L₂=(1+α.Ṯ₁)/(1+α.Ṯ₂) A₁/A₂=(1+α'.Ṯ₁)/(1+α'.Ṯ₂) V₁/V₂=(1+α".Ṯ₁)/(1+α".Ṯ₂)
Expanded Dimensions:
L₂=L₁.(1+α.Ṯ₂)/(1+α.Ṯ₁) A₂=A₁.(1+α'.Ṯ₂)/(1+α'.Ṯ₁) V₂=V₁.(1+α".Ṯ₂)/(1+α".Ṯ₁)

Where: Ṯ₁ is the start temperature; Ṯ₂ is the final temperature; α is the linear coefficient of expansion; α' is the area coefficient of expansion; α" is the volumetric coefficient of expansion
and: L₂, A₂ and V₂ are the enlarged dimensions at Ṯ₂

For a material that has the same coefficient of expansion in all directions:
α' = α x 2 and α" = α x 3

For a material that has different coefficients of expansion in one or more directions, the area and volume coefficients of expansion are simply multiplied by the sum of the ratios.
For example:

A material with a coefficient of expansion in one direction 20% greater than in another direction the area coefficient of expansion is; α' = α x (1 + 1.2)

A material with a coefficient of expansion 20% greater in one direction but only 83% in another, the volume coefficient of expansion is; α" = α x (1 + 1.2 + 0.83)

It is important to ensure that the area coefficient of expansion for materials with differing directional coefficients is established using the correct coefficients for the area concerned, i.e.;
the possible area coefficients of expansion (α') for the above material are:
α x (1 + 1.2), α x (1 + 0.83) and α x (1.2 + 0.83)
dependent upon the area.

### Notes

1. The system may be receiving heat energy and performing work immediately before the start of a process as this is allowed for a state of equilibrium to occur, but such work (W₁) and heat energy (Q₁) must be constant and continuous and exclusive of the work (W₂) and heat energy (Q₂) included in the process.
2. 'δ' is variously written as 'd' or 'Δ' but they all mean the same thing; the difference between values
3. This volume is equal to the sum of all the pistons operated by the process. I.e. for 2 pistons, each will have a swept volume of this value divided by two (2 pistons of 0.13553m³)