# Crap Nullpointer Exceptions

This is the blog of John Dulaney, a hacker of Fedora, SCAdian, player of Music, blacksmith, sailor, and consumer of Bacon.

## Monthly Archives: August 2017

## On calculating port size and steam lap in the simple steam engine valve.

August 26, 2017

Posted by on While the traditional way to design steam engines seems to have been to draw out diagrams representing the relationship between the piston, crank, and valve, I prefer to do the math directly.

First, you need to find the angle of the crank at cutoff

With

A_{c} is the angle of the crank, 0 being top dead center

r_{c} is the radius of the crank, equal to one half piston travel

p is the piston’s position at cutoff

l_{r} is the length of the connecting rod

To find the steam lap:

L is the angle of lead

V_{t} is the valve travel

S_{L} is the steam lap

Finally, the maximum port opening is simply:

P_{o} is the port opening

Advertisements