optmat.gas.composition#

The composition of gas mixtures, from the curated records: dry air (TC-548).

A mixture is not a material: its make-up is a mole_fraction dataset per constituent (family composition, TC-543), each naming the mixture as its source defines it. This module reads them. The recommended composition of dry air is the CIPM-2007 one (Picard, Davis, Gläser & Fujii, Metrologia 45, 149 (2008), Table 1): N2, O2, Ar and CO2 from the CIPM’s own evaluation, and eight trace constituents that the CIPM adopted from the US Standard Atmosphere 1976.

The fractions are those of the printed table and sum to 1 - 2.9e-6 (the table’s rounding). A propagation code that models only some constituents renormalises them itself and says so; this module does not.

Module Attributes

MIXTURES

The recommended composition of each mixture: its name in the curated datasets.

REDUCED

Named compositions that keep some constituents of a curated one, renormalised.

Functions

composition([mixture])

Return the constituents of a mixture, the most abundant first.

Classes

Constituent(material, mole_fraction, sigma, ...)

One constituent of a mixture.

class optmat.gas.composition.Constituent(material, mole_fraction, sigma, source, primary)[source]#

Bases: object

One constituent of a mixture.

Attributes:
materialstr

The constituent gas’s material id.

mole_fractionfloat

Its amount-of-substance fraction, mol/mol.

sigmafloat

The standard uncertainty of the fraction where the source states one, else NaN.

sourcestr

The curated dataset, <source>/<id>.

primarybool

False where the source reprints the fraction from another (the trace constituents of CIPM-2007 dry air, from the US Standard Atmosphere 1976).

material: str#
mole_fraction: float#
primary: bool#
sigma: float#
source: str#
optmat.gas.composition.MIXTURES: Final = {'dry air': 'dry air (CIPM-2007)'}#

The recommended composition of each mixture: its name in the curated datasets.

optmat.gas.composition.REDUCED: Final = {'dry air (N2, O2)': ('dry air (CIPM-2007)', ('N2', 'O2')), 'dry air (N2, O2, Ar)': ('dry air (CIPM-2007)', ('N2', 'O2', 'Ar'))}#

Named compositions that keep some constituents of a curated one, renormalised.

"dry air (N2, O2, Ar)" keeps 99.957 % of CIPM-2007’s molecules: the air of optmat.gas.raman_response.raman_response() and the default air model (OEP 1, section 4.4). "dry air (N2, O2)" is the argon-free reduction. Both leave out CIPM-2007’s CO2 (400 umol/mol) and its trace constituents.

optmat.gas.composition.composition(mixture='dry air')[source]#

Return the constituents of a mixture, the most abundant first.

Parameters:
mixturestr, optional

A key of MIXTURES (the recommended composition, as printed), a mixture as the curated datasets name it ("dry air (CIPM-2007)"), or a reduced composition of REDUCED, whose kept constituents’ fractions (and their uncertainties) are divided by their sum.

Returns:
tuple of Constituent

The constituents.

Raises:
OptmatError

If no curated dataset describes the mixture.

Examples

>>> air = composition("dry air")
>>> [(c.material, c.mole_fraction) for c in air[:4]]
[('N2', 0.780848), ('O2', 0.20939), ('Ar', 0.009332), ('CO2', 0.0004)]