
[0001]
This application claims priority from provisional application Ser. No. 60/532,502, filed Dec. 24, 2003, the content of which is incorporated by reference for all purposes.
1. FIELD OF THE INVENTION

[0002]
This invention relates to systems and methods for determining the level of mud filtrate contamination in formation fluids.
2. BACKGROUND OF THE INVENTION

[0003]
Many oil industry applications require the analysis of downhole fluids. In the prior art this was typically done by bringing samples to the surface using sealed containers, and sending the samples for laboratory measurements. A number of practical limitations are associated with this approach. The main concern usually is that the samples taken to the surface may not be representative of the downhole geologic formation. This is due to the fact that only limited sample material from a limited number of downhole locations can be extracted and taken to the surface, and thus laboratory testing provides only an incomplete picture of the downhole conditions. Furthermore, samples are often contaminated with mud filtrate, and therefore are not truly representative of the native formation fluids.

[0004]
More recently, fluid analysis became possible using pumpout formation testers that provide downhole measurements of certain fluid properties and enable the collection of a large number of representative samples stored at downhole conditions. Three families of such tools have been introduced in the past—the modular dynamic formation tester (MDT) by Schlumberger, the Reservoir Characterization Instrument (RCI) by Baker Atlas, and most recently the Reservoir Description Tool (RDT) by Halliburton. These tools are generally designed to obtain representative formation fluid samples and provide key petrophysical information to determine the reservoir volume, producibility of a formation, type and composition of the movable fluids, and to predict reservoir behavior during production.

[0005]
One of the remaining problems encountered in the operation of such tools is to avoid contamination of the fluid naturally present in the formation with other fluids, in particular the various types of drilling muds used in drilling operations. Drilling mud, also known as drilling fluid, is typically pumped down the center of the hollow drill stem to emerge again at the surface of the borehole. It lubricates the drill shaft, cools the borehole, carries away the drilling detritus, and serves as a wettingphase, which facilitates the flow of hydrocarbons from the formation and into the borehole. Various types of drilling muds are generally classified based on the type of filtrate used therein. The mud filtrate chosen dictates the mud's function and performance, as well as formation invasion effects.

[0006]
There are two major types of mud filtrates: waterbased and oilbased. Waterbased mud (WBM) filtrates include, but are not limited to, freshwater, seawater, saltwater (brine) and others, or a combination of any of these fluids. In the oilbased mud (OBM), the filtrate is an oil product, such as diesel or mineral oil. More generally, oilbased mud is characterized as any type of nonaqueous fluid. For the purposes of the present disclosure, oilbased mud also includes the recently developed variety of oil mud that is also referred to as syntheticbased muds. These syntheticbased muds include, without limitation, olefinic, naphthenic, and paraffinicbased compounds. Dependent on the type of mud used in the drilling process, different factors affect the ability of the tool the accurately estimate the contamination levels at a given point during pumpout.

[0007]
For WBM drilling, mixing with the formation fluid is considered an immiscible process, and determination of the degree of contamination of the fluid using is relatively straightforward. More challenging is the problem of estimating the degree of contamination in OBM drilling when attempting to obtain high quality formation fluid samples, because these mud filtrate fluids are mixed in the formation oil. This mixing can be immiscible or miscible, but either way complicate the determination of the degree of contamination (with immiscible invasion the fluids to not dissolve with each other but mix, with miscible mixing the fluids dissolve in a diffusion process). For example, the presence of even small volumes of oilbase filtrate in the sample can significantly alter the properties of the formation oil. As a result, insitu quantification of the oilbase material contamination in the formation oil is difficult, and poorly quantified samples may not be representative of the formation fluid of interest.

[0008]
Additional difficulties are presented in differentiating oilbased mud from connate oil when oilbased filtrate invades the formation. One method for differentiating oilbased mud from connate oil is disclosed in U.S. Pat. No. 6,107,796, owned by the assignee of the present invention, which is incorporated herein by reference. However, no reliable method has been provided for determining the level of contamination of mud filtrate in formation fluids.

[0009]
The most frequently used prior art approach to estimating contamination has been based on the optical properties of the fluids entering a tool. Schlumberger provides for insitu contamination estimation using an Optical Fluid Analyzer (OFA). BakerAtlas also offers a service similar to the OFA. The OFA exploits the differences in the absorption spectrum (i.e., color contrast) between the OBM contaminant and the formation fluid to deconvolute the spectrum from a fluid measurement (see, e.g., U.S. Pat. Nos. 6,178,815, 6,274,865, 6,343,507 and 6,350,986, which are incorporated herein by reference for background). The OFA measures the optical density (OD) of the flowing fluid and uses empirical relationships to transform the OD into data on contamination by determining the composition of the measured absorbed light spectrum from the sample. Based on this absorption spectrum one can estimate the types of materials present in the fluid and the proportion of each material in the fluid. While the industry has learned how to interpret OFA data over the years, it still is not robust in certain applications where the color contrast is small, or is masked, as is frequently the case in light oils and condensates. One problem with this approach is that it assumes that the measured property is directly linked to the contamination, which may not necessarily be the case.

[0010]
Another approach to contamination estimation is to use electrical resistivity methods, which involve the measurement of the apparent resistivity of fluids entering the tool. While these measurements are straightforward to implement and, for example, can easily distinguish between oil and water it cannot reliably distinguish contaminants in OBM situations. Various other sensors measuring optical properties, resistivity, capacitance and others within formation sampling tools have been used to estimate levels of fluid contamination during the pumpout phase, but no robust solution has been found yet.

[0011]
A more recent approach to contamination estimation is provided by the use of nuclear magnetic resonance (NMR) measurements. NMR measurements of geologic formations may be done using, for example, the MRIL® tool made by NUMAR, a Halliburton company, and the CMR family of tools made by Schlumberger. Details of the structure of the MRIL® tool and the measurement techniques it uses are discussed in U.S. Pat. Nos. 4,710,713; 4,717,876; 4,717,877; 4,717,878; 4,939,648; 5,055,787; 5,055,78; 5,212,447; 5,280,243; 5,309,098; 5,412,320; 5,517,115, 5,557,200; 5,696,448; 5,936,405; 6,005,389; 6,023,164; 6,051,973; 6,107,796; 6,111,408; 6,242,913; 6,255,819; 6,268,726; 6,362,619; 6,512,371; 6,525,534; 6,531,868; 6,541,969; 6,577,125 and 6,583,621, all of which are commonly owned by the assignee of the present application. The CMR tool is described, for example, in U.S. Pat. Nos. 5,055,787 and 5,055,788 to Kleinberg et al. and further in “Novel NMR Apparatus for Investigating an External Sample,” by Kleinberg, Sezginer and Griffin, J. Magn. Reson. 97, 466485, 1992. NMR devices, methods and pulse sequences for use in logging tools are also in U.S. Pat. Nos. 4,350,955 and 5,557,201. The content of the above patents and publications is hereby expressly incorporated by reference for background. A brief discussion of the main NMR measurement parameters follows.

[0012]
Basic NMR Properties and Measurement Parameters

[0013]
NMR measurements are based on exposing an assembly of magnetic moments, such as those of hydrogen nuclei, to a static magnetic field. The assembly tends to align along the direction of the magnetic field, resulting in a bulk magnetization. A magnetic field having direction perpendicular to the static magnetic field is applied to rotate the magnetic moments away from the direction of the bulk magnetization. The rate at which the rotated moments return to the equilibrium bulk magnetization after application of the oscillating magnetic field is characterized by the parameter T_{1}, known as the spinlattice relaxation time. T_{1 }values are in the range of milliseconds to several seconds.

[0014]
Another related and frequently used NMR parameter is the spinspin relaxation time constant T_{2 }(also known as transverse relaxation time), which is an expression of the relaxation due to inhomogeneities in the local magnetic field over the sensing volume of the fluid in the analyzer, e.g., a logging tool. In bulk fluids T_{2 }basically equals T_{1}, but may differ in heavy oil components, such as asphaltenes, resins, etc. Both relaxation times provide information about the properties of the formation fluid, such as the formation porosity and the composition and quantity of the formation fluid.

[0015]
Another measurement parameter used in NMR is the formation diffusivity. Generally, diffusion refers to the motion of atoms in a gaseous or liquid state due to their thermal energy. The selfdiffusion coefficient (D) of a fluid is inversely proportional to the viscosity (η) of the fluid, a parameter of considerable importance in borehole surveys. Stokes' equation yields that:
D∝kT/η, (k=1.38×10^{−23 }J/K) (1)

[0016]
Viscosity and diffusivity are both related to the translational motion of molecules and therefore are interrelated. At higher temperatures T, a molecule contains more energy and can move faster against a given “friction” η, therefore D is proportional to the temperature. Diffusivity is a property that can be precisely determined by NMR techniques without disturbing or altering the fluid. The relationship D∝T/η has been verified over a wide range of viscosities at different temperatures and pressures by NMR spinecho experiments.

[0017]
Relationships involving the NMR relaxation times T_{1 }and T_{2 }must be examined with care. The applicability of expressions of the form:
T_{1}, T_{2}∝kT/η (2)
is more limited than that of Eq. (1). The main reason is that gas/liquid mixtures have more than one relaxation mechanism: dipoledipole for the liquid phase and mainly spinrotation for the gas phase.

[0018]
In a uniform magnetic field, diffusion has little effect on the decay rate of the measured NMR echoes. In a gradient magnetic field, however, diffusion causes atoms to move from their original positions to new ones, which also causes these atoms to acquire different phase shifts compared to atoms that did not move. This contributes to a faster rate of relaxation.

[0019]
Recently, Halliburton introduced MRILab®, a logging tool with the ability to analyze key reservoir fluid properties, including fluid type, viscosity and gastooil ratio (GOR), in realtime at reservoir temperature and pressure. MRILab® is based on NMR measurements and operates as a component of Halliburton's Reservoir Description Tool™ (RDT), making laboratoryquality measurements on reservoir fluids that are necessary for reservoir engineering and completion design. FIG. 5 shows a simplified diagram of a downhole NMR fluid analysis apparatus, such as the MRILab®, that provides NMR measurements to which the contamination estimation methods of the present disclosure can be applied in an illustrative embodiment. Fluids enter the device at the top and pass through two sections, referred to as polarization and resonance sections, respectively. Measurements are performed as the fluid flow passes through the device. U.S. application Ser. No. 10/109,072, which is hereby incorporated by reference, discloses details of this device, which are summarized for reference in Appendix A.

[0020]
Turning back to the problem of contamination estimation, the fundamental difficulty in NMRbased approaches to such estimation is the lack of models that can predict the relaxation spectrum (i.e., the T_{1 }or T_{2 }spectrum) of a mixture of two fluids that are miscible. Existing NMR methods for estimating contamination, including when the MRILab® was first introduced, were based initially on a parameter called “sharpness.” The sharpness of an NMR distribution is defined as:
$\begin{array}{cc}\begin{array}{cc}S=\frac{N\text{\hspace{1em}}\sum _{i}{{a}_{i}^{2}\left(\sum _{i=1}^{N}{a}_{i}\right)}^{2}}{\left(N1\right){\left(\sum _{i}{a}_{i}\right)}^{2}},& \mathrm{for}\text{\hspace{1em}}1\le i\le N,\end{array}& \left(3\right)\end{array}$
where a_{i }are the amplitudes, and N is the number of components in a T_{1 }distribution. (See Bouton, J. et al. “Assessment of Sample Contamination by Downhole NMR Fluid Analysis”, SPE71714, presented at SPE ATCE, New Orleans, La. (2001) incorporated herein for background). Although it was thought that sharpness was sensitive to contamination levels down to 10%, experience has shown that sharpness in general is not a very robust indicator of contamination.

[0021]
The driving idea behind the use of the sharpness parameter was that, while OBM has a narrow distribution (implying a lower S value), distributions associated with native crudes are broader. However, relaxation spectra of low viscosity crudes are also very narrow and in the low viscosity/high GOR case, it may not be possible to distinguish one species from the other. Furthermore, both bulk water and natural gas have narrow distributions. The information from sharpness is relative, in that it is an indicator of the changes taking place, but it may not be sufficient to define end point states quantitatively. Additionally, the sharpness parameter is derived from the T_{1 }distribution, which to a certain extent can be affected by the level signaltonoise ratio (SNR) or distribution shape, which may lead to changes in the T_{1 }spectra that are unrelated to changes in contamination.

[0022]
Given the difficulties using the prior art approaches, there exists a need for more accurate and robust methods for determining the level of contamination of mud filtrate in formation fluids.
3. SUMMARY OF THE INVENTION

[0023]
The present invention provides a novel approach for determining the level of contamination in formation fluids. As used herein, a contaminant could be any fluid originating from mud filtrate that invades the reservoir during the drilling of a well; contamination (c) is the volume fraction of the contaminant in a fluid sample, where 0≦c≦1. The following additional terms and expressions are used in the description of the proposed approach: a contamination function is a temporal function that substantially matches the behavior of the contamination fluid fraction while pumping a sample from an invaded zone. More generally, a contamination function is applicable to multiplecomponent fluid systems including systems comprised of miscible or immiscible liquids, including liquids containing dissolved, suspended or dispersed solids. Unless the context indicates otherwise, the term “fluid mixture” includes in its meaning a mixture of liquids (either miscible or immiscible) or a liquid containing soluble, suspended or dispersed solids. In accordance with the proposed approach, a contamination function is a mathematical model that may be derived, for example, through simulations or observation.

[0024]
A mixing law (or mixing rule), as used in this disclosure, is a mathematical function that describes a property of a mixture in terms of the properties of its constituents. A mixing law would thus allow for the property of the mixture to be predicted if the weight or volume functions for the constituents, and the properties of these constituents, are known. Several examples of mixing laws are provided in the illustrative embodiment in which the physical property of the fluid being monitored is its viscosity. Different mixing laws may apply for other physical properties. In general, all that is required for the mixing law is to provide a mathematical expression that relates a property of a fluid mixture in terms of the constituent components properties (i.e., the values of such property for 0% and 100% contamination, respectively).

[0025]
Using these definitions, the proposed contamination estimation approach is based on the use of a contamination function that describes the time behavior of a particular physical property of the mixture of fluids entering a tool, and a mixinglaw or rule that is used to estimate the volume fractions of the constituent fluids given information about or measurements of the bulk physical property. In a specific illustrative embodiment, the physical property is viscosity, which is monitored indirectly using relaxation measurements (i.e., T_{1 }or T_{2}) obtained from an NMR fluid analyzer, such as the MRILab® fluid analyzer. Other physical properties that can be used in alternate embodiments include resistivity, capacitance, density, hydrogen index, compressibility, speed of sound, pumping pressures, optical density, and others.

[0026]
In particular, the determined values of one or more of the above fluid properties over time are fit to a parameterized contamination function. By matching a contamination function to the fluid property measured over a period of time, the variables of this time function are determined, for example, through regression. Once the variables of the contamination function are determined, this function can predict how the fluid property changes over time. Then, the mixing law function that relates fluid fractions to the bulk fluid property can be used to estimate the actual contamination over past or future time periods.

[0027]
In one type of embodiments, the contamination function used to predict the fluid property is either independent or substantially independent from the fluid fractions in the mixing law. These embodiments are referred to as uncoupled or loosely coupled contamination models. In other embodiments, the mixing laws are taken into account in tracking the bulk fluid property over time, resulting in a coupled contamination modeling. Different examples of such models are illustrated in the specific embodiments described below.

[0028]
In specific embodiments monitoring viscosity using NMR measurements, several empirical contamination functions can be used in accordance with the proposed approach, including the exponential, the error and several versions of the arctan contamination functions, as defined below. In another aspect of this disclosure, the logmean value of a NMR spectrum, in particular the logmean T_{1 }value (T_{1Lm}) is shown to track the viscosity or other properties of the fluid and is used as an indirect property measurement. From the contamination function that best fits the empirical data, and a mixing law that includes estimates of the property values at two different contamination levels (typically at 0% and 100% contamination) one can compute the contamination index of the fluid (considered below) as a function of time. In the illustrative embodiments using viscosity as the monitored physical parameter, various mixing laws, such as those proposed by Todd et al., the powerlaw, various modifications of the Arrhenius law could be used, either coupled with or uncoupled from the select contamination function to estimate the desired contamination index.

[0029]
It will be appreciated that the mathematical modeling approach based on the use of contamination function and mixing law can be used to estimate the level of contamination of a sample taken at a particular time, to compute the time required to reach certain contamination level during pumping, or to derive other parameters of interest during oil exploration.

[0030]
Various modifications of this general approach can be used in practice. For example, the contamination function used in a particular experiment may be determined in advance through prior knowledge. Further, the accuracy of prediction can be improved if one has a priori knowledge about the monitored property value at 0% and 100% contamination. In alternative embodiments, several contamination functions corresponding to different physical properties can be used to monitor the time behavior of the fluid mixture entering the tool. These embodiments are based on the observation that in certain fluid mixtures one property may be more sensitive than others to the contaminant. Accordingly, an array of devices can be used in such embodiments to measure different fluid properties. Using this approach, for example, different contamination estimates can be combined into a single average contamination estimate. Individual contamination estimates may be weighted, possibly using nonlinear regression techniques. As is the case with MRILab® estimates of viscosity, the formation fluid properties can be more accurately predicted because the end points are used to determine the insitu sample properties.

[0031]
Accordingly, it is an object of this disclosure to provide methods for estimation of the level of contamination in the fluids flowing through an analyzer tool. Another object of the disclosure is to provide methods for estimating the pumping time needed to achieve a certain contamination threshold level. Yet another object of the disclosure is to provide methods for monitoring at least one physical property of the fluid entering the tool, such as its viscosity, and based on mixing laws that are known or can be derived use the monitored property to derive an estimate of the contamination level. Additional objective is to provide a computationally efficient algorithm for contamination estimation that can be implemented substantially in real time.

[0032]
Accordingly, in one aspect, the invention is a method for estimating levels of contamination of formation fluids in a borehole, and a corresponding system implementing the steps of: (a) providing a first mathematical contamination function model which expresses a time behavior of one or more fluid properties of a mixture of formation fluids and contamination fluids drawn from a borehole, where said one or more fluid properties are sensitive to the fraction of contamination fluids in the mixture; (b) providing a second mathematical mixing law function model expressing at least one of said one or more fluid properties of a fluid mixture in terms of corresponding properties of formation fluids and contamination fluids in the mixture; (b) drawing fluids from the borehole into a fluid analyzer; (c) measuring at least one of said one or more properties of the drawn fluids by the analyzer; and (d) estimating the level of contamination in the fluids drawn from the borehole at one or more points in time based on the at least one measured fluid property and the provided mathematical models in step (a) and step (b).

[0033]
In another aspect, the invention is a method for downhole formation testing, comprising the steps of: (a) providing measurement signals corresponding to a mixture of formation fluids and contamination fluids drawn from a borehole, the mixture entering a downhole fluid analyzer; (b) based on the provided measurement signals, determining parameters of a contamination function, which expresses the time behavior of one or more fluid properties of the fluid mixture drawn from the borehole; (c) computing from the determined contamination function of a value estimate of said one or more fluid properties for at least one low level of contamination and for at least one high level of contamination; and (d) computing a contamination index for the mixture of fluids drawn from the borehole at different time instants based on the computed value estimates and a fluid mixing law relating properties of the drawn fluids in terms of the corresponding properties of the formation fluids and the contamination fluids.

[0034]
Other aspects of the disclosure are discussed in the following detailed description, and are defined in the attached claims.
4. BRIEF DESCRIPTION OF THE DRAWINGS

[0035]
FIGS. 1A and 1B show T_{1 }data and data analysis from several experiments performed under downhole conditions;

[0036]
FIG. 2 shows the results of sample quality vs. time (seconds) simulations for an oilbased mud (OBM) systems, where sample quality is given in percentages;

[0037]
FIG. 3 shows the results of sample quality vs. time (seconds) simulations for a waterbased mud (WBM) system at 10 cc/sec pumping rate, where sample quality is given in percentages;

[0038]
FIG. 4 illustrates the use of NMR fluid analyzer measurements for contamination estimation in one embodiment;

[0039]
FIG. 5A is a schematic diagram of a downhole NMR fluid analyzer; FIG. 5B is a simplified version;

[0040]
FIGS. 6AD illustrate horizontal cross sections of the analyzer shown in FIGS. 5A and B;

[0041]
FIG. 7 illustrates a schematic block diagram of the electronics of the analyzer in one embodiment;

[0042]
FIG. 8 illustrates a saturation recovery pulse sequence diagram used for T_{1 }measurements;

[0043]
FIG. 9 shows T_{1 }saturationrecovery data for three different fluids as seen in an NMR fluid analyzer;

[0044]
FIG. 10 shows a replot in the T_{1 }domain of the data shown in FIG. 9;

[0045]
FIG. 11 illustrates a pulse sequence employed for diffusivity measurements;

[0046]
FIG. 12 shows a diffusivity measurement;

[0047]
FIG. 13 shows the results of contamination estimation for the data shown in FIG. 1A using a Coupled Logmean T_{1 }model;

[0048]
FIG. 14 shows the results of contamination estimation for the data shown in FIG. 1A using an immiscible fluid model.
5. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0049]
The principal objective of contamination estimation is to secure fluid samples with low levels of contamination for proper Pressure Volume Temperature (PVT) analysis. Another objective is to predict when to stop pumping with a high level of confidence as to not waste rig time on unnecessary clean up pumping. Improved contamination estimates increase the accuracy of the log analysts' data interpretation, and help to provide better estimates of permeability and anisotropy from the pumpout data.

[0050]
The proposed contamination estimation approach described in different embodiments below is based on the use of one or more contamination functions describing the time behavior of a particular physical property of a mixture of fluids entering a tool; and one or more mixinglaw models that can be used to estimate the volume fractions of the constituent fluids given information about or measurements of the physical property. In a specific illustrative embodiment considered below, the physical property is viscosity, which is monitored using indirect measurements, i.e., T_{1 }measurements obtained from an NMR fluid analyzer. Other physical properties that can be used in different embodiments include resistivity, capacitance, density, hydrogen index, compressibility, speed of sound, pumping pressures, optical density, and others. Contamination estimation in accordance with this approach is done for both miscible fluids (i.e., OBM applications) and immiscible fluids (i.e., WBM applications). Accordingly, different contamination models are based on different set(s) of specific assumptions or requirements, and each model may have its particular strengths over the others. Mathematically, the time changes of the contamination index CI over the pumping can be expressed as:
CI(t)=fc(α_{1}, α_{2, }α_{m,} , t) (4)
where α_{1/2 }are the end points in the property values (0% and 100% contamination), and α_{m }is the measured property value. Turning first to the mixing law modeling problem, in the simplest case a bulk fluid property may be assumed to depend linearly on the corresponding properties of the constituent fluid volume fractions (i.e., on a linear combination of the contamination and virgin reservoir fluids). For example, light absorption is proportional to the volume fraction of the constituent fluids. Thus, if the end point properties of the fluid mixture (0% and 100% contamination) are known or can be estimated, and there is sufficient contrast in the property of the contaminant and the reservoir fluid, measurement of the bulk property enables straightforward contamination determination.

[0051]
In the more general case, however, the mixing law is nonlinear and the end point property values are unknown. Consider for example viscosity. As set forth in Eq. (2), viscosity is inversely proportional to the T_{1 }relaxation parameter in a NMR measurement, which can be obtained substantially in real time using a fluid analyzer. Accordingly, models based on the time or T_{1 }domain NMR signatures of the fluids can be used for contamination estimation in immiscible fluids, as discussed below. But such models in general are unsuitable for miscible fluids, because there is no simple mixing rule that relates the endpoint NMR properties to the measured NMR property as a function of the constituent fluid component saturations.

[0052]
In accordance with one important aspect of the disclosure, the approaches in this application are based on the observation that the logmean value of an NMR parameter varies with contamination over time. Previous research has shown that the echo amplitudes in NMR measurements of a fluid entering a fluid analyzer change with time, and as a result have developed time dependent models where an empirical relationship was used to curve fit the echo amplitude changes and to relate the combined time decays to contamination. The embodiment(s) discussed below are based on the observation that logmean T_{1 }(T_{1Lm}) shifts with contamination over time, rather than on the tracking of individual T_{1 }amplitudes. This observation is also applicable to the variation in the logmean value of other NMR parameters with contamination over time.

[0053]
In particular, the logmean T_{1 }shift over time can be attributed to changes in viscosity as the fluid being pumped changes to different proportions of filtrate oil or water. A study of field results from an NMR fluid analyzer, as well as multiphase forward modeling results, shows that contamination (c) varies with time (t) in a predictable pattern. Therefore, a possible solution to the contamination estimation problem for miscible fluids is to use an indirect property, such as T_{1Lm}, the logmean T_{1}. T_{1Lm }is inversely related to viscosity and can be used to estimate contamination when combined with a mixing law that is based on viscosities of two miscible fluids. Because the logmean T_{1 }is used in the illustrative embodiments discussed below, some explanation and definitions are in order.

[0054]
Calculation of LogMean T_{1 }Values

[0055]
In one embodiment, the contamination estimation models are applied to a logmean value derived from one or more NMR measurements. The derivation of the logmean value of a T_{1 }spectrum is presented below in a preferred embodiment. However, similar relations apply for deriving the logmean value of other spectra obtained by NMR measurements, such as a T_{2 }spectrum or diffusivity spectra. Modifications and variations of the approaches, disclosed herein, based on the use of a logmean value of an NMRbased measurement will be apparent to one of ordinary skill in the art without undue experimentation.

[0056]
As noted, in a preferred embodiment, the contamination estimation models are applied to logmean T_{1 }values. The logmean T_{1 }of a T_{1 }spectrum is calculated using the expression:
$\begin{array}{cc}\mathrm{log}\left({T}_{1\mathrm{Lm}}\right)=\frac{\sum _{j}{a}_{j}\text{\hspace{1em}}\mathrm{log}\left({T}_{1j}\right)}{\sum _{j}{a}_{j}},& \left(5\right)\end{array}$
where a_{j }are the amplitudes of a given T_{1 }spectrum, and j is the number of T_{1 }bins used in the inversion.

[0057]
The typical range for the T_{1 }relaxation parameter is from about 1 ms to 20,000 ms. In one embodiment, all of the amplitudes that cover the measured range are used in the computation of T_{1Lm}. In alternative preferred embodiments, T_{1Lm }may be computed for a subset of T_{1 }spectrum values, either to reject noisy components in the spectrum, or to focus around a certain T_{1 }range, where the change in energy contained in that particular band has a large dynamic range as a function of time. In alternate embodiments, the T_{1 }spectrum can be subdivided into several bands, and the corresponding T_{1Lm }for each band is then computed. This subdivision can be based on computational simplicity or observations concerning the temporal characteristics of different T_{1 }subbands.

[0058]
Accordingly, in one embodiment, contamination estimation is based on the use of one or more of the bands of a subdivided T_{1 }spectrum. A band of the T_{1 }spectrum can be selected on the basis of one or more desired criteria, such as maximum dynamic range, longest center T_{1 }value, and others.

[0059]
In another embodiment, contamination estimation is based on a combination of the bands of the subdivided T_{1 }spectrum. The contamination estimates resulting from the application of the one or more contamination estimation models to different bands of the subdivided T_{1 }spectrum can be combined in a number of different ways, either linearly or nonlinearly, to form an averaged contamination estimate.

[0060]
FIGS. 1A, B give an example of the computation of T_{1Lm }from the T_{1 }distributions in OBM logging experiments. Panel 10 shows MRILab® T_{1 }measurements (in milliseconds) from ninetyone successive OBM logging experiments (uncorrected for flow). Vertical scale 12 shows the experiment number in sequential order, from earlier times (top) to later times (bottom). Panel 14 shows the apparent hydrogen index for each experiment, which is derived from the area under the T_{1 }distribution (discussed below). The hydrogen index is about 0.7 for a majority of the experiments. The tool has stopped pumping at the very bottom of the chart, therefore at the very end the hydrogen index is about 1. The fit error for each wait time group is shown in panel 16. Panel 10 also shows the corresponding T_{1Lm }(connected diamond markers), calculated from the MRILab® T_{1 }distributions for each experiment (solid curves). Variations in the T_{1 }distributions and T_{1Lm }include contributions due to changes in contamination and flow rate. The center of the T_{1 }distributions is around 3.5 seconds for a majority of the experiments.

[0061]
Viscosity Estimates Using NMR Measurements

[0062]
The viscosity of a crude oil can be estimated from the T_{1Lm }value by the following empirical relationship:
$\begin{array}{cc}\eta =0.009558\text{\hspace{1em}}\frac{{T}_{k}}{{T}_{1\mathrm{Lm}}},& \left(6\right)\end{array}$
where T_{1Lm }is the logmean T_{1 }value, T_{k }is the absolute temperature in degrees Kelvin, and viscosity is in units of centipoise. A poise is a centimetergramsecond unit of dynamic viscosity, equal to one dynesecond per square centimeter. The relationship between the viscosity of crude oil and the logmean value of other NMR parameters can be empirically estimated or approximated using Eq. (6) in combination with a measurement of the logmean T_{1 }value, and applied to any of the viscosity mixing rules and/or contamination models presented below or otherwise known in the art. The T_{1Lm }can be used to estimate contamination when combined with a mixing law that is based on viscosities of two miscible fluids, as discussed in further detail below.

[0063]
The viscosity relationship of Eq. (6) is an approximation for use mainly with “dead” oils. For “live” oils, which contain gas components, a better viscosity estimate is:
$\begin{array}{cc}\eta =0.009558\text{\hspace{1em}}\frac{{T}_{k}}{f\left(\mathrm{GOR}\right){T}_{1}}& \left(7\right)\end{array}$
where T_{1Lm }is approximated by T_{1 }times a function of the gasoilratio (GOR).

[0064]
Viscosity Mixing Rules

[0065]
As noted, a mixing law or rule is a mathematical expression that describes a property of a mixture in terms of the properties of its constituents. This allows for the property of the mixture to be predicted if the weight or volume fractions or functions for the constituents, and the properties of the constituents are known.

[0066]
It has been concluded that no single mathematical expression could represent the viscosities of all hydrocarbon mixtures. See Shu, W. R., “A Viscosity Correlation for Mixtures of Heavy Oil, Bitumen, and Petroleum Fractions”, SPEJ, June, 277282 (1984). This accounts for the variety of mixing rules that are known or can be developed, all of which may be used in accordance with different embodiments.

[0067]
Several empirical viscosity mixing rules exist that relate the measured viscosity of a miscible mixture to the volume fractions of the endpoint viscosities, i.e., to the viscosity of each individual component. The four most commonly used relations are listed in the following table:


  
${\eta}_{m}=\frac{{\eta}_{1}{\eta}_{2}}{{\left[{s}_{1}{\eta}_{2}^{1/n}+{s}_{2}{\eta}_{1}^{1/n}\right]}^{n}},$  (Todd et al).  (8) 

${\eta}_{m}={\left[{s}_{1}{\eta}_{1}^{n}+{s}_{2}{\eta}_{2}^{n}\right]}^{1/n},$  (Power −Law),  (9) 

ln(η_{m}) = s_{1}ln(η_{1}) + s_{2 }ln(η_{2}),  (Arrhenius),  (10) 

$\mathrm{ln}\left({\eta}_{m}\right)=\frac{{\mathrm{\alpha s}}_{1}}{{\mathrm{\alpha s}}_{1}+{s}_{2}}\mathrm{ln}\left({\eta}_{1}\right)+\left[1\frac{{\mathrm{\alpha s}}_{1}}{{\mathrm{\alpha s}}_{1}+{s}_{2}}\right]\mathrm{ln}\text{\hspace{1em}}\left({\eta}_{2}\right),$  (Modified Arrhenius).  (11) 


[0068]
In the above equations, η_{m }is the measured viscosity of the mixture, η_{1 }and η_{2 }are the end point viscosities (i.e., the viscosity of each component of the mixture), s_{1 }and s_{2 }are their respective volume fractions (or saturations), while n and α are empirically determined nonnegative constants. Note that s_{1}+s_{2}=1, and if it is taken that c=s_{1}, then s_{2}=1−c, where c is the level of contamination.

[0069]
The value of n is typically 4 in the viscosity mixing rule in Eq. (8), developed by Todd, M. R., et al. “The Development, Testing and Application of a Numerical Simulator for Predicting Miscible Flood Performance,” Journal of Petroleum Technology (1972).

[0070]
In Eqs. (9) or (10), s_{1 }and s_{2 }may represent a mass fraction, a mole fraction, or a volumetric fraction. In exponent n in the PowerLaw mixing rule in Eq. (9) is an adjustable value that depends upon the components and the proportions in the mixture. The Arrhenius rule in Eq. (10) is also known as the log mixing rule.

[0071]
The fourth mixing rule in Eq. (11), is a modified version of the classic Arrhenius expression, which was originally proposed by Lederer, E. L., Proc. World Pet. Cong., vol. 2, pp. 52628, London (1933). The constant α is found empirically and has values between 0 and 1. The volume fractions s_{1 }and s_{2 }are associated with the contaminant and the oil, respectively. Rhames et al. examined this equation for mixtures with low viscosity ratios η_{1}/η_{2}, and found that this function expression provided an excellent fit to their data. See Rhames, M. H., et al. “Viscosity Blending Relationships of Heavy Petroleum Oils”, Analytical Chemistry, vol. 20, pp. 912915 (1948). Other researchers used the same functional expression for mixtures of high viscosity ratios typical of bitumen and solvent fractions. Shu, W. R., “A Viscosity Correlation for Mixtures of Heavy Oil, Bitumen, and Petroleum Fractions”, SPEJ, pp. 277282 (1984). Shu correlated the parameter α with properties characteristic of the individual mixture components including the viscosity and the densities of solvent and oil.

[0072]
As described below, in different embodiments one or more of the viscosity mixing rules can be applied to the logmean value of an NMR spectrum, or the logmean value of one or more subdivided bands of the NMR spectrum, for estimating the viscosity of a formation fluid contaminant and/or a hydrocarbon phase in a formation fluid. The contamination estimation methods in accordance with the approach proposed herein will vary according to the chosen viscosity mixing rule. Several variations of the contamination estimation models are described below.

[0073]
Modeling the Contamination Function

[0074]
In addition to the mixing rules considered above in illustrative embodiments, the contamination estimation approach in this application is based on the use of a contamination function, which is a temporal function that substantially matches the behavior of the contamination fluid fraction while pumping a sample from an invaded zone.

[0075]
As a result of a large number of simulations with miscible and immiscible mud systems, as well as studying the behavior of MRILab® field results, the following models have been developed to describe the time dependent behavior of the contamination function c(t), in accordance with different embodiments:


  
$c\left(t\right)={a}_{3}+{a}_{1}\text{\hspace{1em}}\mathrm{arctan}\left(\frac{{t}^{p}}{{a}_{2}}\right),$  (ArcTan),  (12) 

c(t) = a_{3 }− a_{1 }exp(−t^{p}/a_{2}),  (Exponential,)  (13) 

$c\left(t\right)={a}_{3}+{a}_{1}\text{\hspace{1em}}\mathrm{arctan}\left(\frac{t{a}_{4}}{{a}_{2}}\right),$  (ArcTan − Shifted 1),  (14) 

c(t) = a_{3 }+ a_{1 }arctan(t^{p }+ a_{2}),  (ArcTan − Shifted 2),  (15) 

$c\left(t\right)={a}_{3}+{a}_{1}\text{\hspace{1em}}\mathrm{arctan}\left(\frac{{t}^{p}}{{a}_{4}}+{a}_{2}\right),$  (ArcTan − Shifted 3),  (16) 

$c\left(t\right)=\frac{1}{2}\frac{1}{2}\mathrm{erf}\left[{a}_{2}\text{\hspace{1em}}\mathrm{log}\left(\frac{t}{{a}_{1}}\right)\right],$  (Error Function)  (17) 


[0076]
In the models above, a_{1}, a_{2}, a_{3}, a_{4 }and p are constants, and erf is the error function defined as:
$\begin{array}{cc}\mathrm{erf}\left(x\right)=\frac{2}{\sqrt{\pi}}{\int}_{0}^{x}{e}^{{t}^{2}}\text{\hspace{1em}}dt.& \left(18\right)\end{array}$

[0077]
The idea in accordance with the proposed approach is to fit the determined values of one or more fluid properties, such as viscosity, over time to a parameterized contamination function as shown in the table. By matching a contamination function to the fluid property measured over a period of time, the variables of this time function are determined, for example, through regression. Matching could be done over the individual functions listed. For example, the error function in Eq. (17) is a solution for welldefined cases of invasion and these curves have a strong resemblance to the form of a sample quality function given by ƒ_{sq}(t)=1−c(t), where ƒ_{sq }is the sample quality (0 to 1, dimensionless), c(t) is given by Eq. (17), t is time, a_{1 }is time at 50% contamination, and a_{2 }is the time scaling parameter. A detailed numerical simulation study was performed to determine the pumpout contamination versus time.

[0078]
FIG. 2 shows the results of a large number of sample quality simulations with OBM systems using a sample quality function developed from the Landmark VIP reservoir simulator. Invasion was simulated first and used as the initial condition for the sampling pumpout sequence. The contamination curves were developed by tracking the volume fraction of the fluids entering the sampling tool.
FIG. 3 shows how these simulations can be closely mimicked using the Error Function contamination function in Eq. (17). The parameter a
_{1 }controls the shape of the curve (inflection point at 50% contamination) and has units of time. The dimensionless parameter a
_{2 }scales the independent variable t. Typical ranges for a
_{1 }and a
_{2}, for OBM systems are

 0.50≦a_{1}≦100, and
 0.50≦a_{2}≦0.75.

[0081]
The other contamination functions in the preceding table (Eqs. 1216) can be matched to the simulated curves in a similar manner. Experience with field data, the mixing models and the sensor data aids in determining the best contamination model for a particular fluid property. More specifically, in a preferred embodiment, matching can be done by defining a vector ρ of unknown parameters: ρ=[a_{1}, a_{2}, a_{3}, a_{4}, p]_{T}. The objective is to adjust the vector of unknown parameters such that the time function c(t) matches the measured fluid property data. Thus, to determine ρ, in a specific embodiment a nonlinear least squares problem is posed and solved such that the following function is minimized, as known in the art:
$\underset{\rho}{\mathrm{min}}\text{\hspace{1em}}\sum _{i=1}^{N}{\left({\hat{\eta}}_{m}\left(i\right){\eta}_{m}\left(i\right)\right)}^{2}$
where i denotes an experiment, N denotes the total number of experiments in the dataset and the measurement is done using estimated values for the bulk fluid viscosity. Based on two recent studies of laboratory data, as well as MRILab® data it appears that the Eq. (16) has the greatest potential of accurate results. After the optimizer has determined the unknown parameters, the viscosity index of the contaminant η_{1 }and of the formation fluid η_{2 }is determined by extrapolating c(t) to t=0; and t=∞ respectively.

[0082]
It will be appreciated that the application of the contamination estimation methods of this disclosure vary according to the contamination model chosen to be applied, for example, i.e., to an NMR spectrum, or to one or more subdivisions of the NMR spectrum. The methods may also change dependent on whether the contamination model is applied in conjunction with one or more mixing rules.

[0083]
Variations of the Miscible Fluid Models (MFMs)

[0084]
The above modeling is applicable to OBM applications, in which it is assumed that contamination is the result of mixing miscible fluids. Accordingly, the proposed models are termed Miscible Fluid Models (MFM). As noted before, in the case of miscible fluids, the challenge in contamination estimation is to find a mixing rule that relates the endpoint fluid properties to a measured bulk fluid property as a function of their saturations; and the basic approach to MFM in preferred embodiments is to relate the viscosity of the mixture to the logmean value of an indirect property measurements, such as the logmean T_{1 }(T_{1Lm}).

[0085]
This section provides four variations of the contamination estimation methods used in different embodiments, based on four different contamination estimation models. It will be appreciated that other contamination estimation models can be formulated from variations of the approaches discussed herein. While the contamination estimation models are described relative to T_{1 }spectra and the logmean T_{1 }value (T_{1Lm}), the variations of the contamination estimation methods, based on contamination estimation models that are expressed in terms of other NMR measurement parameters, including, but not limited to, T_{2 }and diffusivity measurements, are also envisioned and will be appreciated by those of skill in the art.

[0086]
Implicit LogMean T_{1 }(ILMT1)

[0087]
At present, there is no model that can fully predict the T_{1 }spectrum of a miscible mixture, given the T_{1 }spectra of the end points and their volume fractions in the mixture. In the reallife cases, strictly speaking neither the end point spectra, nor the volume fractions are known. However, given that T_{1Lm }is correlated to viscosity and that the viscosity mixing laws predict two very clearly defined end points, one can reason that T_{1Lm }is a bounded function, where the asymptotes at time zero and infinity correspond to the T_{1Lm }of the contaminant and the formation fluid (e.g., the crude), respectively.

[0088]
A first embodiment of the invention, called the Implicit Logmean T_{1 }(ILMT1) model, provides that the two limits can be defined as follows:
lim c(t)=T _{1Lm,0 }
t→0 (19)
lim c(t)=T _{1Lm,∞}
t→∞ (20)

[0089]
In the ILMT1 model, the T_{1Lm }values are fit using a contamination model in order to compute the two limits given in Eqs. (19) and (20). Given these two quantities, the contamination level at time t_{k }is determined in the ILMT1 model using the relation:
$\begin{array}{cc}c\left({t}_{k}\right)=\frac{\uf603{T}_{1\mathrm{Lm}}\left({t}_{k}\right){T}_{1\mathrm{Lm},\infty}\uf604}{\uf603{T}_{1\mathrm{Lm},0}{T}_{1\mathrm{Lm},\infty}\uf604}& \left(21\right)\end{array}$

[0090]
The parameter c(t) is assumed to conform to the shape of one of the contamination function models discussed above. The problem to be solved is an overdetermined nonlinear least squares problem, where the parameters in the contamination function are solved using wellknown nonlinear leastsquares (NLLS) solvers.

[0091]
In one embodiment, the level of contamination of a formation fluid or an estimation of the pumping time needed for achieving a given contamination level can be provided based on application of the ILMT1 contamination estimation model. In a specific embodiment, using the ArcTanShifted 2 contamination model in Eq. (15), the model is solved (using NLLS techniques) to compute the parameters a_{1}, a_{2}, a_{3}, and p. The limits of the function are then calculated using the computed parameters to obtain the T_{1Lm }for the endpoints (see Eqs. 19 and 20). Finally, Eq. (21) is used to compute the contamination at time t_{k}. The contamination estimate at time t_{k }can then be used to estimate the pumping time necessary for achieving a given contamination level. This estimation can be based on examining the timefunction of the contamination parameter.

[0092]
In a second aspect of the ILMT1 model, the inverse of the logmean value (i.e., 1/T_{1Lm}) can be substituted for the logmean value (T_{1Lm}), and the exact same steps can be carried out. The main advantage of this approach is that the inverse of the logmean value of the NMR parameter could provide information about other materials properties, e.g., 1/T_{1Lm }is directly proportional to viscosity.

[0093]
Explicit LogMean T_{1}(ELMT1)

[0094]
The Explicit Logmean T_{1 }(ELMT1) model, used in another embodiment, where the relationship between the logmean T_{1 }and viscosity is used explicitly, is an extension of the approach described above.

[0095]
In the ELMT1 model, the T_{1Lm }values are fit using a contamination model, as in the ILMT1 model, in order to compute the two limits given in Eqs. (19) and (20). The two end point viscosities are obtained from the end point T_{1Lm }values using Eq. (6), where:
$\begin{array}{cc}{\eta}_{1}=0.009558\text{\hspace{1em}}\frac{{T}_{k}}{{T}_{1\mathrm{Lm},0}},& \left(22\right)\\ {\eta}_{2}=0.009558\text{\hspace{1em}}\frac{{T}_{k}}{{T}_{1\mathrm{Lm},\infty}},& \left(23\right)\end{array}$

[0096]
Finally, a viscosity mixing rule, e.g., Eqs. (8) through (11), is applied to compute c(t_{k}) for a given mixture. For example, Eq. (8) can be recast in terms of c using the relation that s_{1}=c, and s_{2}=1−c:
$\begin{array}{cc}{\eta}_{m}=\frac{{\eta}_{1}{\eta}_{2}}{{\left[c\text{\hspace{1em}}{\eta}_{2}^{1/n}+\left(1c\right)\text{\hspace{1em}}{\eta}_{1}^{1/n}\right]}^{n}},& \left(24\right)\end{array}$
after which the equation is solved for c(t_{k}). It will be appreciated that contamination estimates at different times can be used to compute the time necessary to achieve a given contamination level at a given pump time.

[0097]
Coupled Log Mean T_{1 }(CLMT1)

[0098]
In the ELMT1 model, the contamination model and the mixing rule are applied in two discrete steps. However, in a third embodiment of the invention, referred to as the Coupled LogMean T_{1 }(CLMT1) model, the contamination model is coupled with the viscosity mixing rule. The resulting nonlinear system is then solved for a greater number of unknowns.

[0099]
In a first aspect according to the third embodiment, the ArcTan contamination model given in Eq. (12) is coupled with the Arrhenius viscosity mixing rule given in Eq. (10), which results in the following nonlinear couple system:
$\begin{array}{cc}\mathrm{ln}\left(0.009558\text{\hspace{1em}}\frac{{T}_{k}}{{T}_{1\mathrm{Lm}}}\right)=\left\{\left(\mathrm{a3}+\mathrm{a1}\text{\hspace{1em}}\mathrm{arctan}\left(\frac{{t}^{p}}{{a}_{2}}\right)\right)\text{\hspace{1em}}\mathrm{ln}\left({\eta}_{1}\right)\right\}+\{\left(1{a}_{3}{a}_{1}\text{\hspace{1em}}\mathrm{arctan}\left(\frac{{t}^{p}}{{a}_{2}}\right)\right)\text{\hspace{1em}}\mathrm{ln}\left({\eta}_{2}\right\}& \left(25\right)\end{array}$

[0100]
In a second aspect according to the third embodiment, the viscosity mixing rule of Todd et al. given in Eq. (8) is coupled with the error function contamination model c(t) given in Eq. (17), which results in the following nonlinear couple system:
$\begin{array}{cc}{\eta}_{m}=\frac{{\eta}_{1}{\eta}_{2}}{{\left[c\left(t\right){\eta}_{2}^{1/n}+\left(1c\left(t\right)\right){\eta}_{1}^{1/n}\right]}^{n}},& \left(26\right)\end{array}$
where the value of n is typically 4, η_{m }is the measured viscosity, c(t) is the contamination level at time t, η_{1 }is the viscosity of the OBM, and η_{2 }is the viscosity of the native crude.

[0101]
There are many other possible specific forward models for the CLMT1 model resulting from the coupling of a contamination function model with a viscosity mixing rule, given the four viscosity mixing rules and the six contamination function models described above, and other contamination models or viscosity mixing rules available to one of ordinary skill in the art. It is intended that such alternative contamination function and mixing law models are within the scope of the present invention and the appended claims.

[0102]
Immiscible Fluids Models (IFM)

[0103]
An assumption implicit in the MFM models and methods is that the mixing is miscible. However, in many instances the distinction between miscible and immiscible may disappear, and models specifically designed for immiscible mixing (i.e., in WBM applications) may be necessary for a particular application.

[0104]
Another embodiment in accordance with this disclosure provides the Immiscible Fluid Model (IFM), which is designed for WBM applications. The IFM can be applied for NMR measurements either in the time domain or in the T_{1 }domain. In preferred embodiments, the NMR data derives from MRILab® T_{1 }measurements. An assumption of the IFM model is that the measured response, whether in the time or in the T_{1 }domain, is a linear combination of the signatures of the two end members, where the weighting is governed by the contamination level. The IFM method used in a preferred embodiment includes two steps. First, the two end members are determined from the available data. Given the endmember signatures, the contamination levels are then determined in the second step.

[0105]
The first step of the IFM model is to determine the endpoint signatures x and y. The major unknowns in this step are the NMR signatures of the two fluids (either in time, or T_{1 }domain), in addition to the contamination levels. If the NMR signature of the two fluids at the two endpoint, i.e., the NMR signal of the uncontaminated fluids, is represented by x and y, and given a data matrix of:
B={b_{1}, b_{2}, b_{3}, . . . ,b_{k}) (26)
where b_{k }is the kth column representing the NMR measurement corresponding to the kth experiment, then the measurements are modeled as follows:
b _{k} =c _{k} x+(1−c _{k})y (27)

[0106]
Equations (26) and (27) are given as discrete functions only for ease of notation, and the IFM is not so limited. The c_{k }of Eq. (27) are not ordered in time, in that the unknown vectors x and y would be the same if the columns of B are reshuffled. As a result, an advantage of the IFM model is that the end point vectors can be estimated independent of the dynamics of fluid flow. The contamination function is generally a monotonically decreasing function of time. However, if the flow rate changes during the measurements, e.g., if pumping is stopped, the mud filtrate can flow back in around the probe in the analyzer. This may result in a higher level of contamination when the pump starts again. As a result, if contamination is modeled as a function of time while determining the two end points, then some otherwise valid data points would be interpreted as misfits.

[0107]
The parameters can be solved using wellknown NLLS solvers. For example, a separable nonlinear least squares approach can be used where a bilinear problem is solved to get x, y first, followed by c_{k}.

[0108]
The second step of the IFM contamination estimation model includes fitting the c
_{k }obtained from the first step using a contamination model. For example, the error function is also a solution for well defined cases of WBM invasion, having a strong resemblance to the form of the sample quality function previously discussed for the case of OBM.
FIG. 3 shows the results of a large number of sample quality simulations with WBM systems using the sample quality function discussed above based on the Error Function contamination function in Eq. (17). Typical ranges for a
_{1 }and a
_{2}, for WBM systems are:

 0.50≦a_{1}≦100, and
 0.25≦a_{2}≦0.50.

[0111]
Another possible contamination model is a logarithmic arctan function:
$\begin{array}{cc}c\left(t\right)=\frac{1}{2}\frac{1}{\pi}\mathrm{arctan}\left[{a}_{2}\text{\hspace{1em}}\mathrm{log}\left(\frac{t}{{a}_{1}}\right)\right],& \left(28\right)\end{array}$

[0112]
The IFM method described above can be modified without departing from the teachings of this disclosure as will be appreciated by those of skill in the art. For example, in alternate embodiments, the input data can be weighted based on flow rate, hydrogen index, fit error, noise level, and others. Also, contamination can be estimated in different embodiments either in the timedomain, or T_{1 }domain, where preferably the user can specify either the time or T_{1 }range. Additionally, while Eq. (27) solves for two endpoints, the IFM model could be extended in straightforward manner to the case of three or more fluids by weighting. Thus, a possible scenario is fluid 1 being clean crude from a previous logging station, fluid 2 being the OBM filtrate that enters when flow starts, and fluid 3 being crude at the current depth, which may have a different viscosity from fluid 1.

[0113]
Summary of Contamination Estimation Using NMR Measurements

[0114]
The following algorithm summary is provided for the convenience of the reader in the illustrative embodiment using viscosity as the fluid property being monitored, and indirect NMR measurements to determine these properties. The input curve for the algorithm is T
_{1Lm}. In particular, from acquired echoes in an NMR measurement, the T
_{1 }distribution is computed by standard inversion algorithms, and then converted to T
_{1Lm }using Eq. (5). Next, it is assumed that the sample being analyzed is a mixture of two fluids—the contaminant and the formation fluid. Using the T
_{1Lm }curve one can obtain viscosity indices for these fluids, i.e., the values of η
_{1}—the viscosity of the contaminant, and η
_{2 }as the viscosity of the native fluid. Subsequently, the volumetric fraction of the contaminant and the formation fluid at each experiment is computed by applying a fluid mixingmodel. The algorithm can be summarized in the following steps:

 (1) Read T_{1Lm }data;
 (2) Compute the viscosity index of the fluid mixture η_{m }for each experiment by applying the oil viscosity formula in Eq. (6);
 (3) In a least squares fashion, fit η_{m }to a parameterized viscosity index function c(t) of a given structure (Eq. 1216).
 (4) Compute the viscosity indices of the contaminant: η_{1}=c(t), t=0; and of the formation fluid η_{2}=c(t), t=∞.
 (5) Compute the contamination index for each experiment by applying a fluid mixing model in Eq. (811).

[0120]
In the above summary, the timefunction and mixingmodel are uncoupled. It will be appreciated that both uncoupled and coupled estimates can be provided based on principles discussed above. In a particular embodiment, several tests may be performed to determine the estimation model that optimally fits the data.

[0121]
It will be appreciated that in the embodiments discussed above the end point properties—either apparent viscosity or T_{1 }spectrum—are treated as unknowns. While this is generally true, there are some instances when there is apriori information about the properties of one or more fluids. For example, if the application involves gas (methane) and OBMF, then the T_{1 }(or the T_{1Lm}, since it is uniexponential) of gas is known, and can be treated as a knownquantity, simplifying the inversion. In some cases, apriori information can exist about the contaminant OBMF, its viscosity or T_{1 }spectrum may be treated as known. In either case, the apriori information improves the performance of the inversion, since the number of unknowns is reduced.

[0122]
Application of the Contamination Estimation Models

[0123]
In another aspect, this disclosure also provides methods for applying the contamination estimation models to the nonideal conditions encountered while drilling. The equation of the contamination estimation models are developed based on an assumption of ideal behavior of the formation fluids. One assumption of the contamination estimation models is that there are two end point fluids, e.g., the contaminant and the hydrocarbon. However, the fluid that is measured at the beginning of each experiment may not contain either of the endpoint materials. The fluid measured in the experiments at earlier times may be the fluid left in the flow line from a previous station, possibly measured at a different depth where the reservoir fluid could be completely different. For the very first measurement using a new analyzer in the well, the fluid in the flowline may be water left in the tool during calibration in the shop. Also, contamination is usually modeled as a monotonic phenomenon, in that contamination is taken to decrease as a function of time as the pumpout time increases. For example, T_{1Lm }(or its reciprocal) may actually decrease until the fluid left in the flowline is pumped out, then reverse direction during the relevant portion of the cleanup process.

[0124]
An example of such behavior can be seen in the top graph of FIG. 4, where the diamonds and circles represent actual data points. The top graph shows a loglog plot of contamination estimation models in the specific embodiments to a viscosity vs. time measurement, where the diamonds (⋄) and the circles (∘) are data points, while the curve is the fit of a model to the data points. The middle graph shows spinecho data from a number of experiments. These and other complications may result in the actual contamination trend not being monotonic. If left uncorrected, the artifacts due to flow rate changes may produce data points that are outside the expected range, yielding unreliable contamination estimates.

[0125]
Accordingly, in a preferred embodiment, an inflectionpoint detection algorithm may be applied to identify the relevant time window that contains data from the fluids of interest. Once the relevant time window is identified, data outside this window can be excluded from the inversion. The application of an inflectionpoint detection algorithm to a data set is demonstrated in the top graph of FIG. 4, where the data points represented by diamonds are within the desired range, while the data points represented by circles are determined to be outside this range. Data points in the window that fall within the desired range are weighted more in application of the contamination estimation models as compared to the data points outside the window. In the embodiment illustrated in the top graph of FIG. 4, an arctanlike function is used in the weighting. The reliable and automatic identification of the relevant time window is significant to realtime measurements, since no expertise is required on the part of the user to define the preferred data range on which to perform the analysis.

[0126]
Earlier contamination estimation models have been developed based on the assumption that the contamination approaches zero if pumping continues indefinitely (i.e., c(∞)→0). See, e.g., U.S. Pat. No. 6,178,815; 6,274,865; 6,343,507 and 6,350,986, which are incorporated herein by reference. Unless the well is drilled underbalanced, this would generally not be the case. The overbalance pressure that exists in most wells allows a small amount of mud filtrate to continually leak through the mudcake. With sampling, the filtrate leakage near the probe would be diverted and mixed with the formation fluids entering the tool, causing some residual contamination. Factors that can influence this residual contamination include overbalance, permeability, and (to a lesser degree) anisotropy. The permeability influences how quickly the mudcake forms and the flow rate at which the formation tester can pump a sample. As a result, the residual contamination increases with reduced permeability. The residual contamination can be estimated, and in most cases is less than 1%.

[0127]
The present disclosure also provides methods of adjusting the contamination models to take into account the residual contamination. Using additional simulations, it is possible to develop a correlation function, where the residual contamination (related to the overbalance and permeability) is estimated before pumping starts. The limits of the contamination estimation functions (e.g., Eqs. 1218) used to estimate the contamination while pumping, i.e., the two end points, are then rescaled, so that the projected sample contamination is asymptotic to the residual contamination.

[0128]
Comments and Algorithm Extensions

[0129]
Fluid Properties

[0130]
While the contamination estimation models described in the illustrative embodiment using viscosity and NMR measurements for illustration, the principles of this disclosure can be applied to any other physical parameters or measurements of the formation fluid that are sensitive to contamination. For example, resistivity, capacitance, density, viscosity, HI (hydrogen index), compressibility, speed of sound, and even the pumping pressures can be sensitive to changes in contamination. The specifics of the mixing rule(s) or contamination function models applicable in each case are believed within the scope of knowledge of a person of ordinary skill in the art and will not be considered in further detail. The interested reader is directed to the discussions in [LIST OF REFERENCES] for background information.

[0131]
The use of different fluid properties in accordance with the principles of this disclosure is illustrated using the Implicit LogMean T_{1 }approach, discussed above. Suppose that in a particular implementation, the choice of the contamination function model is the ArcTan model in Eq. (8). An error measure could be defined as:
ε_{k} =c _{k} −d _{k},
where
c _{k} =x _{3} +x _{1 }arctan(t _{k} ^{x} ^{ 3 } /x _{2}),
d _{k} =T _{1Lm,k }

[0132]
The elements of the vector of unknowns x=(x_{1}, x_{2}, x_{3}, x_{4})^{T }correspond to the parameters (a_{1}, a_{2}, a_{3}, p) in the ArcTan Model. The objective function in a simplest form can be defined as:
$\Phi \left(x\right)=\sum _{k=1}^{K}{\varepsilon}_{k}^{2}$

[0133]
The task is then to find the vector x that minimizes the above function, like in any other least squares problem. While the illustrative embodiments using viscosity d_{k }is the log mean of T_{1}, other parameters, such as logmean T_{2}, logmean D_{0}, as well as the hydrogen index, pressure values, or others can be used instead. It will thus be appreciated that the approach proposed herein is not limited to a particular fluid property, or a particular modeling function but rather can be extended without due experimentation to different properties, different mathematical model functions or function combinations.

[0134]
In accordance with another aspect of the disclosure it will be appreciated that in certain fluid mixtures one of these properties may be more sensitive than others to the contaminant. Accordingly, an array of instruments can be used in a preferred embodiment to measure individual properties and the approaches disclosed below applied to each measurement. In a specific embodiment, different contamination estimates can be combined into a single average contamination estimate. Individual contamination estimates may be weighted, preferably using nonlinear regression techniques. As is the case with MRILab® estimates of viscosity, the formation fluid properties can be more accurately predicted because the end points are used to determine the insitu sample properties.

[0135]
MultiFluid Modeling

[0136]
In another aspect, it will be appreciated that the mixing rules described in the above illustrative embodiments are applicable to two fluids—generally a contaminant and the native formation fluid. In certain applications, it may be advantageous to consider three different fluid types, for example, in the production of a well, where fluids of different viscosities are produced from different zones. It will be appreciated that in such cases, for example, a gas zone, and two oil zones may be encountered, where the oils have different viscosities. The viscosity mixing rules given for 2 fluids (Eqs. 8 thru 11), have counterparts for 3 or more fluids. For example, the 2fluid mixing rule, referred to as Todd et al, given by
${\eta}_{m}=\frac{{\eta}_{1}{\eta}_{2}}{{\left[{s}_{1}{\eta}_{2}^{1/n}+{s}_{2}{\eta}_{1}^{1/n}\right]}^{n}},$
where
s _{1} +s _{2}=1,
can be extended for 3fluids in the following way (Todd et al):
${\eta}_{m}=\frac{{\eta}_{1}{\eta}_{2}{\eta}_{3}}{{\left[{s}_{1}{\eta}_{2}^{1/n}{\eta}_{3}^{1/n}+{s}_{2}{\eta}_{1}^{1/n}{\eta}_{3}^{1/n}+{s}_{3}{\eta}_{1}^{1/n}{\eta}_{2}^{1/n}\right]}^{n}},$
where
s _{1} +s _{2} +s _{3}=1.

[0137]
It can be seen from the above that extension of the other mixing rules, for 3 or more fluids, in many cases is straightforward.

[0138]
NMR Measurements of Viscosity

[0139]
The relationship between viscosity and T_{1Lm}, as given in Eq. (6), strictly speaking applies for dead oils, generally not having any substantial portion of gas. The relationship is dependent on the GasOilRatio (GOR), as shown in Eq. (7), if the oil is live. Since f(GOR) is not known at the time of the NMR measurement, the two endpoint viscosities that are outputs of the contamination algorithm may not be correct in certain instances. For this reason, diffusion measurements, as discussed in Appendix A, may be used for viscosity determination, because the relationship between D_{0 }and viscosity is fundamental and is governed by Eq. (1), whereas the relationship between T_{1Lm }and viscosity is empirical.

[0140]
It should be noted, however, that in not knowing f(GOR) does not adversely impact on the contamination estimates obtained in accordance with this disclosure, because whether the oil is “live” or “dead,” the values for T_{1Lm }of the fluid are inversely proportional to its viscosity, only the proportionality constant is different. Therefore, in the case where f(GOR) is unknown, while the endpoint viscosities may be inaccurate, the saturations of the fluids (or the contamination levels) are still correct. Strictly speaking, therefore, the above disclosure is applicable to measurements of an apparent viscosity or a “viscosity index,” instead of viscosity. It will be appreciated that in many instances the apparent viscosity from the contamination analysis will be correct, as in the case of higher viscosities (i.e., low GOR), where the T_{1}viscosity relationship approaches that of the deadoil relationship.

[0141]
Effects of Flow on T_{1 }Data

[0142]
FIG. 1A illustrates that the flow, dependent on the pumpout rate affects the T_{1 }distributions. The magnitude of the flow effect can be appreciated by comparing the T_{1Lm }values, which are in the order of 3 seconds while flowing at 30 cc/min, to stationary values in the order of almost 10 seconds (near the bottom of the log). Faster flow rates result in less polarization in the case of long T_{1}s.

[0143]
If the fluid is viscous, in which case the T_{1 }values are relatively short, the flow rate does not affect the T_{1 }distributions substantially, and the flow effect can be ignored. In a similar way, if the fluid has low viscosity (long T_{1}s), but the flow rate is low, then once again, the T_{1 }distributions are not affected for practical purposes. In either case, the effects of flow are minimal and no corrections are needed.

[0144]
In accordance with another aspect, the contamination algorithms presented herein may function well without flow corrections to the data even in the worst case of long T_{1 }s and high flow rates, as long as the transition from stationary to nonzero flow is made quickly and the flow rate is not varied for the remainder of the time. In such measurements, the most significant effect of flow is to change the apparent viscosity. The artifacts caused by high flow rates are analogous to that of viscosity in the case of dead vs. live oil. In similar fashion, while the apparent viscosity may not be close to the true viscosity, the volume fractions of the two end points, i.e., contamination is still accurate. It will be appreciated, however, that if the flow effects reduce the dynamic range in T_{1Lm}, the sensitivity of the contamination estimates may be reduced. These issues can be taken into account with proper adjustment of the pumpout rate of the device in operation.
EXAMPLES
Example 6.1

[0145]
The results of the contamination estimation for data shown in FIG. 1A using a CLMT1 contamination estimation model (Eq. (26)) are shown in FIG. 13.

[0146]
In the top report section, several parameters and answers are listed. The results of the inversion, for the endpoint viscosity indices, as well as the parameters a_{1 }and a_{2 }are listed. The contamination level at the first and the last experiments, in percent are also listed in the report section. Finally, the time estimate for reaching the contamination threshold is given at the bottom. In the example used, the 5% threshold was already achieved.

[0147]
The second section contains a plot of the estimated contamination vs. time. The estimated contamination is about 2 percent towards the end of the measurement.

[0148]
The third section is a plot of the input data (solid curve) vs. the fit (connected diamonds). The flow rate is shown in the bottom plot, for reference. In the third section, one can see the T_{1 }distributions for the two end members.
Example 6.2

[0149]
The top graph of FIG. 4 shows viscosity vs. time data points (diamonds and circles) from an MRILab® Fluid analyzer, obtained from a well drilled with OBM. An inflectionpoint detection algorithm was applied to identify the relevant time window (diamonds) that contains data from the two fluids of interest. The data in the relevant window (diamonds) is weighted by an arctan function as compared to the data outside the window (circles).

[0150]
The top graph of FIG. 4 also shows the results of the application of the ELMT_{1 }model to the data from the MRILab® (shown by the curve fit). The estimated contamination value of 4.7% is obtained from application of the ELMT_{1 }model, using a combination of the Modified Ahrrenius mixing rule in Eq. (11) and the ArcTanShifted 2 contamination model in Eq. (15). Independent laboratory results were obtained from the analysis of the actual fluid samples secured with the RDT. The laboratory measured contamination value is 4.0%.
Example 6.3

[0151]
While the IFM is not suitable for OBM, it nevertheless gives results comparable to the MFM. The contamination estimation results using the IFM for the data shown in FIG. 1A can be seen in FIG. 14, where contamination is modeled using the error function (even though OBM is used during logging).

[0152]
The lower plot of FIG. 14 shows the T_{1 }distribution for the two endmembers. It is interesting to note that the algorithm used in the analysis chooses the most commonly occurring T_{1 }spectrum for the crude (see FIG. 1A, experiment range 30 to 80), and has considered most everything else as a contaminant, including the very long T_{1 }values encountered only at the end of the measurement.

[0153]
The upper plot shows the contamination values as a function of experiment number. The monotonically decaying smooth curve is the contamination curve. Towards the end of the measurement, contamination values are on the order of 2 percent. The results shown here are obtained by constraining the contamination values between 0 and 1, which explains the abundance of points occurring at 0 and 1.

[0154]
The applicability of an IFM model to an OBM system is probably due to the nature of the fluids and the type of the data collected. Basically, when the two end points are very different, and one has waited long enough for clean up as in this example, any monotonically decaying function will show that contamination is low.
APPENDIX A

[0155]
The following description summarizes equipment and methods used in the illustrative embodiment of the application, which relies on NMR measurements. The interested reader is directed for additional detail on NMR to the disclosure of the patents and publications set forth in the background section of the invention.

[0156]
NMR Fluid Analyzer

[0157]
FIGS. 5A and 5B show simplified diagrams of a downhole NMR fluid analysis apparatus, such as the MRILab®, that provides NMR measurements to which the contamination estimation methods of the present disclosure can be applied in an illustrative embodiment. Fluids enter the device at the top and pass through two sections, referred to as polarization and resonance sections, respectively. Measurements are performed as the fluid flow passes through the device. The fluid entering the system is initially subjected to a strong magnetic field to achieve rapid polarization of the hydrogen nuclei. NMR measurements take place in the lower section, where the field strength is lower. In a preferred embodiment, two separate radio frequency coils are used for pulse transmission and for reception. This split scheme allows for a transmitter coil 30 that is longer than the receiver 35. The practical effect of this split is that relaxation times estimates are less sensitive to the actual flow rate(s) because signals are received from only a portion of a larger volume of fluid that is being pulsed.

[0158]
For a saturationrecovery T_{1 }experiment, a single pulse can be used to prepare a large volume, while the actual readout may happen over a smaller volume. This feature is used to render the measurement of T_{1 }relaxation times largely independent of flow velocities, up to a certain practical limit. Transmission and reception both operate at 4.258 MHZ at room temperature, consistent with 1,000 Gauss field strength. At higher temperatures, the operating frequency is reduced to track the reversible reduction in magnetic field strength.

[0159]
The magnetic field in the measurement volume of the device shown in FIGS. 5A and 5B in general is not entirely uniform. This volume can be split conceptually into an interior region, where the field gradient is negligible, and a fringe region, where the field changes with an approximately uniform gradient. The fringe region may comprise about one third of the total sensitive volume. During T_{1 }measurements and at short pulsetopulse spacing (such as 0.25 ms), the effect of the gradient is not noticeable. To perform a diffusion measurement, the main flow is diverted and a sample is stagnated within the NMR chamber. Furthermore, the pulsetopulse spacing (Te) is increased to induce diffusiondependent signal dephasing. The uniform and the fringe regions are large compared to the largest possible diffusion length; therefore, these regions are essentially isolated from each other for the duration of a single pulseecho train.

[0160]
FIG. 6A is a detailed crosssectional view of the polarization section of the apparatus that the flowing fluid encounters after it enters the measurement chamber. The purpose of this prepolarization section is to polarize hydrogen nuclei in the fluid(s) as rapidly as possible, so that they will exhibit full polarization under the operating field. The flow tube 60, is made from ceramic, glass or PEEK material, and is surrounded by a Faraday shield 45. The magnet consists of segments 25 that are magnetized as indicated by the arrows and are made of material with very low temperature coefficient.

[0161]
FIG. 6B is a detailed crosssectional view of the second section of the apparatus, which is located between the polarization section and the measurement section(s) (labeled “Resonance Section” in FIG. 5B). The purpose of this section is to allow the hydrogen spins to settle to an equilibrium polarization that is close to a nonflowing magnetization corresponding to an external field of 1,000 Gauss.

[0162]
FIG. 6C is a detailed crosssectional view of the transmit portion of the measurement section of the apparatus, which follows the stabilization section. FIG. 6D is a detailed crosssectional view of the last section of the apparatus, which is the transmit/receive section. The NMR time constants T_{1 }of the fluid(s) under investigation are determined by varying the delay time between a broadband saturation pulse and a readout sequence. If the flow velocity does not exceed 10 cm/s, the measurement is generally independent of the flow speed and of the flow profile.

[0163]
The electronics used in the NMR fluid analyzer, which is illustrated in a block diagram in FIG. 7, is similar to that of an NMR spectrometer. The comparatively low frequency of 4.2 MHz used in for some of the measurements allows many traditionally analog functions to be realized readily as digital signal processing (DSP) algorithms. A frequency source 34, controlled by a pulse programmer, sends its signal to a power amplifier 37, which in turn drives the transmitter antenna 30. All timing functions, like pulse widths and acquisition windows, are fully programmable. On the receive side, the signal from the receiver antenna 35 is amplified, synchronously demodulated and integrated. The system also performs its own calibration. All pertinent calibration factors are stored in the tool itself and after calibration echo amplitudes are reported on a scale of 02. The two coils of the device 30, 35 are connected to resonating capacitors 31. These capacitors are of the NPO (no temperature coefficient) and PTC type (positive temperature coefficient), shunted in parallel, as shown. The resultant temperature characteristic is such that with increasing temperature, when the static magnetic field weakens (typically 1% per 100°C.), the capacitance increases at twice the rate (typically 2% per 100°C.). The resultant LC circuit resonant frequency drops at half the capacitor rate (1% per 100° C.) and therefore follows the NMR resonance, making retuning of the circuit unnecessary.

[0164]
In a transmit mode, the controller 33 gates the signal generator 34 of the apparatus and the power amplifier 37 to produce a radio frequency pulse in both coils. The high voltage applied causes all crossed diodes 39 to conduct, thereby connecting the two coils. In receive mode, the crossed diodes stop conducting and signal is only received from the lower coil 35. The signal is amplified, digitized and fed into the digital signal processor 33 for demodulation and further processing.

[0165]
The MRILab® described above determines hydrogen density, selfdiffusion rates and NMR relaxation rates of fluids during the pumpout phase, from which one can compute sample viscosity and GOR. By design, fluid samples are analyzed under true reservoir conditions and results are available substantially in real time. In particular, the MRILab® measures the hydrogen index and the NMR polarization time constant (T_{1}) of flowing fluids, which pass through the device. In the sensor section, the hydrogen in the fluid is first polarized by a set of magnets and then pulsed via an antenna coil to excite the magnetic resonance response. The excitation and refocusing pulses are fed to a long transmitter coil that traverses the magnet section. A smaller receiver coil, located at the bottom of the flowtube, picks up the NMR echo. The separated coil arrangement permits NMR measurements while flowing. The timing sequences for the excitation pulses are fieldprogrammable for additional flexibility. By default, the device records the NMR amplitude corresponding to a number of distinct wait times ranging from 1 millisecond to 16 seconds. The amplitudes are calibrated in hydrogen index units, where 1 unit equals the hydrogen density in water under atmospheric conditions.

[0166]
The MRILab® can also be switched to T_{2 }mode of operation. The measurement of the signal decay time T_{2 }is flowsensitive and is generally valid when a sample is stagnant within the MRILab®, at which time the NMR signal decay induced by selfdiffusion can be observed. Diffusivity is inversely proportional to viscosity, a relationship that holds true in dead oils as well as in gasoil mixtures.

[0167]
Relaxation Time Measurements

[0168]
The T_{1 }relaxation times and hydrogen density can be measured continuously whether or not the fluid is stagnant or flowing. FIG. 8 illustrates a pulse sequence employed with the fluid analyzer in a specific embodiment. It will be appreciated that it is a standard saturation recovery sequence, where an initial saturation pulse is followed by a variable delay. In a preferred embodiment, the delay is programmable and is typically stepped through the values 1, 2, 4, 8, 16, 16384 ms in cyclical fashion. The recovered magnetization at the end of the delay is determined by a short read out sequence, consisting of two pulses and one spin echo. The height of the echo, if plotted as function of delay time, traces out a recovery curve that is converted into a T_{1 }distribution by standard inversion methods. In one embodiment, the inversion algorithm is a variant of the method employed to calculate T_{2 }distributions from wireline data, as disclosed in U.S. Pat. No. 5,517,115. With the above sequence it takes about 33 seconds to complete a measurement cycle. The signaltonoise ratio of the system is so high that additional averaging may be unnecessary. The sequence described above is insensitive to fluid flow and can be used to continuously monitor the T_{1 }profile of pumped fluids. Other measurement sequences may be used in alternative embodiments.

[0169]
More specifically, the T_{1 }measurement sequence is initiated by a frequency swept saturation pulse. The frequency is selected such that the entire range of frequencies in the resonance sections of the apparatus is affected. In a specific embodiment, this range is typically the NMR center frequency +/1% (4.2 MHz+/40 kHz). Pulse amplitude, frequency sweep rate and pulse length are adjusted to effect saturation.

[0170]
As noted, following the saturation pulse, a variable delay is inserted. Preferably, consecutive measurements with delay values of 1 ms, 2 ms, 4 ms, . . . , up to 16384 ms are used. During these intervals, the nuclear magnetization builds up again to its equilibrium value. Also during this time, depending on the flow rate, fluid volume moves into the receiver coil volume, while unprepared fluid enters the resonance volume. As long as the flow rate is not high enough to allow unprepared fluid from the polarization section to enter the receiver coil section, it will be appreciated that the measurement is independent of the actual flow rate. After the saturation recovery delay, the instantaneous value of the nuclear magnetization is determined. This is done with a short pulse sequence, consisting of a π/2 pulse, followed by a π pulse. The RF phase of these pulses is shifted by 90° against each other to cancel the effects of B_{0 }and RF field imperfections. This is equivalent to the start of a CarrPurcellMeiboomGill (CPMG) pulse sequence. The time between these pulses is typically 0.125 ms; a spinecho forms 0.125 ms after the π pulse. This echo is digitized, quantified and its amplitude is taken as a measure of the recovered magnetization as function of the saturation recovery delay. Note that the π/2 and π pulses can be narrow band and need not be frequency swept. The reason is that they are only relevant for the receiver coil section which has a very tightly controlled field and resonance frequency distribution.

[0171]
Examples of T_{1 }distributions for some example fluids are shown in FIGS. 10 and 11. The data points were acquired according to the sequence in FIG. 8 and inverted from the time domain to the T_{1 }domain. The horizontal axis, “time,” in FIG. 9 denotes the time elapsed between the saturation pulse and the readout sequence, the vertical axis is signal amplitude in arbitrary units. The results are easier to interpret after inversion from time domain to T_{1 }domain, as shown in FIG. 10. In this example 53 points are specified for the inversion result. The single, sharp peak at 23 seconds is characteristic of water, the rounded peak in the “oil window” 0.51 second indicates oil and the broad response from the crude oil in the bottom panel is characteristic for complex hydrocarbons. The figure shows examples of T_{1 }saturation recovery data for three different fluids: brine, Diesel oil and a crude oil.

[0172]
The data points illustrated have been acquired by circulating different fluids through the analyzer. Shown from top to bottom are: water (mild brine) with a single relaxation peak in the “water window” at 2 seconds; next a simple hydrocarbon (diesel) with a single relaxation peak in the “oil window” at 0.51 second; and a complex hydrocarbon (crude), which shows a characteristic asymmetric distribution that starts in the few tens of milliseconds and extends to the “oil window.” These samples were under atmospheric conditions at ambient temperature. At elevated temperatures, Eq. (2) predicts an increase in T_{1 }proportional to the absolute temperature in addition to increases due to reduction in viscosity.

[0173]
The determination of long relaxation times no longer depends on how long an echo train persists. In the implementation discussed above, small perturbations in the applied field have relatively limited effect. Additionally, the saturation pulse prepares a much larger sample volume than what is actually used for the readout portion. Therefore, as long as the flow rate is low enough, and the readout is based on a fluid sample that was present anywhere within the resonance regions during the saturation pulse, the measurement is valid.

[0174]
In contrast to T_{1}, the T_{2 }parameter generally cannot be determined on a flowing sample. Distributions of T_{2 }times are determined by standard CPMG sequences on samples that have been stagnated momentarily. Stagnation can be achieved by closing a valve below the analyzer apparatus and diverting the flow stream around the sample chamber. The time required for a T_{2 }measurement is almost entirely determined by the polarization time (“wait time”) and is on the order of several seconds.

[0175]
Hydrogen Density Measurements

[0176]
The hydrogen density or the total number of hydrogen atoms within the measurement volume is a byproduct of any T_{1 }or T_{2 }measurement. It can be represented as the area under any T_{1 }distribution and is typically normalized to the hydrogen density of reference oil at measurement temperatures. At room temperature, the reference oil and water have the same hydrogen density. The reported number is the relative hydrogen index (HI) in the range 02, with accuracy around 1%.

[0177]
Hydrogen density can be automatically converted to hydrogen index (HI), which is the hydrogen density of a material relative to that of water at ambient conditions. The spin density of the fluid is proportional to the hydrogen index. Under the assumption that the oil contains only hydrogen and carbon atoms, the mass density ρ_{m}, the hydrogen index, and the hydrogentocarbon ratio R are related as follows:
HI≈ρ_{m}9R/(12+R) (29)

[0178]
See, for example, Zhang et al., (1998), “Some Exceptions to Default NMR Rock and Fluid Properties, Paper FF: SPWLA.” presented at the 39^{th }Annual Logging Symposium, Keystone, Colo., May 2629. Since the hydrogen index is measured, either the mass density or the hydrogentocarbon ratio can be computed from an estimate of the other variable.

[0179]
It has been reported that most saturated hydrocarbon liquids have relative hydrogen indices of 1 within ±5%. The hydrogen density in gases is significantly lower due to the overall lower density. Thus, a depressed hydrogen index serves as a firstorder alert to the presence of gas and a change in the relationship between T_{1 }and viscosity. Appel et al. reported a reduction of about 20% on live oil samples at 180° F. (See Appel et al., “Reservoir Fluid Study by Nuclear Magnetic Resonance,” Paper HH: SPWLA, presented at the 41^{st }Annual Logging Symposium, Dallas, Tex., Jun. 47, 2000). Under the assumption that all gas is methane (CH_{4}), the observed hydrogen index can be approximated as follows:
HI=x(9/4ρ)+(1−x)1, (30)
where x is the volumetric gas fraction (m^{3}/m^{3}) and ρ, in g/cm^{3}, is the density of methane. The density of methane follows from its temperature and pressure, and Eq. (30) can be used to derive a firstorder approximation for the gas fraction x.

[0180]
Diffusion Measurements

[0181]
Diffusion measurements can be performed using the NMR fluid analyzer using steadygradient spinecho (SGSE) experiments. The experiments require that the fluid flow is temporarily stopped. The concept of using the fringes of a uniform field volume for diffusometry derives from so called SSFSGSE methods. The main advantage of the SGSE method over pulsedfield gradient spinecho (PFGSE) diffusometry is instrumental simplicity and superior stability. The main drawback is a limit on sensitivity, which, for the downhole implementation, is approximately 10^{−6 }cm^{2}/s.

[0182]
The sensitive volume of the apparatus can be divided into an interior, homogeneous region and an exterior gradient region. The field in the fringe volume, which makes up about ⅓ of the total volume, can be approximated by a single field gradient value G_{0}. At short echo spacing (0.25 ms), the effect of the field gradient is too small to be relevant. The pulse sequence used both for diffusion measurements and for diffusivity calibration is shown in FIG. 11.

[0183]
In particular, two CPMG sequences with a short echo spacing (typically 0.25 ms) and a long spacing (T_{e}) are alternated. The long echo spacing is selected as an integer multiple of the short spacing. In this case, echoes line up in time, i.e., occur at the same elapsed time, since the excitation pulse and the ratio of their amplitudes can be formed.

[0184]
For a formation fluid with a given relaxation time T_{2 }and diffusivity D, the two echo trains for the short and the long echo spacing can be described as follows:
A _{1} =I _{H }exp(−t/T _{2})
A _{2} =I _{H} K _{0 }exp(−t/T _{2})exp(−t/T _{D})+I _{H}(1−K_{0})exp(−t/T _{2})
where
1/T _{D}=1/12(γG _{0} T _{e})^{2} D. (31)

[0185]
The relations also apply for an arbitrary distribution of times T_{2}.

[0186]
The system parameter K_{0 }is the gradient volume divided by the total volume. The hydrogen gyromagnetic ratio γ is equal to 26,754 rad/s/gauss. Both K_{0 }and G_{0 }are temperaturedependent and are determined during calibration. The diffusivity D is derived from Eq. (31) by taking the ratio of corresponding echoes, as follows:
A _{2} /A _{1} =K _{0 }exp(−t/T _{D})+(1−K_{0}) (32)

[0187]
This curve is fit to a uniexponential model plus an offset.

[0188]
In the upper graph of FIG. 12, the two curves are the A_{1 }and A_{2 }signals for water at room temperature. The lower graph of FIG. 12 is the ratio curve and the best fit uniexponential model. Since D for water is known as 2.5×10^{−5 }cm^{2}/s, these curves determine the calibration parameters G_{0 }and K_{0}.

[0189]
The two curves in the upper graph of FIG. 12 are spin echo amplitudes at different echo spacings. The accelerated decay for the longer spacing is a manifestation of diffusion in the gradient region of the magnetic field. The ratio curve (lower graph) is the sum of an exponential and a constant term, corresponding to the gradient field region and the uniform field region, respectively. The best fit model curve is also plotted; however, it is indistinguishable from the data.

[0190]
In a preferred embodiment, viscosity is determined as follows:
η=5×10^{−8} T/D (33)

[0191]
In this expression, the viscosity η is measured in cp, the temperature T in Kelvin and the diffusivity D in cm^{2}/s. The temperature may be obtained from the RDT fluid temperature sensor. The proportionality factor is determined by fitting Eq. (1) to data from pure alkanes and methane alkane mixtures.

[0192]
Although the present invention has been described in connection with the preferred embodiments, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is intended to cover such modifications, alternatives, and equivalents as can be reasonably included within the spirit and scope of the invention as defined by the following claims.