The rotor has magnets spaced around it, the same pole facing towards the outside. As the rotor magnets move past a piston, they repel the piston due to its embedded magnet.
The distance between the piston and the rotor can be adjusted by supporting the piston with some adjustable- location magnets, which repel some piston-embedded magnets added for this purpose.
Changing this distance adjusts the stroke length of the pump.
For use as a pump you can use way valves.
If you use cams to control the valves you can run it as a hydraulic motor or as a pump.-- caspian, Jul 12 2015 Illustration http://www.sockstar...ent-piston-pump.png [caspian, Jul 12 2015] Servo powered permamagnet motor Servo_20powered_20permamagnet_20motorInspiration for this idea [caspian, Jul 12 2015] I like.-- MaxwellBuchanan, Jul 12 2015 random, halfbakery