referring to fig1 of the drawings , hydraulic fluid leak detector and shut - off apparatus 10 of this invention is based on the principle of conservation of mass . apparatus 10 measures the mass flow of hydraulic fluid going to and coming back from an actuator , hydraulic circuit or other hydraulic component in a hydraulic circuit , not shown in the drawings . the apparatus is designed to shut off or isolate an actuator in the event of hydraulic leakage . it does that by sensing mass flow difference that is greater than the designed imbalance of the hydraulic actuators or other mechanisms . when this difference is sensed , the apparatus immediately shuts down and cuts off flow of hydraulic fluid to the leaking circuit . hydraulic fluid leak detector and shut - off apparatus 10 is depicted in cross section . apparatus 10 is shown in the open position that allows hydraulic fluid to flow uninterrupted to non - leaking hydraulic components located downstream . the term downstream refers to that portion of the hydraulic circuit that is to the right of apparatus 10 a hydraulic fluid supply line 20 and a hydraulic fluid return line 30 transmit flowing hydraulic fluid as indicated by flow arrows 21 and 31 . supply line 20 and return line 30 respectively extend through apparatus 10 in line portions 20a and 30a and downstream line portions 20b and 30b . these line portions connect hydraulic fluid as indicated by flow arrows 22 and 32 to and from a downstream actuator ( not shown ). apparatus 10 is designed to shut off or close portions 20a and 30a from any hydraulic components that are downstream from the apparatus and connected to portions 20b and 30b a pair of bernouilli devices 40 and 50 are connected in supply line 20 and return line 30 , respectively . the bernouilli devices are identical , but could be different if desired in different design applications . bernouilli devices 40 and 50 have ports connected to hydraulic conduits 41 and 42 and 51 and 52 extending to corresponding ports in linear piston cylinder 60 . cylinder 60 consists of a cylinder casing 61 divided into five cylindrically - shaped compartments 62 , 63 , 64 , 65 , and 66 . the compartments are separated by walls 67 , 68 , 69 , and 70 , that each have a bore 67a , 68a , 69a , and 70a , respectively . the bores are aligned with each another and are sized to slidably accommodate an elongate shaft 75 in a sealed relationship . an appropriate sealing structure , such as o - rings , sealing rings , sealing packing , sealing compounds , etc . can be included between bores 67a , 68a , 69a , and 70a and shaft 75 , as will be apparent to one skilled in the art . shaft 75 is positioned to extend through all of the bores . shaft 75 is affixed to valve - pistons 76 and 77 in compartments 62 and 63 , to pressure pistons 78 and 79 in compartments 64 and 65 , and to shut - and - lock mechanism piston 80 in compartment 66 . the circumferential outer surface of each piston slidably adapts to the cylindrical inner surface of the five compartments in a sealed relationship . an appropriate sealing structure , such as o - rings , sealing rings , sealing packing , sealing compounds , etc . can be included between pistons 76 , 77 , 78 , 79 , and 80 and the inner walls of compartments 62 , 63 , 64 , 65 , as will be apparent to one skilled in the art . shaft 75 is biased toward an open position by pre - compressed spring 85 in compartment 65 which also contains piston 79 . the pre - compressed spring functions as a compensator that exerts a compensating force f c between piston 79 and wall 69 . this force is transmitted to valve - piston 77 causing it to rest against wall 68 keeping portions 20a and 30a open . compensation force f c is representative of the rate of accumulation of mass of hydraulic fluid ( plus a safety margin ) in an actuator downstream from linear piston cylinder 60 . consequently , when the actuator downstream becomes unbalanced , pre - compressed spring 85 will resist circuit shutoff up to a designed mass flow imbalance of the actuator plus a safety margin . piston 80 is interconnected to shaft 75 and functions as a shut - and - lock mechanism . conduits 66a and 66b connect compartment 66 to supply line 20 and return line 30 , respectively . a leak downstream of arrangement 60 will cause shaft 75 to move in the downstream direction , in this case to the right of the drawing . this will displace piston 80 and open conduit 66a to the supply line pressure . this will cause a pressure difference across piston 80 that will force valve - pistons 76 and 77 to move to the right and close return line 30 and supply line 20 at portions 20a and 30a , respectively , see fig2 . since compartments 62 and 63 are filled with hydraulic fluid , valve - pistons 76 and 77 are respectively provided with ducts 76a and 77a to allow the valve - pistons to be displaced in their compartments . valve - pistons 76 and 77 will remain closed until supply pressure within line 20 is shut off . referring again to fig1 and 2 , in operation , linear piston cylinder 60 effectively shuts off hydraulic fluid to and from a downstream actuator or other hydraulic device . supply line 20 transmits hydraulic fluid , as represented by the arrow 21 from a remote pump , not shown , through bernouilli device 40 , into compartment 65 , through portion 20a , and through portion 20b of supply line as represented by the flow arrow 22 . as the hydraulic fluid passes through bernouilli device 40 , the flow of hydraulic fluid creates a pressure differential p s between conduits 41 and 42 based on bernouilli &# 39 ; s principle . pressure differential p s is transmitted via conduits 41 and 42 to cylinder compartment 65 which contains piston 79 . p s is converted to force f s on piston 79 by the relationship that force equals pressure times area . this force is transmitted to the piston in the direction shown in fig1 and 2 . simultaneously , return line 30 is transmitting returning hydraulic fluid coming from the actuator . return line 30b transmits hydraulic fluid , as represented by the arrow 32 from the actuator , not shown , through portion 30a , through bernouilli device 50 , into compartment 64 , and through return line 30 as represented by the flow arrow 31 . as the hydraulic fluid passes through bernouilli device 50 , the flow of hydraulic fluid creates a pressure differential p r between conduits 51 and 52 based on bernouilli &# 39 ; s principle . pressure differential p r is transmitted via conduits 51 and 52 to cylinder compartment 64 that contains piston 78 . p r is converted to a force f r on piston 78 by the relationship that force equals pressure times area . as shown in the drawings , force f r is opposite in direction to force f s that is exerted against piston 79 . differential pressures p s and p r and consequent forces f s and f r exerted against pistons 79 and 78 are generated according to bernouilli &# 39 ; s principle and the conservation of mass . these forces are direct functions of the rate of flow of hydraulic fluid or mass flow through the supply and return lines , respectively . if the bernouilli devices are identical and no mass accumulates in the actuator , the magnitudes of p r ( f r ) and p s ( f s ) will be equal . if , however , there is some accumulation of mass of hydraulic fluid in the actuator , p s will not equal p r and the differential forces will vary depending on the stroke of the actuator . if the stroke of the actuator causes the mass flow of hydraulic fluid through supply line 20 to be greater than the mass flow of hydraulic fluid of return line 30 , then p s ( f s ) will be greater than p r ( f r ). however , pre - compressed spring 85 will exert its compensating force f c and prevent shaft 75 from moving as long as the mass flow of hydraulic fluid is within the design limits of the actuator . if the actuator is on a stroke that gives up its accumulated mass of hydraulic fluid , p r will be greater than p s . however , this will not result in any movement in the shaft 75 because piston 77 is resting against wall 68 that separates compartments 63 and 64 . if a leak occurs in portion 20b of the supply line downstream of apparatus 10b , considerably more hydraulic fluid flows through bernouilli device 40 than through bernouilli device 50 . based on bernouilli &# 39 ; s principle , therefore , p s and thus force f s will be greater than force f r created by p r . consequently , pre - compressed spring 85 and pistons 76 , 77 , 78 , 79 , and 80 affixed to shaft 75 will begin to move in the right . as piston 80 moves to the right , supply line pressure is fed to one side of the piston via interconnect 66a and displaces piston 80 until it rests against stops 66a &# 39 ; in compartment 66 , see fig2 . this motion of piston 80 to the right displaces shaft 75 and valve - pistons 76 and 77 to shut portions 20a and 30a of the supply and return lines . this action shuts off all hydraulic fluid flow downstream of apparatus 10 . if there is a leak in portion 30b of the return line downstream of apparatus 10 , fluid flows through bernouilli device 40 . however , very little , if any , fluid will flow through bernouilli device 50 . this causes the same displacement of shaft 75 and its connected structures and results in shutoff in portions 20a and 30a of the supply and return lines as described in the previous paragraph with respect to a supply line leak . note that apparatus 10 is designed to detect leaks downstream of its location . any leaks upstream will not be detected . apparatus 10 is designed to be located at the beginning of branches in a hydraulic system , or before any other particular element of component in a hydraulic system that should be isolated when it leaks . fig3 shows an alternate design for piston 80 . piston 90 is shown in an alternate design of a shut - and - lock mechanism and it is provided with a circumferential groove 91 . a pre - compressed spring 92 is held between an inner surface of casing 61 and an inner cylinder 93 . the inner cylinder is held in place by ball bearings 94 wedged into a pair of cuts 95 provided in casing 61 . as piston 80 moves in the downstream direction due to failure of the hydraulic actuator , for example , ball bearings 94 are forced into openings 96 provided in inner cylinder 93 and into groove 91 . this frees inner cylinder 93 from casing 61 and attaches it to piston 90 . the force exerted by pre - compressed spring 92 against inner cylinder 93 drives piston 90 and shaft 75 to the far right which shuts off portions 20a and 30a by valve - pistons 77 and 76 , respectively . all hydraulic fluid flow downstream of apparatus 10 is shut off . note that this design will keep valve - pistons 76 and 77 shut until the apparatus is reset by pushing piston 90 back to its original position . normally , the forces on shaft 75 are balanced and the valve - pistons 76 and 77 remain open . if , however , a leak occurs downstream of apparatus 10 in either supply line 20 or return line 21 , the forces on shaft 75 move piston 90 to a position in which spring 92 takes over and shuts down the hydraulic system downstream of the device . although mechanical embodiments have been discussed so far , electrical embodiments are also within the scope of this inventive concept . fig3 depicts electrical apparatus 100 . pistons 78 and 79 of apparatus 10 are replaced with pressure transducers 101 and 102 . in this description , substantially identical components of the previous embodiment , will retain the same reference characters . pressure transducers 101 and 102 are simple resistance - type diaphragm transducers that may be designed to measure pressures estimated on the order of 10 psi to 6000 psi accurately . a simple relay 105 replaces pistons 80 or 90 in the mechanical embodiment , and valve - pistons 76 and 77 are replaced by off - the - shelf solenoid valves 106 and 107 . the function of biasing spring 85 is replaced by the effect of resistors 108 and 109 . one benefit of the electrical embodiment is that the pressure and return lines do not have to be coincident . referring again to fig3 the principle relied upon to generate the pressure differential is the same as the mechanical embodiments described above . the difference is that the pressure differential is sensed electronically by the coaction of resistance - type diaphragm pressure transducers 101 and 102 . voltage o is applied to one end of the transducers and a current flows through the resistors in the transducers , through the balancing resistors 108 and 109 , through resistors r 3 , and to ground . resistors 108 and 109 function to provide mass flow tolerance or compensation similar to the function of pre - compressed spring 85 in the mechanical devices . resistors 108 and 109 balance out voltages v a and v b for a predetermined mass flow tolerance . a diode 110 is included to prevent any displacement of shaft 75 when v b is less than v a . this provides an equivalency to the condition occurring in the embodiment of fig1 when p r is greater than p s and piston 77 rests against wall 68 . relay 105 has inductor coil 105a and switch 105b to provide essentially the same function as piston mechanisms 80 and 90 . if the pressure differential differences between p s and p r are zero , or normal , then the voltages at relay 105 are equal or v b is less than v a . no current flows through the relay &# 39 ; s inductor and the circuit to solenoid valves 106 and 107 remain open . once , however , p s is greater than p r plus tolerance or compensation preset by the magnitudes of resistors 108 and 109 , then v a is less than v b . this condition sets up a current through inductor coil 105a of relay 105 . the current flow generates a magnetic field that attracts switch 105b in relay 105 and closes the circuit to solenoid valves 106 and 107 . immediately , valves 106 and 107 close the downstream leak . the specific mechanical and electrical embodiments described hereinabove are intended to be illustrative of this inventive concept and are not to be construed as limiting . it is to be understood that many configurations , arrangement of constituents and modifications of the constituents could be made by one skilled in the art without departing from the scope of this invention . it is well within the purview of one skilled in the art to select suitable noncorrosive or corrosion resistant materials having sufficient strength . obviously , many modifications and variations of the present invention are possible in light of the above teachings . it is therefore to be understood that within the scope of the appended claims the invention may be practiced otherwise than as specifically claimed .