solprop.physdata.gases#
The gas species solprop knows about.
Every built-in gas is a name here, and every material quantity of it comes from optmat
(SEP 3): the linear law, the equation of state and transport, the Kerr coefficient,
the Raman response and the ionisation rate all key off Gas. A model variant is
not a separate gas; it is chosen with a
MaterialSelection.
Functions
|
Coerce a gas name to a |
|
Return whether the species is molecular rather than a single atom. |
Classes
|
A gas species, spelled as its chemical formula. |
- class solprop.physdata.gases.Gas(*values)[source]#
Bases:
StrEnumA gas species, spelled as its chemical formula.
The members are
strsubclasses, soGas.He == "He"and a plain string may be used anywhere a gas is expected;as_gas()performs the conversion and raisesMaterialErrorfor anything unknown.Examples
>>> from solprop.physdata import Gas >>> Gas.N2O.value 'N2O' >>> Gas("Ar") is Gas.Ar True
- Air = 'Air'#
- Ar = 'Ar'#
- CH4 = 'CH4'#
- D2 = 'D2'#
- H2 = 'H2'#
- He = 'He'#
- Kr = 'Kr'#
- N2 = 'N2'#
- N2O = 'N2O'#
- Ne = 'Ne'#
- O2 = 'O2'#
- SF6 = 'SF6'#
- Xe = 'Xe'#
- solprop.physdata.gases.as_gas(gas)[source]#
Coerce a gas name to a
Gasmember.- Parameters:
- gasGas or str
A
Gasmember or its exact name, e.g."He". The lookup is case-sensitive: an explicit error beats a silent coercion.
- Returns:
- Gas
The matching member.
- Raises:
- MaterialError
If gas is not one of the known species.
Examples
>>> from solprop.physdata import as_gas >>> as_gas("Kr") <Gas.Kr: 'Kr'>
- solprop.physdata.gases.is_molecule(gas)[source]#
Return whether the species is molecular rather than a single atom.
Aircounts as molecular: it is a mixture of diatomic molecules, not a monatomic gas. The predicate is chemical only; which ionisation rate and which Raman response a gas has is optmat’s (solprop.nonlinear.optmat_rates,solprop.nonlinear.optmat_raman).- Parameters:
- gasGas or str
A
Gasmember or its exact name.
- Returns:
- bool
True for a molecular species, False for a noble gas.
- Raises:
- MaterialError
If gas is not one of the known species.
Examples
>>> from solprop.physdata import is_molecule >>> is_molecule("He"), is_molecule("N2"), is_molecule("Air") (False, True, True)