UFL

This function returns the upper flammability limit (UFL) for a chemical as a mole fraction in air at standard conditions. Values can be retrieved directly by CAS Registry Number or estimated when combustion heat and elemental composition are provided.

If no method is supplied, the wrapped library selects a preferred data source automatically. The optional atoms input accepts JSON text describing molecular composition by element counts.

Excel Usage

=UFL(CASRN, Hc, atoms, method)
  • CASRN (str, optional, default: ““): Chemical Abstracts Service Registry Number identifier (-).
  • Hc (float, optional, default: null): Heat of combustion of gas (J/mol).
  • atoms (str, optional, default: null): JSON text for a dictionary of atomic symbols and counts (-).
  • method (str, optional, default: null): Source or estimation method name for UFL lookup (-).

Returns (float): Upper flammability limit of the gas in an atmosphere at STP, [mole fraction].

Example 1: Benzene UFL

Inputs:

CASRN
71-43-2

Excel formula:

=UFL("71-43-2")

Expected output:

0.086

Example 2: Methane UFL from combustion heat and atoms

Inputs:

Hc atoms CASRN
-890590 {“C”: 1, “H”: 4} 74-82-8

Excel formula:

=UFL(-890590, "{"C": 1, "H": 4}", "74-82-8")

Expected output:

0.17

Example 3: Undecanol UFL using WIKIDATA method

Inputs:

CASRN method
111-69-3 WIKIDATA

Excel formula:

=UFL("111-69-3", "WIKIDATA")

Expected output:

0.05

Example 4: Benzene UFL with null method

Inputs:

CASRN method
71-43-2

Excel formula:

=UFL("71-43-2", )

Expected output:

0.086

Python Code

Show Code
import json
from chemicals.safety import UFL

def ufl(CASRN='', Hc=None, atoms=None, method=None):
    """
    Handles the retrieval or calculation of a chemical's Upper Flammability Limit.

    See: https://chemicals.readthedocs.io/chemicals.safety.html

    This example function is provided as-is without any representation of accuracy.

    Args:
        CASRN (str, optional): Chemical Abstracts Service Registry Number identifier (-). Default is ''.
        Hc (float, optional): Heat of combustion of gas (J/mol). Default is None.
        atoms (str, optional): JSON text for a dictionary of atomic symbols and counts (-). Default is None.
        method (str, optional): Source or estimation method name for UFL lookup (-). Default is None.

    Returns:
        float: Upper flammability limit of the gas in an atmosphere at STP, [mole fraction].
    """
    try:
        _a = json.loads(atoms) if atoms and isinstance(atoms, str) else atoms
        res = UFL(Hc=Hc, atoms=_a, CASRN=CASRN, method=method)
        if res is None:
            return "Error: Data not available"
        return float(res)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Chemical Abstracts Service Registry Number identifier (-).
Heat of combustion of gas (J/mol).
JSON text for a dictionary of atomic symbols and counts (-).
Source or estimation method name for UFL lookup (-).