Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ATTENUATED TOTAL REFLECTION BASED MEASUREMENT OF REFRACTIVE INDEX AND CARBON DIOXIDE CONCENTRATION
Document Type and Number:
WIPO Patent Application WO/2023/183128
Kind Code:
A1
Abstract:
Systems and methods presented herein generally relate to a tool for determining a refractive index of a formation fluid using attenuated total reflection. The tool includes a body having a fluid admitting assembly and a flow line that receives the formation fluid. The tool also includes two different crystals having faces in contact with fluid in the flow line. The tool further includes at least one light source coupled to the crystals and configured to direct light into the crystals. Tn addition, the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid. The tool also includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. The tool further includes at least one processor coupled to the at least one light detector.

Inventors:
RAMAKRISHNAN TERIZHANDUR S (US)
O’LEARY ROBERT (US)
Application Number:
PCT/US2023/014465
Publication Date:
September 28, 2023
Filing Date:
March 03, 2023
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
SCHLUMBERGER TECHNOLOGY CORP (US)
SCHLUMBERGER CA LTD (CA)
SERVICES PETROLIERS SCHLUMBERGER (FR)
SCHLUMBERGER TECHNOLOGY BV (NL)
International Classes:
E21B49/08; E21B49/10; G01N21/17; G01N21/41
Foreign References:
US20190079007A12019-03-14
US20120290208A12012-11-15
US20170242149A12017-08-24
US20140300889A12014-10-09
US20100025112A12010-02-04
Attorney, Agent or Firm:
BROWN, Ashley E. et al. (US)
Download PDF:
Claims:
CLAIMS

1. A tool for determining a refractive index of a formation fluid, comprising: a body having a fluid admitting assembly and a flow line that receives the formation fluid; two different crystals having faces in contact with fluid in the flow line, wherein the crystals have at least one of different refractive indices and different angles of incidence; at least one light source coupled to the crystals and configured to direct light into the crystals, wherein the light has at least one wavelength, and wherein the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid; at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals; and at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

2. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid utilizing the attenuations to account for variations in penetration depth.

3. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid at the temperature and pressure of the sampled fluid.

4. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid correcting for background radiation.

5. The tool of claim 1, wherein the at least one processor is configured to use a plurality of reference wavelengths to determine the refractive index of the formation fluid, wherein each reference wavelength of the plurality of reference wavelengths corresponds to a different attenuation coefficient of a component in the formation fluid.

6. The tool of claim 1, wherein the at least one processor is configured to normalize the gain with respect to a reference fluid.

7. The tool of claim 1, wherein the at least one processor is configured to estimate optimal concentrations of components in the formation fluid.

8. The tool of claim 1 , wherein the at least one processor is configured to verify light and heavy component concentrations in the formation fluid.

9. The tool of claim 1, wherein the two different crystals comprise different materials.

10. The tool of claim 1, wherein each of the crystals comprises diamond, sapphire, or zirconia.

11. A method for determining a refractive index of a formation fluid, comprising: placing into a borehole a tool having a fluid admitting assembly, a flow line, two different crystals in contact with the formation fluid in the flow line, at least one light source, at least one light detector and associated signal processing circuitry, and at least one processor, wherein the crystals have at least one of different refractive indices and different angles of incidence; moving the fluid admitting assembly of the tool into contact with a formation at a location of interest in the formation; causing formation fluid to flow into the flow line of the tool and into contact with the crystals; directing light from the at least one light source into the crystals; detecting with the at least one light detector the light exiting the crystals, wherein the crystals and the at least one light source are configured such that the light will undergo total internal reflection at interfaces between the crystals and the formation fluid; using the associated signal processing circuitry to compare the exiting light to a reference light value for the at least one light source associated with the at least one detector in order to obtain attenuation values; and using the at least one processor to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; determine the refractive index of the formation fluid; and determine a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid at measurement wavelengths and reference wavelengths.

12. The method of claim 1 1 , comprising using the at least one processor to determine the refractive index of the formation fluid utilizing the attenuations to account for variations in penetration depth.

13. The method of claim 11, comprising using the at least one processor to determine the refractive index of the formation fluid at the fluid conditions of temperature and pressure.

14. The method of claim 11, comprising using the at least one processor to determine the refractive index of the formation fluid correcting for background radiation.

15. The method of claim 11, comprising using the at least one processor to use a plurality of reference wavelengths to determine the refractive index of the formation fluid, wherein each reference wavelength of the plurality of reference wavelengths corresponds to a different attenuation coefficient of a component in the formation fluid.

16. The method of claim 11, comprising using the at least one processor to estimate optimal concentrations of components in the formation fluid.

17. The method of claim 11, comprising using the at least one processor to verify light and heavy component concentrations in the formation fluid.

18. The method of claim 11, wherein the two different crystals is composed of different materials.

19. The method of claim 11, wherein each of the crystals is composed of diamond, sapphire, or zirconia.

20. A tool for determining a refractive index of a formation fluid, comprising: two different crystals having faces in contact with fluid in a flow line, wherein the crystals have at least one of different refractive indices and different angles of incidence; at least one light source coupled to the crystals and configured to direct light into the crystals; at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals; and at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

Description:
ATTENUATED TOTAL REFLECTION BASED MEASUREMENT OF REFRACTIVE INDEX AND CARBON DIOXIDE CONCENTRATION

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of U.S. Provisional Application No. 63/269,882 entitled “Attenuated Total Reflection Based Measurement of Refractive Index and Carbon Dioxide Concentration,” filed March 24, 2022, the disclosure of which is incorporated herein by reference in its entirety.

BACKGROUND

[0002] The present disclosure generally relates to a tool for determining a refractive index and concentration of carbon dioxide of a formation fluid using attenuated total reflection.

[0003] This section is intended to introduce the reader to various aspects of art that may be related to various aspects of the present techniques, which are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as an admission of any kind.

[0004] Measurement of composition based on attenuated total reflection requires refractive index of the fluid. Since the index itself is a function of the composition, independent refractive index data is necessary to infer composition, particularly that of dissolved carbon dioxide. Conversely, the index can be correlated to a range of physical properties of interest (e g., density, composition and polarizability), and a self-consistency check between composition and refractive index may be carried out. Consistency improves measurement confidence. [0005] Previous methods for inferring refractive index include measuring attenuated total reflection using either two different crystal materials cut with the same truncated-cone geometry, or the same material with differing cone angle of the frustrum, or both. Such methods assume a fixed crystal material refractive index over the wavelengths of measurement, and that the refractive index of the fluid is non-dispersive or invariant to the wavelength of the probing electromagnetic beam. Therefore, any wavelength dependent variation in refractive index in the crystal or the fluid introduces an error in the estimated composition of the fluid. It is desirable to remove this error by, for example, inferring the variation of the refractive index of the fluid with respect to the wavelength, and accounting for such variation in estimating fluid composition.

SUMMARY

[0006] A summary of certain embodiments described herein is set forth below. It should be understood that these aspects are presented merely to provide the reader with a brief summary of these certain embodiments and that these aspects are not intended to limit the scope of this disclosure.

[0007] Certain embodiments of the present disclosure include a tool for determining a refractive index of a formation fluid. The tool includes a body having a fluid admitting assembly and a flow line that receives the formation fluid. The tool also includes two different crystals having faces in contact with fluid in the flow line. The crystals have at least one of different refractive indices and different angles of incidence. The tool further includes at least one light source coupled to the crystals and configured to direct light into the crystals. The light has at least one wavelength. In addition, the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid. The tool also includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. The tool further includes at least one processor coupled to the at least one light detector. The at least one processor is configured to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

[0008] Certain embodiments of the present disclosure also include a method for determining a refractive index of a formation fluid. The method includes placing into a borehole a tool having a fluid admitting assembly, a flow line, two different crystals in contact with the formation fluid in the flow line, at least one light source, at least one light detector and associated signal processing circuitry, and at least one processor. The crystals have at least one of different refractive indices and different angles of incidence. The method also includes moving the fluid admitting assembly of the tool into contact with a formation at a location of interest in the formation. The method further includes causing formation fluid to flow into the flow line of the tool and into contact with the crystals. In addition, the method includes directing light from the at least one light source into the crystals. The method also includes detecting with the at least one light detector the light exiting the crystals. The crystals and the at least one light source are configured such that the light will undergo total internal reflection at interfaces between the crystals and the formation fluid. The method further includes using the associated signal processing circuitry to compare the exiting light to a reference light value for the at least one light source associated with the at least one detector in order to obtain attenuation values. In addition, the method includes using the at least one processor to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, determine the refractive index of the formation fluid, and determine a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid at measurement wavelengths and reference wavelengths.

[0009] Certain embodiments of the present disclosure also include tool for determining a refractive index of a formation fluid. The tool includes two different crystals having faces in contact with fluid in a flow line. The crystals have at least one of different refractive indices and different angles of incidence. The tool also includes at least one light source coupled to the crystals and configured to direct light into the crystals. The tool further includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. In addition, the tool includes at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

[0010] Various refinements of the features noted above may be undertaken in relation to various aspects of the present disclosure. Further features may also be incorporated in these various aspects as well. These refinements and additional features may exist individually or in any combination. For instance, various features discussed below in relation to one or more of the illustrated embodiments may be incorporated into any of the above-described aspects of the present disclosure alone or in any combination. The brief summary presented above is intended to familiarize the reader with certain aspects and contexts of embodiments of the present disclosure without limitation to the claimed subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Various aspects of this disclosure may be better understood upon reading the following detailed description and upon reference to the drawings, in which:

[0012] FIG. l is a schematic diagram of a downhole apparatus for determining the refractive index of a formation fluid, in accordance with embodiments of the present disclosure;

[0013] FIG. 2 is a partial block, partial schematic diagram of elements of the downhole apparatus of FIG. 1, in accordance with embodiments of the present disclosure;

[0014] FIGS. 3a and 3b are schematic diagrams showing crystals arranged relative to a flow line, in accordance with embodiments of the present disclosure;

[0015] FIGS. 4-8 are plots of a double normalized function for the effective path length for diamond and sapphire, in accordance with embodiments of the present disclosure;

[0016] FIG. 9 is a plot of a crystal correction coefficient with respect to sapphire, in accordance with embodiments of the present disclosure;

[0017] FIG. 10 is a plot of the refractive index of sapphire, in accordance with embodiments of the present disclosure;

[0018] FIGS. 11 and 12 are plots of a function of the refractive index of sapphire versus square of wavelength, in accordance with embodiments of the present disclosure; [0019] FIG. 13 is a plot of the refractive index of diamond near linear dependence with respect to reciprocal of square of wavelength and negligible temperature dependence, in accordance with embodiments of the present disclosure;

[0020] FIG. 14 is a plot of the minimum and maximum carbon dioxide pressures required for attenuation to be in range for ∈ c calibration, in accordance with embodiments of the present disclosure;

[0021] FIG. 15 is a plot of the solubility of carbon dioxide in water, in accordance with embodiments of the present disclosure,

[0022] FIG. 16 is another plot of the minimum and maximum carbon dioxide pressures required for attenuation to be in range for ∈ c calibration, in accordance with embodiments of the present disclosure; and

[0023] FIG. 17 is a flow diagram of a method for determining a refractive index of a formation fluid, in accordance with embodiments of the present disclosure.

DETAILED DESCRIPTION

[0024] One or more specific embodiments of the present disclosure will be described below. These described embodiments are only examples of the presently disclosed techniques.

Additionally, in an effort to provide a concise description of these embodiments, all features of an actual implementation may not be described in the specification. It should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers’ specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another. Moreover, it should be appreciated that such a development effort might be complex and time consuming, but would nevertheless be a routine undertaking of design, fabrication, and manufacture for those of ordinary skill having the benefit of this disclosure.

[0025] When introducing elements of various embodiments of the present disclosure, the articles “a,” “an,” and “the” are intended to mean that there are one or more of the elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Additionally, it should be understood that references to “one embodiment” or “an embodiment” of the present disclosure are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the recited features.

[0026] As used herein, the terms “connect,” “connection,” “connected,” “in connection with,” and “connecting” are used to mean “in direct connection with” or “in connection with via one or more elements”; and the term “set” is used to mean “one element” or “more than one element.” Further, the terms “couple,” “coupling,” “coupled,” “coupled together,” and “coupled with” are used to mean “directly coupled together” or “coupled together via one or more elements.”

[0027] In addition, as used herein, the terms “real time”, ’’real-time”, or “substantially real time” may be used interchangeably and are intended to describe operations (e.g., computing operations) that are performed without any human-perceivable interruption between operations. For example, as used herein, data relating to the systems described herein may be collected, transmitted, and/or used in control computations in “substantially real time” such that data readings, data transfers, and/or data processing steps occur once every second, once every 0.1 second, once every 0.01 second, or even more frequently, during operations of the systems (e.g., while the systems are operating). In addition, as used herein, the terms “continuous”,

“continuously”, or “continually” are intended to describe operations that are performed without any significant interruption. For example, as used herein, control commands may be transmitted to certain equipment every five minutes, every minute, every 30 seconds, every 15 seconds, every 10 seconds, every 5 seconds, or even more often, such that operating parameters of the equipment may be adjusted without any significant interruption to the closed-loop control of the equipment. In addition, as used herein, the terms “automatic”, “automated”, “autonomous”, and so forth, are intended to describe operations that are performed are caused to be performed, for example, by a computing system (i.e., solely by the computing system, without human intervention).

[0028] As described above, previous methods for inferring refractive index assumed a fixed crystal material refractive index over the wavelengths of measurement, and that the refractive index of the fluid was non-dispersive or invariant to the wavelength of the probing electromagnetic beam. As such, any wavelength dependent variation in refractive index in the crystal or the fluid introduces an error in the estimated composition of the fluid.

[0029] The embodiments described herein include variation of refractive index of the crystal with respect to wavelength. Within the band of measurement, the embodiments described herein allow the refractive index of the fluid be different at each of the probing wavelengths. Total internal reflection is assumed to occur. Therefore, the embodiments described herein have the potential to improve accuracy of not only the refractive index measurement, but also of the inference of dissolved gas (usually carbon dioxide (CO2)) fraction. Hydrocarbon solvents for illustrative purposes are broken into light and heavy, although a greater number of components may be chosen, depending on the availability of more reference wavelengths. The refractive index dispersion characteristics may be inferred, depending on the number of frequencies or wavelengths deployed.

[0030] To provide context, during both injection and production of oil and gas operations, reservoir fluids are monitored. In enhanced oil recovery (EOR) processes, compositional measurements of fluid phases are useful for quantitative evaluation of displacement induced migration. Specifically, data relating to fluid characterization in different producing zones may be used to infer reservoir structure, optimize zonal production strategies, quantify hydrocarbon quality, and facilitate recycling of injected gases, such as CO2.

[0031] To measure concentrations, one approach is to withdraw fluid samples from the reservoir using a formation testing probe or packed-off intervals. In certain embodiments, sensors may be used within the flow line to measure transmission at infra-red (IR) wavelengths. The spectral characteristics of the transmitted beam are indicative of various components within the fluid, each chemical component having its own absorption coefficient. In addition, density and viscosity may also be used to ensure consistent component fractions.

[0032] As described in greater detail herein, attenuated total reflection (ATR) measurement at mid-IR frequencies may be used to measure dissolved components (e.g., CO2 within a liquid). These methods rely on the attenuation of a reflected wave due to a small penetration (e.g., usually a fraction of a wavelength) of the incident beam’s evanescent wave, the penetration depth being dependent on the refractive indices of the fluid and the crystalline material, such as sapphire or diamond or zirconia, in contact with it. The incident angle of the beam at the crystal- fluid interface, and therefore the geometry, also affects the effective penetration depth. The crystal is transparent to incident and reflected infra-red electromagnetic wave and has a refractive index sufficiently larger than the fluid to enable total reflection.

[0033] In the absence of any information, a nominal refractive index for the fluid may be assumed. Such assumption is acceptable when the solute concentrations are relatively low and the refractive index is determined by the solvent. However, for relatively high solute concentrations, such assumption may lead to inaccuracies if the fluid’s index varies with the concentration of the dissolved components. In certain embodiments, such limitations may be overcome by collecting two attenuation measurements with differing crystal geometries, or differing materials, or both, and inferring ηf , the fluid refractive index. In such embodiments, it may be assumed that as well as η K , the crystal’s refractive index, are constant over the span of the measurement wavelength.

[0034] However, real fluids and materials used for ATR measurements may show a level of dispersion that should not be entirely ignored if accurate determinations of are necessary to estimate effective penetration length and fluid composition. Besides geometry, the penetration distance of the evanescent wave is dependent on ηf and η K , and, therefore, their variability with respect to wavelength.

[0035] The embodiments described herein continuously measure the refractive index of the fluid in order to correct for the change in the penetration depth in substantially real-time, while accounting for variations of η K and ηf with respect to wavelength A. Since a direct measurement for refractive index is utilized in conjunction with the ATR, temperature adjustment for penetration distance is avoided. In addition, the embodiments described herein also avoid infrared background correction. The embodiments described herein may be implemented as a plug-in to current formation testers.

[0036] FIG. 1 illustrates a downhole apparatus 10 for determining the refractive index of a formation fluid. As illustrated, in certain embodiments, the downhole apparatus or tool 10 may be suspended in a borehole 12 traversing a formation 14 by a cable 16 that is spooled in a usual fashion on a suitable winch (not shown) on the formation surface. On the surface, the cable 16 may be electrically coupled to a surface control system 18. The downhole tool 10 includes an elongated body 20 that encloses a tool control system 22. In certain embodiments, the elongated body 20 also includes a selectively extendable fluid admitting assembly 24 and a selectively extendable tool anchoring member 26, which are respectively arranged on opposite sides of the body 20. In certain embodiments, the fluid admitting assembly 24 is configured to selectively seal off or isolate selected portions of the wall of the borehole 12 such that pressure or fluid communication with the adjacent formation 14 is established. In addition, in certain embodiments, the downhole tool 10 includes a fluid analysis module 28 with a flow line 30 through which fluid collected from the formation 14 flows. The fluid may thereafter be expelled through a port (not shown) or may be directed to one or more fluid collecting chambers 32, 34, which may receive and retain the fluids collected from the formation 14. As described in greater detail herein, the fluid admitting assembly 24, the fluid analysis module 28, and the flow path to the fluid collecting chambers 32, 34 may be controlled by the control systems 18, 22.

[0037] In certain embodiments, at least two sample chambers 36 may be placed in communication with the flow line 30 as described with respect to FIGS. 3a and 3b. Each sample chamber 36 may be configured as illustrated in FIG. 2. In particular, each sample chamber 36 may be bounded by a cover 38 and an exterior surface 40 of an optically dense crystal 42. The flow line 30 provides for supply of a fluid sample 44 into the sample chamber 36 such that liquid fluid (i.e., of the fluid sample 44) is in direct contact with the exterior surface 40 of the crystal 42. An infrared (IR) light source 46 generates a beam of IR radiation 48 that is directed into the crystal 42 such that it is incident on the interface of the crystal 42 and the liquid fluid of the fluid sample 44 at an angle larger than the critical angle θ C , which is a function of the refractive indices of both the fluid sample 44 and the crystal 42 and is given by where r/ K is the refractive index of the crystal 42 and η f is the refractive index of the fluid sample 44. The internal reflection of the beam 48 can occur multiple times along the interface of the crystal 42 and the fluid sample 44. The crystal 42 may be a high refractive index material, such as sapphire or diamond, in order to minimize the critical angle θ C .

[0038] In the regions of the IR spectrum where the fluid sample 44 absorbs energy, the evanescent wave at those wavelengths will be attenuated. The crystal 42 directs the reflected beam 50 (e.g., including the attenuated energy from each evanescent wave) for supply to an IR detector 52. As described in greater detail herein, in certain embodiments, signal processing circuitry 54 (e.g., amplifier and filter circuitry, A/D conversion circuitry, and so forth) processes the output of the IR detector 52 to measure and process the output of the IR detector 52, thereby measuring the intensity of the detected light within the predetermined IR measurement bands as a function of time, and generating digital data corresponding to such measurements. In certain embodiments, one or more predetermined IR measurement bands include a predetermined absorption band centered around 4.27 micrometers (pm) (e.g., 4.27 pm ±75 nanometers (nm)), a predetermined reference band centered around 2.5 pm (e.g., 2.5 pm ±75 nm), and a reference band centered around 3.5 pm (e.g., 3.5 pm ±75 nm). The reference wavelengths are chosen to distinguish solvent components such that no absorption of the desired dissolved component occurs at the reference wavelength.

[0039] In certain embodiments, the reflected beam 50 (e.g., including the attenuated evanescent waves) may be guided by a lens 56 through an optical filter 58 to the IR detector 52. The optical fdter 58 may provide bandpass optical filtering for the predetermined infrared measurement (and reference) bands. In certain embodiments, the IR detector 52 may include an array of IR detector elements corresponding to the predetermined infrared measurement bands. Alternatively, in other embodiments, a single IR detector element may be used.

[0040] In certain embodiments, additional supporting electronics may be used in conjunction with the IR light sources 46 and IR detectors 52. In certain embodiments, the supporting electronics may be provided for each IR light source 46 and each IR detector 52 or may be shared by the IR light sources 46 and by the IR detectors 52. As illustrated in FIG. 2, in certain embodiments, such supporting electronics may include a data communication interface 60, IR source driver circuitry 62, control circuity 64, and power circuitry 66. In certain embodiments, the data communications interface 60 may be electrically coupled to the signal processing circuitry 54 and may operate to communicate digital data generated by the signal processing circuitry 54 (e.g., which represents the intensity of the detected light within the predetermined IR measurement band(s) as a function of time) to an external data processor 68.

[0041] In certain embodiments, the data processor 68 may process the digital data as described in greater detail herein in order to determine the refractive index of the fluid sample 44. In certain embodiments, the IR source driver circuitry 62 may generate electrical signals for the IR light source 46 in order to operate the IR light source 46 as desired. In addition, in certain embodiments, the data processor 68 may send control signals (e.g., via the communications interface 60) to the control systems 18, 22 illustrated in FIG. 1 to cause the control systems 18, 22 to control certain surface and/or downhole equipment based at least in part on data processing performed by the data processor 68, which will be described in greater detail herein.

[0042] In certain embodiments, the control circuitry 64 may control operation of the electrical, optoelectrical and/or optical elements of the downhole tool 10 illustrated in FIG. 1 in accordance with commands communicated from the external data processor 68 to the control circuitry 64 via the communications interface 60. For example, in certain embodiments, the control circuitry 64 may interface to the IR source driver circuitry 62 to activate and control the operational mode of the IR light source 46 via commands issued by the external data processor 68 and communicated thereto via the communications interface 60. In addition, the control circuitry 64 may carry out other control operations as desired. In certain embodiments, the power circuitry 66 may receive power supply signals from an external power supply 70 and transform and/or condition these signals into a form suitable for supply to the electrical and optoelectrical elements of the downhole tool 10. In certain embodiments, the operation of the power circuitry 66 may include AC -DC conversion functions, DC-DC conversion functions, voltage regulation functions, current limiting functions, and other power conditioning functions.

[0043] Turning now to FIG. 3a, in certain embodiments, two different crystals 42, 42b may be disposed adjacent each other and along a flow line 30. In certain embodiments, the different crystals 42a, 42b may have different geometries. By way of example only, a first crystal 42a is a sapphire ATR crystal having faces (e.g., exterior surfaces) that angle at 75° from the horizontal, whereas a second crystal 42b is a sapphire ATR crystal having faces that angle at 65° from the horizontal. When the crystals 42a, 42b are in contact with formation fluids (e.g., the fluid sample 44 described with respect to FIG. 2), both crystals 42a, 42b are expected to have total internal reflection. In the configuration illustrated in FIG. 3a, the crystals 42a, 42b are arranged such that fluid flowing through the flow line 30 (e.g., the direction indicated by the arrow) will be first in contact with the first crystal 42a and then in contact with the second crystal 42b. Assuming that the fluid is generally homogeneous, measurements may be collected simultaneously. On the other hand, if it is assumed that the fluid is not homogeneous, the measurements may be made sequentially when it is expected that the same fluid is adjacent to the respective crystals 42a, 42b.

[0044] FIG. 3b illustrates another embodiment having two different crystals 42c, 42d. The crystals 42c, 42d are illustrated as facing each other on opposite sides of the flow line 30. In certain embodiments, the crystals 42c, 42d may have different geometries. By way of example only, a first crystal 42c is a sapphire ATR crystal having faces (e.g., exterior surfaces) that angle at 75° from the horizontal, whereas a second crystal 42d is a sapphire ATR crystal having faces that angle at 65° from the horizontal. Because the crystals 42c, 42d are disposed opposite each other with the fluid from the flow line 30 passing therebetween, measurements involving the crystals 42c, 42d may be made simultaneously. It is also to be understood that the two crystals 42c, 42d may be placed such that the flat faces of the crystals 42c, 42d facing the fluid of the two crystals 42c, 42d may be placed at the same axial location but at right angles to each other, or any other suitable angle.

[0045] In other embodiments, the different crystals (e.g., either the crystals 42a, 42b illustrated in FIG. 3a or the crystals 42c, 42d illustrated in FIG. 3b) may have substantially identical geometries (e.g., angles of incidence), but may be made from different materials (i.e., the crystals may have different refractive indices). By way of example only, one crystal may be a sapphire crystal and the other crystal may be a diamond crystal. In yet other embodiments, both the materials and the angles of incidence (e.g., geometries) of the different crystals may be different. In certain embodiments, the geometry of each material may be optimized in order to maximize sensitivity to r/y. Within an expected range of T]f, the configuration may be tailored so that the difference in the attenuation between the two crystals is maximized for the same wavelength A and number of reflections N R .

[0046] Conventional refractometers have been used to estimate the refractive index of crude oil in a surface laboratory at a specified wavelength. Unfortunately, sampled reservoir fluids may be contaminated by drilling-mud filtrate. The accuracy of the estimated refractive indices is dependent on both sample withdrawal techniques and the extent to which reservoir conditions are replicated in surface laboratories. It is known that contaminants introduced or removed during the fluid transfer process from downhole to laboratory may introduce a significant bias in the estimates of refractive index. It is logistically difficult and expensive to routinely bring reconstituted representative samples to the laboratory for analysis.

[0047] Another challenge arises due to the variability of refractive index with temperature, fluid composition, and pressure. For example, significant variation in the refractive index of glycerin and paraffin oil has been observed at relatively high pressures. In addition, refractive index of other fluids varies with dissolved species, and this dependence is roughly given by the Lorentz-Lorenz relationship. Also, variation of refractive index with dissolved CO2 in hydrocarbon systems is inevitable, and has indeed been the basis of mapping CO2 concentrations within a liquid. [0048] For completeness, a brief review of commonly used refractometers for crude oil in surface labs is provided here:

• The Abbe refractometer is based on total internal reflection of the incident beam at the interface of the sample and the measuring prism. The sample and prism are placed in direct contact. The measurement relies on inferring the critical angle of total reflection (0 C ). This is the incident angle for which the refracted ray travels along the boundary between the two media. In this refractometer, a source irradiates light from a wide range of incident angles onto a prism. For an incident angle, < 6 C the light is partly refracted and reflected. On the other hand, for

> 6 C , the light is totally reflected. A sensor array measures the reflected light intensity, and monitors the transition of partly reflected to totally reflected light for estimating the critical G c . The refractive index of fluid is then obtained from Snell’s law.

• The Interferometric refractometer is based on the principle of interference. It uses interferometry to measure the difference in light velocity in different media. This measurement principle is best suited for solids or thin films. In recent years, this technology has been modified for liquid samples.

• Other bench-top devices such as the Pulfrich refractometer and Immersion refractometer are well-known devices for measuring refractive index. Both are critical angle refractometers with variations in implementation of the principle of total internal reflection. Like the Abbe refractometer, these technologies are robust and precise for conducting measurements in laboratory environments. For example, a Peltier device is routinely used to avoid temperature variations between the sample and the sensing prism. These refractometers are not well suited for conducting downhole measurements and fluid analysis. [0049] The refractive index, rp is the reciprocal of the ratio of the phase velocity (v) in the medium to the speed of light in vacuum (c):

100501 Light travels slower in other media relative to vacuum because of electromagnetic field interactions with the charged particles of the medium Refractive index and the speed of light in a medium are dependent both on temperature and pressure. Various relationships have been proposed to capture the dependence between refractive index and mass density. For example, in miscible systems, the Gladstone-Dale equation is: where p is the mass density of the medium and η Mi is the molar refractivity of the I th component.

Mass fraction of the component i is Wi. Another well-known relationship is the Lorentz-Lorenz equation: where a denotes the molecular polarizability of the medium, N A is the Avogadro’s number, and M is the molecular weight of the medium. The polarizability is the coefficient of proportionality between the dipole moment and the electric field. [0051] Measurements of refractive index may be combined with one or more of the aforementioned formulae and others to obtain consistent physical properties of interest, including mass density, composition of crude oil, viscosity etc. within a restricted series of materials. These estimates are useful for reservoir modeling.

[0052] In many other ways, the measurement of refractive index is quite important. For example, in certain embodiments, dissolved CO2 concentration may be measured using the attenuation of a reflected signal at mid-IR wavelengths. This method, however, requires refractive index of the liquid within which the CO2 concentration needs to be obtained. Unlike aqueous solutions, in many instances (e.g., hydrocarbon solvent), the dissolved amount of CO2 is sufficiently large that it changes the refractive index of the phase under examination. Then, the dissolved fraction may not be obtained directly. It is for this reason that the two-crystal configuration described with respect to FIGS. 3a and 3b may be used to infer η f for subsequent determination of dissolved CO2.

[0053] The embodiments described herein present a new measurement principle that uses a combination of two or more attenuated total reflectance (ATR) sensors to measure the refractive index of fluid (17^) downhole at the measurement wavelengths including that of the reference. We also take into account the variation of η K (e.g., refractive index of crystal, K, is a generic indicator for crystal and may refer to sapphire, diamond, zirconia, and so forth) with respect to wavelength, since multiple wavelengths are used in such a measurement. A reference wavelength, at which there is no attenuation by the dissolved component (e.g., here CO2) whose fraction is desired is necessary, and is different from the dissolved component absorption wavelength λ m . Depending on the nature of the solvent, we may need more than one reference wavelength. In CO2 enhanced oil recovery, at a minimum, crude oil is divided into light and heavy components. The embodiments described herein illustrate the principle by having two reference wavelengths A r and λ R , although the number of reference wavelengths may be more and is at least equal to the number of components assumed to constitute the solvent. The values of η K and ηf at wavelengths λ r , λ R , and λ m are not the same, and variation with respect to A is consequential for determining penetration lengths over which absorption and scattering cause attenuation. Since the penetration length depends on the refractive index ratios at each of the wavelengths, attenuation is a function of not only the (natural log) molar attenuation coefficient of species i and its molar concentration Ci, but also the refractive index ratios (which in turn may vary with C i ). Thus, in order to infer the concentration of species causing intensity reduction from the optical measurement, refractive index of the fluid at the said measurement wavelength may first be determined, with the molar attenuation coefficient known.

Determination of these quantities for subsequent use for inferring dissolved component concentration is one of the purposes of the embodiments described herein. Certain embodiments of the present disclosure focus on the mid-infrared (m-IR) range; however, the techniques described herein are also extensible to a different range of wavelengths as long as the fundamental equations describing attenuation is rooted in Beer-Lambert’s law described below.

[0054] At this point, it may be useful to state notations for clarity. Molar concentration is C, and its subscript may be I, h, or c, referring to light and heavy components of solvent, and CO2. Similarly, as stated before, are the (natural log) attenuation coefficients given by 6;, i = I, h, or c. Tn our problem, concentrations are spatially uniform through the liquid over the path length,φ. In a transmission experiment, φ is readily identified. In attenuated total reflection, path length is obtained by solving the relevant electromagnetic equations of Maxwell, and an effective path length equivalent to a transmission experiment is identified. It is sufficient to know that the effective path length varies with the refractive indices of the fluid and the crystal, and that these may vary with wavelength, temperature, and pressure. The path length also changes with incident angle.

|0055| Beer-Lambert law with absorbance A e written in terms of natural logs of ratio of intensity measured I to source intensity I o is:

[0056] For completeness, the traditional chemistry definition of absorbance in terms of logs will be discussed. Here, absorbance A is given as: or The embodiments described herein may utilize either of these. Unless otherwise stated, ∈i will be used herein to refer to molar attenuation coefficients.

[0057] As used herein, non-hatted notation implies a value, and accented parameters imply functions. Since a main concern described herein is wavelength and concentration dependence of refractive indices, temperature and pressure (T and P) are generally assumed to be fixed. The variation with respect to T and P is addressed in the calibration section below. Also, are only species dependent, and are independent of Ci. At a reference wavelength λ r , it may be noted that:

[0058] Note that C = {C l , C h , C c }. As per the assumption discussed above, C c has no or minimal influence on attenuation at wavelength and λ R . Similar to λ r , at λ R :

[0059] Adsorption due to species CO2 occurs at measurement wavelength λ m . At this wavelength:

[0060] For molar attenuation coefficient, along the lines of notations of refractive indices, with subscripts denoting the component and the wavelength: [0061] As in the case of refractive indices, it is to be understood that the above quantities will vary with temperature and pressure, although in liquid state, pressure dependence is expected to be relatively weak.

[0062] At the wavelengths λ r , λ R , and λ m , the source (e.g., incident) intensities are I Or , I 0R , and I Om . The totally reflected beam is attenuated as per the dictates of Beer-Lambert law, and these measured intensities at the corresponding wavelengths, at I r , l R , and I m . If we let (3 represent the wavelength subscripts r, R, and m, an expression applicable for all wavelengths of interest and within the applicability of Beer-Lambert law is: where we note that through ηf and η K , and the path length variation with respect to wavelength and incident angle are captured in the subscripts β and 6. The subscript K for referring to crystal takes on a value that varies with the material, for example, d for diamond, s for sapphire, or f for zirconia. To distinguish the crystals, notations K 1 for crystal 1, K 2 for crystal 2, and so on if there are more than two crystals, may be used.

Source Calibration

[0063] The intensity I o β is fixed by the source temperature T o . Even if the fluid chamber is evacuated, so that there is no absorption, the measured optical intensity would not show the expected variation with respect to T o and would not be identical from one sensor to the next. This variation from the expected Planck’s black body spectral radiance of (h and k are the

Planck’s and Boltzmann constants): may be due to a number of factors including filter and detector variability, and may be remedied by setting suitable gains in the measurement system. Since the sensor should have an adequate span over the expected range of data, calibration in vacuum would lead to saturating the measurement. Therefore, a suitable liquid whose is known at various temperatures of the liquid and whose refractive index is in the middle of the expected range is ideal.

[0064] For source intensity gain and intensity tuning called normalization, consider the sensor crystal 42 exposed to the known fluid sample 44. As per the dictates of Eq. 22, the expected source intensity at λ R and λ m for a source temperature fixed at T o may be written as:

[0065] Obviously, f(T 0 ; A r ; A r ) = 1. The molar attenuation coefficient of the normalization fluid may be denoted with a subscript z. Then, for the normalization fluid, the ATR response for a sensor with N R total internal reflections is: [0066] Now, since the refractive index of the crystal 42 and the normalization fluid are known, the effective path length is known (see further below). Thus, the right hand side of the above equations may be computed. Since I zr is measured, Eq. 25 leads to:

[0067] From the measured I Or , l zr , and I zm , and Eqs. 23-27, the gains may be set so that:

[0068] If the above responses are satisfied through appropriate gain adjustment, then the ratios of Eq. 23 and 24 are met for all sensors, and it may be assumed that these relationships hold post-normalization.

Penetration Depth

[0069] The ATR technology is based on measuring the change in the intensity of a totally internally reflected infrared beam when it passes through the interface of the sensor (i.e., crystal 42) and the fluid sample 44. This is given in terms of the attenuation of the reflected beam intensity when compared to the incident beam. The implementation of ATR technology should satisfy two necessary conditions for total internal reflection. These are that:

• The refractive index of the crystal 42 be greater than that of the fluid sample 44 at all wavelengths over the measurement range.

• The incident angle of the beam be larger than the critical angle at the crystal -sample interface. [0070] The amplitude of the internally reflected wave at the crystal-sample interface is affected because the evanescent wave formed while undergoing total internal reflection penetrates the fluid sample 44 adjacent to the interface, and exponentially decays with the distance from the crystal-sample interface. The penetration depth is that distance over which the evanescent wave’s intensity decays according to what would have occurred in transmission, and is approximately:

[0071] In a strongly absorbing medium, the interaction between the probing light beam and the medium should be sufficiently small to ensure that measurements are not entirely attenuated. The correct depth or what is preferably termed as the effective path length is better quantified by considering perpendicular and parallel polarization and taking their mean value.

[0072] Since the path length of the evanescent wave is a fraction of a pm, ATR is a powerful technique for obtaining dissolved CO2 in brine and crude oil downhole. The prerequisite is that the predominant species should be the molecular CO2 and not a derivative species. If configured to have multiple reflections, the cumulative depth of penetration may be used to compute i, the optical path length of the sensor, approximately equal to N R d e , where N R is the number of reflections and d e is the effective path length, and is set equal Kd p as explained below.

[0073] It is assumed that the effective path length of the mid-IR is equal to Kd p , as described above. Parallel and perpendicular polarized waves undergo differing evanescent path lengths, and K computed as a result of both attenuations is the variable that corrects d p to d e . Thus, the effective path length is: where K varies with η f , η K , and θ. Variation of η f or η K with respect to λ implies that K changes with A. For that matter, it varies with concentration vector C of the dissolved species also. This leads to:

[0074] Again, the functional dependence is for a fixed temperature and pressure. N R is the number of reflections that is determined by the design of the crystal-fluid interface. Note that forη K , the subscript K is used to denote the material. For example, K may be d for diamond, s for sapphire, ξ for zirconia. For the fluid refractive index, a subscript s may be added to f in order to emphasize that the measurement is on a solution whose component is desired.

[0075] For intensities that are measured, the first subscript is denoted as s to indicate the solution whose dissolved component is desired to be estimated, whereas the second subscript refers to the wavelength. The third subscript refers to the crystal number. Each crystal number may have a different material of construction and/or a different 0.

[0076] With crystal one, the measured absorbance (in In scale) at λ r is thus denoted A er1 , and with crystal two, it is A er2 . Then:

[0077] The ratio of absorbance of the two crystals 42 is:

[0078] D is defined as:

[0079] For practical purposes, then, D = K. Then:

[0080] The results may be normalized with respect to a reference. In certain embodiments, the functions D at a ηf = η min = 1.3 are used as the reference, although 1.325 may be used as well. Accordingly: [0081] Further normalization of D r10 and D r2Q may be carried out assuming a fixed refractive index for the fluid sample 44 and the crystal 42. The additional normalization construction of a function that varies only with the refractive index of the fluid sample 44, assumed independent of λ. However, the embodiments described herein are far more elaborate because of variability in refractive indices with respect to λ in the material of the crystal 42 and the fluid sample 44. To this end, Eq. 37 may be rewritten as:

[0082] In addition:

[0083] Note that the denominator’s numerical value for the crystal index is matched to that of the numerator. Also, note that by definition, the ratio D rl0 — D r20 is independent of ηf . A second normalization enables removal of the dependency on η K and 0. For this: where F = F(η K s ) is a function of the ratio of the refractive indices of the crystal 42 to that of sapphire at A, and r] max is the maximum value of ηf for the normalization, set equal to 1.475 in this illustration. The range of 1.3 of 1.475 for covers most of fluids of interest. The function G( f,λ) implies that for each A, D NN may be sufficiently well represented by a function of Essentially, the dependence on A arises due to η s variation with respect to A and the second crystal’s η variation has been removed through the normalization process. It is, therefore, more appropriate to represent this dependence through This representation has an advantage that it reflects the more natural dependence, and the temperature variation is captured through η s .

[0084] Numerical evidence of the above conjecture is presented below in a separate section on universality. Henceforth, will be used (i.e., the approximation is replaced with an equality). The equation above was tested at 350 K for A in the range 2.5-4.5 pm with diamond and sapphire crystal properties. However, since the effective path length depends only on refractive indices, and not the material itself, it is believed that the conjecture is valid for other crystal materials whose refractive index is between that of diamond and sapphire (e.g., zirconia). At λ r , η K is replaced with η Kr and η s with r/ sr , the refractive index of sapphire at the first reference wavelength.

[0085] The conjecture of Eq. 43 is important to processing of the measurements. It allows us to rewrite Eq. 40 in the form:

[0086] With the conjecture that the above equation simplifies to:

[0087] Referring back to Eq. 30, Eq. 45 may be rewritten explicitly in terms of as:

[0088] The left hand side of the above equation is the ratio of two absorbances and constitutes a measurement. On the right hand side, the first term is independent o fs and it requires the geometry of the crystal 42, the crystal material and its refractive index at measurement conditions, all of which are known. The only unknowns in the second and third terms is T]^ r ; the functional description of F is given in the section on universal description. Satisfying Eq. 46 provides the solution for ηf sr .

[0089] The same procedure may be carried out for reference wavelength λ R . For this wavelength, Eq. 46 is modified to read:

[0090] Eq. 47 may be solved to obtain ηf sR . The measurement wavelength for the dissolved component is λ m . Analogous to Eqs. 46 and 47:

[0091] Again, since the crystal refractive indices are known at λ m , solving Eq. 48 from the measured ratio of absorbance, may be obtained.

[0092] Determination of ηf s at other wavelengths may be carried out as long as it lies between η min and η max , and suitable fdters and detectors are present within the sensor to carry out the measurements. Wavelength dependency of ηfs at the fluid’s temperature may then be obtained.

Dual Sapphire Crystals

[0093] Rather than using two different crystal materials, in other embodiments, sapphire may be used for both crystals. The above results may be simplified for such a configuration. Eq. 46 becomes:

[0094] An explicit solution for the fluid refractive index at A r is:

[0095] Analogous solutions at other wavelengths are:

Identical Crystal Material

[0096] In certain embodiments, the two crystals 42 may be made of the same material (e.g., diamond or zirconia). When the crystal materials are the same, Tk 1 = η K 2 at each wavelength. Although the ratio η K / η s is not unity, the second term of Eqs. 46 to 48 is one. Therefore, Eqs. 50 to 52 may be used, with the appropriate η K β replacing η s β in the expressions. Eqs. 38 and 39 may be used for D rl0 and D r20 with the appropriate refractive indices for the crystals 42.

Universality

[0097] Numerical evidence is now provided of the universality conjecture of Eq. 43 for D NN to be expressible in terms of functions G or G (see FIGS. 4-9). A wavelength was first chosen, with a range of 0, and D NN was computed. The value of F (given by the function F) that makes the plot universal was also found. All of the plots are illustrated for diamond and sapphire at a temperature of 350 K, but note that this is inconsequential, because only refractive indices enter the calculation. FIG. 4 illustrates that for two materials of different refractive indices at 2.5 pm, the double normalized non-dimensional path length can be overlain. A similar overlap is seen at 3 pm (FIG. 5). Additional plots in steps of 0.5 pm for λ are shown in FIGS. 6-8. The legend “Universal” curve is a quadratic least squares approximation for points using refractive indices of diamond and sapphire.

[0098] For each wavelength, the function F takes on a different value, and this is best expressed as a function of since (i) sapphire is the reference and (ii) the ratio of F /d p has explicit dependence on A removed. The function F is irrelevant when the crystal 42 is also made of sapphire since the multiplicative factorη K / η s - 1 will make the product zero. In FIG. 9, the variation of F with respect to is illustrated along with a least squares approximation. The small scatter of computed markers from the best-fit curve is due to the precision used in F, and has little material consequence.

[0099] Since F is known as a function of η K S , for a given λ and T, the argument of F is known. The curve of FIG. 9 gives F. For the temperature of interest, η K is known for the materials used at a given A. Since D rl0 , D r20 , D R20 , D ml0 , and D m20 are functions only ofη K at the wavelength of interest, and 0, all quantities on the right hand side of Eqs. 46-48 are known except for ηf , which may thus be determined from the ratio of two measurements represented by the left hand side.

Dissolved Component Concentration

[00100] For the purpose of this section, it is assumed that calibration has been carried out, and that the value of e lr , e hr , ∈ cr , e lR , e hR , ∈ hm , and ∈ cm within the temperature and pressure ranges of interest is known. Thus, the functions in Eqs. 12-20 assume that temperature T and pressure P are parameters, not explicitly included. In other words, as an example, strictly, E ir = ^ir(.^r> T, P) where T and P have been dropped in Eq. 12. [00101] In the section on calibration, it is illustrated how e t , e h , and ∈ c may be determined and, thus, infer their parametric dependence on T and P, and functional dependence on λ. By design (dropping the parametric dependence), e c r ) and e c R ) are nearly zero compared to solvent.

[00102] Now, at λ r and λR four measurements from two crystals 42 (or 2N K , for N K crystals 42) are known. However, one measurement at each wavelength is independent, since the other was needed for ηf at each wavelength. Since the crystal 42 with the smaller 0 will have a larger d e , attenuation measurement from the small 0 crystal 42 may be used. Letting 0 t < 0 2 , from Eq. 21 while recognizing that the design calls for ∈ cr , ∈ cR = 0:

[00103] Note that ? is computable since all the three arguments are known. Provided the equations are linearly independent, Q and C h may be determined. It is possible that e ir = € hr and e tR = e hR . If so, only the sum C t + C fl may be inferred, and the two equations have to be linearly dependent. In this unlikely case, during the calibration phase, it should be ensured that e im — e hm as we ll- Otherwise, I and h fractions at a molecular weight threshold should be distinguished so that

[00104] It is not possible for concentrations to be negative. Thus, if either one is found to be less than 0, its value may be set to be zero, and an error flag may be set. Each equation above will produce two different values for the non-negative concentration. A suitable mean (e.g., arithmetic) value of the two will be used. For example, suppose that C t < 0 from Eqs. 53 and 54. Ci = 0 may be set. Each of the above equations then produces a value for C h , and these may be averaged in certain embodiments.

[00105] Once C ( and C h are obtained from Eqs. 53 and 54, the measurement at may be used to get the concentration of the dissolved component from:

[00106] Note that C c > 0. If not, C c = 0 may be set, and an error flag may be set.

Optimal Concentration Estimation

[00107] For reducing noise in the output, a single measurement at wavelength A r and λ R may not be the best option. For example, detector and signal processing noise in the measurements, or fluctuations or variations in temperature between two crystals 42 may cause unwanted errors in C ( , C ft , and C c . It is desirable to increase the number of reference wavelengths and/or take several closely spaced measurements that are sufficiently well separated to be uncorrelated, but not so far apart to be influenced by changes in the stream of the fluid sample 44. As used herein, the term “optimal concentration” is intended to mean concentrations of the various components of the fluid sample 44 that minimize noise and other errors that are due to random fluctuations.

[00108] One method to process the data, and probably the easiest and fastest, is to infer ηf s for each pair of first and second measurements at A r and λ R . Alternatively, if there are J sets having 3 J measurements, η f s may be averaged and the mean value used. Under either case, ηf s is obtained prior to solving for the concentrations. [00109] Consider having J such measurements of A erl , A eR1 , A eml , along with matched J results of ηf sr , ηf sR , and ηf s m- Thus, there are 3/ measurements, or J each of A erl , A eR1 , A eml . For each of these J measurements, there is an inferred ηfs. The unknowns are C l C h , and C c . f for each of the 3] measurements is computed from and λ m . Note that multiple measurements out of the J sets may have the same temperature and, for these are the same. The same is true fo and where i here is understood to be at the frequency associated with the attenuation coefficient. The coefficient matrix E consisting of these elements will be such that E T E will be a 3 x 3 matrix. Then (E T E) 1 E T is the pseudoinverse and is a 3 X 3/ matrix. The measurements will have random variations and, as stated before, it is a column matrix A of 3/ elements. The least square result for the column matrix C with elements C t , C h , and C c is (E T E) -1 E T A. Explicitly, the matrix elements are:

[00110] The least squares solution when the same ηf s is used for the entire set of / is:

[00111] The averages of the J measurements are defined through:

[00112] An alternative easily applied option for real-time answers would be to take average temperature of the 2/ sets (from the two crystals), and compute ηf s R, and ηf s m- The averages of A erl , A eR1 , A eml of the J sets may then be used in Eqs. 53, 54, and 55 to get Cl, C h , and C c . These provide an explicit best-fit solution from a set of J measurements comprising 3 J attenuation data, and may also be applied on a rolling basis. When a J -I- 1 set of three is added, set 1 is rolled off, and all sets are rolled up one level, and J + 1 replaces J. This, then, provides a

J-window moving average measurement. [00113] In both of these cases, a moving set of J measurements, each consisting of 3 elements, may be used. The oldest set of points are rolled out of the dataset head to be replaced by a set of three new measurements at the tail end. J and At (time for J measurements to be completed is JΔt) may be chosen such that within /At, noticeable change in concentrations are unlikely, and At is large enough for the noise to be uncorrelated.

[00114] Eqs. 59 are based on / sets of measurements, for which a single value of ηfs is used for a given wavelength. While the equations provide the least squares solution to this problem, and is the same as inverting average of the / absorbances, there is no guarantee that no element of C is negative. If the wavelengths are chosen for the ∈ matrix such that it is diagonally dominant, negative concentrations will be avoided. However, since light and heavy hydrocarbons are likely to have significant commonalities in the absorption spectrum, it is useful to have a method where only non-negative results are possible. Such a method may be a nonnegative least squares algorithm. Although refinements to this algorithm are available, this algorithm is more than adequate. Alternatively, the non-negative least squares may be equivalent to a quadratic programming formulation of the form: where Q = E T E and y = — E T A . The two methods should produce the same results. Background Radiation

[00115] Unlike infrared (IR) wavelengths, mid-IR wavelengths are such that, at the temperatures of interest, a non-negligible spectral radiance occurs at the wavelengths of interest, particularly 3 pm and above, even for temperatures as low as 323 K.

[00116] One method for subtracting background radiation is to use the measured temperature, compute the spectral radiance and intensity based on Planck black-body radiation, and subtract the emission intensity from the measurement. Since the characteristics of the sensor and the filters come into play to make this correction properly, a look-up value of intensities for a temperature range of interest may be used. These look-up values may be tabulated based on actual measurement with a fluid, but without a source. However, the emissivity of fluids may vary, and such a correction may be prone to vary from one fluid to the next, or even with composition for a given hydrocarbon solvent. With brines, this is less of an issue, because the solubility of CO2 in brine is sufficiently small that brine emissivity does not change appreciably.

[00117] For a more easily applied correction for a fluid of unknown emissivity, an on-off method may be implemented, the steps of which may include:

• The source is on. Signal measured is a combination of the attenuate reflected intensity and the background. The measured signal at wavelengths λ r , λ R , and λ m for the solution adjacent to the crystal 42 may be labeled S sr , S sR , and S sm .

The source is off. Signal measured is the background. The measured signal at wavelengths λ r , and λ m for the solution adjacent to the crystal 42 may be labeled

Z sr , Z SR , and Z sm . Measurements used for calculating absorbances are I sr = S sr — Z sr , I sR = S sR — Z sR , and l Ism = J Ssm — Zsm-

• Background subtraction may be applied for both crystals one and two.

• Background subtraction may also be applied during calibration, as discussed below.

Crystal

[00118] For calibration and inversion of the measured intensities in terms of concentration, the refractive index of crystals 42 should not only be known at the temperature at the face exposed to the fluid sample 44, but also at each of the measurement wavelengths, including the reference. Given that the crystals 42 are relatively incompressible in comparison to the fluid samples 44, pressure dependency is likely to be of negligible consequence. As an example, sapphire shows a strong dependency over the wavelengths of interest (e.g., 2-5 pm) as exhibited in FIG. 10. The functionality is quadratic for at least at 20 °C. As illustrated in FIG. 11 , 77^ is nearly linear with respect to 2 over the range of wavelengths illustrated. A more elaborate computation that includes both temperature and wavelength dependence results is illustrated in the plot of FIG. 12. The temperature dependence is relatively weak compared to wavelength. The differences in η s at 2 pm and 4 pm are important enough for a measurement.

[00119] An alternative to sapphire is diamond, which has a higher refractive index and, therefore, allows for a smaller incidence angle for total internal reflection. FIG. 13 illustrates the square of diamond’s refractive index with respect to the reciprocal of the square of the wavelength. In order to read the wavelength, the top axis shows the corresponding A values. Unlike sapphire, diamond’s refractive index increases with wavelength, and is quite linear with respect to I /λ 2 .

[00120] The correlations, the results of which are illustrated in FIGS. 12 and 13, allow inference of η K at any of the wavelengths and at the temperatures of interest. Thus, based on the procedures given for calibration in the next section, the values of may be inferred for the range of temperatures of interest, and over the limited range of pressures.

Calibration

[00121] In certain embodiments, calibration may be performed with two components I and h, thus dealing with the commonly encountered case of dissolution of CO2 in crude oil. In other embodiments, more components than I and h may be added, but each addition would require an extra wavelength that provides nearly independent information, and this is not always possible given that hydrocarbons may be dominated by C-H bonds. It is also known that, at a minimum, composition evolution in developed miscibility requires two components. Furthermore, when the crude oil is represented by light and heavy components, the sampled hydrocarbon fluid in a CO2 enhanced oil recovery process may change in composition with respect to the proportion of components /, h, and c, and it is desirable to estimate these.

[00122] Based on the foregoing, the calibration process may focus on tabulating e lr , e hr, e iR’ e hR, cm with respect to T and P. For aqueous media applications such as in aquifer storage of CO2 or in beverage industry, the solvent does not need to be split up into I and h components; for such applications, the solvent may be represented by a single component and I may be understood to reflect the aqueous solvent within which CO2 dissolves. Here, then, C h =

0. [00123] The breakdown of a solvent into I and h fractions generally requires a cutoff. This may be based on the number of carbon atoms or molecular weight. The two are closely related since carbon is often the dominant contributor to molecular weight. Similar separation may be based on boiling point at a specified pressure. It may be preferable to use molecular weight as the criterion, since the concentrations of light and heavy components are known by simply measuring the mass density of the separated fractions at a given T and P.

[00124] In certain embodiments, the first step may be to take one of the fractions. Since only a very weak dependence of e on pressure is expected, a mean pressure value may be considered. If accuracy is of paramount importance, then a grid of temperatures and pressures may be constructed, and at each (T, P) pair, ∈ lr , ∈ lR , and ∈ lm may be obtained. For this, an ATR measurement may be conducted with the source turned on, and source turned off so as to obtain ! r , I R , and I m after subtracting background radiation at each of the wavelengths. The background radiation may be checked against the measured temperature to see whether the relative magnitudes at λ r , λ R , and correspond to the independent temperature measurement. If not, the calibration for l 0 may be rechecked. Assuming that this step is satisfactory, from the I r , l R , and I m values, applying Eq. 21, with C h and C c equal to zero, ∈ lr , ∈ lR , and ∈ lm are known. By repeating the process over the entire grid of (T, P), as densely as needed, functional variation of the attenuation coefficients may be obtained for the € component. For liquids, because these coefficients show negligible dependence on P, and are expected to have only small dependence on T, a least squares algorithm is likely to help alleviate concerns of experimental errors.

[00125] Repetition of the above procedure for component h enables generation of e hr , e hR , e hm expressions with respect to T and P. Verification for Components I and h

[00126] Next, the values of and e hr , e hR , e hm may be verified as adequate in inferring mixture composition of I and h. For this, masses W t and W h of the I and h components may be considered. With the molecular weights of the two components being M t and M h , the number of moles of I and h in the mixture are:

[00127] Starting with volumes F ; and V h of the two components, since the final volume V ih #=

V t + V h , an independent mixed volume measurement may be needed. The concentrations are

[00128] Thus, an attenuation experiment with a constituted mixture should provide correct values for C t and C h when the calibrated values of and e h are used at the three wavelengths for the T and P of interest. Conversely, the measured intensities should correspond to: where C L and C h are obtained from Eqs. 65.

Calibration for Component c

[00129] For component c, the matter is not quite as straightforward, since CO2 may be in gas or liquid states or supercritical at the conditions of f and P. Even at 100%, at low pressures, attenuation may be negligible. In addition, pure CO2 may have a very large attenuation at high pressures. Therefore, the system may combine measurements with equilibrated CO2 in a solvent, knowing the dissolved amount from thermodynamic data, and attenuation in gas-phase pure CO2. It may also be necessary to vary the solvent, in certain situations. Whenever a solvent is used, pure solvent attenuation coefficient and the component concentrations in the mixture will be needed; the latter of which is known from thermodynamic solution data of CO2 in the solvent. In this scenario, it may be useful to know η at least for a subset of the solutions or pure gas, for validation. The procedure with pure CO2 and an aqueous solvent is illustrated herein. The method is equally applicable with other solvents. The solvent may be denoted with a subscript b. Thus, the concentration of the solvent for calibration is C b and its attenuation coefficient is ∈ b .

[00130] Based on attenuation experiments, a relatively rough scale for ∈ c is about 100 m 2 mol -1 . This number may be used only for obtaining an estimate of the expected magnitude of attenuations for experimental design, and may not be used otherwise. For example, setting a 10% attenuation with a 1 pm path length (each reflection with sapphire, at 70°, gives an effective path length of about 0.44 pm at 350 K, with an of unity; at 75°, this drops to 0.32 pm), a minimum of approximately 2.29 MPa pressure at 298 K may be required. More appropriately, a concentration of 1053.6 mol m' 3 may be needed to get ∈ c . By conducting attenuation experiments at various pressures and temperatures with pure CO2, ∈ c at wavelengths λ r , λ R , and λ m at each T and P may be obtained from: [00131] The minimum pressure as per the above assumptions is shown in FIG. 14 with open circles. Below this pressure, attenuation may be insufficient. As examples, at 273 K, a pressure of approximately 2.03 MPa is needed, and at 373 K a pressure of approximately 3.03 MPa is required. Above these pressures, attenuation is sufficient to infer ∈ c .

[00132] At relatively high pressures, attenuation in CO2 may be too large and the sensor may be nearly saturated. The estimated ∈ c with a saturated sensor will have an unacceptable error. Since ∈ c is expected to have only very small variability with respect to P, we may choose to use the low pressure values as an approximation. An alternative is to consider high pressure CO2 at vapor, gas and supercritical conditions. The calculations in FIG. 14 show the maximum pressure above which a liquid forms; at this transition, the sensor is over saturated. The transition to liquid occurs below the critical temperature shown by a vertical dashed line. The solid circles otherwise show the maximum pressure above which attenuation is sufficiently strong to lose sensitivity to concentration. Thus, the approximate range of recommended pressures for calibration is the band between open and solid circles. If it is found that ∈ c dependence on P is insignificant, pure CO2 based calibration is sufficient.

[00133] If, for a certain range of temperature, it is found that ∈ c dependence on P is relevant enough to be taken into account, an alternative would be to use attenuation measurements with dissolved CO2 and thermodynamic data for calibration. The simplest of solvents to consider would be brine or water, the latter being preferable since solubility of CO2 decreases with salt concentration. Using 1000 kg m' 3 as the approximate density of water over the range of T and P of interest, and a 3 pm effective path length (for η f = 1.325 and T = 350 K, at an angle of 75°, per reflection effective length is about 0.89 pm; at 70°, this increases to 1.29 pm), an attenuation range of 0.1-0.9 may be set for estimating ∈ c . These lower and upper values gives ∈ c C ci — 0.10536 and 2.3026. For purposes of determining approximate bounds for minimum and maximum pressure, attenuation may be neglected due to solvent. Then, with = 3 pm and ∈ c = 100 m 2 mol' 1 , a molality of CO2 between 0.3512 and 7.6533 in mol kg' 1 is calculated.

[00134] Based on thermodynamics based correlations for standard chemical potentials for CO2 in water, fugacity coefficients, and the vapor pressure of water, molality of CO2 in an aqueous solvent may be computed reasonably well for P and T ranges of interest. Calculated solubilities from these correlations are shown for different temperatures within a range of interest in FIG. 15. Since the equilibrated dissolved CO2 is known to be dominated by species of CO2 in liquid form, it may be used to set the range of pressures for which the attenuation is expected to be in the region of appreciable sensitivity. The minimum pressure required for molality to be 0.3512 mol kg' 1 has been computed. The maximum pressure allowable is the transition to liquid below the critical temperature, since the thermodynamic model assumes vapor phase for CO2. Above critical temperature of CO2, the maximum pressure exceeds 20 MPa, and is not of concern. The minimum pressure of CO2 required for calibration with a pure water solution has been added to the FIG. 14 result, and the combined plot is shown in FIG. 16.

[00135] FIG. 17 is a flow diagram of a method 72 for determining a refractive index of a formation fluid (e.g., the fluid sample 44 discussed with respect to FIG. 2). In certain embodiments, the method 72 includes placing into a borehole 12 a downhole tool 10 having a fluid admitting assembly 24, a flow line 30, two different crystals 42 in contact with the formation fluid 44 in the flow line 30, at least one light source 46, at least one light detector 52 and associated signal processing circuitry 54, and at least one processor 68, wherein the crystals 42 have at least one of different refractive indices and different angles of incidence (block 74). In addition, in certain embodiments, the method 72 includes moving the fluid admitting assembly 24 of the downhole tool 10 into contact with a formation 14 at a location of interest in the formation 14 (block 76). In addition, in certain embodiments, the method 72 includes causing formation fluid 44 to flow into the flow line 30 of the downhole tool 10 and into contact with the crystals 42 (block 78). In addition, in certain embodiments, the method 72 includes directing light from the at least one light source 46 into the crystals 42 (block 80). Tn addition, in certain embodiments, the method 72 includes detecting with the at least one light detector 52 the light exiting the crystals 42, wherein the crystals 42 and the at least one light source 46 are configured such that the light will undergo total internal reflection at interfaces between the crystals 42 and the formation fluid 44 (block 82). In addition, in certain embodiments, the method 72 includes using the associated signal processing circuitry 54 to compare the exiting light to an unattenuated (or reference) light value for the at least one light source 46 associated with the at least one detector 52 in order to obtain attenuation values (block 84). In addition, in certain embodiments, the method 72 includes using the at least one processor 68 to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals 42, and determine the refractive index of the formation fluid 44 and a carbon dioxide concentration in the formation fluid 44 utilizing the attenuations to account for variations in the refractive index of the formation fluid 44 (block 86).

[00136] As described above, in certain embodiments, once the at least one processor 68 determines the refractive index of the formation fluid 44 and the carbon dioxide concentration in the formation fluid 44, the at least one processor 68 may send control signals (e.g., via the communications interface 60) to the control systems 18, 22 illustrated in FIG. 1 to cause the control systems 18, 22 to control certain surface and/or downhole equipment to, for example, adjust component compositions of fluids that might be injected into the borehole 12 based at least in part on the determined refractive index of the formation fluid 44 and carbon dioxide concentration in the formation fluid 44.

[00137] The embodiments of the present disclosure include, but are not limited to:

• A two crystal based attenuated total reflection measurement at more than one reference wavelength and an attenuation wavelength at which CO2 attenuates an incident mid-IR beam.

• A technique that takes into account the variation of refractive index at the wavelengths of acquisition, for inferring the fluid composition.

• A normalization procedure for all sensors with a reference fluid so that with the tuned gain, all source intensities at the acquisition wavelengths appear the same to the detector.

• A procedure that avoids background radiation correction through direct on-off method.

• A calibration method for inferring the molar attenuation coefficients of the solvent components and the gas whose dissolved concentration is desired.

• Estimate of attenuation coefficient varying with temperature and pressure.

• An optimal component concentration estimate from a multitude of attenuation measurements at two or more wavelengths.

• An algorithm that continuously estimates moving average optimal concentrations.

[00138] The specific embodiments described above have been illustrated by way of example, and it should be understood that these embodiments may be susceptible to various modifications and alternative forms. It should be further understood that the claims are not intended to be limited to the particular forms disclosed, but rather to cover all modifications, equivalents, and alternatives falling within the spirit and scope of this disclosure.