Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
DETERMINATION OF DOWNHOLE FORMATION FLUID CONTAMINATION AND CERTAIN COMPONENT CONCENTRATIONS
Document Type and Number:
WIPO Patent Application WO/2019/221758
Kind Code:
A1
Abstract:
A method and system can obtain real time property measurements of a fluid comprising a formation fluid downhole, real time measurements of an amount of an interactive component of the fluid downhole, and real time measurements of an amount of a non-interactive component of the fluid downhole. The method and system further includes determining a total amount of the interactive component in the fluid or a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole. The real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole, and the property can be scaled with the contamination level.

Inventors:
JONES CHRISTOPHER MICHAEL (US)
PIAZZA RALPH (BR)
VAN ZUILEKOM ANTHONY H (US)
PEARL MEGAN RENEE (US)
SACORAGUE LUIZ ALEXANDRE (BR)
VIEIRA ALEXANDRE JAIME MELLO (BR)
Application Number:
PCT/US2018/033516
Publication Date:
November 21, 2019
Filing Date:
May 18, 2018
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
HALLIBURTON ENERGY SERVICES INC (US)
PETROLEO BRASILEIRO SA PETROBRAS (BR)
International Classes:
E21B49/08; E21B47/00
Domestic Patent References:
WO2016076825A12016-05-19
Foreign References:
US20120211650A12012-08-23
US20140180591A12014-06-26
US20160130696A12016-05-12
US20110313670A12011-12-22
Attorney, Agent or Firm:
PEACOCK, Gregg, A. et al. (US)
Download PDF:
Claims:
CLAIMS

WHAT IS CLAIMED IS:

1. A method comprising:

obtaining real time property measurements of a fluid comprising a formation fluid downhole,

obtaining real time measurements of an amount of an interactive component of the fluid downhole,

obtaining real time measurements of an amount of a non-interactive component of the fluid downhole, and

determining a total amount of the interactive component in the fluid or a

contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole,

wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole, and

wherein the property is scaled with the contamination level.

2. The method of claim 1, wherein at least one of the real time property measurements and real time measurements of the amounts of the interactive component and non-interactive component are obtained by an optical computing device.

3. The method of claim 1, further comprising

disposing a downhole tool or wireline tool into a borehole to obtain the real time property measurements, real time measurements of the amount of the interactive component, and/or the real time measurements of the amount of the non-interactive component.

4. The method of any one of claims 1 to 3, wherein the property is the density of the fluid.

5. The method of claim 4, wherein determining the contamination level of the formation fluid comprises determining the density of a drilling fluid filtrate by extrapolating the real time density measurements of the fluid to the origin.

6. The method of claim 4, wherein determining the contamination level of the formation fluid comprises linear-fitting the density of the fluid at the time of interest on a line reflecting the linear relationship between the density of the fluid and the corresponding contamination level.

7. The method of claim 6, wherein the line reflecting the linear relationship between the density of the fluid and the corresponding contamination level is established via the density of the drilling fluid filtrate, which corresponds to 100% contamination, and the density of the fluid, which corresponds to the contamination level when the release of the interactive component in its free form begins to occur.

8. The method of any one of claims 1 to 3, wherein a sampling decision is made based on the amount of the interactive component.

9. The method of any one of claims 1 to 3, wherein determining the contamination level of the formation fluid comprises determining a slope of a line of the real time amount of the interactive component versus the corresponding real time amount of the non-interactive component.

10. The method of any one of claims 1 to 3, wherein determining the contamination level of the formation fluid comprises determining the actual amounts of the interactive and non interactive components.

11. The method of claim 10, wherein the actual amounts of the interactive and non interactive components in the formation fluid are obtained through an asymptotic approach.

12. The method of any one of claims 1 to 3, wherein determining the contamination level of the formation fluid comprises determining the contamination level of the formation fluid when the release of the interactive component in its free form begins to occur.

13. The method of any one of claims 1 to 3, wherein the time of interest is after the time when the release of the interactive component in its free form begins to occur.

14. The method of any one of claims 1 to 3, wherein the real time measurements of the amount of the interactive component comprise three phases, which include an initial low steady concentration followed by a phase showing a sharp increase in the concentration of free interactive component followed by a plateau concentration phase.

15. The method of any one of claims 1 to 3, wherein the interactive component is C02 or H2S and wherein the non-interactive component is methane, ethane, propane, butane, or pentane.

16. The method of any one of claims 1 to 3, wherein the interactive component is C02 and the non-interactive component is methane.

17. The method of any one of claims 1 to 3, wherein determining the contamination level of the formation fluid comprises:

receiving real time amount measurements of the non-interactive component and the interactive component at timel and obtain k as [the interactive component]/[the non interactive component];

determining B which is equal to k *100 hn, wherein m is equal to the ratio of the difference of real time measurements of [the interactive component] at two time points over the difference of real time measurements of [the non-interactive component] at the corresponding two time points;

determining the contamination at timel (CtimeI) by linear fitting on a line determined by time zero wherein contamination is 100% and the property is the extrapolated value of the real time property chart and by the time when the release of the free interactive component begins to occur wherein contamination is B and density is found on the real time property chart;

determining [the interactive component^ and [the non-interactive component^ according to [the interactive component]= [the interactive component^ * (1 - Cumei/B ) and [the non-interactive component]=[the non-interactive component^ * (l-C1;me7/l00), respectively; and determining whether [the interactive component^ and [the non-interactive component^ are equal to or greater than a 95% confidence level, comparing to [the interactive component] and [the interactive component], respectively.

18. A system comprising:

one or more tools which comprise one or more optical computing devices wherein the one or more tools are configured to obtain real time property measurements of a fluid comprising a formation fluid downhole, real time measurements of an amount of an interactive component of the fluid downhole, and real time measurements of an amount of a non-interactive component of the fluid downhole;

memory storing instructions; and

at least one processor that executes the instructions to:

determine the total amount of the interactive component or a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole,

wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole, and wherein the property is scaled with the contamination level.

19. The system of claim 18 wherein the memory and at least one processor executes instructions to:

obtain real time amount measurements of the non-interactive component and the interactive component at timel and obtain k as [the interactive component]/[the non-interactive component];

determine B which is equal to k * 100 hn, wherein m is equal to the ratio of the difference of real time measurements of [the interactive component] at two time points over the difference of real time measurements of [the non-interactive component] at the corresponding two time points;

determine the contamination at timel (Ctimei) by linear fitting on a line determined by time zero wherein contamination is 100% and the property is the extrapolated value of the real time property chart and by the time when the release of the free interactive component begins to occur wherein contamination is B and density is found on the real time property chart;

determine [the interactive component^ and [the non-interactive component^ according to [the interactive component]= [the interactive component^ * (1 - imei/B ) and [the non-interactive component]=[the non-interactive component^ * (1- Ctmiei! 100), respectively; and

determine whether [the interactive component^ and [the non-interactive component^ are equal to or greater than a 95% confidence level, comparing to [the interactive component] and [the interactive component], respectively.

20. The system of claims 18 or 19, wherein the one or more tools is either a wireline tool or a downhole tool included in a BHA.

21. A system, comprising:

an integrated computational element, comprising alternating layers of a first and a second dielectric material, each of the alternating layers of the first and the second dielectric materials having a thickness and a refractive index selected according to a regression vector associated with a characteristic of a sample, the sample located downhole in a borehole; a detector configured to measure an intensity of a sample light interacted with the integrated computational element and to generate a detector signal based on the intensity of the sample light interacted with the integrated computational element; and

a signal processor configured to obtain the characteristic of the sample from the detector signal, and to determine a total amount of an interactive component in the sample or a contamination level of the sample at a time of interest based on real time property measurements of the sample and real time measurements of the amounts of the interactive component and non-interactive component of the sample.

Description:
DETERMINATION OF DOWNHOLE FORMATION FLUID CONTAMINATION AND CERTAIN COMPONENT CONCENTRATIONS

BACKGROUND

[001] This application relates to a method of determining drilling fluid fdtrate

contamination of a downhole formation fluid and a method of determining drilling fluid interactive component concentrations, such as that of carbon dioxide or hydrogen sulfide concentrations in a downhole formation fluid and drilling fluid filtrate mixture. Both methods use real-time measurements of a downhole fluid comprising the formation fluid for the determination of contamination and carbon dioxide, hydrogen sulfide or other interactive component concentrations.

[002] In certain practices, it is of particular interest to determine the level of contamination of a formation fluid. The contamination concerned can be caused by drilling fluid filtrate or oil-based mud filtrate. While it is possible to obtain the contamination level by analyzing the sampled fluid in a laboratory, such a practice is not practical for real time field operations. Hence, there is a need for determining drilling fluid filtrate or oil-based mud filtrate contamination using subterranean real time measurements of a downhole fluid comprising a formation fluid.

BRIEF DESCRIPTION OF THE DRAWINGS

[003] FIG. 1 illustrates an optical computing device in a downhole tool, the optical computing device configured to measure a characteristic of a fluid.

[004] FIG. 2 illustrates an integrated computational element for use in an optical computing device for a downhole tool.

[005] FIG. 3A shows downhole real time measurements of the amounts of C0 2 , methane (Cl), and gas-oil ratio (GOR) in a fluid comprising a formation fluid flowing through sensors.

[006] FIG. 3B shows downhole real time measurements of density of the fluid flowing through sensors.

[007] FIG. 4 is a flow chart illustrating an asymptotic approach for obtaining a drilling fluid filtrate contamination and total amount of an interactive component (such as CO2).

[008] FIG. 5 illustrates a drilling system configured with a downhole tool configured having an optical sensor including an optical computing device in a measurement-while-drilling (MWD) and a logging-while-drilling (LWD) operation. [009] FIG. 6 illustrates a wireline system configured with a downhole tool having an optical sensor including an optical computing device during formation testing and sampling.

DETAILED DESCRIPTION

[0010] Downhole measurements of a fluid comprising a formation fluid can provide information about characteristics of the formation fluid and/or the components in the reservoir fluid downhole. Downhole fluid analysis (DFA) is often used to provide information in real time about the characteristics of subterranean formations and/or the compositions of formation or reservoir fluids. The real time measurements can provide, for example, density information of the downhole fluid, the amounts of certain components in the fluids such as carbon dioxide (CCF ) and C 1 -C 5 alkanes (e.g., methane, ethane, propane, etc.), gas-oil ratio (GOR), for example. The downhole tool which can perform these measurements include optical computing devices incorporating integrated computational elements (ICEs) that enable a simplified way to detect a characteristic of a sample by measuring the intensity of an output light from the sample after interacting with the ICE. In embodiments consistent with the present disclosure, an ICE may also be referred to as a multivariate optical element (MOE).

[0011] ICE technology can operate with light shining through, transmitted (or scattered) from downhole fluids and then through sensors. Each sensor can be programmed to recognize the chemical nature - or optical fingerprint - of a specific fluid component. Measuring the intensity of light passing through any one sensor indicates the presence and amount of a particular chemical component within the overall fluid. Tools with such sensors are placed downhole and can provide real time measurements of a fluid comprising the formation fluid flowing through the sensor such as a density of such a fluid and amounts of certain chemicals in the fluid flowing through the sensor.

[0012] In some embodiments, a device as disclosed herein determines a characteristic of a fluid (e.g., the amount of C0 2 in formation fluid downhole). The characteristic of the fluid may have a direct bearing on the value of a potential reserve. Furthermore, determining the characteristic of the fluid can be used to determine a capital investment needed to produce a field, specifically when designing surface production facilities and completion strategies.

[0013] In some configurations, drilling fluid filtrate can contain compounds designed to scavenge acidic compounds such as hydrogen sulfide and carbon dioxide. Further the drilling fluid may interact selectively with other acidic or non-acidic compounds such as but not limited to the mechanism of chelation or ligand coordination. Acid scavengers include but are not limited to, for example, alkaline compounds, e.g., amines which can bind with carbon dioxide through either non-covalent bond (e.g., coordinating or complexing with carbon dioxide) or covalent bond. Non-covalent bonding is inclusive of any attractive mechanism that does not include molecular electron sharing such as that of ionic forces or weekly attractive forces including but not limited to electrostatic charge forces, dipole forces or induced dipole forces. This binding reaction can be reversed by application of heat or reduction in pressure to drive the equilibrium to recover the acidic component. Thus, free form carbon dioxide in a drilling fluid filtrate contaminated sample at reservoir conditions is present in a lower amount than that of carbon dioxide in that same sample at surface conditions, such as in a laboratory. The binding action between carbon dioxide and drilling fluid filtrate prevents downhole measurements, which are sensitive to only free-form carbon dioxide, from determining an accurate estimation of the total amount of carbon dioxide when drilling fluid filtrate is present. In some embodiments, techniques as disclosed herein provide a total concentration of carbon dioxide present in a downhole formation fluid being withdrawn from a reservoir by correcting for the effects of drilling fluid filtrate

contamination.

[0014] Some embodiments of this application relate to a method, which comprises obtaining real time property measurements of a fluid comprising a formation fluid downhole, obtaining real time measurements of an amount of an interactive component of the fluid downhole, obtaining real time measurements of an amount of a non-interactive component of the fluid downhole, and determining a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole, wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the interactive component in its free form downhole.

[0015] Some embodiments of this application relate to a method, which comprises obtaining real time property measurements of a fluid comprising a formation fluid downhole, obtaining real time measurements of an amount of an interactive component of the fluid downhole, obtaining real time measurements of an amount of a non-interactive component of the fluid downhole, and determining the total amount of the interactive component in the fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole, wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the interactive component in its free form downhole. [0016] The real time measurements can be obtained, for example, by a tool having a sensor including an optical computing device as disclosed herein. The tool with the optical computing device may be incorporated in a drilling system or a wireline system to measure a characteristic of a fluid.

[0017] As used herein, the term“characteristic” refers to a chemical, mechanical, or physical property of a fluid (e.g., a downhole fluid in an oil and gas rig or wellbore). A characteristic of a fluid may include a quantitative or qualitative value of one or more chemical constituents or compounds present therein or any physical property associated therewith. Such chemical constituents and compounds may be referred to herein as“analytes.” Illustrative

characteristics of a substance that can be monitored with the optical computing devices described herein can include, for example, chemical composition e.g., identity and concentration in total or of individual components), phase presence (e.g, C0 2 , gas, oil, water, etc.), impurity content, pH, alkalinity, viscosity, density, ionic strength, total dissolved solids, salt content (e.g., salinity), porosity, opacity, bacteria content, total hardness, combinations thereof, state of matter (solid, liquid, gas, emulsion, mixtures, etc.), and the like.

[0018] As used herein, the term “electromagnetic radiation” refers to radio waves, microwave radiation, infrared and near-infrared radiation, visible light, ultraviolet light, X- ray radiation and gamma ray radiation.

[0019] As used herein, the term“optical computing device” refers to an optical device that is configured to receive an input of electromagnetic radiation associated with a fluid and produce an output of electromagnetic radiation from a processing element (e.g, ICE) arranged within the optical computing device. The electromagnetic radiation that optically interacts with the processing element is changed so as to be readable by a detector, such that an output of the detector can be correlated to a particular characteristic of the substance. The output of electromagnetic radiation from the processing element can be reflected, transmitted, and/or dispersed electromagnetic radiation. Whether the detector analyzes reflected, transmitted, or dispersed electromagnetic radiation may be dictated by the structural parameters of the optical computing device as well as other considerations known to those skilled in the art. In addition, emission and/or scattering of the fluid, for example via fluorescence, luminescence, Raman, Mie, and/or Raleigh scattering, can also be monitored by optical computing devices.

[0020] As used herein, the term“optically interact” or variations thereof refers to the reflection, transmission, scattering, diffraction, or absorption of electromagnetic radiation either on, through or from one or more processing elements (i.e., ICE or MOE components) or a substance being analyzed by the processing elements. Accordingly, optically interacted light refers to electromagnetic radiation that has been reflected, transmitted, scattered, diffracted, or absorbed by, emitted, or re-radiated, for example, using a processing element, but may also apply to interaction with a substance. As mentioned above, the processing element used in the above-defined optical computing devices may be an ICE. In operation, an ICE is capable of distinguishing electromagnetic radiation related to a characteristic of interest of a substance from electromagnetic radiation related to other components of the substance.

[0021] FIG. 1 illustrates an optical computing device 20 that may be used in a downhole tool 10. Optical computing device 20 is configured to measure a characteristic of a fluid. Downhole tool 10 includes a light source 101 providing an illumination light 105 ( e.g ., electromagnetic radiation) that impinges on a sample 150 of the fluid, such as a downhole fluid encountered in the oil and gas industry during drilling and borehole logging operations. Optical computing device 20 includes ICEs 100a, lOOb, and lOOc (hereinafter collectively referred to as ICEs 100). Accordingly, optical computing device 20 includes optical elements to direct a portion of an interacted light l06a to ICE lOOa, a portion of an interacted light l06b to ICE lOOb, and a portion of an interacted light l06c to ICE lOOc. Further, optical computing device 20 includes optical elements to direct a computed light 108a from ICE lOOa to a detector 110, a computed light 108b from ICE 100b to detector 110, and a computed light l08c from 1CE 100c to detector 110. Detector 110 may also be configured separately to receive computed light from each of the individual lCEs 100. Hereinafter, interacted lights 106a-c will be collectively referred to as interacted lights 106, and computed lights 108a-c will be collectively referred to as computed lights 108.

[0022] Without limitation, the number of ICEs 100 in optical computing device 20 may be only one, two, three (as illustrated in FIG. 1), or more or less. Furthermore, without limitation any one of ICEs 100 may be used with a broadband filter, a narrow band filter, a neutral density filter, a grating element, a diffraction prism, or any other type of spectroscopic resolving optical element as known to those with ordinary skill. In that regard, a first ICE 100 in a first optical computing device 20 may be associated with a first fluid characteristic, and a second ICE 100 in a second optical computing device 20 may be associated with a second fluid characteristic. Without limitation, the first fluid characteristic and the second fluid characteristic may be the same or may be different. In some embodiments, a second ICE 100 may be disassociated with the first fluid characteristic. Accordingly, a second computed light 108 may have an intensity that is unrelated to the first fluid characteristic. [0023] A detector 110 receives computed lights 108 and generates a signal 170 proportional to the intensity of computed lights 108. In some embodiments, downhole optical tool 10 uses available measurements from other sensors to get reference fluid pressure (P), temperature (T), density (p), and other parameters associated with sample 150, such as fluid viscosity, bubble point, and the like. Accordingly, the reference P, T, and p data collected with downhole optical tool that are compatible to the corresponding pressure, volume, and temperature (PVT) measurements of a standard calibration database may be used as inputs of fluid predictive models.

[0024] ln some embodiments, interacted lights 106 may be referred to as“sample lights,” and computed lights 108 are sample lights interacted with lCEs 100. In some embodiments, it is desirable that the intensity of at least one of computed lights 108 be proportional to the fluid characteristic being measured. In some embodiments, the intensity of computed lights 108 may be related to the fluid characteristic through a non-linear relationship involving multiple factors. For example, in some embodiments P, T and other environmental factors measured by downhole tool 10 affect the relation between computed light 108 and the fluid characteristic.

[0025] ln still further embodiments, optical computing device 20 can obtain real time measurements of an amount of an interactive component of the fluid downhole, and real time measurements of an amount of a non-interactive component of the fluid downhole.

[0026] A controller 160 in downhole tool 10 uses the signal from detector 110 and the measured P, T, and p values to determine a characteristic of the downhole fluid forming sample 150. Controller 160 may include a processor 161 and a memory 162. Memory 162 may store commands in a pre-calibrated optical signal transformation algorithm and in a fluid predictive model which, when executed by processor 161 cause controller 160 to perform at least some steps in methods for analyte detection and fluid characterization as disclosed herein. While controller 160 may be included in downhole tool 10, in some embodiments, controller 160 may be at the surface and communicating with downhole tool 10, which can be near or at the bottom of a borehole in an oil and gas operation.

[0027] Processor 161 may be configured to perform optical fluid analysis using non-linear neural network (NN) transformation and predictive algorithms stored in memory 162. In some embodiments, processor 161 performs the non-linear optical analysis in real-time. Sample 150 may include heavy oils, medium and light oils, gas condensates and gas, water, multiphase mixtures and other fluids relevant to downhole fluid analysis. [0028] FIG. 2 illustrates an ICE 100 for use in an optical computing device for a downhole tool. As illustrated, ICE 100 may include a plurality of alternating layers 202 and 204, such as silicon (Si) and Si0 2 (quartz), respectively. In general, layers 202, 204 include materials whose index of refraction is high and low, respectively. Other examples of materials might include niobia and niobium, germanium and germania, MgF, SiO, and other high and low index materials known in the art. Layers 202, 204 may be strategically deposited on an optical substrate 206. In some embodiments, optical substrate 206 is BK-7 optical glass. In other embodiments, the optical substrate 206 may be another type of optical substrate, such as quartz, sapphire, silicon, germanium, zinc selenide, zinc sulfide, or various plastics such as polycarbonate, polymethylmethacrylate (PMMA), polyvinylchloride (PVC), or diamond, or ceramics, combinations thereof, and the like.

[0029] At the opposite end ( e.g ., opposite the optical substrate 206 in FIG. 2), the ICE 100 may include a layer 208 that is generally exposed to the environment of the device or installation, and may be able to detect a sample substance. The number of layers 202, 204 and the thickness of each layer 202, 204 are determined from the spectral attributes acquired from a spectroscopic analysis of a characteristic of the substance being analyzed using a conventional spectroscopic instrument. The spectrum of interest of a given characteristic typically includes any number of different wavelengths. It should be understood that the exemplary ICE 100 in FIG. 2 does not in fact represent any particular characteristic of a given substance, but is provided for purposes of illustration only. Consequently, the number of layers 202, 204 and their relative thicknesses, as shown in FIG. 2, bear no correlation to any particular characteristic. Nor are the layers 202, 204 and their relative thicknesses necessarily drawn to scale, and therefore should not be considered limiting of the present disclosure. Moreover, those skilled in the art will readily recognize that the materials that make up each layer 202, 204 ( i.e ., Si and Si0 2 ) may vary, depending on the application, cost of materials, and/or applicability of the material to the given substance being analyzed.

[0030] In some embodiments, the material of each layer 202, 204 can be doped or two or more materials can be combined in a manner to achieve the desired optical characteristic. In addition to solids, the exemplary ICE 100 may also contain liquids and/or gases, optionally in combination with solids, in order to produce a desired optical characteristic. In the case of gases and liquids, the ICE 100 can contain a corresponding vessel (not shown), which houses the gases or liquids. Exemplary variations of the ICE 100 may also include holographic optical elements, gratings, piezoelectric, light pipe, and/or acousto-optic elements, for example, that can create transmission, reflection, and/or absorptive properties of interest. [0031] Multiple layers 202, 204 exhibit different refractive indices. By properly selecting the materials of the layers 202, 204 and their relative thickness and spacing, the ICE 100 may be configured to selectively pass/reflect/refract predetermined fractions of electromagnetic radiation at different wavelengths. Each wavelength is given a predetermined weighting or loading factor. The thickness and spacing of the layers 202, 204 may be determined using a variety of approximation methods from the spectrum of the characteristic or analyte of interest. These methods may include inverse Fourier transform (IFT) of the optical transmission spectrum and structuring the ICE 100 as the physical representation of the IFT. The approximations convert the IFT into a structure based on known materials with constant refractive indices.

[0032] The weightings that the layers 202, 204 of the ICE 100 apply at each wavelength are set to the regression weightings described with respect to a known equation, or data, or spectral signature. When electromagnetic radiation interacts with a substance, unique physical and chemical information about the substance may be encoded in the electromagnetic radiation that is reflected from, transmitted through, or radiated from the substance. This information is often referred to as the spectral“fingerprint” of the substance. The ICE 100 may be configured to perform the dot product of the electromagnetic radiation received by the ICE 100 and the wavelength dependent transmission function of the ICE 100. The wavelength dependent transmission function of the ICE 100 is dependent on the layer material refractive index, the number of layers 202, 204 and the layer thicknesses. The ICE 100 transmission function is then analogous to a desired vector derived from the solution to a linear multivariate problem targeting a specific component of the sample being analyzed. As a result, the output light intensity of the ICE 100 is related to the characteristic or analyte of interest. The desired vector derived from the solution to a linear multivariate problem may be any one of a regression vector, a loading vector, or a plurality of loading vectors derived from a linear combination of more than one regression vector. Accordingly, in some embodiments ICE 100 may include alternating layers of a first ( e.g ., Si and the like) and a second (e.g., S1O2, and the like) dielectric material. Each of the alternating layers of the first and the second dielectric materials have a thickness and a refractive index selected according to a regression vector associated with a characteristic of a sample.

[0033] Optical computing devices employing ICE 100 may be capable of extracting the information of the spectral fingerprint of multiple characteristics or analytes within a substance and converting that information into a detectable output regarding the overall properties of the substance. That is, through suitable configurations of the optical computing devices, electromagnetic radiation associated with characteristics or analytes of interest in a substance can be separated from electromagnetic radiation associated with all other components of the substance in order to estimate the properties of the substance in real-time or near real-time. Accordingly, ICE 100 is able to distinguish and process electromagnetic radiation related to a characteristic or analyte of interest.

[0034] Before ICE 100 is physically fabricated, one or more ICE models are typically generated. Such models may be generated using, for example, a computer-based software program or design suite that may be stored on a computer-readable medium containing program instructions configured to be executed by one or more processors of a computer system. The design suite may be configured to generate several ICE device models, each being configured or otherwise adapted to detect a particular characteristic or analyte of interest.

[0035] FIG. 5 illustrates a drilling system 500 configured with at least one tool having a sensor including but not limited to an optical computing device 532 ( e.g ., optical computing device 20) in a measurement-while-drilling (MWD) or logging-while-drilling (LWD) operation. Boreholes may be created by drilling into the earth 502 using drilling system 500. Drilling system 500 may be configured to drive a bottom hole assembly (BF1A) 504 positioned or otherwise arranged at the bottom of a drill string 506 extended into the earth 502 from a derrick 508 arranged at the surface 510. The derrick 508 includes a Kelly 512 and a traveling block 513 used to lower and raise the Kelly 512 and the drill string 506.

[0036] The BHA 504 may include a drill tool 514 operatively coupled to a tool string 516 which may be moved axially within a drilled wellbore 518 as attached to the tool string 516. During operation, drill tool 514 penetrates the earth 502 and thereby creates wellbore 518. BHA 504 provides directional control of drill tool 514 as it advances into earth 502. Tool string 516 can be semi -permanently mounted with various measurement tools (not shown) such as, but not limited to, measurement-while-drilling (MWD) and logging-while-drilling (LWD) tools, that may be configured to take downhole measurements of drilling conditions. In other embodiments, the measurement tools may be self-contained within drill string 506, as shown in FIG. 5.

[0037] Fluid or“drilling mud” from a mud tank 520 may be pumped downhole using a mud pump 522 powered by an adjacent power source, such as a prime mover or motor 524. The drilling mud may be pumped from mud tank 520, through a stand pipe 526, which feeds the drilling mud into drill string 506 and conveys the same to drill tool 514. The drilling mud exits one or more nozzles arranged in drill tool 514 and in the process cools drill tool 514. After exiting drill tool 514, the mud circulates back to the surface 510 via the annulus defined between the wellbore 518 and the drill string 506, and in the process returns drill cuttings and debris to the surface. The cuttings and mud mixture are passed through a flow line 528 and are processed such that a cleaned mud is returned down hole through the stand pipe 526 once again.

[0038] BHA 504 may further include a downhole tool 530. For this embodiment, downhole tool 530 includes optical computing device 532 configured with one or more ICE 100. Downhole tool 530 may be positioned between drill string 506 and drill tool 514.

[0039] A controller 560 including a processor 561 and a memory 562 can be

communicatively coupled to optical computing device 532 of downhole tool 530. While optical computing device 532 may be placed near the bottom of wellbore 518, and extend for a few inches above drill tool 514, a communication channel may be established by using electrical signals or mud pulse telemetry for most of the length of tool string 506 from drill tool 514 to controller 560. In certain embodiments, optical computing device 532 can obtain real time measurements of an amount of an interactive component of the fluid downhole, and real time measurements of an amount of a non-interactive component of the fluid downhole. In addition, drilling system 500 can be configured with one or more additional tools to obtain real time property measurements of a fluid comprising a formation fluid downhole.

[0040] Memory 562 includes commands which, when executed by processor 561 cause controller 560 to perform steps in methods consistent with the present disclosure. More specifically, controller 560 may provide commands to and receive data from optical computing device 532 during operation. For example, in some embodiments, controller 560 may receive information from optical computing device 532 about drilling conditions in wellbore 518 and controller 560 may provide a command to BHA 504 to modify certain drilling parameters. For example, controller 560 may provide a command to adjust or change the drilling direction of drill tool 514 based on a message contained in information provided by optical computing device 532. In that regard, the information provided by optical computing device 532 to controller 560 may include certain drilling conditions such as physical or chemical properties of the drilling mud in the subterranean environment. More generally, optical computing device 532 may provide data such as gas-oil-ratio (GOR) content, a methane concentration, a CCF concentration, or a hydrocarbon content of a fluid in the borehole. Accordingly, controller 560 may use processor 561 to determine a

characteristic of the sample in a medium surrounding drill tool 514 using the data collected from the optical computing device 532. [0041] FIG. 6 illustrates a wireline system 600 configured with a tool having a sensor including but not limited to an optical computing device 604 during formation testing and sampling. After drilling of wellbore 518 is complete, it may be desirable to know more details of types of formation fluids and the associated characteristics through sampling with use of wireline formation tester. System 600 may include a wireline tool 602 that forms part of a wireline logging operation that can include one or more of an optical computing device 604 as described herein ( e.g optical computing device 20 or 532). System 600 may include derrick 508 supporting traveling block 613. Wireline tool 602, such as a probe or sonde, may be lowered by wireline or logging cable 606 into borehole 518. Wireline tool 602 may be lowered to the bottom of the region of interest and subsequently pulled upward at a substantially constant speed by wireline or logging cable 606. Wireline tool 602 may be configured to measure fluid properties of the wellbore fluids, and any measurement data generated by wireline tool 602 and its associated optical computing device(s) 604 can be communicated to a surface logging facility 670 for storage, processing, and/or analysis. The optical computing device(s) 604 may include one or more ICE 100. Logging facility 670 may be provided with electronic equipment 650, including one or more processors 651 and one or more memory 652 for various types of signal processing. Memory 652 may store instructions and commands which, when executed by processor 651, can provide determinations and fluid characterization as disclosed herein.

[0042] At least some of the steps in the methods described herein may be performed by a computer having a processor executing commands stored in a memory of the computer.

[0043] Some embodiments of this application relate to a system, e.g., a drilling system or logging system. The system comprises one or more tools such as one or more downhole tools or one or more logging tools which comprise one or more optical computing devices. The one or more tools can be configured to obtain real time property measurements of a fluid comprising a formation fluid downhole, real time measurements of an amount of an interactive component of the fluid downhole, and/or real time measurements of an amount of a non-interactive component of the fluid downhole. The system can also comprise a memory storing instructions, and at least one processor that executes the instructions to: determine the total amount of the interactive component or a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole, wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole, wherein the property is scaled with the contamination level.

[0044] Some embodiments of this application relate to a non-transitory, computer-readable storage medium including instructions which, when executed by a processor cause a computer to perform a method, the method comprising: receiving real time property measurements of a fluid comprising a formation fluid downhole, receiving real time measurements of an amount of an interactive component of the fluid downhole, receiving real time measurements of an amount of a non-interactive component of the fluid downhole, and determining the total amount of the interactive component or a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole, wherein the real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole, wherein the property is scaled with the contamination level.

[0045] As used herein, a non-interactive component refers to any compound in a formation fluid that does not interact with drilling fluid or mud such as by forming covalent or noncovalent bonds with other components of the drilling fluid or mud. In other words, the non-interactive component exits in its free form in a formation fluid without preferential influence from any drilling fluid component. Typical examples of such non-interactive components for common drilling fluids include C 1-C5 alkanes, such as methane, ethane, propane, etc., although specific drilling fluid chemistries may make specific formation fluid components either interactive or non-interactive in different circumstances.

[0046] As used herein, an interactive component refers to any compound in a formation fluid that interacts with drilling fluid or mud such as by forming covalent or noncovalent bonds with other components of the drilling fluid or mud. This interaction leads to a chemical entity that does not respond to a signal, e.g., an optical signal, tuned to the interactive component when it is not interacting with certain other components, e.g., in its free form, present in drilling fluid or mud. The free form of the interactive component can be released when the drilling fluid filtrate contamination level is less than an amount required to interact with substantially the total amount of the interactive component. Theoretically, the drilling fluid filtrate contamination level required to interact with the total amount of the interactive component is also the drilling fluid filtrate contamination level when the release of the interactive component in its free form (or unbound form) begins to occur. Typical examples of the interactive components for common drilling fluids include C0 2 and H 2 S.

[0047] The phrases“total amount of the interactive component” and“actual amount of the interactive compound” are used interchangeably in this application. Both refer to the addition of the amount of the interactive compound in its free form and the amount of the interactive compound in its bound form.

[0048] The term“property” in the phrase“real time property measurement of a fluid” refers to the property of the fluid that is scaled with the contamination level. It can be the density or GOR of the fluid. It can also be the amount of any non-interactive component, which can be the same as or different from non-interactive component recited in the method.

[0049] The term“concentration” and“amount” for the interactive component and non interactive component are used interchangeably.

[0050] Use of brackets for components refers to amounts or concentrations of such components. For example, use of brackets for [C0 2 ], [Cl], [an interactive component], and [a non-interactive component] or something similar refer to the downhole measured amounts or concentrations of C0 2 , methane, the interactive component, and the non-interactive component, respectively. [C0 2 ]R, [C l ] R , [an interactive component^, and [a non-interactive component^ or something similar refer to the actual amounts or actual concentrations of C0 2 , methane (i.e., the amount of methane corrected for dilution factor caused by the contamination), the interactive component, and the non-interactive component (i.e., the amount of non-interactive component corrected for dilution factor caused by the

contamination), respectively.

[0051] In the application, the term“unbound” or“free form” may be used interchangeably. Both terms refer to a compound itself without forming a chemical entity that does not respond to an optical signal tuned to the compound in its free form. The term“bound form” refer to a compound forming a chemical entity with drilling fluid filtrate that does not respond to an optical signal tuned to the compound in its free form.

[0052] In implementing certain aspects of the application, drilling fluid is used in a wellbore. Drilling fluid filtrate is caustic, containing multiple oil or water soluble basic compounds designed to scavenge acidic compounds such as hydrogen sulfide (TI 2 S) or carbon dioxide from the formation fluid. The drilling fluid can contain water soluble and/or oil soluble acid scavenging compounds to reduce corrosion and bind with H 2 S. These scavengers are very often but not limited to amine components. Amines (nitrogen containing compounds) are also used for C0 2 capture during combustion. This process is well documented in the literature. The scavenging process involves interactions between scavenger, such as an amine, and the component to be scavenged, such as H 2 S or C0 2 . More generally, any caustic or Lewis base components in a mixture will interact with acetic or Lewis acid components. The interaction can be a non-covalent reaction or covalent reaction, or any other type reaction that allows the scavenged component, such as C0 2 or H 2 S, to be released in its free form, upon the drilling fluid contamination is less than the amount required to interact with the total amount of the component to be scavenged, such as H 2 S or C0 2 . Although amine chemistry is not the only scavenging chemistry available, it is common because it can also provide favorable conditioning to subterranean formations.

[0053] The minimum drilling fluid filtrate level required to completely bind the interactive component is termed as break through level.

[0054] lnteractive components also can be scavenged by a tool body. The competitive mechanism for binding with the mud filtrate can be used to optimize the concentration of drilling fluid filtrate wherein the filtrate level is chosen not to be as low as possible, but rather sufficiently close to the break through contamination level. Further, multiple samples may be acquired after the break through level to characterize multiple components of the reactive component. If the reactive component binds with the filtrate component, then it may be protected against scavenging from the tool, thereby allowing a sample to be

captured. Further with previous from analog wells or general experience characterization, a sampling decision on a new well may be conducted to optimize the level of contamination in a sample to preserve the reactive component and protect from tool or sampling scavenging. For example, when the interactive component is hydrogen sulfide, to avoid pollution, the sampling is expected to be performed before the break through level. In other words, a sampling decision is made based on the amount of the interactive component.

[0055] FIG. 3A shows a plot of real time concentration measurements for C0 2 , methane (denoted as Cl) and gas-oil ratio (GOR) from a pumpout fluid over time. In some embodiments, the value of the ordinate (Y-axis) in the plot depicted in F1G. 3A is a signal generated by a detector from an optical computing device as disclosed herein (e.g., signal 170 from detector 110 in optical computing device 20, cf. FIG. 1). The measurements were obtained by using optical computing devices consistent with the present disclosure (e.g., optical computing devices 20, 532, and 604) in downhole measurements by flowing the pump out fluid through the sensors. The optical computing devices use at least one ICE tuned to measure free, unbound C0 2 in the pump out fluid The optical signals of bound C0 2 significantly differ from those of un-bound C0 2 . Accordingly, the optical computing device is not expected to respond to bound C0 2 . .

[0056] The real time plot of the concentration of free C0 2 can be characterized as comprising three phases, which include an initial low steady concentration followed by a phase showing a sharp increase in the concentration of free C0 2 followed by a plateau concentration phase. For this embodiment, the amount of free C0 2 begins to rise sharply in FIG. 3 A at 91 minutes when the drilling fluid filtrate contamination level decreased to the amount required to complex the total amount of C0 2 .

[0057] As used herein, the phrase“the time when the release of the interactive components in its free form begins to occur” or similar language refers to the time point on the real time plot of the amount of the interactive component when the amount of the interactive components in its free form begins to rise more sharply than the previous phase. In theory, it is the time when the drilling fluid filtration contamination in the formation fluid is at a level required to interact with the total amount of the interactive component such that no free interactive component exists. This contamination level is termed as“B” in this application or break through contamination level. Before and after this time, the drilling fluid filtration contamination level in the formation fluid is greater and lower than B, respectively.

[0058] It is believed that in the phase before 91 minutes, amines (and/or other acid scavengers) in the drilling fluid filtrate or mud contamination were complexing (loosely binding in a non-covalent fashion) with the C0 2 thereby suppressing the signal for unbound C0 2 until the drilling fluid filtrate or mud concentration- and consequently the amine concentration- was sufficiently low to allow free C0 2 to be released. The C0 2 concentration began to rise immediately after 91 minutes, corresponding with a decrease in the drilling fluid filtrate or mud associated scavengers such that free, unbound C0 2 could be present and detected.

[0059] Compared to the laboratory determined concentration of C0 2 in the sample represented by FIG. 3A, the C0 2 determined by the optical computing device downhole was 1.8 percentage units lower than the laboratory determination (9.04% versus 7.24%), resulting in a relative 20% difference in concentration. However, according to laboratory analysis, the fluid that was sampled contained 3.22% wt drilling fluid filtrate or mud contamination.

[0060] During laboratory analysis, the complexing of C0 2 with amines in the drilling fluid filtrate or mud would have been reversed and free, unbound C0 2 released immediately when the sample was flashed to lower pressure. Therefore, the laboratory would observe all C0 2 whether previously bound or free. The laboratory determination of 9.04% wt C0 2 in the formation fluid was a true representation of the total C0 2 concentration in the contaminated formation fluid. The optical computing device measured the contaminated formation fluid downhole, where high pressure facilitated complexing reactions. Therefore, the C0 2 result of 7.24% wt obtained using an optical computing device downhole represented only the unbound or free C0 2 present in the contaminated formation fluid.

[0061] From the laboratory reported contamination of formation fluid sampled at different times, the pumpout optical computing device data could be scaled to determine a 15% wt contamination at the time when free C0 2 in the formation fluid began to release (i.e., at 91 minutes in FIG. 3). Therefore, optical computing device predicted 0 % wt free C0 2 with 15% contamination. Free C0 2 began to rise immediately after the contamination dropped below 15%. The contamination level of 15% wt was the amount of drilling fluid filtrate to complex with the total amount of C0 2 present in the formation fluid. A simple ratio (3.2%/l5%) determines that at 3.2% wt contamination, 20% of the C0 2 would be complexed and 80% of the C0 2 would be free downhole.

[0062] Therefore, the downhole response of the optical computing device (7.24 wt%) was only 80% of the total C0 2 concentration. Correcting the downhole response of the optical computing device for complexing yields a total C0 2 concentration in the formation fluid of 9.09 wt%. That means, the actual amount of C0 2 (9.09 wt%) is equal to the measured amount of C0 2 (7.24 wt%) divided by the result of (1-3 2%/l 5%).

[0063] The corrected downhole C0 2 response of the optical computing device was only 1% higher than the laboratory determination (9.04% wt). This correction did not account for the dilution factor of drilling fluid filtrate to correct the reservoir concentration. The uncontaminated reservoir fluid concentration can be calculated to correct for dilution of C0 2 as 9.09/(1 -3.2%/ 100%)=9.37% wt C0 2.

[0064] The above validates a method of determining the actual amount of C0 2 in the formation fluid (termed as“[C(¾] R ”) based on the real time amount of C0 2 measured downhole (termed as [C(¾]). This method comprises determination of drilling fluid filtrate contamination levels of the formation fluid at different times. The contamination level at the time when the release of free C0 2 begins to occur (termed as“ B”) and at the time of interest which is after the time when the release of free C0 2 occurs (termed as“C”) can be determined. Both B and C can be expressed as a number of contamination percent.

[0065] The relationship of [CO 2] obtained by downhole measurements to [CO 2] R , B, and C can be expressed in Equation 1 set forth below (C < or = B): Equation 1

[0066] FIG. 3B shows real time density measurements of the fluid during the same pumpout as FIG 3 A. In some embodiments, the value of the ordinate (Y-axis) in the plot depicted in FIG. 3B is a signal generated by a detector from an optical computing device as disclosed herein ( e.g ., signal 170 from detector 110 in optical computing device 20, cf. FIG. 1). In FIG. 3B, the density of the fluid pumpout, as shown on the left axis, graded approximately linearly from drilling fluid filtrate at early times to formation fluid at late times. During very early times, drilling fluid (mud) was actually pumped through the optical computing device as opposed to the drilling fluid filtrate. The drilling fluid had a much higher density than drilling fluid filtrate. As mud cleared the tool line, the density of the pumped fluid shifted down to the density of pure drilling fluid filtrate. A density of 0.815 g/cc for drilling fluid filtrate, P F, could be estimated at early times by extrapolating the density response back to the origin. That means, the density of the drilling fluid filtrate is the density of the pumpout fluid extrapolated to time 0 on the real time density measurements of the pumpout fluid downhole, which correspond to 100% contamination.

[0067] Using an average of the ending fluid density p E in the plot of FIG. 3B as 0.70155 g/cc, for which a laboratory drilling fluid filtrate contamination of 3.22% wt was measured, the density of the pure formation fluid P R could be calculated as: (3.22/l00)p F + (1- 3.22/l00)p R =p E so that p R was 0.6978 g/cc. The contamination curve shown on the right axis of Figure 3B can be calculated by the method described below.

[0068] This application further relates to a method of determining the drilling fluid filtrate contamination of the formation fluid. This method further uses both real time, in situ or post processed measurements of an interactive component of the formation fluid and real time measurements of a non-interactive component of the formation fluid. The method further provides information of the amounts of the interactive component and the non-interactive amount for in real time or in situ actions including sampling decision actions. This method can further use physical fluid property measurements such as density measurements of the pumpout fluid downhole.

[0069] ln some embodiments, the method comprises determination of a value for B and a value for C using asymptotic assumptions.

[0070] By way of a non-limiting example, the interactive component can be CCh or FFS. The non-interactive component can be a Ci-C 5 alkane e.g., methane, ethane, propane, etc.

[0071] Any sensor response linear with contamination may be scaled to a contamination calibration curve with two known points of contamination. In fact for some sensor responses, the 100% drilling fluid filtrate point is known a-priori. Such is the case including but not limited to gas concentration, where it is assumed that drilling fluid filtrate contains no dissolved gas. For example a methane concentration should then be zero at 100% drilling fluid filtrate.

[0072] Other sensor responses which may be characterized at 100% drilling fluid filtrate contamination include but not limited to drilling fluid filtrate density. Of greater difficulty is obtaining a secondary signal from which to calibrate a contamination curve. Contamination trend fitting assumes the monotonic decrease of contamination throughout the process of a near wellbore flush by a wireline formation tester pumpout. The trend fitting models assume an asymptotic approach to pure formation fluid.

[0073] The second calibration point may be derived as the asymptote of the trend fit model. In fact, nonlinear responses may also be fit if the response function for the sensor measurement is known as a function of contamination. Such is the case with gas to oil ratio GOR, viscosity, or MR signals. As an example, one method to use nonlinear signals to calculate contamination is to linearize the signals according to the known response function. As another example, a second method is to fit contamination according to a nonlinear model. Unfortunately, the assumption that contamination asymptotically approaches zero often proves to be false, and instead the contamination approaches a steady state value either influenced by far field contamination or drilling fluid filtrate recycle from the wellbore.

Also, often the models used to fit contamination are not sufficient to extrapolate the nuances of real data. The contamination level B at the time when release of free CO occurs can serve as a secondary point for a real time calibration of a contamination curve.

[0074] The method of determining the drilling fluid filtrate contamination level of the formation fluid is described below by using C0 2 as the interactive component and methane as non-interactive component and the real time measurements illustrated in FIG. 3 A and F1G. 3B, without limiting the scope thereof.

[0075] The real time amount of methane obtained by downhole measurements (termed as [C7]), the actual amount of methane (termed as [C7] R ), which refers to the methane amount corrected for dilution factor caused by the contamination, and C, which is the contamination percent at the time of interest which is after the time when the release of free CO2 occurs, can be represented in Equation 2 set forth below: Equation 2

[0076] A plot of the real time [CO 2 versus corresponding real time [C7] is linear with slope related to B. “Corresponding” means [C7] measured at the same time as [CO 2]. Using a two point slope (m) calculation, Equation 3 set forth below can be used to calculate m, where:

Equation 3

[0077] In Equation 3, Ci and C? are contaminations at two different time points in the fluid pumpout, respectively. When the earlier time point is the time point when the release of free CO2 occurs (for example, at 91 minutes in FIG. 3), C1=B , and Equation 3 can be simplified to Equation 4 set forth below:

Equation 4

[0078] Equation 4 can be simplified into Equation 5, defining [CO2V [U/] R = k and rearranging the denominator: m = k (1 -C 2 /B) Equation 5

(1-1+(E-C 2 )/100)

[0079] Equation 5 can be simplified into Equation 6 or Equation 7 by removing 1-1 and unifying the numerator: Equation 6 Equation 7

[0080] Equation 7 can be rearranged into Equation 8:

B = k ^ Equation 8 [0081] Using the linear equation [C0 2 ] = \Cl\m + b. where b is the pumpout determined intercept, Equation 9 can be derived:

Equation 9

4

[0082] At the time when C = B, Equation 2 can be rewritten as Equation 10:

Equation 10.

[0083] Unfortunately for the example of FIG. 3, the intercept at C7=0 occurring at 100% contamination which is far from B of -15% as estimated from lab data. Although mathematically the slope and intercept can be used to derive B, in this case the intercept would have too much error, so B is instead estimated by iteration.

[0084] In conducting iteration, m can be calculated from two time points in FIG. 3A, each time point corresponding to a set of [ CO 2 ] and [C7] For example, at time 91 and 111 minutes in FIG. 3A, each of [C7] and [CO2] was found to be:

The slope m is (0.0537-0.0l27)/(0.0805-0.0752) = 7.74.

[0085] [CO2 R and [C7] R can be calculated with an asymptotic approach. This approach is reflected in FIG. 4. It begins with a set of [ CO2 ] and [C7] measured at time 1 (labeled as [C(¾]timei and [C7] timei, respectively), which is, for example , after the inflection point of CO2 rise of real time measurements, which may be approximated by 50% of the asymptotic CO2 value, such as measurements of amount of C0 2 and methane at 228 minutes as reflected in FIG. 3A. Treating this set of [C(¾]timei and [C7] timei as the first set of [CO2] R and [C7] R , thereby obtaining a A value which is equal to [U6F], imc i /[C/], mc i, labeled as kl . According to Equation 8, B=k* \00/m , a B value labeled as B1 can be obtained as Bl=kl* lOO/m.

[0086] Based on the real time density measurements chart of the pumpout fluid as exemplified in FIG. 3B, the density for the drilling fluid filtrate when the contamination is 100% can be obtained by extrapolation. B 1 represents the contamination at the time when the release of free C0 2 begins to occur, wherein the corresponding density can be found in the real time density measurements chart (the time is 91 minutes in FIG. 3B). Hence, using linear fitting based on the density and contamination value at the two time points (i.e., time 0 when contamination is 100% wherein the density is obtained by extrapolation of the density plot of FIG. 3B, and the time when the contamination is B1 wherein the density can be found at the time when release of free C02 begins to occur in the density plot of FIG. 3B, this time can be found in FIG. 3 A) and the density measured at time 1, a first value for the

contamination C at time 1, labeled Ca mel , can be obtained.

[0087] Applying the calculated B1 and Ca mel , and the measured [CO 2] timci into Equation 1, and the calculated B1 and C timei , and the measured [C7] timei and Equation 2, a second set of [CO2] R and [C7] R can be obtained. So is the second value for k (labelled as k2). Using the same slope m, a second value for B (labelled as B2) is obtained. Repeating the density linear fitting, a second value for the contamination C at time 1 can be obtained. Repeating the calculations until each of the [CO 2 R and [C7] R approach asymptotic limit.

[0088] The final round of calculation comprises using the asymptotic limit of the [C0 2 ] R and [C7] R to obtain k , and then /i, using the density linear fitting to obtain C at time 1.

[0089] The above method compared well with C value obtained in laboratory. For example, the asymptotic limit of the [CO2] R and [C7] R obtained using measurements reflected in FIG. 3A and FIG 3B and the method described in FIG. 4 are 0.0650 g/cc and 0.0572 g/cc, respectively. The k value therefore is 0.0650/0.0572 = 1.1304, which leads to il = 100 *k/m = 14.61%. From FIG. 3B, the density for the drilling fluid filtrate is 0.815 by extrapolation (at 100% contamination). B is the contamination at the time when the release of free C0 2 begins to occur, which is at 91 minutes according to FIG. 3A. In FIG. 3B, the density at 91 minutes is 0.71452. Using the density linear fitting based on the following two points,

the contamination at 228 minutes which corresponds to a density of 0.70155 on FIG. 3B can be obtained as 3.590632 by linear fitting using the line determined by the two time points

(time 0 and 91 minutes, described in the above table). Comparing with the laboratory value of 3.22%, the calculated value of 3.59 is reliable. Density is used in the examples for linear fitting. Other properties of the pumpout fluid which are scaled with contamination level can also be used for linear fitting. Exemplary properties include GOR of the pumpout fluid and the amount of a non-interactive component of the pumpout fluid.

[0090] The methods described herein use C0 2 as the example of interactive component and methane as the example of non-interactive component for determining the drilling fluid filtrate contamination and the actual amount of C0 2. The methods are not limited to C0 2 and methane. The real time measurements of other interactive components and non-interactive components can be used to determine the drilling fluid filtrate contamination and the actual amount of the interactive component. [ CO2 ] and [C7] used in the methods described herein can be replaced with [an interactive component] and [a non-interactive component], respectively.

[0091] At least some of the steps described in FIG. 4 can be performed by a computer having a processor executing commands stored in a memory of the computer. Specifically, some embodiments of this application relate to a system, comprising memory storing instructions and data, and at least one processor that executes the instructions, the instructions and data comprising: receive real time amount measurements of Cl and C0 2 at timel and obtain k as [C(¾]/[C7]; determine B which is equal to k * 100 hn, wherein m is equal to the ratio of the difference of real time measurements of [CO2] at two time points over the difference of real time measurements of [C7] at the corresponding two time points; determine the contamination at timel (C ftme2 ) by linear fitting on a line determined by time zero wherein contamination is 100% and density is the extrapolated value of the real time density chart and by the time when the release of free C0 2 begins to occur wherein contamination is B and density is found on the real time density chart; determine [CO 2] R and [C7]R according to Equation 1 and 2, respectively; determine whether [CO2] R and [C7]R are equal to or greater than a certain confidence level, such as 95% confidence level, comparing to [C0 2 \ and [C7], respectively. In some embodiments, the instructions further comprise: output Qimei as the contamination at time 1, and [CO 2] R as the actual amount of C0 2 in the formation fluid if the confidence level is satisfied; determine k as [C(¾]R/[C7]R and repeat the steps beginning from the determination of B if the confidence level is not satisfied.

[0092] Some embodiments of this application relate to a non-transitory, computer-readable storage medium including instructions which, when executed by a processor cause a computer to perform a method. The method comprising: receive real time amount measurements of Cl and C0 2 at timel and obtain k as [C(¾]/[C7]; determine B which is equal to k * 100 !m, wherein m is equal to the ratio of the difference of real time measurements of [ CO2 ] at two time points over the difference of real time measurements of [C7] at the corresponding two time points; determine the contamination at timel (C time d by linear fitting on a line determined by time zero wherein contamination is 100% and density is the extrapolated value of the real time density chart and by time when the release of free C0 2 begins to occur wherein contamination is B and density is found on the real time density chart; determine [C0 2 ] R and [C7] R according to Equation 1 and 2, respectively; determine whether [C(9 2 ] R and [C7] R are equal to or greater than certain confidence level, such as 95% confidence level, comparing to \C0 2 ] and [( 7J, respectively. In some embodiments, the method further comprises: output C timei as the contamination at time 1, and [C0 2 \ R as the actual amount of C0 2 in the formation fluid if the confidence level is satisfied; determine k as [C(¾] R /[C7] R and repeat the steps beginning from the determination of B if the confidence level is not satisfied.

[0093] Embodiments disclosed herein include: A. A method, including obtaining real time property measurements of a fluid comprising a formation fluid downhole, obtaining real time measurements of an amount of an interactive component of the fluid downhole, obtaining real time measurements of an amount of a non-interactive component of the fluid downhole. The method further includes determining a total amount of the interactive component in the fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole.

[0094] B. A method, including obtaining real time property measurements of a fluid comprising a formation fluid downhole, obtaining real time measurements of an amount of an interactive component of the fluid downhole, obtaining real time measurements of an amount of a non-interactive component of the fluid downhole. The method further includes determining a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole.

[0095] C. A system including one or more tools having one or more optical computing devices wherein the one or more tools are configured to obtain real time property

measurements of a fluid comprising a formation fluid downhole, real time measurements of an amount of an interactive component of the fluid downhole, and real time measurements of an amount of a non-interactive component of the fluid downhole. The system further comprises a memory storing instructions and at least one processor that executes instructions to: determine the total amount of the interactive component or a contamination level of the formation fluid at a time of interest based on the real time property measurements of the fluid downhole and the real time measurements of the amounts of the interactive component and non-interactive component downhole.

[0096] Each of embodiments A, B and C may have one or more of the following additional elements in any combination: Element 1 : The real time measurements of the amount of the interactive component downhole are real time measurements of the amount of the interactive component in its free form downhole. Element 2: The property is scaled with the contamination level. Element 3: At least one of the real time property measurements, the real time measurements of the amount of the interactive component and/or the real time measurements of the non-interactive component is obtained by an optical computing device. The optical computing device may be part of a tool such as a downhole tool or wireline tool. Element 4: The methods can include disposing a downhole tool or wireline tool into a borehole to obtain the real time property measurements, real time measurements of the amount of the interactive component, and/or the real time measurements of the amount of the non-interactive component. Element 5: The real time property of the fluid comprising the formation fluid downhole is the density of the fluid.

[0097] Element 6: In some embodiments, determining the contamination level of the formation fluid comprises determining the density of the drilling fluid filtrate by

extrapolating the real time density measurements of the fluid to the origin; alternatively, determining the contamination level of the formation fluid comprises linear-fitting the density of the fluid at the time of interest on a line reflecting the linear relationship between the density of the fluid and the corresponding contamination level such as wherein the line reflecting the linear relationship between the density of the fluid and the corresponding contamination level is established via the density of the drilling fluid filtrate, which corresponds to 100% contamination, and the density of the fluid, which corresponds to the contamination level when the release of the interactive component in its free form begins to occur. Element 7: Determining the contamination level of the formation fluid comprises determining a slope of a line of the real time amount of the interactive component versus the corresponding real time amount of the non-interactive component.

[0098] Element 8: Wherein determining the contamination level of the formation fluid comprises determining a slope of a line of the real time amount of the interactive component versus the corresponding real time amount of the non-interactive component. Element 9: Wherein determining the contamination level of the formation fluid comprises determining the actual amounts of the interactive and non-interactive components such as wherein the actual amounts of the interactive and non-interactive components in the formation fluid are obtained through an asymptotic approach.

[0099] Element 10: Wherein determining the contamination level of the formation fluid comprises determining the contamination level of the formation fluid when the release of the interactive component in its free form begins to occur. Element 11 : Wherein the time of interest is after the time when the release of the interactive component in its free form begins to occur. Element 12: Wherein the real time measurements of the amount of the interactive component comprise three phases, which include an initial low steady concentration followed by a phase showing a sharp increase in the concentration of free interactive component followed by a plateau concentration phase.

[00100] Element 13: The interactive component is C0 2 or H 2 S and/or the non-interactive component is methane, ethane, propane, butane, or pentane such as wherein the interactive component is C0 2 and the non-interactive component is methane.

[00101] Element 14: The methods may include determining the contamination level of the formation fluid comprises: receiving real time amount measurements of the non-interactive component and the interactive component at timel and obtain k as [the interactive component]/[the non-interactive component]; determining B which is equal to k *\00/m, wherein m is equal to the ratio of the difference of real time measurements of [the interactive component] at two time points over the difference of real time measurements of [the non interactive component] at the corresponding two time points; determining the contamination at timel (C^ mei ) by linear fitting on a line determined by time zero wherein contamination is 100% and the property is the extrapolated value of the real time property chart and by the time when the release of the free interactive component begins to occur wherein

contamination is B and density is found on the real time property chart; determining [the interactive component^ and [the non-interactive component^ according to [the interactive component]= [the interactive component^ * (1 - C timei /B) and [the non-interactive component]=[the non-interactive component^ * (l-C timei /100), respectively; and determining whether [the interactive component^ and [the non-interactive component^ are equal to or greater than a 95% confidence level, comparing to [the interactive component] and [the interactive component], respectively. In some embodiments, the system may include memory and at least one processor that executes the instructions to determine the foregoing.

[00102] Element 15: The systems may include wherein the one or more tools is either a wireline tool or a downhole tool included in a BHA. [00103] Therefore, the disclosed systems and methods are well adapted to attain the ends and advantages mentioned as well as those that are inherent therein. The particular embodiments disclosed above are illustrative only, as the teachings of the present disclosure may be modified and practiced in different but equivalent manners apparent to those skilled in the art having the benefit of the teachings herein. Furthermore, no limitations are intended to the details of construction or design herein shown, other than as described in the claims below. It is therefore evident that the particular illustrative embodiments disclosed above may be altered, combined, or modified and all such variations are considered within the scope of the present disclosure. The systems and methods illustratively disclosed herein may suitably be practiced in the absence of any element that is not specifically disclosed herein and/or any optional element disclosed herein. While compositions and methods are described in terms of “comprising,”“containing,” or“including” various components or steps, the compositions and methods can also“consist essentially of’ or“consist of’ the various components and steps. All numbers and ranges disclosed above may vary by some amount. Whenever a numerical range with a lower limit and an upper limit is disclosed, any number and any included range falling within the range is specifically disclosed. In particular, every range of values (of the form,“from about a to about b,” or, equivalently,“from approximately a to b,” or, equivalently,“from approximately a-b”) disclosed herein is to be understood to set forth every number and range encompassed within the broader range of values. Also, the terms in the claims have their plain, ordinary meaning unless otherwise explicitly and clearly defined by the patentee. Moreover, the indefinite articles“a” or“an,” as used in the claims, are defined herein to mean one or more than one of the elements that it introduces. If there is any conflict in the usages of a word or term in this specification and one or more patent or other documents that may be incorporated herein by reference, the definitions that are consistent with this specification should be adopted.