Bypass valve is used to fill and dump the drill string during drilling tool round-trips. This valve can be suppled separately pr tpogether with the motor.
The valve is mounted on the mud motor's top sub. If there is no pressure difference between the drill string and tubing annulus during mud motor's round trip, the valve piston is hold in the upper position by spring power and the interior of the string communicates with tubing annulus via valve's hole pattern (the valve is open). During run-in-hole stage the drillstem is filled with annulus mud.
When running out the mud goes to tubimg annulus.
When mud is delivered to the drillstring the piston goes down due to pressure difference. The holes pattern of the piston is overlapped and annulus is isolated from the strings interior (valve is closed). The valve stays closed until there is pressure in the drill string. After pumps are turned off and the pressure lowers, the valve's piston goes up, opening the valve.