A piston-rotaxane is a rotaxane molecule where one of the free rings is attached to a rod-like polymer (the piston). We examine the behavior of a system of piston rotaxanes grafted by one end to a surface in the presence of a fluid flow. At a critical shear rate the rotaxane layer will extend perpendicular to the surface, i.e. the system undergoes shear-induced swelling. When the inside surface of a narrow tube is coated with these rotaxanes a nanovalve can be created which has a highly nonlinear flow-rate versus pressure curve. In particular a valve can be created which limits the maximum discharge over a wide range of pressures.