Statoinary steam engine with piston valves