# Patent

## Title
Methods for compositional analysis of downhole fluids using data from NMR and other tools

## Abstract

Methods and apparatuses are provided for analyzing a composition of a hydrocarbon-containing fluid. The methods include using a nuclear magnetic resonance (NMR) tool to conduct an NMR measurement on the hydrocarbon-containing fluid to obtain NMR data. A non-NMR tool, such as an optical tool, is used to conduct additional measurements on the hydrocarbon-containing fluid and to obtain non-NMR data on the fluid. An indication of the composition of the fluid can be determined by using the NMR data and the non-NMR data in an inversion process.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
This Application is related to U.S. patent application Ser. Nos. 14/109,497 and 14/109,354, both entitled “Methods for Compositional Analysis of Downhole Fluids Using Data from NMR and Other Tools” and filed on Dec. 17, 2013, which are hereby incorporated herein by reference in their entireties.
FIELD
The subject disclosure generally relates to hydrocarbon-bearing geological formations. More particularly, the subject disclosure relates to methods for analyzing the compositional analysis of formation fluids using nuclear magnetic resonance (NMR) and other data from downhole tools.
BACKGROUND
Optical (spectral) data from downhole fluid analysis logging tools are currently being used to determine the composition of crude oils downhole. See, e.g., Fujisawa, G., et al., “Near-infrared Compositional Analysis of Gas and Condensate Reservoir Fluids at Elevated Pressures and Temperatures”, Applied Spectroscopy, 52(12: 1615-1620 (2002); Fujisawa, G. et al., “Analyzing Reservoir Fluid Composition In-Situ in Real Time: Case Study in a Carbonate Reservoir”, SPE 84092, Annual Technical Conference and Exhibition, Denver, Colo. (2002) which are both hereby incorporated by reference herein in their entireties. These determinations are restricted to a subset of components or pseudocomponents including C1 (methane) to C5 (pentane), such as C1, C2-C5, and also C6+. The optical tools measure the optical densities {ODi} at a set of wavelengths λ1. These are then used to determine the weight percent wcj of components and pseudocomponents such as C1, C2-C5 and C6+, or C1, C2, C3-C5 and C6+. The individual weight percents for C2, C3, C4, and C5 can then be further resolved using a delumping algorithm. For some of the optical tools, the amount of water and carbon-dioxide (CO2) can also be determined. In addition, the optical density can be used to obtain information about asphaltenes and resins. See, e.g., Mullins, O. C., et al., “The Colloidal Structure of Crude Oils and the Structure of Reservoirs”, Energy Fuels, 21:2785-2794 (2007) which is hereby incorporated by reference herein in its entirety.
NMR relaxation and diffusion data can also be used to determine oil composition. From this data, the average chain length and the chain length distribution can be obtained. See, e.g., Freed, D. E., et al., “Scaling Laws for Diffusion Coefficients in Mixtures of Alkanes”, Phys. Rev. Lett., 94:067602 (2005); Freed, D. E., “Dependence on Chain Length of NMR Relaxation Times in Mixtures of Alkanes”, J. Chem. Phys., 126:174502 (2007); Hurlimann, M. D. et al., “Hydrocarbon Composition from NMR Diffusion and Relaxation Data”, SPWLA, 49th Annual Logging Symposium (May 2008); U.S. Pat. No. 6,859,032 to Heaton, N. J., and Freedman, R.; Anand, V. and Freedman, R., “New Methods for Predicting Properties of Live Oils from NMR”, SPWLA, Paper AAAA Proceedings of the 2009 Annual SPWLA Symposium (2009), which are all incorporated by reference herein in their entireties. In addition the comparison of transverse and longitudinal relaxation times and/or diffusion can give some information about asphaltenes, and the shapes of the distributions can be a signal of highly biodegraded oils. See, e.g., Mutina, A. R., and Hurlimann, M. D., “Correlation of Transverse and Rotational Diffusion Coefficient: A Probe of Chemical Composition in Hydrocarbon Oils”, J. Phys. Chem., A 112:3291-3301 (2008); Freed, D. E., and Hurlimann, M. D., “One- and Two-Dimensional Spin Correlation of Complex Fluids and the Relation to Fluid Composition”, C. R. Phys., 11:181-191 (2010), which are both hereby incorporated by reference herein in their entireties. Furthermore, the measurement of the NMR relaxation dispersion, i.e., the relaxation profile as a function of the applied magnetic field, can yield additional information about the aggregation propensity of the asphaltenes and resins in the crude oil.
NMR relaxation and diffusion measurements can be made with a downhole fluid analysis logging tool. See, Kleinberg, R. L., “Well logging”, Encyclopedia of Nuclear Magnetic Resonance, John Wiley (1996), which is hereby incorporated by reference herein in its entirety. The NMR tools measure the magnetization Mi at a series of echo times ti. They can also measure the magnetization as a function of wait times τi or as a function of bi, which is a diffusion weighting parameter determined by gradients and time variables. The tool data, such as {Mi, ti}, {Mi, τi}, or {Mi, bi} are used to determine the transverse or longitudinal relaxation time distributions or the diffusion distributions, given by {ƒj, T2j}, {ƒj, T1j}, or {ƒj, Dj}, respectively. For these distributions, ƒj is the fraction of protons with relaxation time T2j or T1j or with diffusion coefficient Dj, weighted by the total magnetization, M0. These distributions can be related to the raw data by an inversion process, such as an inverse Laplace transform. See, Fordham, E. J. et al., “Imaging multiexponential relaxation in the (y, logd T1) plane, with application to clay filtration rock cores,” J. Magn, Reson, A, 113:139-150 (1995); Venkataramanan, L. et al., “Solving fredholm integrals of the first kind with tensor product structure in 2 and 2.5 dimensions,” IEEE Trans. Signal Process, 50:1017-1026 (2002), which are both hereby incorporated by reference herein in their entireties. However, this inverse Laplace transform can be problematic because when noise is present, the inversion is non-unique. As a result, a regulator is often introduced to ensure the smoothness of the calculated distributions. These issues introduce some uncertainty into the calculated relaxation and diffusion distributions. See, Epstein, C. L., and Schotland, J., “The bad truth about Laplace's transform,” SIAM Rev., 50:504-520 (2008), which is hereby incorporated by reference herein in its entirety.
To obtain the relaxation or diffusion distribution from the raw data, the quantity ∥d−Kƒ∥2 is minimized with the constraint that ƒj, the components of the vector ƒ, are non-negative. In this expression, d is the vector with components di=Mi, and K is the kernel. For standard measurements, it is given by Kij=exp(−ti/T2j), 1−2 exp(−ti/T1j) and exp(−biDj) for the transverse relaxation, longitudinal relaxation and diffusion, respectively. In the past, the above expression is minimized using methods such as a non-negative least square fit with Tikhonov regularization or by maximum entropy methods.
Once the relaxation or diffusion distributions are known, the NMR data can be used to obtain information about chain length distributions and the viscosity of the oil. The viscosity η of the oil is related to the −1st moment of the diffusion coefficient. See, Freed, D. E., et al., “Scaling laws for diffusion coefficients in mixtures of alkanes”, Phys Rev Lett. 94:067602 (2005) and Hürlimann, M. D. et al., “Hydrocarbon composition from NMR diffusion and relaxation data,” SPLWA, 49th Annual Logging Symposium (May 2008). In terms of the log distribution, ƒD(log Di), the viscosity is given by




  
    
      
        
          η
          =
          
            CT
            ⁢
            
              
                ∫
                
                  
                    
                      
                        f
                        D
                      
                      ⁡
                      
                        (
                        
                          log
                          ⁢
                          
                            
                          
                          ⁢
                          
                            D
                            i
                          
                        
                        )
                      
                    
                    /
                    
                      D
                      i
                    
                  
                  ⁢
                  
                    d
                    
                      log
                      ⁡
                      
                        (
                        
                          D
                          i
                        
                        )
                      
                    
                  
                
              
              
                ∫
                
                  
                    
                      f
                      D
                    
                    ⁡
                    
                      (
                      
                        log
                        ⁢
                        
                          
                        
                        ⁢
                        
                          D
                          i
                        
                      
                      )
                    
                  
                  ⁢
                  
                    d
                    
                      log
                      ⁡
                      
                        (
                        
                          D
                          i
                        
                        )
                      
                    
                  
                
              
            
          
        
        ,
      
    
    
      
        (
        1
        )
      
    
  




where the temperature T is in degrees Kelvin and C has been found to be 3.2×10−8 cpcm2/sK, but can vary somewhat depending on the type of oil. For numerical calculations, the integrals in Eq. (1) are replaced with summations. There are also correlations between viscosity and the mean log diffusion coefficient or relaxation time which appear in the literature. See, e.g., Morriss, C. E., et al., “Hydrocarbon saturation and viscosity estimation from NMR logging in the Beldridge diatomite,” The Log Analyst, 38/2:44-59 (1996); Kleinberg, R. L., and Vinegar, H. J., “NMR properties or reservoir fluids,” The Log Analyst, 37/6:20-32 (1996); Lo, S., et al., “Correlations of NMR relaxation time with viscosity, diffusivity, and gas/oil ratio of methane/hydrocarbon mixtures,” Proceedings of the 2000 Annual Technical Conference and Exhibition, Society of Petroleum Engineers (October, 2000); Straley, C., “Reassessment of correlations between viscosity and NMR measurements,” SPWLA, 47th Annual Logging Symposium (June 2006) which are all hereby incorporated by reference herein in their entireties.

Several methods have been proposed to relate NMR relaxation and diffusion to chain length distributions. One method makes use of radial basis functions to interpolate between known data and new measurements. See, Anand, V., and Freedman, R., “New methods for predicting properties of live oils from NMR,” Paper AAAA Proceedings of the 2009 Annual SPWLA Symposium (2009). Another method uses the constituent viscosity model to relate the diffusion coefficients and relaxation times of each component to its microscopic, or constituent, viscosity. See, previously incorporated U.S. Pat. No. 6,859,032. A third method as discussed below is based on looking at mixtures of alkanes, but can apply to oils with other components also.
For the method based on looking at mixtures of alkanes, the average chain length or carbon number (the terms “chain length” and “carbon number” being used interchangeably herein) is defined as N=ΣxjNj, where xj is the mole percent of molecules with chain length Nj. For oils high in saturates, this average chain length is related to the 1/νth moment of the diffusion distribution and, in the absence of asphaltene, to the 1/κth moment of the relaxation time distribution, where ν=0.7, and κ=1.24. They are given by Freed, D. E., et al., “Scaling laws for diffusion coefficients in mixtures of alkanes,” Phys Rev Lett. 94:067602 (2005), and Freed, D. E., “Dependence on chain length of NMR relaxation times in mixtures of alkanes,” J. Chem, Phys., 126:174502 (2007):




  
    
      
        
          
            N
            _
          
          =
          
            
              A
              
                1
                
                  β
                  +
                  v
                
              
            
            ⁢
            
              
                〈
                
                  D
                  
                    1
                    /
                    v
                  
                
                〉
              
              
                
                  -
                  v
                
                
                  β
                  +
                  v
                
              
            
          
        
        ,
        
          

        
        ⁢
        and
      
    
    
      
        (
        2
        )
      
    
  
  
    
      
        
          N
          _
        
        =
        
          
            B
            
              1
              
                γ
                +
                κ
              
            
          
          ⁢
          
            
              
                〈
                
                  T
                  
                    1
                    ,
                    2
                  
                  
                    1
                    /
                    κ
                  
                
                〉
              
              
                κ
                
                  γ
                  +
                  κ
                
              
            
            .
          
        
      
    
    
      
        (
        3
        )
      
    
  




In these equations, A and B are constants that depend on temperature and pressure, and β and γ are constants that depend on temperature. The chain length Ni that corresponds to the diffusion coefficient Di is then given by previously incorporated Freed, D. E., et al., “Scaling laws for diffusion coefficients in mixtures of alkanes,” Phys Rev Lett. 94:067602 (2005),

Ni=A1/νN−β/νDi−1/ν.  (4)

For chain lengths less than about five, this expression should be modified, because, in that case, the molecules act more like hard spheres than chains. Similarly, in the absence of asphaltenes, the chain length that corresponds to the relaxation time T1,2i is given by previously incorporated Freed, D. E., “Dependence on chain length of NMR relaxation times in mixtures of alkanes,” J. Chem, Phys., 126:174502 (2007),

Ni=B1/κNγ/κT1,2i−1/κ.  (5)

It should be appreciated that equation (5) is not valid for dissolved gases, such as methane and ethane, because they relax by different processes than the longer molecules. If the diffusion or relaxation distribution was determined as function of log Di or log T1,2i with the log Di or log T1,2i evenly spaced, then the log distribution for the proton fraction of spins on molecules with chain length Ni is given by

ƒN(log Ni)=νƒD(log Di),  (6)

ƒN(log Ni)=κƒT(log T1,2i),  (7)

respectively. The weight fraction, on a log scale, is then given by





  
    
      
        
          w
          ⁡
          
            (
            
              log
              ⁢
              
                
              
              ⁢
              
                N
                i
              
            
            )
          
        
        =
        
          
            
              
                [
                
                  
                    (
                    
                      
                        7
                        ⁢
                        
                          
                        
                        ⁢
                        
                          N
                          i
                        
                      
                      +
                      1
                    
                    )
                  
                  /
                  
                    (
                    
                      
                        N
                        i
                      
                      +
                      1
                    
                    )
                  
                
                ]
              
              ⁢
              
                
                  f
                  N
                
                ⁡
                
                  (
                  
                    log
                    ⁢
                    
                      
                    
                    ⁢
                    
                      N
                      i
                    
                  
                  )
                
              
            
            
              ∫
              
                
                  [
                  
                    
                      (
                      
                        
                          7
                          ⁢
                          
                            
                          
                          ⁢
                          
                            N
                            j
                          
                        
                        +
                        1
                      
                      )
                    
                    /
                    
                      (
                      
                        
                          N
                          j
                        
                        +
                        1
                      
                      )
                    
                  
                  ]
                
                ⁢
                
                  
                    f
                    N
                  
                  ⁡
                  
                    (
                    
                      log
                      ⁢
                      
                        
                      
                      ⁢
                      
                        N
                        j
                      
                    
                    )
                  
                
                ⁢
                
                  d
                  
                    log
                    ⁡
                    
                      (
                      
                        N
                        j
                      
                      )
                    
                  
                
              
            
          
          .
        
      
    
    
      
        (
        8
        )
      
    
  




In this equation, it is assumed that a molecule with Ni carbon atoms has 2Ni+2 protons. Then, on a linear scale, the weight fraction of molecules with chain length Ni is given by

wi=w(log Ni)/Ni.  (9)

It should be appreciated that equations (2) through (5) set forth above for chain length and mean chain length as a function of diffusion coefficients and relaxation times may be derived from the observation that, for oils high in saturates, the diffusion coefficient have the form

Di=AN−βNi−ν  (10)

and similarly for relaxation times. For small molecules such as methane and ethane, the quantity Niν in Eq. (10) is modified because the molecules no longer act like chain molecules. For methane, it is replaced with 1.64, and for ethane, it is replaced with 2.73. See, Freed, D. E., et al., “Scaling laws for diffusion coefficients in mixtures of alkanes,” Phys Rev Lett. 94:067602 (2005). In this way, the NMR relaxation and diffusion distributions can give the chain length distribution for the entire oil, not just for components below C6. However, the resolution is not particularly good.

SUMMARY
This summary is provided to introduce a selection of concepts that are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used as an aid in limiting the scope of the claimed subject matter.
Illustrative embodiments of the present disclosure are directed to a method of analyzing a composition of a hydrocarbon-containing fluid. The method includes using a nuclear magnetic resonance (NMR) tool to conduct an NMR measurement on the hydrocarbon-containing fluid to obtain NMR data (e.g., a NMR relaxation and/or a NMR diffusion measurement). The method further includes using a non-NMR tool to conduct additional measurements on the hydrocarbon-containing fluid to obtain non-NMR data on the fluid. In some embodiments, the non-NMR tool is an optical tool, the additional measurements are optical measurements, and the non-NMR data are optical data. An indication of the composition of the fluid, such as chain length distribution, is determined by using the NMR data and the non-NMR data in an inversion process.
In various embodiments, the inversion process includes inverting the NMR data and using the non-NMR data to constrain the inversion of the NMR data. The inversion may be constrained by requiring the inversion to result in NMR distributions consistent with the non-NMR data.
In other embodiments, the inversion process includes combining the NMR data and the non-NMR data. The combined NMR data and non-NMR data is inverted to obtain the indication of the composition of the hydrocarbon-containing fluid.
Various embodiments are directed to a method of analyzing a composition of a hydrocarbon-containing formation fluid. The method includes locating a NMR tool and at least one additional non-NMR tool downhole in a formation. The hydrocarbon-containing formation fluid is extracted from the formation. The NMR tool is used to conduct downhole NMR measurements and to obtain NMR data on the extracted formation fluid. An additional non-NMR tool is used to conduct additional downhole measurements and obtain non-NMR data on the extracted formation fluid. An indication of the composition of the extracted formation fluid is determined by using the NMR data and the non-NMR data in an inversion process.
Further embodiments of the present disclosure are also directed to an apparatus for analyzing a composition of a hydrocarbon-containing formation fluid. The apparatus includes a NMR borehole tool adapted for use downhole to conduct NMR measurements downhole and to obtain NMR data on the hydrocarbon-containing formation fluid. The apparatus also includes a non-NMR borehole tool adapted for use downhole to conduct non-NMR measurements downhole and obtain non-NMR data on the formation fluid. A processor is coupled to the NMR borehole tool and the non-NMR borehole tool. The processor uses an inversion process to determine an indication of the composition of the formation fluid using the NMR data and the non-NMR data.
Further features and advantages of the subject disclosure will become more readily apparent from the following detailed description when taken in conjunction with the accompanying drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
The subject disclosure is further described in the detailed description which follows, in reference to the noted plurality of drawings by way of non-limiting examples of embodiments of the subject disclosure, in which like reference numerals represent similar parts throughout the several views of the drawings, and wherein:
FIG. 1 is a flow chart of a disclosed method;
FIG. 2 are plots of the chain length distribution of an oil sample obtained from an optical tool, an NMR tool as weighted according to one embodiment, and gas chromatography; and
FIG. 3 is an apparatus for implementing disclosed methods.



DETAILED DESCRIPTION
The particulars shown herein are by way of example and for purposes of illustrative discussion of the embodiments of the subject disclosure and are presented in the cause of providing what is believed to be the most useful and readily understood description of the principles and conceptual aspects of the subject disclosure. In this regard, no attempt is made to show structural details in more detail than is needed for the fundamental understanding of the subject disclosure, the description taken with the drawings making apparent to those skilled in the art how the several forms of the subject disclosure may be embodied in practice.
Turning to FIG. 1, a broad method is disclosed. At 10, one or more downhole fluid analysis logging tools used to extract fluid from a formation and to take measurements on these fluids are placed downhole. At 20, the one or more tools are used to extract fluid from a formation, and at 30, measurements (experiments) on the fluid are conducted. These measurements include NMR measurements, such as (by way of example) relaxation measurements or diffusion measurements, and at least additional non-NMR measurements such as (by way of example) optical measurements, mass density measurements, and viscosity measurements. These different measurements can be made by the same logging tool or different logging tools, but for purposes of the specification and claims even if a single tool can make both NMR and non-NMR measurements that tool will be considered as comprising multiple tools because it has multiple functions. At 40, one or more processors located downhole and/or uphole are used to interpret this raw data to obtain quantities such as (by way of example) the NMR magnetization decays, the distributions of NMR relaxation times and diffusion coefficients, optical spectra and densities, and the density and viscosity of the fluid. At 50, the processor then uses the NMR determinations and the other determinations, such as optical spectra determinations, together in order to obtain compositional information or an indication of composition, such as a chain length distribution, mean chain length, weight percent of a component, weight percent of a pseudocomponent (e.g., a combination of components), mole percent of a component, mole percent of a pseudocomponent, gas-to-oil ratio, and/or viscosity.
The NMR tool can measure, but is not restricted to a measurement of NMR diffusion, NMR longitudinal relaxation (T1) NMR transverse relaxation (T2), the dispersion of NMR relaxation, NMR hydrogen index, and high resolution NMR spectroscopy data. The non-NMR tool can measure, but is not restricted to a measurement of optical density, optical spectra, fluid density, viscosity, temperature, and pressure. In one aspect, as described in detail hereinafter, in addition to conducting an enhanced compositional analysis, additional information may be obtained, such as the amount of dissolved gases, such as CO2, information about asphaltenes and biodegradation, and the viscosity of the oil.
In some embodiments, it is assumed that a forward model exists that allows for the prediction of the distribution of relaxation times or diffusion coefficients from the composition of the fluid. One example is the constituent viscosity model in U.S. Pat. No. 6,859,032, and another is the previously-described alkane mixture model. A third example is the empirical interpolation scheme described in Anand, V., and Freedman, R., “New methods for predicting properties of live oils from NMR,” Paper AAAA Proceedings of the 2009 Annual SPWLA Symposium (2009). These models can be extended to treat dissolved gases such as carbon dioxide and methane.
In various embodiments, the resolution and width of the carbon chain length distribution can be enhanced by combining data from different tools. For example, the optics data is sensitive to small alkanes such as C1 (methane) and C2 (ethane), but it lumps the composition for hexane and larger alkanes into one pseudo-component (C6+), such that the individual weight percents of molecules with carbon number 6 and greater are not determined. The NMR data can give the composition over the entire range of carbon numbers, but the resolution and accuracy is, in many cases, not as fine as the optics data is for the small carbon numbers such as C2 through C5. As described in more detail below, by using the optical data to constrain an inversion process that inverts the NMR data, or by combining the two sets of data in other manners, a chain length distribution that has greater resolution and accuracy at low carbon numbers and also covers a wider range of chain length is achieved.
In other embodiments, data from NMR is combined with data from other tools to enable a determination of the oil composition when the NMR data by itself is insufficient for obtaining chain length distributions. An example of this is when there are dissolved gases such as methane and ethane in the oil. These gases relax by different processes than the rest of the oil. See, Lo, S., et al., “Correlations of NMR relaxation time with viscosity, diffusivity, and gas/oil ratio of methane/hydrocarbon mixtures,” Proceedings of the 2000 Annual Technical Conference and Exhibition, Society of Petroleum Engineers (October, 2000) and Zhang, Y. et al., “Oil and gas NMR properties: The light and heavy ends,” SPWLA 43rd Annual Logging Symposium, Oslo, Japan, Paper HHH (2002) which is hereby incorporated by reference herein in its entirety. Because of this, in order to obtain chain length distributions from the relaxation data, it is useful to know the amount of methane and ethane in the oil. By combining the optics data and density data with the NMR relaxation data, it becomes possible to obtain a more robust, full chain-length distribution.
In further embodiments, data from other tools are combined with the NMR raw data to improve the inversion of the raw data and thereby improve the accuracy of the chain length distribution derived from the NMR data. In particular, obtaining NMR relaxation and diffusion distributions from the magnetization decay involves an inversion process, such as an inverse Laplace transform. There are many solutions for the distributions that are consistent with the raw data within the tolerance of the noise level. Constraining the solution for the diffusion or relaxation distributions to be consistent with oil properties, such as composition or viscosity derived from other tools, restricts the distributions to ones that better reflect these physical properties of the oil. This, in turn, provides better values for the chain length distributions. In addition, the raw data from the NMR tools can be inverted directly to chain length distributions, and, again, by constraining the distributions to agree with measurements from other tools, the accuracy of the chain length distributions can be improved.
In one embodiment, the chain length distribution from NMR is combined with the composition from an optics tool to enhance the resolution and range of the final chain length distribution. More particularly, optical data from downhole optical tools provides weight fractions for a few components below C6 and lumps the additional weight fractions as C6+. Essentially, that means that the optical tool provides no detailed information above C5. Similarly but conversely, while NMR measurements provide information over a full chain length range, the resolution in the chain length distribution found by direct methods, in many cases, is quite poor between C1 and C6. By combining the different measurements, chain length distributions over a wide range of chain lengths can be obtained with a higher resolution than from either alone.
Information about the composition of the fluid (e.g., chain length distribution) can be normalized using the non-NMR data. The chain length distribution determined from the NMR data is normalized by rescaling the chain length distribution to make the distribution consistent with the non-NMR data. For example, suppose the weight percents wc1, wc2-c5 and wc6+ have been determined from processing associated with an optical tool, and the chain length distribution {Ni, wi} has been determined from processing associated with an NMR tool. The optics data can be delumped according to known techniques to obtain wc1, wc2, wc3, wc4, wc5 and wc6+. For the new distribution, W(Ni) the values of wci found from the optics can be kept for carbon numbers less than 6. The wc6+ fraction can then be used to normalize the components wi for carbon numbers i≧6 from the NMR distribution, to obtain the entire distribution. The new distribution then becomes




  
    
      
        
          W
          ⁡
          
            (
            
              N
              i
            
            )
          
        
        =
        
          {
          
            
              
                
                  
                    w
                    ci
                  
                
                
                  
                    
                      for
                      ⁢
                      
                        
                      
                      ⁢
                      i
                    
                    ≤
                    5
                  
                
              
              
                
                  
                    
                      w
                      i
                    
                    ⁢
                    
                      
                        w
                        
                          c6
                          +
                        
                      
                      
                        
                          ∑
                          
                            j
                            ≥
                            6
                          
                        
                        ⁢
                        
                          
                        
                        ⁢
                        
                          w
                          j
                        
                      
                    
                  
                
                
                  
                    
                      for
                      ⁢
                      
                        
                      
                      ⁢
                      i
                    
                    ≥
                    6
                  
                
              
            
            .
          
        
      
    
    
      
        (
        11
        )
      
    
  




An example is given in FIG. 2. In this case, the NMR data was taken on the dead oil (with no dissolved gases), so the NMR distribution (triangles) contains no information (i.e., the mass fraction is set to zero) for C1 through C4 and normalized information (based on equation (11)) for carbon chains 5 and larger. The processed (delumped) optics data on the live oil (squares) shows the weight percent up to C5. The combined distribution is given by the squares for C1 through C5 and by the triangles for C6 and above. If desired, the optics and NMR results can be averaged or weighted for C5 as discussed in more detail hereinafter. The combined distribution takes into account the full range of carbon numbers measured by gas chromatography (circles) on the live oil, and as seen in FIG. 2 agrees quite well with the gas chromatography.
In some cases, the data from NMR for some of the shorter chains may also be reliable. Then this information can also be included in the final chain length distribution. For example, if the amount of methane from NMR, w1, is considered to be fairly reliable, then the final chain length distribution can be taken to be




  
    
      
        
          W
          ⁡
          
            (
            
              N
              i
            
            )
          
        
        =
        
          {
          
            
              
                
                  
                    
                      aw
                      
                        c
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                    
                    +
                    
                      
                        (
                        
                          1
                          -
                          a
                        
                        )
                      
                      ⁢
                      
                        w
                        1
                      
                    
                  
                
                
                  
                    
                      for
                      ⁢
                      
                        
                      
                      ⁢
                      i
                    
                    ≤
                    5
                  
                
              
              
                
                  
                    
                      w
                      i
                    
                    ⁢
                    
                      
                        1
                        -
                        
                          
                            ∑
                            
                              i
                              =
                              1
                            
                            5
                          
                          ⁢
                          
                            
                          
                          ⁢
                          
                            W
                            ⁡
                            
                              (
                              
                                N
                                i
                              
                              )
                            
                          
                        
                      
                      
                        
                          ∑
                          
                            j
                            ≥
                            6
                          
                        
                        ⁢
                        
                          
                        
                        ⁢
                        
                          w
                          j
                        
                      
                    
                  
                
                
                  
                    
                      for
                      ⁢
                      
                        
                      
                      ⁢
                      i
                    
                    ≥
                    6
                  
                
              
            
            ,
          
        
      
    
    
      
        (
        12
        )
      
    
  




where a is a measure of the confidence level of the optically determined wc1 versus the NMR-determined w1.

A second embodiment involves combining NMR data and data from other tools, such as optical tools, density tools, pressure tools, or viscometers, and inverting the combined data to obtain chain length distributions. The NMR data may include NMR relaxation, NMR diffusion distributions, or hydrogen index measurements. The additional data from the other tools can make it possible to obtain chain length distributions from the NMR data in cases where the inversion of the NMR data would otherwise be non-unique or the NMR data by itself is insufficient to determine the chain length distribution. It also augments the range of chain lengths that can be resolved by optics alone.
It is noted that equations (2) through (5) set forth above for the mean chain lengths and the chain lengths in terms of the diffusion or relaxation distributions also depend on pressure and temperature. Thus, to obtain the mean chain lengths and the chain length distributions from NMR measurements, it is useful to combine these measurements with pressure and temperature measurements.
It is also noted that oils often contain dissolved gases such as methane and ethane. These gases relax via different processes than the larger alkane molecules. As a consequence, they can have the same relaxation time as larger molecules, such as hexane. This makes the inversion process for the chain length distribution from relaxation distributions non-unique, unless additional information, such as the amount of methane, is known. Often, though, the relaxation measurements are taken with considerably more resolution than the diffusion measurements. This means that, in principle, they should give much higher quality chain length distributions, if the issues of the dissolved gases can be resolved, and if there is little to no asphaltene in the oil. In some cases, diffusion measurements are not made. Thus, it is useful to have a method for calculating the chain length distribution from relaxation times.
It is also noted that dissolved carbon dioxide (CO2) changes the density and free volume of the oil, and thus influences the diffusion coefficients and relaxation times of the oil. However, the CO2 is not directly observed by downhole NMR tools. As a result, if there is a substantial amount of CO2 in the oil, just applying equations (2) through (5) will not give an accurate chain length distribution. To properly account for the effects of CO2, it is useful to have an independent measure of CO2.
With respect to the second embodiment what follows is a detailed example for determining the chain length distribution from the relaxation time distribution when there is a substantial amount of methane in the oil. Other hydrocarbon gases such as ethane can be treated similarly. For dissolved methane, spin rotation and intermolecular relaxation are the dominant contribution to its relaxation. This is in contrast to most other alkanes, where intramolecular relaxation is the dominant mode of relaxation. A model for these effects can be found in Lo, S., et al., “Correlations of NMR relaxation time with viscosity, diffusivity, and gas/oil ratio of methane/hydrocarbon mixtures,” Proceedings of the 2000 Annual Technical Conference and Exhibition, Society of Petroleum Engineers (October, 2000), but other models can be used instead. In the aforementioned Lo, S., et al., reference, the intermolecular relaxation rate T1 of methane is given by




  
    
      
        
          
            
              (
              
                1
                
                  T
                  1
                
              
              )
            
            inter
          
          =
          
            
              32
              ⁢
              
                
              
              ⁢
              
                π
                2
              
              ⁢
              
                γ
                4
              
              ⁢
              
                ħ
                2
              
              ⁢
              
                I
                ⁡
                
                  (
                  
                    I
                    +
                    1
                  
                  )
                
              
              ⁢
              N
              ⁢
              
                
              
              ⁢
              
                ρ
                n
              
              ⁢
              η
            
            
              15
              ⁢
              
                
              
              ⁢
              kT
            
          
        
        ,
      
    
    
      
        (
        13
        )
      
    
  




where γ is the gyromagnetic ratio, ħ is Planck's constant, I=1⁄2 is the spin of the proton, N is the number of spins per molecule, ρn is the number density of molecules, k is Boltzmann's constant, T is temperature, and η is the viscosity of the oil. The viscosity of the oil can be determined by a viscometer or calculated from the NMR diffusion or relaxation distribution. The product Nρn is the number of spins per unit volume, which is equal to the hydrogen index HI. This can be measured directly by NMR tools.

The relaxation rate due to spin rotation is




  
    
      
        
          
            
              (
              
                1
                
                  T
                  1
                
              
              )
            
            SR
          
          =
          
            
              
                c
                1
              
              ⁢
              ρ
            
            
              T
              
                c
                2
              
            
          
        
        ,
      
    
    
      
        (
        14
        )
      
    
  




where, in the aforementioned Lo, S., et al. reference, c1=1.57*105, c2=1.50 and ρ is the density in g/cm3. The total relaxation of methane T1,2meth is then given by





  
    
      
        
          T
          
            1
            ,
            
              2
              ⁢
              
                
              
              ⁢
              meth
            
          
        
        =
        
          
            
              [
              
                
                  
                    (
                    
                      1
                      
                        T
                        1
                      
                    
                    )
                  
                  inter
                
                +
                
                  
                    (
                    
                      1
                      
                        T
                        1
                      
                    
                    )
                  
                  SR
                
              
              ]
            
            
              -
              1
            
          
          .
        
      
    
    
      
        (
        15
        )
      
    
  




This depends on density, hydrogen index, viscosity and temperature. The hydrogen index can be measured with NMR tools. The density can be measured with a densimeter or can be calculated from pressure measurements, and the viscosity can be measured by a viscometer or calculated from NMR diffusion or relaxation measurements. The downhole temperature is also measured by logging tools.

According to equation (5), the other components of the oil (assuming no other dissolved gases and no asphaltene) have a T1 and T2 given by

T1,2i=BN−γNi−κ.  (16)

The composition can be found by finding N. One possibility is to use the value of N from diffusion measurements. In some wireline tools, the diffusion is not measured with sufficient resolution to obtain a full chain length distribution, but it can still be used to obtain the mean chain length. It is also possible to solve for the mean chain length directly from the relaxation data by starting with the 1/κth moment of T1 or T2, which can be expressed in terms of the relaxation distribution as





  
    
      
        
          〈
          
            T
            
              1
              /
              κ
            
          
          〉
        
        =
        
          
            
              ∫
              
                
                  
                    f
                    T
                  
                  ⁡
                  
                    (
                    
                      log
                      ⁢
                      
                        
                      
                      ⁢
                      
                        T
                        
                          1
                          ,
                          2
                        
                      
                    
                    )
                  
                
                ⁢
                
                  T
                  
                    1
                    ,
                    2
                  
                  
                    1
                    /
                    κ
                  
                
                ⁢
                
                  d
                  
                    log
                    ⁡
                    
                      (
                      
                        T
                        
                          1
                          ,
                          2
                        
                      
                      )
                    
                  
                
              
            
            
              ∫
              
                
                  
                    f
                    T
                  
                  ⁡
                  
                    (
                    
                      log
                      ⁢
                      
                        
                      
                      ⁢
                      
                        T
                        
                          1
                          ,
                          2
                        
                      
                    
                    )
                  
                
                ⁢
                
                  d
                  
                    log
                    ⁡
                    
                      (
                      
                        T
                        
                          1
                          ,
                          2
                        
                      
                      )
                    
                  
                
              
            
          
          .
        
      
    
    
      
        (
        17
        )
      
    
  




In terms of the chain length distribution, this is equivalent to

T1/κ=ΣpiT1,21/κ(Ni),  (18)

where pi is the proton fraction, given by





  
    
      
        
          p
          i
        
        =
        
          
            
              
                (
                
                  
                    2
                    ⁢
                    
                      
                    
                    ⁢
                    
                      N
                      i
                    
                  
                  +
                  2
                
                )
              
              ⁢
              
                x
                i
              
            
            
              ∑
              
                
              
              ⁢
              
                
                  (
                  
                    
                      2
                      ⁢
                      
                        
                      
                      ⁢
                      
                        N
                        j
                      
                    
                    +
                    2
                  
                  )
                
                ⁢
                
                  x
                  j
                
              
            
          
          =
          
            
              
                
                  (
                  
                    
                      N
                      i
                    
                    +
                    1
                  
                  )
                
                ⁢
                
                  x
                  i
                
              
              
                
                  N
                  _
                
                +
                1
              
            
            .
          
        
      
    
    
      
        (
        19
        )
      
    
  




In this example, it is assumed that for the components in the oil with i>1, the relaxation time T1,2(Ni) is given by equation (16), while for i=1 it is equal to T1,2meth. Substituting this into equation (18) for the 1/κth moment of the relaxation time, and rearranging the terms results in




  
    
      
        
          〈
          
            T
            
              1
              /
              κ
            
          
          〉
        
        =
        
          
            
              ∑
              
                i
                ≥
                1
              
            
            ⁢
            
              
            
            ⁢
            
              
                
                  p
                  i
                
                
                  N
                  i
                
              
              ⁢
              
                B
                
                  1
                  /
                  κ
                
              
              ⁢
              
                
                  N
                  _
                
                
                  
                    -
                    γ
                  
                  /
                  κ
                
              
            
          
          -
          
            
              
                p
                1
              
              
                N
                1
              
            
            ⁢
            
              B
              
                1
                /
                κ
              
            
            ⁢
            
              
                N
                _
              
              
                
                  -
                  γ
                
                /
                κ
              
            
          
          +
          
            
              p
              1
            
            ⁢
            
              
                T
                
                  1
                  ,
                  
                    2
                    ⁢
                    
                      
                    
                    ⁢
                    meth
                  
                
                
                  1
                  /
                  κ
                
              
              .
            
          
        
      
    
    
      
        (
        20
        )
      
    
  




Next, equation (19) can be used for pi, to express it in terms of the mole fraction, xi, thus obtaining





  
    
      
        
          〈
          
            T
            
              1
              /
              κ
            
          
          〉
        
        =
        
          
            
              
                
                  ∑
                  
                    i
                    ≥
                    1
                  
                
                ⁢
                
                  
                
                ⁢
                
                  
                    (
                    
                      
                        N
                        i
                      
                      +
                      1
                    
                    )
                  
                  ⁢
                  
                    
                      x
                      i
                    
                    /
                    
                      N
                      i
                    
                  
                
              
              
                
                  N
                  _
                
                +
                1
              
            
            ⁢
            
              B
              
                1
                /
                κ
              
            
            ⁢
            
              
                N
                _
              
              
                
                  -
                  γ
                
                /
                κ
              
            
          
          -
          
            
              
                2
                ⁢
                
                  
                
                ⁢
                
                  x
                  1
                
              
              
                
                  N
                  _
                
                +
                1
              
            
            ⁢
            
              B
              
                1
                /
                κ
              
            
            ⁢
            
              
                N
                _
              
              
                
                  -
                  γ
                
                /
                κ
              
            
          
          +
          
            
              
                2
                ⁢
                
                  
                
                ⁢
                
                  x
                  1
                
              
              
                
                  N
                  _
                
                +
                1
              
            
            ⁢
            
              
                T
                
                  1
                  ,
                  
                    2
                    ⁢
                    
                      
                    
                    ⁢
                    meth
                  
                
                
                  1
                  /
                  κ
                
              
              .
            
          
        
      
    
    
      
        (
        21
        )
      
    
  




The right-hand side of this equation contains the sum Σi≧1(Ni+1)xi/Ni=1+Σi≧1xi/Ni. The latter sum is considerably less than one unless there is a large quantity of dissolved gas in the oil. In the case, where the only dissolved gas is methane, it can be approximated by its first term, xi resulting in

(N+1)T1/κ=B1/κN−γ/κ(1−x1)+2x1T1,2meth1/κ.  (22)

If the weight percent of methane wc1 which can be measured by the optical tools is known, x1 can be expressed in terms of wc1 using the equation





  
    
      
        
          w
          
            c
            ⁢
            
              
            
            ⁢
            1
          
        
        =
        
          
            
              
                
                  14
                  ⁢
                  
                    
                  
                  ⁢
                  
                    N
                    1
                  
                
                +
                2
              
              
                
                  
                    ∑
                    j
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    14
                    ⁢
                    
                      
                    
                    ⁢
                    
                      N
                      j
                    
                  
                
                +
                2
              
            
            ⁢
            
              x
              1
            
          
          =
          
            
              8
              
                
                  7
                  ⁢
                  
                    
                  
                  ⁢
                  
                    N
                    _
                  
                
                +
                1
              
            
            ⁢
            
              
                x
                1
              
              .
            
          
        
      
    
    
      
        (
        23
        )
      
    
  




This can be substituted into equation (22) to remove x1. In the resulting equation, the unknown is N, which can be solved for numerically. Once a solution is obtained for N, then equation (16) gives the relation between Ni and T1,2i for i>1. Equations (7), (8) and (9) can then be used to find the chain length distribution, with one modification. The weight percent of methane is given by wc1. However, the NMR methane signal occurs at T1,2meth, and before ƒ(log T1,2i) is substituted into equation (7), this extra signal should be subtracted off. Thus, Eq. (7) is replaced by

ƒN(log Ni)=κ└ƒT(log T1,2i)−M0p1g(log(T1,2meth)−log(T1,2i))┘.  (24)

where the function g is an approximate delta-function that is peaked at T1,2meth=T1,2i and has an area of one. The magnetization M0 can be found from the initial magnetization in a T2 decay. It is also the area under the T2 distribution. Alternatively, it is the zero'th moment of the T2 decay and can be calculated using the Mellin transform. Similarly, T21/k can be calculated from the T2 distribution or directly from the magnetization decay. See, Venkataramanan L., et al., “Mellin transform of CPMG data,” J. Magn. Reson., 206:20-31 (2010) which is hereby incorporated by reference herein in its entirety.

In other embodiments, the raw data from NMR can be combined with data from one or more of optics, density, viscosity and pressure downhole measurement tools to improve the inversion process for the physical properties from the NMR data. One example of this is using results from tools, such as optics or the viscometer, to constrain the inversions for T2 or diffusion to obtain distributions that are consistent with this other data. More particularly, NMR distributions are obtained using an inverse Laplace transform of the magnetization decay. However, this inverse Laplace transform is ill-conditioned, which means that when the signal has noise, there are many solutions which fit the data. In many cases, some constraint, such as smoothness of the distribution, is imposed to restrict the solution to more physical ones.
Once a property of the oil is known, such as its viscosity, η, or the weight percent of methane, wc1, this property can be expressed as a function of the ƒj and the diffusion coefficients Dj or the relaxation times T1,2j. Then these known values can be used as constraints for a minimization as previously described (e.g., the quantity ∥d−Kƒ∥2 is minimized using methods such as a non-negative least square fit with Tikhonov regularization or by maximum entropy methods). To illustrate this, consider the example where the viscosity ηmeas has been measured by some other method. Then, it is possible to solve for a diffusion distribution for the NMR data that also has a viscosity equal to ηmeas. This can be done by obtaining a diffusion coefficient from the NMR data, calculating the viscosity η({ƒj, Dj}) for this distribution and comparing this calculated viscosity with the measured viscosity. If the calculated viscosity is very different from the measured one, the NMR inversion is redone to obtain another distribution iteratively until the calculated viscosity is consistent with the measured data. Mathematically, this could be done by a joint inversion by minimizing ∥k−Kƒ∥2 while satisfying the condition that ∥ηmeas−η({ƒj,Dj})∥ is less than the experimental tolerance. Most optimization packages can honor this condition along with the usual positivity constraint that ƒj≧0.
It is also possible to constrain the viscosity η({ƒj,Dj}) found from the diffusion distribution according to equation (1) to equal the measured quantity by minimizing the expression

∥d−Kƒ∥2+λ∥ηmeas−η({ƒj,Dj})∥2,  (25)

where λ is a parameter that reflects how strong the constraint is. Constraining the calculated viscosity to equal the measured viscosity can help improve the inversion process for the diffusion distribution. Once this distribution has been found, it can be used to solve for the chain length distribution, as described above. It should be appreciated that this method will also apply to relaxation distributions and other physical properties that can be expressed in terms of the diffusion distributions or relaxation distributions.

In other embodiments, the raw data from a downhole NMR tool is combined with data from other downhole tools to invert directly for information about the composition. For example, in the case of diffusion, variables can be chosen as {Nj,ƒ(Nj)} instead of {Dj,ƒj}. The Nj can be linearly spaced, for example Nj=j for j=1, 2, 3, . . . , or another spacing can be chosen. Then the kernel can be defined in terms of these new variables as

Kij({Nj})=exp(−biD(Nj)),  (26)

where D(Nj) is given by equation (10), with the appropriate modification for methane and ethane. This equation depends on the mean chain length, which, in turn, depends on the entire distribution. A non-linear minimization can be conducted, where the kernel changes with the fit, or N can be determined directly from the raw data, using methods in previously incorporated Venkataramanan L., et al., “Mellin transform of CPMG data,” J. Magn. Reson., 206:20-31 (2010). In the latter case, for a given measurement, the kernel is fixed, and the minimization can be linear, apart from the usual non-negativity constraint. In particular, consider the example where the methane weight percent wc1 is known from optical measurements. The proton number for methane, ƒ(N1), can be expressed in terms of wc1 as follows:





  
    
      
        
          
            f
            ⁡
            
              (
              
                N
                1
              
              )
            
          
          =
          
            
              M
              0
            
            ⁢
            
              
                
                  N
                  1
                
                +
                1
              
              
                
                  7
                  ⁢
                  
                    
                  
                  ⁢
                  
                    N
                    1
                  
                
                +
                1
              
            
            ⁢
            
              
                
                  7
                  ⁢
                  
                    
                  
                  ⁢
                  
                    N
                    _
                  
                
                +
                1
              
              
                
                  N
                  _
                
                +
                1
              
            
            ⁢
            
              w
              
                c
                ⁢
                
                  
                
                ⁢
                1
              
            
          
        
        ,
      
    
    
      
        (
        27
        )
      
    
  




where, as in the example above, M0 and Ncome from moments of the magnetization decay and can be calculated directly from the raw data. In this equation, it is again assumed that a molecule with carbon number Ni has 2Ni+2 protons. Depending on the oil, other assumptions can be made instead. To obtain this equation, use has been made of the relation between the proton number ƒ(Ni) and the mole fraction xi given by





  
    
      
        
          
            f
            ⁡
            
              (
              
                N
                i
              
              )
            
          
          =
          
            
              
                
                  
                    (
                    
                      
                        2
                        ⁢
                        
                          
                        
                        ⁢
                        
                          N
                          i
                        
                      
                      +
                      2
                    
                    )
                  
                  ⁢
                  
                    x
                    i
                  
                
                
                  
                    ∑
                    j
                  
                  ⁢
                  
                    
                  
                  ⁢
                  
                    
                      (
                      
                        
                          2
                          ⁢
                          
                            
                          
                          ⁢
                          
                            N
                            j
                          
                        
                        +
                        2
                      
                      )
                    
                    ⁢
                    
                      x
                      j
                    
                  
                
              
              ⁢
              
                M
                0
              
            
            =
            
              
                
                  
                    (
                    
                      
                        2
                        ⁢
                        
                          
                        
                        ⁢
                        
                          N
                          i
                        
                      
                      +
                      2
                    
                    )
                  
                  ⁢
                  
                    x
                    i
                  
                
                
                  
                    2
                    ⁢
                    
                      
                    
                    ⁢
                    
                      N
                      _
                    
                  
                  +
                  2
                
              
              ⁢
              
                M
                0
              
            
          
        
        ,
      
    
    
      
        (
        28
        )
      
    
  




and the relation between the weight percent and the proton number





  
    
      
        
          w
          ci
        
        =
        
          
            
              
                (
                
                  
                    14
                    ⁢
                    
                      
                    
                    ⁢
                    
                      N
                      i
                    
                  
                  +
                  2
                
                )
              
              ⁢
              
                x
                i
              
            
            
              
                ∑
                j
              
              ⁢
              
                
              
              ⁢
              
                
                  (
                  
                    
                      14
                      ⁢
                      
                        
                      
                      ⁢
                      
                        N
                        j
                      
                    
                    +
                    2
                  
                  )
                
                ⁢
                
                  x
                  j
                
              
            
          
          =
          
            
              
                
                  (
                  
                    
                      14
                      ⁢
                      
                        
                      
                      ⁢
                      
                        N
                        i
                      
                    
                    +
                    2
                  
                  )
                
                ⁢
                
                  x
                  i
                
              
              
                
                  14
                  ⁢
                  
                    
                  
                  ⁢
                  
                    N
                    _
                  
                
                +
                2
              
            
            .
          
        
      
    
    
      
        (
        29
        )
      
    
  




Thus, equation (27) can be used to fix the value of ƒ(N1) to the value determined by wc1, N, and M0. Then the expression ∥d−K({Nj})ƒ∥2 can be minimized to solve for ƒ(Ni) with i≧2, while holding ƒ(N1) fixed. This minimization can be done using standard non-negative least squares techniques and regularization schemes such as Tikhonov regularization. Alternatively, maximum entropy methods can be used.
Optical data can also be combined with NMR relaxation measurements to determine fluid composition. For example, a log-linear scaling law can be used to relate component T2 relaxation time to component chain length. The scaling law can be used to obtain fluid mixture component weight fractions from the NMR relaxation measurements. Moreover, optical data can be used with the NMR measurements and the scaling law to obtain further refined estimates for these component weight fractions. U.S. patent application Ser. No. 14/109,354 filed on Dec. 17, 2013 and referenced above describes this method in further detail and is hereby incorporated by reference in its entirety.
According to one aspect, these methods are not limited to a single component in the distribution but, instead, can apply to any combination of components. In addition, if a component such as wc1 is known with some level of uncertainty, and the NMR on its own also can give ƒ(N1) with some level of uncertainty, instead a constraint can be introduced as in the previous example. This can be done by implementing a joint inversion which minimizes the expression

∥d−K({Nj})ƒ∥2,  (30)

while satisfying the condition that

∥w1−wc1∥<the experimental tolerance,  (31)

where wc1 is the measured quantity and w1 is calculated from ƒ(N1) according to equation (27). Alternatively, a regularization technique can be used, such as minimizing the expression

∥d−K({Nj})ƒ∥2+λ∥w1−wc1∥2  (32)

over the ƒ({Nj}). The ƒ(Nj) are also constrained to be positive. In the above expression, λ depends on the uncertainty of the two measurements, and w1 can be obtained from ƒ(N1) using equation (27). In this way, by combining information from other tools, the inversion for chain length from NMR can be improved.

Similar methods can also be used if pseudo-components are determined from the optics. For example, when the weight percent wc3-c5 of the pseudo-component C3-5 is measured, this is the sum of the individual weight percents w3, w4 and w5 of C3, C4 and C5. In this case, w3, w4 and w5 can be determined directly from the ƒ(Ni) with the help of equations (28) and (29). Then the expression ∥d−K({Nj})ƒ∥2 can be minimized with the constraint that w3+w4+w5=wc3-c5. The methods described above can also be used to obtain the chain length distribution from relaxation time distributions, if the weight percent of methane and the density of the oil are known.
In another embodiment, the NMR data can be used to improve fluid composition determinations made from the optics data. In particular, if there is a small amount of water (under about 5%), and the water and hydrocarbon volumes can be determined from the NMR data, then these values can be used to constrain the estimation of fluid composition from the optics data. In one method, different models for two-phase flow can be applied to the optics data, and the ones that give the accurate water and hydrocarbon fractions can then be used in determining the hydrocarbon composition from the optics data. The volume fraction of water can also be used to constrain the optics data to determine the amount of carbon dioxide in the sample. This information can then be used to improve the determination of the composition of the oil or gas in the sample from the NMR data.
According to one aspect, the previously-described methods can be used to analyze the composition of a hydrocarbon-containing fluid not only downhole, but in a laboratory or uphole at a wellsite. By way of example, a hydrocarbon-containing fluid is subject to an NMR relaxation or diffusion experiment in order to obtain NMR relaxation or diffusion data as well as to a non-NMR experiment such as an optical experiment to obtain non-NMR data such as optical data. The data obtained by the non-NMR experiment is then used to modify the analysis of the NMR data in determining indications of the composition. By way of example, optical data may be used to constrain an inversion of the NMR data.
According to a further aspect, the previously-described methods can be used in conjunction with single-phase samples (e.g., liquid), and multi-phase samples (e.g., liquid and gas) including emulsions. The previously-described methods can also be used in conjunction with samples containing water.
According to another aspect, as seen in FIG. 3, an apparatus 100 is provided for implementing the previously-described methods. The apparatus 100 includes a tool string including an NMR borehole tool 110 and a non-NMR borehole tool 120, shown located in a borehole 124 of a formation 128, and a processor 130 that is coupled to tools 110 and 120. The NMR borehole tool 110 may be any commercially available NMR tool or any proposed tool capable of conducted NMR measurements downhole. In one embodiment, the NMR borehole tool 110 is capable of conducting NMR relaxation and/or diffusion measurements on a hydrocarbon-containing fluid sample. The non-NMR tool 120 may be any commercially available non-NMR tool or any proposed tool of conducted non-NMR measurements downhole that are useful in modifying an NMR data analysis, e.g., by being useful in constraining an inversion of the NMR data. In one embodiment, the non-NMR tool 120 is a formation tester instrument such as the CFATM tool that is capable of optically scanning the hydrocarbon-containing fluid sample that is located in a flowline of the tool. The processor 130, although shown on the surface of formation 128, may be part of either or both of tools 110 and 120 or may be a separate processor that may be located downhole or uphole. The processor may be a programmed computer, a dedicated processor, a microprocessor, a system of microprocessors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or other circuitry capable of analyzing the NMR data obtained by tool 110 in light of the data obtained by tool 120.
Although only a few example embodiments have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the example embodiments without materially departing from this disclosure. Accordingly, all such modifications are intended to be included within the scope of this disclosure as defined in the following claims. In the claims, means-plus-function clauses are intended to cover the structures described herein as performing the recited function and not only structural equivalents, but also equivalent structures. Thus, although a nail and a screw may not be structural equivalents in that a nail employs a cylindrical surface to secure wooden parts together, whereas a screw employs a helical surface, in the environment of fastening wooden parts, a nail and a screw may be equivalent structures. It is the express intention of the applicant not to invoke 35 U.S.C. §112, paragraph 6 for any limitations of any of the claims herein, except for those in which the claim expressly uses the words ‘means for’ together with an associated function.

## Claims

1. A method of analyzing a molecular composition of a hydrocarbon phase of a hydrocarbon-containing fluid containing a plurality of hydrocarbons of different chain lengths, the method comprising:
(a) using a nuclear magnetic resonance (NMR) tool to conduct at least one of a NMR relaxation measurement and a diffusion measurement on the hydrocarbon-containing fluid to obtain NMR data;
(b) using a non-NMR tool to conduct additional measurements on the fluid to obtain non-NMR data; and
(c) determining an indication of the molecular composition of the hydrocarbon phase of the hydrocarbon-containing fluid by using the NMR data and the non-NMR data in an inversion process.

2. A method according to claim 1, wherein the inversion process comprises inverting the NMR data and using the non-NMR data to constrain the inversion of the NMR data.

3. A method according to claim 2, wherein the inversion is constrained by requiring the inversion to result in NMR distributions consistent with the non-NMR data.

4. The method according to claim 1, wherein the inversion process comprises combining the NMR data and the non-NMR data and inverting the combined NMR data and non-NMR data to obtain the indication of the composition of the hydrocarbon-containing fluid.

5. A method according to claim 1, wherein the non-NMR tool is an optical tool, the additional measurements are optical measurements, and the non-NMR data are optical data.

6. A method according to claim 5, wherein the inversion process comprises inverting the optical data and using the NMR data to constrain the inversion of the optical data.

7. A method of analyzing a molecular composition of a hydrocarbon phase of a hydrocarbon-containing formation fluid containing a plurality of hydrocarbons of different chain lengths, the method comprising:
(a) locating a nuclear magnetic resonance (NMR) tool and at least one additional non-NMR tool downhole in a formation;
(b) extracting the hydrocarbon-containing formation fluid from the formation;
(c) using the NMR tool to conduct downhole NMR measurements and to obtain NMR data on the extracted formation fluid and using the at least one additional non-NMR tool to conduct additional downhole measurements and to obtain non-NMR data on the extracted formation fluid; and
(d) determining an indication of the molecular composition of the hydrocarbon phase of the extracted formation fluid by using the NMR data and the non-NMR data in an inversion process.

8. A method according to claim 7, wherein the inversion process comprises inverting the NMR data and using the non-NMR data to constrain the inversion of the NMR data.

9. A method according to claim 8, wherein the inversion is constrained by requiring the inversion to result in NMR distributions consistent with the non-NMR data.

10. The method according to claim 7, wherein the inversion process comprises combining the NMR data and the non-NMR data and inverting the combined NMR data and non-NMR data to obtain the indication of the composition of the extracted formation fluid.

11. A method according to claim 7, wherein the indication of the molecular composition comprises a chain length distribution.

12. A method according to claim 7, wherein the NMR measurements comprise at least one of relaxation measurements and diffusion measurements.

13. A method according to claim 12, wherein the NMR data comprise at least one of NMR magnetization decays, distributions of NMR relaxation times, and distributions of NMR diffusion coefficients.

14. A method according to claim 8, wherein the non-NMR tool is an optical tool, the additional measurements are optical measurements, and the non-NMR data are optical data.

15. A method according to claim 14, wherein the optical data comprise at least one of optical spectra and optical densities.

16. A method according to claim 14, wherein the inversion process comprises inverting the optical data and using the NMR data to constrain the inversion of the optical data.

17. A method according to claim 16, wherein the NMR data comprises water and hydrocarbon volumes of the extracted formation fluid.

18. An apparatus for analyzing a molecular composition of a hydrocarbon phase of a hydrocarbon-containing formation fluid containing a plurality of hydrocarbons of different chain lengths, the apparatus comprising:
a nuclear magnetic resonance (NMR) borehole tool adapted for use downhole to conduct NMR measurements downhole and to obtain NMR data on the hydrocarbon-containing formation fluid;
a non-NMR borehole tool adapted for use downhole to conduct non-NMR measurements downhole and to obtain non-NMR data on the formation fluid;
a processor coupled to the NMR borehole tool and the non-NMR borehole tool, wherein the processor is configured to determine an indication of the molecular composition of the hydrocarbon phase of the formation fluid using the NMR data and the non-NMR data in an inversion process.

19. An apparatus according to claim 18, wherein the non-NMR borehole tool is an optical tool and the non-NMR data is optical data.

20. An apparatus according to claim 18, wherein the indication of the composition comprises a chain length distribution.