Viscosity
- pygasflow.atd.viscosity.viscosity_air_power_law(T)[source]
Compute air’s viscosity using a power law:
- Parameters:
- Tfloat or array_like
Temperature of the air in [K]
- Returns:
- mufloat or array_like
Viscosity [kg / (m * s)]
Notes
The following equation is being used:
mu(T) = 0.702e-07 * T for T <= 200
mu(T) = 0.04644e-05 * T**0.65 for T > 200
Examples
Compute air’s viscosity at T=50K:
>>> from pygasflow.atd.viscosity import viscosity_air_power_law >>> viscosity_air_power_law(50) np.float64(3.5100000000000003e-06)
Pint quantities can be used as well:
>>> import pint >>> import pygasflow >>> ureg = pint.UnitRegistry() >>> pygasflow.defaults.pint_ureg = ureg >>> viscosity_air_power_law(50 * ureg.K) <Quantity(3.51e-06, 'kilogram / meter / second')>
- pygasflow.atd.viscosity.viscosity_air_southerland(T)[source]
Compute the viscosity of air with Southerland equation.
- Parameters:
- Tfloat or array_like
Temperature of the air in [K]
- Returns:
- mufloat or array_like
Viscosity [kg / (m * s)]
Examples
Compute air’s viscosity at T=50K:
>>> from pygasflow.atd.viscosity import viscosity_air_southerland >>> viscosity_air_southerland(50) np.float64(3.2137209693578125e-06)
Pint quantities can be used as well:
>>> import pint >>> import pygasflow >>> ureg = pint.UnitRegistry() >>> pygasflow.defaults.pint_ureg = ureg >>> viscosity_air_southerland(50 * ureg.K) <Quantity(3.21372097e-06, 'kilogram / meter / second')>
- pygasflow.atd.viscosity.viscosity_chapman_enskog(T, gas='air', M=None, sigma=None, Sigma_mu=None)[source]
Compute the viscosity of pure motoatomic or polyatomic gases using Chapman-Enskog theory.
There are two mode of operation:
by providing the
gaskeyword argument, the algorithm will load pre-computed values ofM,sigmaandSigma_mu.viscosity_chapman_enskog(T, gas="air" [optional])by providing
M,sigmaandSigma_mu. This is going to disregard the value ofgas, and computes the viscosity of air.viscosity_chapman_enskog(T, M=M, sigma=sigma, Sigma_mu=Sigma_mu)
- Parameters:
- Tfloat or array_like
Temperature of the air in [K]
- gasstr, optional
Possible values are:
['air', 'N2', 'O2', 'NO', 'N', 'O', 'Ar', 'He']- Mfloat or None, optional
Molecular weigth [kg / kmole]
- sigmafloat or None, optional
Collision parameter (first Lennard-Jones parameter) [m]
- Sigma_mufloat or None, optional
Dimensionless collision integral
- Returns:
- mufloat or array_like
Viscosity [kg / (m * s)]
References
“Basic of aerothermodynamics” by Ernst Heinrich, Table 13.1
“Transport Phenomena” by R. Byron Bird, Warren E. Stewart, Edwing N. Lightfoot, Table E2
Examples
Compute air’s viscosity at T=50K:
>>> from pygasflow.atd.viscosity import viscosity_chapman_enskog >>> viscosity_chapman_enskog(50) np.float64(3.4452054654966263e-06)
Compute the viscosity of molecular oxygen at T=300K:
>>> viscosity_chapman_enskog(300, gas="O2") np.float64(2.069427983599303e-05)
Pint quantities can be used as well:
>>> import pint >>> import pygasflow >>> ureg = pint.UnitRegistry() >>> pygasflow.defaults.pint_ureg = ureg >>> viscosity_chapman_enskog(50 * ureg.K) <Quantity(3.44520547e-06, 'kilogram / meter / second')>
Comparison of the viscosity of different gases over a range of temperatures.
import numpy as np import matplotlib.pyplot as plt from pygasflow.atd import viscosity_chapman_enskog T = np.linspace(200, 1000) gases = ['air', 'N2', 'O2', 'NO', 'N', 'O', 'Ar', 'He'] fig, ax = plt.subplots() for gas in gases: ax.plot(T, viscosity_chapman_enskog(T, gas=gas), label=gas) ax.legend() ax.set_xlabel("Temperature [K]") ax.set_ylabel("Viscosity [kg / (m * s)]") plt.show()
(
Source code,png,hires.png,pdf)