Gas mixture
Use the GasMixture
class to calculate properties of a gas mixture.
- class chemics.GasMixture(gases, mole_fractions)[source]
Gas mixture class.
- Parameters:
gases (list of Gas objects) – Gas objects representing each component of the gas mixture.
mole_fractions (list) – Mole fraction of each gas component.
- Variables:
molecular_weights (list of float) – Molecular weight of each gas component in g/mol.
viscosities (list of float) – Viscosity of each gas component in microPoise (μP).
mole_fractions (list of float) – Mole fraction of each gas component.
- Raises:
ValueError – If sum of mole fractions does not equal 1.
- molecular_weight()[source]
Calculate molecular weight of the gas mixture as a weighted mean.
- Returns:
mw_mixture (float) – Molecular weight of the gas mixture in g/mol.
Examples
>>> gas1 = cm.Gas('H2', 773) >>> gas2 = cm.Gas('N2', 773) >>> gas_mixture = cm.GasMixture([gas1, gas2], [0.8, 0.2]) >>> gas_mixture.molecular_weight() 7.2156...
- viscosity(method='graham')[source]
Gas mixture viscosity.
Calculate viscosity of the gas mixture using Graham’s method [1] or the Herning and Zipperer method [2]. For the Graham method, Equation 1 from the Davidson report [3] is used
\[\mu_{mix} = \sum (x_i \cdot \mu_i)\]where \(\mu_{mix}\) is viscosity of the gas mixture, \(x_i\) is mole fraction [-] of each component, and \(\mu_i\) is gas viscosity of each component. For the Herning and Zipperer method, Equation 1 from the Davidson report is used
\[\mu_{mix} = \frac{\sum (\mu_i \cdot x_i \cdot \sqrt{MW_i})}{\sum (x_i \cdot \sqrt{MW_i})}\]where \(\mu_{mix}\) is viscosity of the gas mixture, \(x_i\) is mole fraction [-] of each component, \(\mu_i\) is gas viscosity of each component, and \(MW_i\) is the molecular weight [g/mol] of each gas component.
- Parameters:
method (str) – Method for calculating the gas mixture viscosity, choose graham or herning. Default value is graham.
- Returns:
mu_mixture (float) – Viscosity of the gas mixture in units of microPoise (μP).
Examples
>>> gas1 = cm.Gas('H2', 773) >>> gas2 = cm.Gas('N2', 773) >>> gas_mixture = cm.GasMixture([gas1, gas2], [0.85, 0.15]) >>> gas_mixture.viscosity() 207.34...
>>> gas1 = cm.Gas('H2', 773) >>> gas2 = cm.Gas('N2', 773) >>> gas_mixture = cm.GasMixture([gas1, gas2], [0.85, 0.15]) >>> gas_mixture.viscosity(method='herning') 252.78...
References