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
CASRNstr

CASRN [-]

Returns
RIfloat

Refractive Index on the Na D line, [-]

Tfloat or None

Temperature at which refractive index reading was made; None if not available, [K]

Other Parameters
methodstr, optional

A string for the method name to use, as defined by constants in RI_methods

Notes

The available sources are as follows:

  • ‘CRC’, a compillation of Organic RI data in [1].

  • ‘WIKIDATA’, data from the Wikidata project [2]

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
CASRNstr

CASRN, [-]

Returns
methodslist[str]

Methods which can be used to obtain the RI with the given inputs.

See also

RI
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.

n(ρ,T,λ)=(2A+11A)0.5n(\rho, T, \lambda) = \left(\frac{2A + 1}{1-A}\right)^{0.5}
A(δ,θ,Λ)=δ(a0+a1δ+a2θ+a3Λ2θ+a4Λ2a5Λ2ΛUV2+a6Λ2ΛIR2+a7δ2)A(\delta, \theta, \Lambda) = \delta\left(a_0 + a_1\delta + a_2\theta + a_3\Lambda^2\theta + a_4\Lambda^{-2} \frac{a_5}{\Lambda^2-\Lambda_{UV}^2} + \frac{a_6} {\Lambda^2 - \Lambda_{IR}^2} + a_7\delta^2\right)
δ=ρ/(1000 kg/m3)\delta = \rho/(1000 \text{ kg/m}^3)
θ=T/273.15K\theta = T/273.15\text{K}
Λ=λ/0.589μm\Lambda = \lambda/0.589 \mu m
ΛIR=5.432937\Lambda_{IR} = 5.432937
ΛUV=0.229202\Lambda_{UV} = 0.229202
Parameters
Tfloat

Temperature of the water [K]

rhofloat

Density of the water [kg/m^3]

wavelengthfloat

Wavelength of fluid [meters]

Returns
RIfloat

Refractive index of the water, [-]

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.

Parameters
brixfloat

Degrees brix to be converted, [°Bx]

Returns
RIfloat

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.

Parameters
RIfloat

Refractive index, [-]

Returns
brixfloat

Degrees brix to be converted, [°Bx]

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.

α=(34πNA)(n21n2+2)Vm\alpha = \left(\frac{3}{4\pi N_A}\right) \left(\frac{n^2-1}{n^2+2}\right)V_m
Parameters
RIfloat

Refractive Index on Na D line, [-]

Vmfloat

Molar volume of fluid, [m^3/mol]

Returns
alphafloat

Polarizability [m^3]

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.

Rm=(n21n2+2)VmR_m = \left(\frac{n^2-1}{n^2+2}\right)V_m
Parameters
RIfloat

Refractive Index on Na D line, [-]

Vmfloat

Molar volume of fluid, [m^3/mol]

Returns
Rmfloat

Molar refractivity [m^3/mol]

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.

RI=2RmVmRmVmRI = \sqrt{\frac{-2R_m - V_m}{R_m-V_m}}
Parameters
Rmfloat

Molar refractivity [m^3/mol]

Vmfloat

Molar volume of fluid, [m^3/mol]

Returns
RIfloat

Refractive Index on Na D line, [-]

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].

n(T,λ)=i=0iBiti+jCjwjn(T, \lambda) = \sum_{i=0}^{i} B_i t^i + \sum_j C_j w^j
t=T298.15t = T - 298.15
w=WL×109589.26w = WL\times 10^{9} - 589.26
Parameters
Tfloat

Temperature of the fluid [K]

Bslist[float]

Polynomial temperature expansion coefficients, in reverse order to the polynomial (as needed for efficient computation with horner’s method’), [-]

Cslist[float]

Polynomial wavelength expansion coefficients, in reverse order to the polynomial (as needed for efficient computation with horner’s method’), [-]

wavelengthfloat

Wavelength of fluid [meters]

Returns
RIfloat

Refractive index of the pure fluid, [-]

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