The Fairlie locomotive was invented and patented by the Scottish engineer, Robert F. Fairlie whose name it bore in 1864. He had become convinced that the conventional pattern of locomotive was seriously deficient; they wasted weight on unpowered wheels (remember, the maximum tractive effort a locomotive can exert is a function of its weight on driving wheels) and on a tender that did nothing but carry fuel and water without contributing to the locomotive's adhesive weight. Furthermore, the standard locomotive had a definite front and back, and was not intended for prolonged driving in reverse, thus requiring a turntable or wye at every terminus.
Fairlie's answer, of course, was a double-ended steam locomotive, carrying all its fuel and water aboard the locomotive and with every single axle driven. The double-ended part was accomplished by having two boilers on the locomotive, joined at the firebox ends, back to back, with the smokeboxes at the ends of the locomotive (keeping them looking fairly conventional, until you realise the locomotive is two-faced, Janus-like). In Fairlie's original design, the boilers shared a common firebox, but with separate water spaces; it was found that this didn't work as well as expected, and the fireboxes were partitioned into two on later locomotives.
The locomotive driver (US: engineer) worked on one side of the locomotive, and the fireman on the other; the joined fireboxes separated them. There were, of course, controls at both ends of the central cab to allow the locomotive to be driven equally well in both directions.
Underneath, the locomotive was supported on two swivelling trucks, two powered engines, with all wheels driven; smaller locomotives had four-wheel trucks, while larger had six-wheel.. The cylinders on each power truck pointed outward, towards the locomotive end. Steam was delivered to the cylinders via flexible tubing. Couplers and buffers (where fitted) were mounted on the trucks, not the locomotive frame, so that they swivelled with the curvature of the track.
Fuel and water were carried on the locomotive, in the form of side tanks beside each boiler for the water, and bunkers for the fuel above them.
Early Fairlie locomotives were rather unsuccessful, examples being built for the Neath and Brecon Railway and the Queensland Railway in Australia being notably unsuccessful, in the latter case resulting in locomotives being returned to the builder. However, in 1869 Fairlie's company built a locomotive, named Little Wonder (Fairlie was not an individual given to modesty) for the Ffestiniog Railway, a slate hauler in north Wales, and this one proved to be an outstanding success. Particularly important for a narrow gauge line as small as the Ffestiniog, whose gauge was the minuscule one of 1'11½", was the fact that the Fairlie design meant that the fireboxes and ashpans did not have to be restricted by frame or track width, but only by the overall loading gauge. Little Wonder was such a success that Fairlie offered the Festiniog management a perpetual license to use the Fairlie patent without restriction in return for using the line and the success of its Fairlie locomotives in his publicity. The Ffestiniog, indeed, still uses Fairlie patent locomotives to this day; it has owned seven, of which four are still in running condition.
Armed with this success, Fairlie sold his invention (and the concept of the narrow gauge railway on which it was based) around the world. Locomotives were built for many British colonies, for Imperial Russia, and even one example for the United States.
That locomotive was ordered for the newly built Denver and Rio Grande Railroad in 1872, and was a smaller locomotive with four-wheel trucks, giving it an 0-4-0 + 0-4-0 configuration. The railroad's experience with the locomotive was typical, and an indication of the fact that, though Fairlie had eliminated several problems of the conventional locomotive, he had introduced new ones of his own.
Most critical was the absence of a tender, meaning that the capacity for fuel and water was ludicrously small. A locomotive is already a crowded place, and Fairlie's design gave even less room to place its supplies than a normal tank engine, which at least has a space behind the driver's cab to fill. Moreover, the central position of the cab meant that it was hard to add a tender later.
Also problematic were the flexible steam pipes to and from the cylinders of each swivelling engine; they were prone to leakage and wasting of power.
The final problem lay in the power trucks; there was a good reason for unpowered wheels on a steam locomotive, in that they served a function of stabilising the locomotive, reducing its tendency to wander or 'hunt' when rolling on straight track, and leading the locomotive into curves and thereby reducing derailments. Fairlies had a tendency to be rough-riding, rough on the track they rode, and more prone to derailment than they should have been.
The only really successful use of the Fairlie locomotive, other than on the Ffestiniog Railway was on a mountainous stretch of the Ferrocaril Mexicano's line between Mexico City and Veracruz, where a total of 49 enormous 0-6-0 + 0-6-0 Fairlies weighing about 125 tons apiece, imported from England and the largest and most powerful locomotives built there up to that point, were used until the line was electrified in the 1920s.
A variation of the Fairlie that enjoyed some popularity, especially in the United States, was the Single Fairlie, essentially half a double Fairlie, with one boiler, a cab at one end, and a single articulated power truck combined with an unpowered truck underneath the cab. This design abandoned the unidirectional nature of the double Fairlie but gained back the ability to have a large bunker and water tank behind the cab, and the possibility of using a trailing tender if necessary. The single, conventional boiler made maintenance cheaper and did away with the crew's separation. A fair number were built, especially by Fairlie's licensee in the United States, William Mason, who built a large number, 146 or so, of so-called Mason Bogies.
Fairlie's vision was limited by the limitations of the steam locomotive - its thirst for heavy, bulky water and the unbalancing forces of its directly driving pistons - but he did successfully anticipate the form of locomotives for the future. The vast majority of diesel and electric locomotives in the world today follow a form not too dissimilar from Fairlies - two power trucks with all axles driven, and a huge number follow Fairlie's idea of being double ended and being capable of being driven equally well in both directions. Some inventors are limited by the available technology of their day, and it could be said that Fairlie was one.
To see a Fairlie today, one must go to Wales and visit the Ffestiniog, for nowhere else in the world do these unique locomotives still run. One, Merddin Emrys, is a 1879 product of the Ffestiniog's own Boston Lodge workshops, and is still going strong over 120 years later.