Train passengers across the UK have been advised not to travel if they can avoid it as the heatwave plunged the rail network into chaos.

Many services were cancelled altogether, and severe speed restrictions imposed on services that are running.

Here’s why extreme temperatures cause so much disruption to the rail network.

How does hot weather affect UK trains?

The temperature of steel rails can climb 20 degrees higher than the air around them. So when temperatures are approaching 40 degrees, track temperatures can come close to 60 degrees. That causes the metal to expand, putting it at risk of buckling.

The only way that Network Rail and train operators can respond is by imposing drastic speed restrictions, or cancelling services altogether, to avoid the risk of a train derailing from the misshapen track.

Overhead electrical lines can also expand and sag, putting them at risk of being pulled down by trains.

A third problem is that dry weather causes cracks, or even potholes, in the ground beneath the track. Trains travelling over such sections have to move more slowly for safety reasons.

The Channel Tunnel rail link uses concrete sleepers. Photograph: Dan Chung/The Guardian

Why do trains seem to run OK in hotter countries?

When Network Rail stress-tests its steel rail for its reaction to heat, it does so based on the mean summer track temperature in the UK, which is 27 degrees.

In parts of Europe, and other hot countries, they assume much higher temperatures and manage their track accordingly.

That can involve adjusting the track between seasons, to cope with extremes of both hot and cold. Another difference is that British tracks are typically mounted on sleepers, whereas some rail networks in countries with greater climate extremes use concrete slab, which can cope with track expansion and contraction. Concrete slab track costs four times as much to lay.

Network Rail says it would not be cost-effective to build the UK’s tracks in the way they do in hotter countries because we don’t usually experience large variations in temperature.

Some train services are cancelled so that trains can go slower. Photograph: chrispictures/Alamy Stock Photo/Alamy Stock Photo

What is being done to reduce problems?

The most obvious solutions are train cancellations, which is one reason why train operators have been advising passengers not to travel if they can possibly avoid it.

Another is to introduce severe speed restrictions so any trains that hit a section of buckled track are not derailed. Some services could be running as slowly as 20mph on particularly hot stretches.

Network Rail has also sent out extreme weather action teams (EWATs) to monitor the line and, in some cases, paint parts of the track white. This can reduce temperatures by up to 10 degrees.

Will the climate crisis cause more problems in future?

As the world heats up, it is highly likely that the UK will experience more record-breaking heatwaves, meaning periods of rail disruption will become more frequent unless action is taken.

Network Rail published its strategy for coping with the climate crisis in 2017. Among the questions it is considering is whether it might eventually become more cost-effective to spend money now on track capable of dealing with the heat, to avoid mounting costs of repairs and compensation for affected passengers.

• This article was amended on 25 July 2019. An earlier version stated that British railway tracks are usually mounted on wooden sleepers. Network Rail says three-quarters of sleepers are now concrete