I'm was at the G4G conference last week and working on my (6-minute) talk caused me to think again about the motivation behind making steam engine models.

Nearly all model steam engines (and some full-size ones) use a beautiful set of harmonic motions to create the self-sustaining, alternating application of steam pressure to first one side and then the other of a piston, which drives a flywheel, which in turn drives a valve that causes the alternating steam pressure.

This model shows the fundamental fact that the two harmonic motions, that of the piston and that of the valve, are 90 degrees out of phase. When the piston comes to rest, the valve is moving fastest to switch the steam over to the other side.

This is a beautifully simple mechanism, and it's the smoothest possible way of running an engine: everything is in harmonic motion, meaning the least possible change in acceleration at every point in the cycle.

But, it requires two connection points to the flywheel, which seems like something that could be subject to further simplification. If you could make a mechanical differentiator to take the derivative of the sine wave motion of the piston, you could use that to synthesize the cosine motion of the valve. But that's not possible in any pure way, because you would necessarily require infinite leverage or something to that effect. (Because the valve needs to be moving at maximum speed when the piston is stationary: how do you derive motion from lack of motion?)

But it turns out there is a simple and commonly-used (on real steam engines and some models) way to achieve a sort of approximation to the cosine wave. And the curve you get is actually *better* than a cosine, in that it makes the valve move faster exactly when needed, and remain completely stationary when it doesn't need to move. The motion is not smooth, but it serves the engine better. Notice that this design has only one takeoff, yet the motion of the valve is still maximized at the point where the piston comes to rest (actually *just* before).

The trick is to use the very top/bottom of the sine wave, magnify it (with mechanical leverage), and then min/max it (with a sliding toggle) to create hysteresis. Mathematically, the motion of the toggle is approximately 5 * max(0, sin(x) - 0.8), with appropriate switching of the sign for the negative lobe of the sine wave. This plot shows the piston (green) and valve (orange) positions as a function of time through one complete cycle.

If you add a cosine wave to the plot (actually -cos(x)), you can see how the jerky, toggle-based curve is a mechanical approximation of a cosine, but squared off. What you *actually* want from the point of view of steam flow, is a square wave: the valve should switch instantly from one side to the other, exactly at the extremes of motion of the piston.

The whole elegance of having two pure harmonic motions is really not ideal at all from this point of view, which is why such mechanisms are not used on large engines.

There is another "mathematical" way of looking at the difference between engines that have separate sine and cosine connections to the flywheel, vs. a single sine wave connection. The combination of a sine and cosine wave define a direction of time, as it were. With time (x-axis) moving forwards to the right, the sine wave leads the cosine wave. If you reverse time, the cosine leads the sine. Therefore, this engine can only run in one direction (unless you interchange where the steam is coming in with the exhaust).

But a single sine wave does not change if you reverse time: it is symmetrical to time reversal, as they say in physics. That means, necessarily, that the single-connection engine above *must* be able to run in either direction without changing anything in the mechanism. Another way of looking at it is to say that the entire mechanism to the right of the flywheel has *no way of knowing which direction the flywheel is turning*. The harmonic, sine wave motion will be identical regardless of the direction of rotation, therefore it must work either way. So what determines which direction it actually goes? It's all down to which side the valve was flipped to when the engine is started up. The hysteresis of the valve creates the direction-of-time difference.

That's actually a thing in real engines: I saw a model steam engine with this type of valve just a few days before making this design. The guy showed me how you flip a lever before starting the engine, and it was clear that this lever was not redirecting steam. At the time I didn't understand how this could work, which caused me to worry about it until I finished this model, and now it all makes sense.

Literally hundreds of patents were issued over a span of centuries, focused on improved methods of controlling the timing of steam engine valves. For example, you might want to optimize for maximum work per unit of water used to create steam, instead of optimizing for maximum power from a given size of piston,. If so, you design the valves to admit a small amount of high-pressure steam at the start of the cycle, then close off quickly, allowing the steam to expand within the cylinder. The pressure drops off as the cylinder moves over, but you don't use any more steam. In practice this is said to get you about 2/3 of the work for 1/3 of the water, compared to applying full steam pressure for the whole stroke.

Towards the end, before the steam engine was replaced completely by internal combustion and turbine engines, the valves were mostly "poppet" style valves, driven by cams. The timing could be changed at will to optimize for torque or efficiency.

Theodore

P.S. I love my laser cutter! As I said, I came up with this design while working on a talk. That was Monday evening, and my flight out to the conference was Wednesday early morning. Around 11PM that night I decided it was nuts to try to actually make the engine in time to take to the conference, so I started working on the CAD files. By around 1AM Tuesday morning I had a design ready (based on my Folded Steam Engine, lengthened a bit and with the valve connection replaced with the new design). Around 10AM Tuesday morning I went to the shop and laser cut the new design. It took four or five re-cuttings of the piston and toggle lever to fine-tune the dimensions so the valve moves the correct distance (taking into account the reality of the laser cut width and the slop in the screw pivot joint, which are a bit hard to predict in the drawing).

Once the design was good, I made six copies, put a couple of them together, then Nick and I photographed a time lapse of the new design. All that took maybe 2-3 hours.

I really do not know of *any* tool that works so fast and so perfectly to churn out beautiful-looking mechanical parts. I really wish 3D printers could come anywhere near this level of speed, economy, and beauty of results. While waiting for that, I will continue to live in my 2D laser cutter world.