thermo.safety module

thermo.safety.ppmv_to_mgm3(ppmv, MW, T=298.15, P=101325.0)[source]

Converts a concentration in ppmv to units of mg/m^3. Used in industrial toxicology.

\[\frac{mg}{m^3} = \frac{ppmv\cdot P}{RT}\cdot \frac{MW}{1000}\]
Parameters:

ppmv : float

Concentratoin of a component in a gas mixure [parts per million, volumetric]

MW : float

Molecular weight of the trace gas [g/mol]

T : float, optional

Temperature of the gas at which the ppmv is reported

P : float, optional

Pressure of the gas at which the ppmv is reported

Returns:

mgm3 : float

Concentration of a substance in an ideal gas mixture [mg/m^3]

Notes

The term P/(RT)/1000 converts to 0.040874 at STP. Its inverse is reported as 24.45 in [R10861104].

References

[R10861104](1, 2) ACGIH. Industrial Ventilation: A Manual of Recommended Practice, 23rd Edition. American Conference of Governmental and Industrial Hygenists, 2004.

Examples

>>> ppmv_to_mgm3(1, 40)
1.6349623351068687
thermo.safety.mgm3_to_ppmv(mgm3, MW, T=298.15, P=101325.0)[source]

Converts a concentration in mg/m^3 to units of ppmv. Used in industrial toxicology.

\[ppmv = \frac{1000RT}{MW\cdot P} \cdot \frac{mg}{m^3}\]
Parameters:

mgm3 : float

Concentration of a substance in an ideal gas mixture [mg/m^3]

MW : float

Molecular weight of the trace gas [g/mol]

T : float, optional

Temperature of the gas at which the ppmv is reported

P : float, optional

Pressure of the gas at which the ppmv is reported

Returns:

ppmv : float

Concentration of a component in a gas mixure [parts per million, volumetric]

Notes

The term P/(RT)/1000 converts to 0.040874 at STP. Its inverse is reported as 24.45 in [R10871105].

References

[R10871105](1, 2) ACGIH. Industrial Ventilation: A Manual of Recommended Practice, 23rd Edition. American Conference of Governmental and Industrial Hygenists, 2004.

Examples

>>> mgm3_to_ppmv(1.635, 40)
1.0000230371625833
thermo.safety.TWA(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval of Time-Weighted Average limits on worker exposure to dangerous chemicals.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> TWA('98-00-0')
(10.0, 'ppm')
>>> TWA('1303-00-0')
(5.0742430905659505e-05, 'ppm')
>>> TWA('7782-42-5', AvailableMethods=True)
['Ontario Limits', 'None']
thermo.safety.STEL(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval of Short-term Exposure Limit on worker exposure to dangerous chemicals.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> STEL('67-64-1')
(750.0, 'ppm')
>>> STEL('7664-38-2')
(0.7489774978301237, 'ppm')
>>> STEL('55720-99-5')
(2.0, 'mg/m^3')
>>> STEL('86290-81-5', AvailableMethods=True)
['Ontario Limits', 'None']
thermo.safety.Ceiling(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval of Ceiling limits on worker exposure to dangerous chemicals.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> Ceiling('75-07-0')
(25.0, 'ppm')
>>> Ceiling('1395-21-7')
(6e-05, 'mg/m^3')
>>> Ceiling('7572-29-4', AvailableMethods=True)
['Ontario Limits', 'None']
thermo.safety.Skin(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval of whether or not a chemical can be absorbed through the skin, relevant to chemical safety calculations.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> Skin('108-94-1')
True
>>> Skin('1395-21-7')
False
>>> Skin('7572-29-4', AvailableMethods=True)
['Ontario Limits', 'None']
thermo.safety.Carcinogen(CASRN, AvailableMethods=False, Method=None)[source]

Looks up if a chemical is listed as a carcinogen or not according to either a specifc method or with all methods.

Returns either the status as a string for a specified method, or the status of the chemical in all available data sources, in the format {source: status}.

Parameters:

CASRN : string

CASRN [-]

Returns:

status : str or dict

Carcinogen status information [-]

methods : list, only returned if AvailableMethods == True

List of methods which can be used to obtain carcinogen status with the given inputs

Other Parameters:
 

Method : string, optional

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

AvailableMethods : bool, optional

If True, function will determine which methods can be used to obtain if a chemical is listed as carcinogenic, and will return methods instead of the status

Notes

Supported methods are:

  • IARC: International Agency for Research on Cancer, [R10881106]. As extracted with a last update of February 22, 2016. Has listing information of 843 chemicals with CAS numbers. Chemicals without CAS numbers not included here. If two listings for the same CAS were available, that closest to the CAS number was used. If two listings were available published at different times, the latest value was used. All else equal, the most pessimistic value was used.
  • NTP: National Toxicology Program, [R10891106]. Has data on 226 chemicals.

References

[R10881106](1, 2) International Agency for Research on Cancer. Agents Classified by the IARC Monographs, Volumes 1-115. Lyon, France: IARC; 2016 Available from: http://monographs.iarc.fr/ENG/Classification/
[R10891106](1, 2) NTP (National Toxicology Program). 2014. Report on Carcinogens, Thirteenth Edition. Research Triangle Park, NC: U.S. Department of Health and Human Services, Public Health Service. http://ntp.niehs.nih.gov/pubhealth/roc/roc13/

Examples

>>> Carcinogen('61-82-5')
{'National Toxicology Program 13th Report on Carcinogens': 'Reasonably Anticipated', 'International Agency for Research on Cancer': 'Not classifiable as to its carcinogenicity to humans (3)'}
thermo.safety.Tflash(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval or calculation of a chemical’s flash point. Lookup is based on CASRNs. No predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available.

Prefered source is ‘IEC 60079-20-1 (2010)’ [R10901108], with the secondary source ‘NFPA 497 (2008)’ [R10911108] having very similar data. A third source ‘Serat DIPPR (2017)’ [R10921108] provides third hand experimental but evaluated data from the DIPPR database, version unspecified, for 870 compounds.

Parameters:

CASRN : string

CASRN [-]

Returns:

Tflash : float

Flash point of the chemical, [K]

methods : list, only returned if AvailableMethods == True

List of methods which can be used to obtain Tflash with the given inputs

Other Parameters:
 

Method : string, optional

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

AvailableMethods : bool, optional

If True, function will determine which methods can be used to obtain Tflash for the desired chemical, and will return methods instead of Tflash

Notes

The predicted values from the DIPPR databank are also available in the supporting material in [R10921108], but are not included.

References

[R10901108](1, 2) IEC. “IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1: Material characteristics for gas and vapour classification - Test methods and data.” https://webstore.iec.ch/publication/635. See also https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
[R10911108](1, 2) National Fire Protection Association. NFPA 497: Recommended Practice for the Classification of Flammable Liquids, Gases, or Vapors and of Hazardous. NFPA, 2008.
[R10921108](1, 2, 3) Serat, Fatima Zohra, Ali Mustapha Benkouider, Ahmed Yahiaoui, and Farid Bagui. “Nonlinear Group Contribution Model for the Prediction of Flash Points Using Normal Boiling Points.” Fluid Phase Equilibria 449 (October 15, 2017): 52-59. doi:10.1016/j.fluid.2017.06.008.

Examples

>>> Tflash(CASRN='64-17-5')
285.15
thermo.safety.Tautoignition(CASRN, AvailableMethods=False, Method=None)[source]

This function handles the retrieval or calculation of a chemical’s autoifnition temperature. Lookup is based on CASRNs. No predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available.

Prefered source is ‘IEC 60079-20-1 (2010)’ [R10931111], with the secondary source ‘NFPA 497 (2008)’ [R10941111] having very similar data.

Parameters:

CASRN : string

CASRN [-]

Returns:

Tautoignition : float

Autoignition point of the chemical, [K]

methods : list, only returned if AvailableMethods == True

List of methods which can be used to obtain Tautoignition with the given inputs

Other Parameters:
 

Method : string, optional

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

AvailableMethods : bool, optional

If True, function will determine which methods can be used to obtain Tautoignition for the desired chemical, and will return methods instead of Tautoignition

References

[R10931111](1, 2) IEC. “IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1: Material characteristics for gas and vapour classification - Test methods and data.” https://webstore.iec.ch/publication/635. See also https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
[R10941111](1, 2) National Fire Protection Association. NFPA 497: Recommended Practice for the Classification of Flammable Liquids, Gases, or Vapors and of Hazardous. NFPA, 2008.

Examples

>>> Tautoignition(CASRN='71-43-2')
771.15
thermo.safety.LFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None)[source]

This function handles the retrieval or calculation of a chemical’s Lower Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available.

Prefered source is ‘IEC 60079-20-1 (2010)’ [R10951113], with the secondary source ‘NFPA 497 (2008)’ [R10961113] having very similar data. If the heat of combustion is provided, the estimation method Suzuki_LFL can be used. If the atoms of the molecule are available, the method Crowl_Louvar_LFL can be used.

Parameters:

Hc : float, optional

Heat of combustion of gas [J/mol]

atoms : dict, optional

Dictionary of atoms and atom counts

CASRN : string, optional

CASRN [-]

Returns:

LFL : float

Lower flammability limit of the gas in an atmosphere at STP, [mole fraction]

methods : list, only returned if AvailableMethods == True

List of methods which can be used to obtain LFL with the given inputs

Other Parameters:
 

Method : string, optional

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

AvailableMethods : bool, optional

If True, function will determine which methods can be used to obtain the Lower Flammability Limit for the desired chemical, and will return methods instead of Lower Flammability Limit.

References

[R10951113](1, 2) IEC. “IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1: Material characteristics for gas and vapour classification - Test methods and data.” https://webstore.iec.ch/publication/635. See also https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
[R10961113](1, 2) National Fire Protection Association. NFPA 497: Recommended Practice for the Classification of Flammable Liquids, Gases, or Vapors and of Hazardous. NFPA, 2008.

Examples

>>> LFL(CASRN='71-43-2')
0.012
thermo.safety.UFL(Hc=None, atoms={}, CASRN='', AvailableMethods=False, Method=None)[source]

This function handles the retrieval or calculation of a chemical’s Upper Flammability Limit. Lookup is based on CASRNs. Two predictive methods are currently implemented. Will automatically select a data source to use if no Method is provided; returns None if the data is not available.

Prefered source is ‘IEC 60079-20-1 (2010)’ [R10971115], with the secondary source ‘NFPA 497 (2008)’ [R10981115] having very similar data. If the heat of combustion is provided, the estimation method Suzuki_UFL can be used. If the atoms of the molecule are available, the method Crowl_Louvar_UFL can be used.

Parameters:

Hc : float, optional

Heat of combustion of gas [J/mol]

atoms : dict, optional

Dictionary of atoms and atom counts

CASRN : string, optional

CASRN [-]

Returns:

UFL : float

Upper flammability limit of the gas in an atmosphere at STP, [mole fraction]

methods : list, only returned if AvailableMethods == True

List of methods which can be used to obtain UFL with the given inputs

Other Parameters:
 

Method : string, optional

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

AvailableMethods : bool, optional

If True, function will determine which methods can be used to obtain the Upper Flammability Limit for the desired chemical, and will return methods instead of Upper Flammability Limit.

References

[R10971115](1, 2) IEC. “IEC 60079-20-1:2010 Explosive atmospheres - Part 20-1: Material characteristics for gas and vapour classification - Test methods and data.” https://webstore.iec.ch/publication/635. See also https://law.resource.org/pub/in/bis/S05/is.iec.60079.20.1.2010.pdf
[R10981115](1, 2) National Fire Protection Association. NFPA 497: Recommended Practice for the Classification of Flammable Liquids, Gases, or Vapors and of Hazardous. NFPA, 2008.

Examples

>>> UFL(CASRN='71-43-2')
0.086
thermo.safety.fire_mixing(ys=None, FLs=None)[source]

Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001.

>>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.0015]), FLs=[.012, .053, .031])
0.02751172136637643
>>> fire_mixing(ys=normalize([0.0024, 0.0061, 0.0015]), FLs=[.075, .15, .32])
0.12927551844869378
thermo.safety.LFL_mixture(ys=None, LFLs=None, CASRNs=None, AvailableMethods=False, Method=None)[source]

Inert gases are ignored.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> LFL_mixture(ys=normalize([0.0024, 0.0061, 0.0015]), LFLs=[.012, .053, .031])
0.02751172136637643
>>> LFL_mixture(LFLs=[None, None, None, None, None, None, None, None, None, None, None, None, None, None, 0.025, 0.06, 0.073, 0.020039, 0.011316], ys=[0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.10, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], CASRNs=['7440-37-1', '124-38-9', '7440-59-7', '7440-01-9', '7727-37-9', '7440-63-3', '10102-43-9', '7782-44-7', '132259-10-0', '7439-90-9', '10043-92-2', '7732-18-5', '7782-50-5', '7782-41-4', '67-64-1', '67-56-1', '75-52-5', '590-19-2', '277-10-1'])
0.023964903630937385
thermo.safety.UFL_mixture(ys=None, UFLs=None, CASRNs=None, AvailableMethods=False, Method=None)[source]

Inert gases are ignored.

This API is considered experimental, and is expected to be removed in a future release in favor of a more complete object-oriented interface.

>>> UFL_mixture(ys=normalize([0.0024, 0.0061, 0.0015]), UFLs=[.075, .15, .32])
0.12927551844869378
>>> LFL_mixture(LFLs=[None, None, None, None, None, None, None, None, None, None, None, None, None, None, 0.143, 0.36, 0.63, 0.1097, 0.072], ys=[0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.10, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05], CASRNs=['7440-37-1', '124-38-9', '7440-59-7', '7440-01-9', '7727-37-9', '7440-63-3', '10102-43-9', '7782-44-7', '132259-10-0', '7439-90-9', '10043-92-2', '7732-18-5', '7782-50-5', '7782-41-4', '67-64-1', '67-56-1', '75-52-5', '590-19-2', '277-10-1'])
0.14550641757359664
thermo.safety.Suzuki_LFL(Hc=None)[source]

Calculates lower flammability limit, using the Suzuki [R10991117] correlation. Uses heat of combustion only.

The lower flammability limit of a gas is air is:

\[\text{LFL} = \frac{-3.42}{\Delta H_c^{\circ}} + 0.569 \Delta H_c^{\circ} + 0.0538\Delta H_c^{\circ 2} + 1.80\]
Parameters:

Hc : float

Heat of combustion of gas [J/mol]

Returns:

LFL : float

Lower flammability limit, mole fraction [-]

Notes

Fit performed with 112 compounds, r^2 was 0.977. LFL in percent volume in air. Hc is at standard conditions, in MJ/mol. 11 compounds left out as they were outliers. Equation does not apply for molecules with halogen atoms, only hydrocarbons with oxygen or nitrogen or sulfur. No sample calculation provided with the article. However, the equation is straightforward.

Limits of equations’s validity are -6135596 J where it predicts a LFL of 0, and -48322129 J where it predicts a LFL of 1.

References

[R10991117](1, 2) Suzuki, Takahiro. “Note: Empirical Relationship between Lower Flammability Limits and Standard Enthalpies of Combustion of Organic Compounds.” Fire and Materials 18, no. 5 (September 1, 1994): 333-36. doi:10.1002/fam.810180509.

Examples

Pentane, 1.5 % LFL in literature

>>> Suzuki_LFL(-3536600)
0.014276107095811815
thermo.safety.Suzuki_UFL(Hc=None)[source]

Calculates upper flammability limit, using the Suzuki [R11001118] correlation. Uses heat of combustion only.

The upper flammability limit of a gas is air is:

\[\text{UFL} = 6.3\Delta H_c^\circ + 0.567\Delta H_c^{\circ 2} + 23.5\]
Parameters:

Hc : float

Heat of combustion of gas [J/mol]

Returns:

UFL : float

Upper flammability limit, mole fraction

Notes

UFL in percent volume in air according to original equation. Hc is at standard conditions in the equation, in units of MJ/mol. AAPD = 1.2% for 95 compounds used in fit. Somewhat better results than the High and Danner method. 4.9% < UFL < 23.0% -890.3 kJ/mol < dHc < -6380 kJ/mol r^2 = 0.989 Sample calculations provided for all chemicals, both this method and High and Danner. Examples are from the article.

Predicts a UFL of 1 at 7320190 J and a UFL of 0 at -5554160 J.

References

[R11001118](1, 2) Suzuki, Takahiro, and Kozo Koide. “Short Communication: Correlation between Upper Flammability Limits and Thermochemical Properties of Organic Compounds.” Fire and Materials 18, no. 6 (November 1, 1994): 393-97. doi:10.1002/fam.810180608.

Examples

Pentane, literature 7.8% UFL

>>> Suzuki_UFL(-3536600)
0.0831119493052
thermo.safety.Crowl_Louvar_LFL(atoms)[source]

Calculates lower flammability limit, using the Crowl-Louvar [R11011119] correlation. Uses molecular formula only.

The lower flammability limit of a gas is air is:

\[ \begin{align}\begin{aligned}C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O\\\text{LFL} = \frac{0.55}{4.76m + 1.19x - 2.38y + 1}\end{aligned}\end{align} \]
Parameters:

atoms : dict

Dictionary of atoms and atom counts

Returns:

LFL : float

Lower flammability limit, mole fraction

Notes

Coefficient of 0.55 taken from [R11021119]

References

[R11011119](1, 2, 3) Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001.
[R11021119](1, 2) Jones, G. W. “Inflammation Limits and Their Practical Application in Hazardous Industrial Operations.” Chemical Reviews 22, no. 1 (February 1, 1938): 1-26. doi:10.1021/cr60071a001

Examples

Hexane, example from [R11011119], lit. 1.2 %

>>> Crowl_Louvar_LFL({'H': 14, 'C': 6})
0.011899610558199915
thermo.safety.Crowl_Louvar_UFL(atoms)[source]

Calculates upper flammability limit, using the Crowl-Louvar [R11031121] correlation. Uses molecular formula only.

The upper flammability limit of a gas is air is:

\[ \begin{align}\begin{aligned}C_mH_xO_y + zO_2 \to mCO_2 + \frac{x}{2}H_2O\\\text{UFL} = \frac{3.5}{4.76m + 1.19x - 2.38y + 1}\end{aligned}\end{align} \]
Parameters:

atoms : dict

Dictionary of atoms and atom counts

Returns:

UFL : float

Upper flammability limit, mole fraction

Notes

Coefficient of 3.5 taken from [R11041121]

References

[R11031121](1, 2, 3) Crowl, Daniel A., and Joseph F. Louvar. Chemical Process Safety: Fundamentals with Applications. 2E. Upper Saddle River, N.J: Prentice Hall, 2001.
[R11041121](1, 2) Jones, G. W. “Inflammation Limits and Their Practical Application in Hazardous Industrial Operations.” Chemical Reviews 22, no. 1 (February 1, 1938): 1-26. doi:10.1021/cr60071a001

Examples

Hexane, example from [R11031121], lit. 7.5 %

>>> Crowl_Louvar_UFL({'H': 14, 'C': 6})
0.07572479446127219
thermo.safety.NFPA_combustible_classification(Tflash, Tb=None, Psat_100F=None)[source]