A rotary fluid machine includes a first operating part (49) and a second
operating part (57), which are groups of axial piston cylinders, wherein
a rotary valve (61) for controlling the intake and discharge of a working
medium to and from the first and second operating parts (49, 57) is formed
from a first valve part that has a flat sliding surface (68) perpendicular
to a rotational axis (L) of the rotor (27) and controls the intake and discharge
of the working medium to and from the first operating part (49), and a second
valve part that has a cylindrical sliding surface (71) centered on the rotational
axis (L) of the rotor (27) and controls the intake and discharge of the
working medium to and from the second operating part (57). Since the intake
and discharge of the working medium to and from the first and second operating
parts (49, 57) are controlled by the common rotary valve (61), the
size of the rotary fluid machine can be reduced.