Abstract:
A vibration densitometer which can be calibrated to an accuracy never before possible, i.e. to within an error of 0.25 percent or less, and in two fluids or gases or gas mixtures, one, both or none being an elemental fluid or gas. The fluids or gases or fluid or gas mixtures have different density equations 
     d i  = A i  T i   2  - i B i   
     d j  = A j  T j   2  - B j   
     The first of which is converted by ΔT i , an extremely linear function of container or pipeline pressure, such that 
     d j  = A i  (T i  - ΔT i ) 2  - B i . 
     Where 
     d i  and d j  are the two respective fluid densities, T i  and 
     T j  are two periods directly proportional to the reciprocals of the respective vibration frequencies, and A i , A j , B i  and B j  are constants. 
     It was heretofore unknown to calibrate a vibration densitometer in two fluids or gases or fluid or gas mixtures with the aforesaid extremely small error.

Description:
BACKGROUND OF THE INVENTION 
     This invention relates to instruments for producing an output which is a function of the densities of two elemental fluids or gases, one elemental fluid or gas and one fluid or gas mixture, or two fluid or gas mixtures, and more particularly to a highly accurate vibration densitometer. 
     In the past it has been impossible to obtain an accurate density output from a vibration densitometer in the aforesaid two fluids, gases and fluid or gas mixtures. 
     SUMMARY OF THE INVENTION 
     In accordance with the vibration densitometer of the present invention, the two equations for two fluids or gases, respectively, are 
     d i  = A i  T i   2  - B i   
     d j  = A j  T j   2  - B j   
     And the first equation is converted to the following 
     d j  = A i  (T i  - Δ T i  ) 2  - B i   
     Where 
     Δ T i  is a function of the container or pipeline pressure, and the last equation makes it possible to calibrate the invention very accurately for both fluids or gases simultaneously. 
     In the foregoing: 
     d i  and d j  are the two respective fluid densities, T i  and T j  are two periods directly proportional to the reciprocals of the respective vibration frequencies, and A i , A j , B i  and B j  are constants. 
     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 a densitometer constructed in accordance with the present invention; 
     FIG. 2 is a more detailed block diagram of the digital function generator shown in FIG. 1; 
     FIG. 3 is a more detailed block diagram of a square law digital computer shown in FIG. 2; 
     FIG. 4 is a more detail block diagram of a pick off shown in FIG. 2; 
     FIG. 5 is a schematic diagram of a differentiator; 
     FIGS. 6, 7 and 8 are tables illustrating typical values for construction of the present invention; 
     FIG. 9 is a graph of a group of waveforms characteristic of the operation of the present invention; 
     FIG. 10 is a block diagram of the conventional offset digital computer shown in FIG. 2; and 
     FIG. 11 is a graph of another group of waveforms characteristic of the operation of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     In the drawings, in FIG. 1, a vibration densitometer probe is indicated at 34&#39;  having a driver coil 23, a vane 24, a piezoelectric crystal 25 and a preamplifier 26. 
     Probe 34&#39;  has an input lead 27 and an output lead 28. 
     Other blocks shown in FIG. 1 are a loop circuit 29, a digital function generator 30 and utilization means 31. Loop circuit 29 has an input lead 32 and output leads 33 and 34. Digital function generator 30 has an input lead 393 connected from loop circuit output lead 34. The output of digital function generator 30 is connected to utilization means 31. 
     The output lead 28 of probe 34&#39; is connected to the input lead 32 of loop circuit 29. The input lead 27 of probe 34&#39; is connected from the output lead 33 of loop circuit 29. Probe 34&#39; and loop circuit 29 form a closed loop electromechanical oscillator. Vane 24 is submerged in a fluid. The density of the fluid is a function of the frequency at which vane 24 vibrates. 
     Digital function generator 30 may have its input lead 393 connected from lead 33 or at other points in loop circuit 29. Loop circuit 29 impresses a square wave voltage on input lead 393 of digital function generator 30 having a mark-to-space ratio of 1:1. 
     Utilization means 31 shown in FIG. 1 may be a density indicator, a specific gravity indicator, a process controller or otherwise. 
     Reference is hereby made to certain U.S. patents. These patents are listed for convenience in the following: 
     1. U.S. Pat. No. 3,677,067. 
     2. U.S. Pat. No. 3,706,220. 
     3. U.S. Pat. No. 3,738,155. 
     4. U.S. Pat. No. 3,741,000. 
     5. U.S. Pat. No. 3,878,374. 
     6. U.S. Pat. No. 3,885,140. 
     7. U.S. Pat. No. 3,883,811. 
     8. U.S. Pat. No. 3,775,597. 
     The foregoing patents of paragraphs (1), (2), (3), (4), (5), (6), (7) and (8) are hereinafter referred to as patents P1, P2, P3, P4, P5, P6, P7 and P8, respectively. 
     Probe 34&#39; shown in FIG. 1 may be conventional. Alternatively, probe 34&#39; may be similar to or identical to a probe disclosed in any of the patents P1-P8. 
     Preamplifier 26 shown in FIG. 1 may be conventional. 
     All the structure shown in FIG. 1 may be identical to that shown in P5, P6 and P7 except for digital function generator 30, if desired. This common structure, side from digital function generator 30, also operates in a manner identical to that in which it operates in P5, P6 and P7. 
     OPERATION 
     In the embodiment of the invention shown in FIG. 1, probe 34&#39; and loop circuit 29 form an electromechanical oscillator which oscillates at a frequency dependent upon the density of the fluid in which vane 24 is immersed. The same is true of the pulse repetition frequency of the square wave voltage applied to the input lead 393 of digital functional generator 30. 
     Digital function generator 30 may be described as a digital linearization circuit. It produces a digital output directly proportional to density from the input signal thereto impressed upon the input lead 393 thereto. 
     The digital function generator 30 of FIG. 1 is indicated in greater detail in FIG. 2. Digital function generator 30 has input led 393. A divide-by-twenty-five divider 394, a divide-by-twenty-five divider 395, a divide-by-two divider 396 and a divide-by-two divider 397 are connected in succession from input lead 393 to a terminal junction 398. 
     Digital function generator 30 has a burst oscillator 30&#39;. NAND gates are provided at 399 and 400 with their outputs connected to a square law digital computer 10&#39;. The output of NAND gate 400 is connected to a divider 37&#39; in the computer 10&#39; of FIG. 3 through an OR gate 40 and a NAND gate 352. The output of NAND gate 399 is connected to a rate multiplier 38&#39; in FIG. 3 through an OR gate 343. 
     NAND gate 400 receives one input from junction 398 and another input from oscillator 30&#39; through a divide-by-two divider 41. NAND gate 399 receives one input from the output of divider 41, and another input from the output of an inverter 401 connected from junction 398. The output of inverter 401 is connected to a junction 403. One input of NAND gate 399 is connected from junction 403. 
     A differentiator 405 and a pick off 42 are connected from junction 398. A one shot 342 is connected from differentiator 405 to divider 37&#39; in square law digital computer 10&#39; to reset the same. 
     Digital function generator 30 shown in FIG. 2 has various other junctions 406, 407, 408, 409 and 410. 
     The output of one shot 342 is connected to a junction 412. Junction 412 is connected to square law digital computer 10&#39; and to another input of NAND gate 352 through an inverter 43. 
     An inverter 415, a differentiator 416 and a one shot 417 are connected in succession in that order from junction 406 to junction 409. Inverters 39&#39; and 36&#39; are provided which receive inputs from the output of corresponding NAND gates 44 and 45, respectively, which, in turn, are connected from the output of one shot 417 by respective connections from junctions 409. Junction 406 is connected from the output of divider 395 and to the input of dividier 396. Junction 407 is connected from the output of divider 396 and to the input of divider 397. Junctions 407 and 408 are connected together. NAND gates 45 has one input connected from junction 408. 
     Junctions 398 and 410 are connected together. NAND gates 44 and 45 both receive an input from the output of divider 397 by respective connections from junction 398. An inverter 418 is connected from junction 407 to another input of NAND gate 44. 
     An offset digital computer 354 receives an input from square law digital computer 10&#39; and from the outputs of inverters 36&#39; and 39&#39;. Computer 354 may be identical to the one of P5, P6 or P7 or be otherwise conventional. 
     An indicator 27&#39; is connected from the output of offset digital computer 354. Offset digital computer 354 may be decimal or binary. The indicator 27&#39; may be any simple conventional indicator with one lamp for each binary stage or a decimal indicator as described in P5, P6 and P7. Indicator 27&#39; may be entirely conventional. Offset digital computer 354 may be conventional or of the type or identical to that illustrated in P5, P6 and P7. The same is true of square law digital computer 10&#39; and indicator 27&#39;. 
     Offset computer 354 in FIG. 2 produces a binary or a binary coded decimal (BCD) output so that indicator 27&#39; may be read directly, binary or decimal, in density or specific gravity. 
     Offset digital computer 354 and indicator 27&#39; are connected in succession in that order from square law digital computer 10&#39;. Offset digital computer 354 may be entirely conventional or as disclosed in P8 
     Offset digital computer 354 receives serial groups of serial pulses from computer 10&#39;, the number of pulses in each group being directly proportional to the square of the period of the square wave appearing at terminal junction 398 and adjusted by pick off 42. 
     Pick off 42 shuts off NAND gates 399 and 400 at the beginning of the leading edges of pulses appearing at both junctions 398 and 403. The 0 output of pick off 42 does not go high after the said leading edges until a period ΔT i  (to be defined) has passed. If ΔT i  is negative, a switch 46 is maintained in the closed position shown. Switch 46 has a pole 47, and two contacts 48 and 49. When ΔT i  is positive, pole 47 is held into engagement with contact 49, which is connected to ground, and a switch 46&#39; is closed, as shown in FIG. 2. 
     A pressure sensor 50 from the pipeline has an output that is impressed upon pick off 42 also. The 1 output of pick off 42 is connected to inputs of NAND gates 399 and 400. The 0 output of pick off 42 with the output of burst oscillator 30&#39; are impressed as inputs on a NAND gate 51, the output of which can be or not be, as desired, connected to an input of each of the OR gates 40 and 343. 
     The said square is likewise directly proportional to the square of the period of the square wave appearing on input lead 393. 
     Square law digital computer 10&#39; is illustrated in FIG. 3 and may be identical to the structure and operation of that disclosed in P5, P6 and P7 or otherwise conventional. The square law computer 10&#39; shown in FIG. 3 has a divider 37&#39; which is merely a counter that counts the output pulses from NAND gate 352. Differentiator 405 and one shot 342 set the count of divider 37&#39; to zero upon the leading edge of the pulse appearing at junction 403 (FIG. 2) and shown at E6 in FIG. 11. 
     A rate multiplier 38&#39; is connected from OR gate 343 and produces on its output lead 358 a number of serial pulses in a group which is a fraction of the total input pulses in a group such as a group shown at E8 in FIG. 11 (methane only) dependent upon the number stored in the register of the counter of divider 37&#39;. The output pulses in a group on output lead 358 of rate multiplier 38&#39; is then directly proportional to the square of the period of the square wave either at junction 398 in FIG. 2 or at input lead 393 therein. 
     In FIG. 3, a switch matrix 33&#39; is connected to a rate multiplier 359. Rate multiplier 359 is also connected from rate multiplier ouput lead 358 to offset digital computer 354. Switch matrix 33&#39; has a set of manual operators 361 to produce binary or decimal switch settings. Binary switches may be employed. Alternatively, binary coded decimal (BDC) switches may be employed. The number of pulses in a group on the output lead 360 of rate multiplier 359 is less than the input thereto, in part, depending upon the setting of the switch matrix 33&#39;. 
     In FIG. 3, the counter of divider 37&#39; may be entirely conventional. As stated previously, switch matrix 33&#39; may also be entirely conventional. The same is true of rate multiplier 38&#39; and 359. 
     Typically, the square wave appearing at junction 398 in FIG. 2 has a period of about 0.5 second. Typically, the pulse repetition frequency of the output signal of burst oscillator 30&#39; in FIG. 2 is 1.0 megahertz. Further, typically, the number of pulses in each of the groups at E8 and E9 in FIG. 11 are about 125,000. 
     The pulses in each grouping at E8 go to rate multiplier 38&#39; in FIG. 3. The pulses in each group E9 go to divider 37&#39; in FIG. 3. 
     A more detailed block diagram of pick off 42 (FIG. 2) is illustrated in FIG 4 including a conventional integrator 52 having a capacitor 53, an amplifier 54 and a reset switch 55. Integrator 52 has input and output junctions 56 and 57, respectively. A regulated source of potential 58 is connected to input junction 56 via an input switch 59 and a resistor 56&#39;. Source 58 may be adjustable at 58&#39;, if desired. 
     Reset switch 55 is operated at the leading and trailing edges of the square wave appearing at junction 398 in FIG. 2 through an inverter 60, differentiators 61 and 62, one shots 63 and 64, and an OR gate 65. 
     Pick off 42 thus has an input lead 66 connected from junction 398 in FIG. 2. 
     Pick off 42 has a differential amplifier 67 with non-inverting and inverting input leads 68 and 69, respectively, and an output lead 70. 
     A flip-flop is provided at 71. A one shot 70&#39; is connected from lead 70 to the reset input of flip flop 71. The output of OR gate 65 is connected to the set input of flip flop 71. 
     The 1 output of flip flop 71 controls input switch 59 and is also connected to NAND gate 51 in FIG. 2. The 0 output of flip flop 71 is connectable to NAND gates 399 and 400 through switch 46&#39; in FIG. 2. 
     Lead 69 is FIG. 4 is connected from pressure sensor 50 in FIG. 2. 
     When ΔT i  is always positive, in FIG. 2 NAND gate 51, switch 46, and OR gate 40 and 343 may be omitted. When ΔT i  is always negative, nothing is omitted. 
     All of the differentiators disclosed herein may be of the type shown in FIG. 5 including a capacitor 73, a resistor 74 and a diode 75. 
     In FIG. 2 the phrase &#34; pressure sensor&#34; is hereby defined for use herein and for use in the claims as including conventional signal conditioning electronics which are disclosed in a number of older U.S. patents, and which are disclosed, at least in part, as a linear variable displacement transformer (LVDT) in the later U.S. Pat. No. 3,853,006. The output of pressure sensor 50 is thus a D.C. voltage produced by the said conventional means which is included in the definition &#34;pressure sensor.&#34; 
     In FIG. 9, waveform E&#39;56 is shown twice for clarity. The waveforms of FIGS. 9 and 11 relate to nitrogen and methane density measurements, respectively. It is, however, substantially impossible to show waveforms graphically to scale because ΔT i  is such a small period. Waveforms are thus not necessarily shown graphically to scale anywhere in the drawings hereof. 
     If the 1 output of pick off 42 were always maintained low, and the 0 output thereof were always maintained high, the waveforms of FIG. 11 would always occur. However, there is a ΔT i  compensation to be described (it is used for nitrogen only). 
     The vane 24 in FIG. 1 vibrates in a gas at a resonant frequency so that output on lead 34 of loop circuit 29 is a square wave as described herein of a pulse repetition frequency (PRF) equal to the said resonant frequency. The mark-to-space ratio of this and the other square waves referred to herein is always unity. The variable T may be defined as 
     
         T = 1/f                                                    1 
    
     where f is the pulse repetition frequency of the signal appearing at junction 398 in FIG. 2. 
     As has been recently discovered, e.g. see U.S. Pat. No. 3,677,067, 
     
         d = AT.sup.2 - B                                           2 
    
     where 
     A may be a positive or negative constant, B may be a positive or negative constant, and d is the density of the gas in which vane 24 is immersed (often in a pipeline of flowing gas). Both of the constants A and B in (2) are usually positive in (2). 
     Densitometers of the type disclosed in all the patents cited herein have been accurate to within 0.5 percent or better. However, a need exists for even greater accurcy. Moreover, if the said prior art densitometers are calibrated in one gas and used in another, a second calibration is frequently required, which second calibration practically is impossible in the field without the expenditure of considerable time and expense. This problem effectively cannot be solved by the customer or user because the calibration process requires considerable training and the same is again time-consuming and expensive. 
     It is an industry standard that the densitometer of the present invention be tested in nitrogen gas and used in a gas different from nitrogen (the gas with which the densitometer of the present invention is actually to be used). 
     The present invention is constructed as follows. The constants A and B are preferably determined empirically by the conventional method of least squares or least squares method (LSM). However, this is done for both nitrogen and methane, for example, because the A and B for each are different. 
     
         d.sub.i = A.sub.i T.sub.i.sup. 2 = B.sub.i                 3 
    
     and d j  = A j  T j   2  - B j               4 
     where d i  and d j  are the densities of nitrogen and, for example, methane, respectively, A i  and A j   are the A constants for nitrogen and methane, respectively, T i  and T j  are the periods corresponding to nitrogen and methane, respectively, and B i  and B j  are the B constants for nitrogen and methane, respectively. 
     Measure d i  and T i  for m points and curve fit by the LSM as follows by adding all columns except that of T i . 
     
         ______________________________________Point d.sub.i T.sub.i T.sub.i.sup.2                          T.sub.i.sup.4                                  d.sub.i T.sub.i.sup.2______________________________________1     .       .       .       .       .2     .       .       .       .       .3     .       .       .       .       ..     .       .       .       .       ..     .       .       .       .       ..     .       .       .       .       .m     .       .       .       .       .______________________________________  ##STR1##                  ##STR2##                          ##STR3##                                  ##STR4##______________________________________ 
    
     All equations obtained by the LSM herein may be so obtained with any number of points, as desired. 
     Solve the following simultaneous equations (5) and (6) for A i  and B i . ##EQU1## 
     Find A j  and B j  in the same manner, if desired, for further calibration steps or checking. 
     Then find, by measurement or computation from (3) and (4), with all constants determined, ΔT i   
     where 
     d j  = A i  (T i  - ΔT i ) 2  - B i  7 
     and 
     d j  = A j  T j   2  - B j                   8 
     Notice in (7) that the subscript of d is j, whereas all of the other subscripts are i. 
     If the first derivative of d i  with respect to T i  in (3) is d i , then ##EQU2## The differential equation which follows then results. 
     
         dd.sub.i = 2A.sub.i T.sub.i dT.sub.i                       12 
    
     If the differentials of (12) are not infinitesimals, but still very small, viz. (it has been discovered that they are very small), 
     
         Δd.sub.i ≃dd.sub.i 
    
     
         and ΔI.sub.i ≃dT.sub.i 
    
     
         Δd.sub.i = 2A.sub.i T.sub.i Δ T.sub.i          13 
    
     Solving (13) for ΔT i , ##EQU3## A more accurate equation for ΔT i  is ##EQU4## where Δd i  /d i  + B i  is not small in comparison to unity. 
     The terms Δd i  and ΔT i  may be either positive or negative. 
     If the customer checks the nitrogen calibration pressure sensor 50 must be connected. Switches 46 and 46&#39; in FIG. 2 are then put into the positions shown. This adds pulses passed by NAND gate 51 directly proportional to -ΔT i  (in the case of methane, Δd i  and ΔT i  are both negative) less those which would have been supplied by NAND gates 399 and 400. Operators 361 are set to A i  in FIG. 3 and matrix A&#39; in FIG, 10 is set to B i . 
     For calibration or a commercial run of methane the connection of the pressure sensor 50 of FIG. 2 to a calibration container or pipeline is omitted, and operators 361 in FIG. 3 are set to A j  while matrix A&#39; in FIG. 10 is set to B j . To switch to methane, both switches 46 and 46&#39; are moved to the positions thereof other than as shown. Switches 46 and 46&#39; may be ganged, if desired. 
     If a standardized densitometer is not required and ΔT i  is always to be positive, OR gates 40 and 343, switch 46 and NAND gate 51 may be omitted. The position of switch 46&#39; then determines whether the use is in nitrogen or methane. The algebraic sign of ΔT i  will always be known in advance. 
     When ΔT i  is positive, and no structure is removed from FIG. 2, the pole of switch 46 is always ground. 
     Any gas or gas mixture may be substituted for the nitrogen gas and/or methane gas so long as the mixture does not have components which vary greatly during operation. 
     The use of pressure sensor 50 shown in FIG. 2 will now become evident. It has been discovered that ΔT i  is an extremely linear function of container or pipeline pressure. Thus, 
     
         ΔT.sub.i = K.sub.a + K.sub.b P.sub.i                 16 
    
     where K a  and K b  are constants, and P i  is the container or pipeline pressure of the nitrogen. 
     The constants K a  and K b  are preferably determined empirically and by the use of the LSM as follows. The term, Δd i , as defined below 
     
         Δd.sub.i = d.sub.i = d.sub.j                         17 
    
     is determined at one period only, then another, and so on for any number of points. These determinations, with all other constants known, may be made by the use of equations (3) and (4) or by measuring d i  and d j  for each of a plurality of successive periods. The table of FIG. 6 is exemplary. 
     Once the data of FIG. 6 is known (Δd i  is calculated by subtraction, of course -- T i  is the period in both gases), ΔT i  is calculated from one of the equations (14) and (15) for each of the points 1, 2, 3 and 4 in FIG. 6, although any number of points may be used. The term ΔT i , in microseconds, so calculated from the data of FIG. 6 is -207.89, -247.45, - 356.52 and -58.20 for the points 1, 2, 3 and 4, respectively, in FIG. 6. 
     From the data given hereinbefore and in FIG. 6, ΔT i  is preferably curve fit to P i  by finding K a  and K b  of equation (15) by the LSM as shown in FIG. 7. 
     From FIG. 7, K a  and K b  of equation (16) may be determined by solving the following simultaneous equations (18) and (19) therefor. ##EQU5## 
     The zero and span adjustments of any conventional pressure sensor may be employed to determine k a  and k b , respectively. Pressure sensor 50 in FIG. 2 may be entirely conventional. Pressure sensor 50 provides a D.C. output voltage E18 (see FIG. 9) directly proportional to |ΔT i  |. For the table of FIG. 7, with ΔT i  in microseconds 
     
         ΔT.sub.i = -[51.229 + 0.6228 P.sub.i ]               20 
    
     The table of FIG. 8 is the proof of the combined calibrations. Note columns d j  and d i  =  f(T ai ) are identical, where 
     
         d.sub.j = A.sub.j T.sub.j.sup.2 - B.sub.j                  21 
    
     and 
     
         d.sub.i = A.sub.i T.sub.ai.sup.2 - B.sub.i                 22 
    
     and 
     
         T.sub.ai = T.sub.i - Δ T.sub.i                       23 
    
     The term D in FIG. 8 is deviation. Note in FIG. 8 that d j  and d i  are identical for all four pressures. 
     In FIG. 4, integrator 52 is started on a ramp E19 in waveform E14 of FIG. 9 at junction 57 in FIG. 4 at the beginning of the leading and trailing edges of pulses appearing at junction 398 in FIG. 2. The waveform appearing at input lead 66 in FIG. 4 and at junction 398 in FIG. 2 is shown at E5 in FIG. 11 and at E56 twice in FIG. 9. The waveforms E&#39;56 in FIG. 9 are enlarged over E5 in FIG. 11 to demonstrate better how ΔT i  is used, ΔT i  being very small. 
     In FIGS. 4, 9 and 11, flip flop 71 is set at the leading and trailing edges of E5 by one shots 63 and 64. One shots 63 and 64 also reset integrator 52 by closing switch 55 each time flip flop 71 is set. The 1 output of flip flop 71 is connected to input switch 59 and thereby closes the same when flip flop 71 is set. Ramp E19, which is a portion of E14 in FIG. 9, then begins. Ramp E19 then terminates at time t1 when the ramp voltage E19 at junction 57 in FIG. 4 becomes equal to the D.C. output voltage of pressure sensor 50 (FIG. 2) received over lead 69 (FIG. 4). Junction 57 in FIG. 4 then remains at potential E18 (FIG. 9) because one shot 70&#39;(FIG. 4) resets flip flop 71 and the 1 output thereof opens input switch 59 in FIG. 4. 
     The waveforms E&#39;89 or E&#34;89 are the accurate forms of E8 and E9 in FIG. 11, but only during nitrogen use. Pulses are added during t1 directly proportional to -ΔT i  in E89. Pulses are subtracted directly proportional to -ΔT i  in E&#34; 89 (ΔT i  positive). 
     In FIG. 9, E15 is the output of one shot 70&#39; in the pick off 42 of FIG. 4. The voltages E16 and E17 in FIG. 4 are the 1 and 0 outputs of flip flop 71 and of pick off 42, the former being included in the latter in FIG. 4. 
     OPERATION OF THE DIGITAL FUNCTION GENERATOR 30 OF FIGS. 1 AND 2 
     Loop circuit output lead 34 in FIG. 1 impresses a square wave on digital function generator input lead 393 shown in FIGS. 1 and 2, the said square wave having a mark-to-space ratio of unity. Density indicated at 27&#39; in FIG. 2 is a function of the period of the said square wave in accordance with equation (2). The same is true of square waves E5 and E6 shown in FIG. 11 which appear at junctions 398 and 403 in FIG. 2, respectively. 
     The output of NAND gates 399 and 400 is E9 and E8, respectively, when switches 46 and 46&#39; are open. In this case, if operators 361 in FIG. 3 are set to A j  and matrix A&#39; in FIG. 10 is set to B j , indicator 27&#39; in FIG. 2 will read methane density. Computer 10&#39; in FIG. 2 produces a number of output pulses to computer 354 directly proportional to the number of pulses in a group of E8 or E9 in FIG. 11. Since density does not necessarily change rapidly, the pulses in the first group in E8 may be identical in number to those in the first group of E9. 
     Offset digital computer 354 shown in FIG. 2 simply subtracts B j  from the output of square law digital computer 10&#39;. The output of the latter is A j  T j   2 . The methane or other gas of use calibration may be easily checked against measured densities in this way by both the manufacturer and the customer. For both to check the nitrogen calibration against measured values, switches 46 and 46&#39; are closed (in the case of another gas or gas mixture where ΔT i  is positive switch 46&#39; is closed, but arm 47 of switch 46 is grounded on contact 49 thereof). Pulses are then added or not from the outputs of NAND gates 399 and 400 in direct proportion to -ΔT i  or +ΔT i , respectively, and in direct proportion to the time during which the 1 output of pick off 42 is high. This results in a period subtraction when ΔT i  is positive. During this period NAND gates 399 and 400 produce no pulses whatsoever, and pulses are alternately added or not in OR gates 40 and 343 if switch 46 is closed (as shown) or open (pole 47 grounded), respectively. 
     The period ΔT i  may sometimes partly or always be determined by adjustment at knob 58&#39; of source 58 in FIG. 4 which determines the slope of E19 in FIG. 9. In FIG. 9 t1 is directly proportional to the D.C. output voltage of pressure sensor 50. 
     The output of one shot 342 in FIG. 2 merely resets divider 37&#39; shown in FIG. 3 and the input from inverter 43 to NAND gate 352 disables the latter during that reset. 
     All the other structures in FIG. 2 that operate computer 354 are identical to or equivalent to those disclosed in P5, P6 and P7 and operate in exactly the same way as do computers 10&#39; and 354, and indicator 27&#39;. The only differences betwen P5, P6 and P7, and the operators of computer 354 are that an AND gate is disclosed in P5, P6 and P7 for each of the NAND gates 44 and 45, and inverters 36&#39; and 39&#39; are omitted. 
     The constants A and B may be determined empirically by placing the densitometer probe 34&#39; in FIG. 1 in two different fluids of two different known densities each time measuring T. The constants A and B may then be calculated from two simultaneous equations per patent P1. However, the LSM is preferred. 
     Something about certain structures disclosed herein is discussed in the material immediately following. The importance of some of this discussion may be apparent only from subsequent explanations. 
     A main storage register D&#39; is illustrated in FIG. 10. As will be described, a predetermined number B&#34; is entered in storage register D&#39; is a counter 23&#39; periodically. 
     A logic circuit is provided at 13&#39;. Logic circuit 13&#39; has an input from square law computer 10&#39; through switch 32&#39;. 
     In FIG. 10, the said predetermined number B&#34; is periodically entered in storage register D&#39;, as stated previously. The magnitude of the predetermined number B&#34; may be selected or changed by operating binary or binary coded decimal (BCD) switches which are located in a switch matrix A&#39;. The switches in matrix A&#39; are either connected from a positive potential or ground. The outputs of the switches are sampled and impressed upon storage register D&#39;0 periodically. A gating pulse (E13 in FIG. 11) is impressed upon a gating circuit B&#39; for this purpose from inverter 39&#39;. 
     Gating circuit B&#39; is connected from matrix A&#39; to an OR gate matrix C&#39;. The output of OR gate matrix C&#39; is then impressed upon storage register D&#39;. 
     Once the said predetermined number B&#34; has been entered into storage register D&#39;, logic circuit 13&#39; then controls the register D&#39; to count up or down depending upon whether the signs of A and B are the same or different, switch 32&#39; in FIG. 10 being placed in the one or the other of corresponding positions thereof, respectively, on this account. The output of logic circuit 13&#39; is, thus, impressed upon storage register D&#39; through OR gate matrix C&#39;. Logic circuit 13&#39; receives pulses to count from switch 32&#39;. Logic circuit 13&#39; receives other inputs from storage register D&#39;. 
     From the foregoing, it will be appreciated that matrix C&#39; with logic circuit 13&#39; and storage register D&#39; form either a count up-count down counter depending upon in which position switch 32&#39; lies. This counter may be entirely conventional, if desired. 
     The output of storage register D&#39; is also sampled periodically by a gating circuit 24&#39; which may be of the same type as gating circuit B&#39;. Gating circuit 24&#39; receives pulses from inverter 36&#39; in FIG. 2 to cause it to sample the output of register D&#39;. The output of gating circuit 24&#39; is impressed upon a storage register 26&#39;. The output of the storage register 26&#39; is impressed upon indicator 27&#39;. 
     If desired, indicator 27&#39; may be a binary indicator or a BCD indicator. 
     All of the structures D&#39;, 13&#39;, A&#39;, B&#39;, C&#39;, 24&#39;, 26&#39; and 27&#39; may be entirely conventional or may or may not be identical to the corresponding structures disclosed in P8. 
     Alternatively, indicator 27&#39; may simply be a row of lamps each connected from the 1 output of each of the flip flops in storage register 26&#39;. 
     Pulses are supplied from inverter 36&#39; to gating circuit 24&#39;. 
     The purpose of the switch matrix A&#39; is to set, periodically, the flip flops in storage register D&#39; to selected states. 
     Switch matrix A&#39; may have one double-pole, double-throw switch for each bit or flip flop in register D&#39;. Gating circuit B&#39; may have an AND gate for the set 1 and set 0 inputs to each bit or flip flop in register D&#39;. The OR gate matrix C&#39; may have an OR gate for the set 1 and set 0 inputs of each bit in register D&#39;. 
     The same outputs of the bits of register D&#39; are connected both to logic circuit 13&#39; and to gating circuit 24&#39;. 
     The square wave at junction 406 in FIG. 2 is illustrated at E1 in FIG. 11. 
     The square wave which appears at the output of inverter 415 in FIG. 2 is illustrated at E2 in FIG. 11. 
     The square wave which appears at junction 407 in FIG. 2 is illustrated at E3 in FIG. 11. 
     The square wave which appears at the output of inverter 418 in FIG. 2 is illustrated at E4 in FIG. 11. 
     The square wave which appears at the terminal junction 398 in FIG. 2 is illustrated at E5 in FIG. 11. 
     The square wave which appears at junction 403 in FIG. 2 is illustrated at E6 in FIG. 11. 
     The output of burst oscillator 30&#39; is illustrated at E7 in FIG. 11. 
     The output of NAND gate 400 (methane only in the following) in FIG. 2 is illustrated at E8 in FIG. 11. 
     The output of NAND gate 399 in FIG. 2 is illustrated at E9 in FIG. 11. 
     The output of differentiator 416 in FIG. 2 is illustrated at E10 in FIG. 11. 
     The output of one shot 417 shown in FIG. 2 is illustrated at E11 in FIG. 11. 
     The output of inverter 36&#39; shown in FIG. 2 is illustrated at E12 in FIG. 11. 
     The output of inverter 39&#39; shown in FIG. 20 is illustrated at E13 in FIG. 11. 
     The phrase &#34;utilization means,&#34; as used herein and in the claims, is hereby defined to include, but not be limited to, an indicator, a process controller, or otherwise. 
     Although a symbol has been used consistently in the drawings to represent OR gates, it is to be understood that the symbol includes, but is not limited to, a wire OR gate. Thus, one or more or all of the symbols employed herein to represent an OR gate may or may not be a wire OR gate, as desired. 
     The phase &#34;OR gate,&#34; as used herein and in the claims, is hereby defined to include a NOR gate with or without an inverter, as may be necessary or desirable. 
     The phrase &#34;NAND gate,&#34; as used herein and in the claims, is hereby defined to include an AND gate with or without an inverter, as may be necessary or desirable. 
     In FIG. 1, digital function generator 30, having input lead 393, may have the said input lead 393 connected from loop circuit output lead 33 or from any other appropriate conductor in loop circuit 29. 
     As indicated hereinbefore, binary or binary decimal systems may sometimes be used entirely in part, not at all, as shown or to a greater or less extent than that disclosed herein. 
     word &#34;densitometer,&#34; as used herein and in the claims, is hereby defined to include, but not be limited to, that shown with or without (1) utilization means, (2) a process controller, (3) a density or specific gravity indicator, or (4) otherwise. 
     The phrase &#34;specific gravity,&#34; as used herein and in the claims, is hereby defined as the equivalent of density and as the ratio of the density of a sample fluid to the density of a reference fluid, the reference fluid being air or any other fluid at a reference temperature and pressure. 
     If it has not been made abundantly clear hereinbefore, no pressure sensor to pipeline connection need to made during density measurement or otherwise of methane or the gas of interest as opposed to nitrogen or the gas of calibration. 
     The word &#34;gas&#34; is hereby defined for use herein and in the claims to mean either a pure or relatively pure gas such as pure nitrogen gas or pure methane gas, or a mixture of two or more gases. 
     The word &#34;fluid&#34; as used herein and in the claims is hereby defined to include either one elemental gas or a mixture of gases, but to exclude all liquids.