Oscillating cylinders for steam engines