Refractive Index (chemicals.refractivity)¶
This module contains various refractive index lookup, calculation, and unit conversion routines and dataframes.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Lookup Functions¶
- chemicals.refractivity.RI(CASRN, method=None)[source]¶
This function handles the retrieval of a chemical’s refractive index. Lookup is based on CASRNs. Will automatically select a data source to use if no method is provided; returns None if the data is not available.
Function has data for approximately 4500 chemicals.
- Parameters
- CASRN
str
CASRN [-]
- CASRN
- Returns
- Other Parameters
- method
str
,optional
A string for the method name to use, as defined by constants in RI_methods
- method
Notes
The available sources are as follows:
References
- 1
Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics, 95E. Boca Raton, FL: CRC press, 2014.
- 2
Wikidata. Wikidata. Accessed via API. https://www.wikidata.org/
Examples
>>> RI(CASRN='64-17-5') (1.3611, 293.15) >>> RI("60-35-5") (1.4278, None) >>> RI('100-41-4', method='WIKIDATA') (1.495, None)
- chemicals.refractivity.RI_methods(CASRN)[source]¶
Return all methods available to obtain the refractive index for the desired chemical.
- Parameters
- CASRN
str
CASRN, [-]
- CASRN
- Returns
See also
- chemicals.refractivity.RI_all_methods = ('CRC', 'WIKIDATA')¶
Tuple of method name keys. See the RI for the actual references
Correlations for Specific Substances¶
- chemicals.refractivity.RI_IAPWS(T, rho, wavelength=5.893e-07)[source]¶
Calculates the refractive index of water at a given temperature, density, and wavelength.
- Parameters
- Returns
- RI
float
Refractive index of the water, [-]
- RI
Notes
This function is valid in the following range: 261.15 K < T < 773.15 K 0 < rho < 1060 kg/m^3 0.2 < wavelength < 1.1 micrometers
Test values are from IAPWS 2010 book.
References
- 1
IAPWS, 1997. Release on the Refractive Index of Ordinary Water Substance as a Function of Wavelength, Temperature and Pressure.
Examples
>>> RI_IAPWS(298.15, 997.047435) 1.3328581926471605
Unit Conversions¶
- chemicals.refractivity.brix_to_RI(brix)[source]¶
Convert a refractive index measurement on the brix scale to a standard refractive index.
Notes
The scale is officially defined from 0 to 85; but the data source contains values up to 95. Linear extrapolation outside of the bounds is performed; and a table of 96 values are linearly interpolated.
The ICUMSA (International Committee of Uniform Method of Sugar Analysis) published a document setting out the reference values in 1974; but an original data source has not been found and reviewed.
References
- 1
“Refractometer Data Book-Refractive Index and Brix | ATAGO CO., LTD.” Accessed June 13, 2020. https://www.atago.net/en/databook-refractometer_relationship.php.
Examples
>>> brix_to_RI(5.8) 1.341452 >>> brix_to_RI(0.0) 1.33299 >>> brix_to_RI(95.0) 1.532
- chemicals.refractivity.RI_to_brix(RI)[source]¶
Convert a standard refractive index measurement to the brix scale.
Notes
The scale is officially defined from 0 to 85; but the data source contains values up to 95.
Linear extrapolation to values under 0 or above 95 is performed.
The ICUMSA (International Committee of Uniform Method of Sugar Analysis) published a document setting out the reference values in 1974; but an original data source has not been found and reviewed.
References
- 1
“Refractometer Data Book-Refractive Index and Brix | ATAGO CO., LTD.” Accessed June 13, 2020. https://www.atago.net/en/databook-refractometer_relationship.php.
Examples
>>> RI_to_brix(1.341452) 5.800000000000059 >>> RI_to_brix(1.33299) 0.0 >>> RI_to_brix(1.532) 95.0
Utility functions¶
- chemicals.refractivity.polarizability_from_RI(RI, Vm)[source]¶
Returns the polarizability of a fluid given its molar volume and refractive index.
- Parameters
- Returns
- alpha
float
Polarizability [m^3]
- alpha
Notes
This Lorentz-Lorentz-expression is most correct when van der Waals interactions dominate. Alternate conversions have been suggested. This is often expressed in units of cm^3 or Angstrom^3. To convert to these units, multiply by 1E9 or 1E30 respectively.
References
- 1
Panuganti, Sai R., Fei Wang, Walter G. Chapman, and Francisco M. Vargas. “A Simple Method for Estimation of Dielectric Constants and Polarizabilities of Nonpolar and Slightly Polar Hydrocarbons.” International Journal of Thermophysics 37, no. 7 (June 6, 2016): 1-24. doi:10.1007/s10765-016-2075-8.
Examples
>>> polarizability_from_RI(1.3611, 5.8676E-5) 5.147658206528923e-30
- chemicals.refractivity.molar_refractivity_from_RI(RI, Vm)[source]¶
Returns the molar refractivity of a fluid given its molar volume and refractive index.
- Parameters
- Returns
- Rm
float
Molar refractivity [m^3/mol]
- Rm
References
- 1
Panuganti, Sai R., Fei Wang, Walter G. Chapman, and Francisco M. Vargas. “A Simple Method for Estimation of Dielectric Constants and Polarizabilities of Nonpolar and Slightly Polar Hydrocarbons.” International Journal of Thermophysics 37, no. 7 (June 6, 2016): 1-24. doi:10.1007/s10765-016-2075-8.
Examples
>>> molar_refractivity_from_RI(1.3611, 5.8676E-5) 1.2985217089649597e-05
- chemicals.refractivity.RI_from_molar_refractivity(Rm, Vm)[source]¶
Returns the refractive index of a fluid given its molar volume and molar refractivity.
- Parameters
- Returns
- RI
float
Refractive Index on Na D line, [-]
- RI
References
- 1
Panuganti, Sai R., Fei Wang, Walter G. Chapman, and Francisco M. Vargas. “A Simple Method for Estimation of Dielectric Constants and Polarizabilities of Nonpolar and Slightly Polar Hydrocarbons.” International Journal of Thermophysics 37, no. 7 (June 6, 2016): 1-24. doi:10.1007/s10765-016-2075-8.
Examples
>>> RI_from_molar_refractivity(1.2985e-5, 5.8676E-5) 1.3610932757685672
Pure Component Liquid Fit Correlations¶
- chemicals.refractivity.TDE_RIXExpansion(T, Bs, Cs, wavelength=5.8926e-07)[source]¶
Calculates the refractive index of a pure liquid at a given temperature, and wavelength, using the NIST TDE RIXExpansion formula [1].
- Parameters
- T
float
Temperature of the fluid [K]
- Bs
list
[float
] Polynomial temperature expansion coefficients, in reverse order to the polynomial (as needed for efficient computation with horner’s method’), [-]
- Cs
list
[float
] Polynomial wavelength expansion coefficients, in reverse order to the polynomial (as needed for efficient computation with horner’s method’), [-]
- wavelength
float
Wavelength of fluid [meters]
- T
- Returns
- RI
float
Refractive index of the pure fluid, [-]
- RI
References
- 1
“ThermoData Engine (TDE103b V10.1) User`s Guide.” https://trc.nist.gov/TDE/Help/TDE103b/Eqns-Pure-RefractiveIndex/RIXExpansion.htm.
Examples
>>> TDE_RIXExpansion(330.0, Bs=[-0.000125041, 1.33245], Cs=[1.20771e-7, -3.56795e-5, 0.0], wavelength=589.26e-9*.7) 1.33854894426073