optmat.gas.gases#

The gas species the package curates data for.

The registry contains five noble gases and ten molecular gases. Each carries the few fixed facts the rest of the package relies on: its electron count (the Thomas-Reiche-Kuhn sum rule S(0) of its dipole oscillator-strength distribution) and the name of its equation of state in CoolProp, where one exists.

Functions

as_gas(gas)

Return the Gas named by gas.

info(gas)

Return the fixed facts about a species.

Classes

Gas(*values)

A gas species, named by its chemical formula.

GasInfo(gas, electrons, fluid, atomic)

Fixed facts about one species.

class optmat.gas.gases.Gas(*values)[source]#

Bases: StrEnum

A gas species, named by its chemical formula.

Ar = 'Ar'#
CH4 = 'CH4'#
CO = 'CO'#
CO2 = 'CO2'#
D2 = 'D2'#
H2 = 'H2'#
He = 'He'#
Kr = 'Kr'#
N2 = 'N2'#
N2O = 'N2O'#
Ne = 'Ne'#
O2 = 'O2'#
O3 = 'O3'#
SF6 = 'SF6'#
Xe = 'Xe'#
class optmat.gas.gases.GasInfo(gas, electrons, fluid, atomic)[source]#

Bases: object

Fixed facts about one species.

Attributes:
gasGas

The species.

electronsint

Number of electrons per atom or molecule: the Thomas-Reiche-Kuhn sum rule S(0) of the dipole oscillator-strength distribution.

fluidstr or None

CoolProp’s name of the fluid for the real-gas equation of state, or None where CoolProp has none (ozone).

atomicbool

True for the noble gases, which have no vibrational or rotational structure and so no infrared resonances.

atomic: bool#
electrons: int#
fluid: str | None#
gas: Gas#
optmat.gas.gases.as_gas(gas)[source]#

Return the Gas named by gas.

Parameters:
gasGas or str

A species or its formula, e.g. "Ar".

Returns:
Gas

The species.

Raises:
OptmatError

If gas names no curated species.

Examples

>>> as_gas("Ar")
<Gas.Ar: 'Ar'>
optmat.gas.gases.info(gas)[source]#

Return the fixed facts about a species.

Parameters:
gasGas or str

The species.

Returns:
GasInfo

Its electron count, equation-of-state name and whether it is atomic.

Examples

>>> info("Xe").electrons
54