Abstract:
A net oil computer which can gate out turbine meter pulses by producing gating pulses of time widths T o  and/or T w  directly proportional to percent oil, by volume, and/or percent water, by volume, respectively, flowing as a mixture in a pipeline, where ##EQU1## K is a constant, D M  IS THE MEAN DENSITY OF THE MIXTURE, 
     d w  is the water density, and 
     d o  is the oil density. 
     A densitometer provides the d m  input. The water density does not vary significantly with temperature. A temperature probe can be used to compensate for changes in d o  due to changes in temperature.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to a computer for producing an output or indication of the rate of flow of a first and/or second fluid in mixture of at least two fluids and containing one or both of the first and second fluids, and more particularly to a net volume oil computer or the like. 
     In the past, approximations have somewhat reduced the accuracy at which net oil computers operate. 
     PRIOR ART STATEMENT 
     U.S. Pat. Nos. 3,842,655 and 3,952,592 issued Oct. 22, 1974, and Apr. 27, 1976, respectively, disclose the computation of net oil p o , percent by volume, and percent water p w , by volume in accordance with the following approximations: 
     
         p.sub.o = [K&#39;] [d.sub.w - d.sub.m ] 
    
     
         p.sub.w = [K&#39;] [d.sub.m - d.sub.o ] 
    
     where 
     D W  IS THE DENSITY OF THE WATER, 
     D O  IS THE DENSITY OF THE OIL, 
     D M  IS THE MEAN DENSITY, AND 
     K&#39; is a constant. 
     The mean density is obtained by the use of a densitometer. A temperature probe is used to compensate d o  for changes in temperature. 
     The correct formulas discovered in accordance with this invention will be found in the prosecution of said U.S. Pat. No. 3,952,592, but the same are not prior art hereto. 
     U.S. Pat. No. 3,488,996 issued Jan. 13, 1970, does not disclose the structure disclosed herein, but column 1, lines 20-24, thereof are relevant. 
     This invention was prior to that disclosed in copending application Ser. No. 748,459, filed Dec. 8, 1976, by PETER P. ELDERTON for NET OIL COMPUTER OR THE LIKE. 
     U.S. Pat. No. 3,906,198 issued Sept. 16, 1975, and is relevant hereto in that the same discloses a net weight oil computer. This application discloses a net volume oil computer. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, the above-described and other disadvantages of the prior art are overcome by providing a net oil computer or the like for producing an output directly proportional to the total volume flow of at least one of first and second fluids flowing as a mixture in a pipeline and having densities d o  and d w , respectively, said computer comprising: first means connected with the pipeline for producing first pulses at a pulse repetition frequency directly proportional to the volume rate of flow of both fluids in said pipeline; second means connected with the pipeline for producing an output directly proportional to the mean density d m  of said mixture; a switch having a first input lead connected from said first means to receive said first pulses, said switch having at least one output lead connected therefrom, said switch having a second input lead and being electrically operable upon receipt of a pulse on said second input lead to change the connection between the first input and the output lead of said switch; and third means connected from said second means to receive the output thereof and adapted to impress second pulses on the second input lead of said switch of a pulse width directly proportional to one of the time periods T o  and T w , where ##EQU2## and K is a constant, 
     said third means causing said first pulses to be passed and interrupted alternately from the first input to the output lead of said switch. 
     Algebraic signs are reversed on occasion. For example, when d w  &gt; d o , +d w  and the rest are used. When d w  &lt; d o , -d w  and the rest are used. 
     The above-described and other advantages of the present invention will be better understood from the following detailed description when considered in connection with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings which are to be regarded as merely illustrative: 
     FIG. 1 is a block diagram of one embodiment of the present invention; and 
     FIG. 2 is a schematic diagram of a gate generator shown in FIG. 1. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A net oil computer constructed in accordance with the present invention is shown in FIG. 1. This computer has components mounted in a pipeline 408&#34;. One component is a densitometer probe 407&#34; having its output connected to a transmitter circuit 401. The probe 407&#34; and the transmitter circuit 401 form a densitometer disclosed in U.S. Pat. No. 3,842,655. 
     Circuit 401 produces an output current which is directly proportional to the mean density of the mixture of water and oil in pipeline 408&#34;. 
     In FIG. 1, the net oil computer also includes a turbine flowmeter 402 which has a rotor 403 and a stator 404. Flowmeter 402 also has a magnetic pickup 405. Flowmeter 402 is entirely conventional and produces a pulse train on an output lead. The pulse repetition frequency (PRF) of the pulses on the output lead is directly proportional to the volume flow rate within pipeline 408&#34;. In other words, the flow rate is the rate of flow of both oil and water combined. The output of flowmeter 402 is impressed upon the poles 407 and 407&#39; of switches 408 and 408&#39;, respectively. Switches 408 and 408&#39; may be relays, electronic switches or otherwise. Relays 408 and 408&#39; have contacts 409, 410 and 409&#39;, 410&#39;, respectively. Contacts 409 and 409&#39; are respectively connected to indicators 411 and 415 via dividers 412 and 416, driver amplifiers 413 and 417, and counters 414 and 418, respectively. 
     Flowmeter 402 is connected to switch pole 407 and 407&#39; through a preamplifier 419 and a monostable multivibrator 420. 
     Switches 408 and 408&#39; are operated by a gate generator 400 that receives input signals from transmitter circuit 401 and a temperature probe 421. 
     Dividers 412 and 416 may be employed to cause indicators 411 and 415 to read directly in barrels of oil and barrels of water, respectively. 
     If the output pulses are received, poles 407 and 407&#39; engage contacts 409 and 409&#39;, respectively. That is, the engagement occurs during the widths of the output pulses of gate generator 400 on the respective output leads thereof. Switches 408 and 408&#39; are alternately operated by gate generator 400. 
     Gate generator 400 is shown in detail in FIG. 2. Junctions are illustrated at 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, and 110. A current-to-voltage converter 109&#39; and a resistor 111 are connected in succession, in that order, from converter 109&#39; to junction 100. A differential amplifier 112 is provided having an inverting input connected fron junction 100, and a noninverting input connected to ground. 
     A potentiometer 113 is provided having a winding 114 connected between +V and -V, and a wiper 115. A resistor 116 is connected from wiper 115 to junction 100. 
     A resistor 117 is connected from junction 100 to junction 101. The output of amplifier 112 is connected to junction 101. 
     Temperature probe 421 and a variable resistor 118 are connected in series in that order from junction 101 to junction 102. Another differential amplifier 119 has an inverting input connected from junction 102, a noninverting input connected to ground, and an output connected to junction 103. Another variable resistor 120 is connected between junctions 102 and 103. 
     Junctions 103 and 106 are connected together. A sawtooth generator (integrator) 121, comparators 123 and 124, a divide-by-two divider 125, AND gates 126 and 127, and an OR gate 128 are also provided. 
     Comparator 124 is connected from junction 105 and from generator 121. Comparator 123 receives inputs from junction 106 and generator 121. Comparators 123 and 124 have their outputs connected to inputs of gates 127 and 126, respectively. Comparator inputs from generator 121 are received from a junction 107 connected to the output of the generator 121. 
     Gates 126 and 127 are connected respectively from the &#34;1&#34; and &#34;0&#34; outputs of divider 125 through junctions 109 and 110, respectively. The outputs of gates 126 and 127 are connected to the inputs of OR gate 128. Junctions 109 and 110 are connected to switches 408&#39; and 408, respectively. OR gate 128 is connected to a conventional differentiator 129 including a capacitor 130 and a resistor 131. 
     Junctions 108 and 111 are connected to the inputs of both generator 121 and divider 125. 
     Another differential amplifier 132 is also provided. Each of the amplifiers 112, 119 and 132 and the circuits thereof may be described as an &#34;analog calculator.&#34; 
     A resistor 133 is connected between junctions 104 and 106. A potentiometer 134 with winding 135 and wiper 136, as before, has a resistor 137 connected between wiper 136 and junction 104. A resistor 138 is connected between junctions 104 and 105. 
     OPERATION 
     In FIG. 2, the output voltage +e 1  of converter 109&#39; will be 
     
         +e.sub.1 = K.sub.1 d.sub.m                                 (1 ) 
    
     The position of wiper 115 is then adjusted so that the voltage thereof is -e 2   
     where 
     
         -e.sub.2 = -K.sub.1 d.sub.w                                (2) 
    
     Densities d w  and d o  are measured after putting the oil-water mixture through a centrifuge. All voltages e 1 , e 2 , etc. are assumed positive as are all constants K, primed or not, with or without subscripts. The same is true of all densities. The word &#34;density&#34; is also hereby defined as equivalent to &#34;specific gravity&#34; because they are different by a constant factor (the density of pure water -- never or not necessarily d w ). 
     When the resistance of resistor 111 is equal to that of resistor 116, the output voltage +e 3  of amplifier 112 is then 
     
         +e.sub.3 = K.sub.2 (e.sub.2 - e.sub.1)                     (3) 
    
     Thus 
     
         +e.sub.3 = K.sub.3 (d.sub.w - d.sub.m)                     (4) 
    
     The output voltage -e 4  of amplifier 119 is ##EQU3## where 
     R a  is the resistance of resistor 120, 
     R b  is the resistance of resistor 118, and 
     R c  is the resistance of temperature probe 421. 
     As is well known, 
     
         R.sub.c = R.sub.1 (1 + α.sub.1 ΔT)             (6) 
    
     where 
     R 1  is a constant, 
     α 1  is the temperature coefficient of resistance, 
     ΔT = T - T 1   
     T is temperature, and 
     T 1  is the temperature at which R c  = R 1 . Substituting (4) and (6) into (5) and rewriting ##EQU4## 
     In accordance with the present invention it has been discovered that when d w  &gt; d o  ##EQU5## where 
     P o  is the percent oil by volume, and 
     p w  is the percent water by volume. 
     When d w  &lt; d o  ##EQU6## By definition, 
     
         p.sub.w = 100 - P.sub.o                                    (12) 
    
     Changes in d w  with temperature may often or always be neglected. However, changes in d o  with temperature frequently cannot. Thus 
     
         d.sub.o = d.sub.2 (1 - α.sub.2 ΔT)             (13) 
    
     substituting (13) in (8), ##EQU7## 
     The proportionality 
     
         -e.sub.4 = -K.sub.4 p.sub.o                                (15) 
    
     may then be achieved in (7) by adjusting R b  and/or R a  so that ##EQU8## 
     The negative voltage -e 4  is used because the output of generator 121 is positive, and the comparators 123 and 124 end each half cycle when the sawtooth voltage alternately becomes equal and opposite to -e 4  and -e 5 . 
     The output voltage -e 5  of amplifier 132, when the resistance of resistor 137 is equal to that of resistor 133, is 
     
         -e.sub.5 = -K.sub.7 (e.sub.6 - e.sub.4)                    (20) 
    
     where 
     -e 4  is defined in (18), and 
     the voltage +e 6  of wiper 136 is 
     
         +e.sub.6 = K.sub.6                                         (21) 
    
     the output pulses of AND gates 127 and 126 then have widths T o  and T w , respectively, such that ##EQU9## For example, notice from (12) that the function of amplifier 132 and its circuitry is to compute ##EQU10## 
     If (16) is divided by (17), the magnitude of R a  becomes more or less immaterial. ##EQU11## and R b  for a given d w  may be calculated from (26) thus: ##EQU12##