solprop.physdata.transport#

Transport properties of the fill gases: viscosity, sound speed, mean free path.

The steady-flow fill of a hollow fibre (solprop.gasflow) needs three gas properties beyond the equation of state: the dynamic viscosity, which sets the Poiseuille conductance; the speed of sound, which bounds the throughput of an end that exhausts into vacuum; and the mean free path, which says whether the gas is a continuum at all. All three are dilute-gas values here, which is what the laminar flow law and the choke use.

The material properties are optmat’s (SEP 3), through the OptmatGas a built-in gas or species carries: the dilute viscosity, the ideal-gas heat capacity and the molar mass of optmat.gas.transport, each over optmat’s own temperature range; the real-gas sound speed of its equation of state; and, for a mixture, optmat’s Wilke rule (mixture_viscosity; C. R. Wilke, J. Chem. Phys. 18, 517 (1950), https://doi.org/10.1063/1.1747673, about 1 to 2 % accurate). solprop keeps:

  • the dilute sound speed \(c = \sqrt{\gamma R T / M}\) with the dilute heat-capacity ratio \(\gamma = c_p / c_v\), \(c_v = c_p - R\), and for a mixture the mole-weighted molar mass and \(\gamma = \sum x_i c_{p,i} / \sum x_i c_{v,i}\) (ideal-gas mixing of heat capacities);

  • the mean free path, the viscosity-based kinetic-theory form \(\lambda = (\eta / p)\sqrt{\pi k_B T / (2 m)}\), which needs no collision diameter. Other conventions exist; the Knudsen thresholds that use it assume this form and the core diameter.

A temperature outside a gas’s range is refused, as is a custom Species that does not carry optmat’s equation of state, which carries none of these data.

Pressures are in bar at this interface (docs/dev/conventions.md section 1).

Functions

heat_capacity_ratio(gas, temperature)

Return the dilute heat-capacity ratio of a gas or a mixture.

mean_free_path(gas, pressure_bar, temperature)

Return the mean free path of a gas from its viscosity.

molar_mass(gas)

Return the molar mass of a gas, or the mole-weighted mean of a mixture.

sound_speed(gas, temperature[, pressure_bar])

Return the adiabatic speed of sound in a gas or a mixture.

temperature_range(gas)

Return the temperatures over which a gas's transport properties are valid.

viscosity(gas, temperature)

Return the dilute dynamic viscosity of a gas or a mixture.

solprop.physdata.transport.heat_capacity_ratio(gas, temperature)[source]#

Return the dilute heat-capacity ratio of a gas or a mixture.

Parameters:
gasGas, str, Species or Mapping

One built-in gas, or gases to mole fractions summing to one.

temperaturefloat

Temperature in K, inside temperature_range() of every gas.

Returns:
float

gamma = sum(x c_p) / sum(x (c_p - R)), dimensionless.

Raises:
MaterialError

If a gas is unknown or a custom species, the fractions are invalid, or the temperature is outside a gas’s range.

Examples

>>> from solprop.physdata.transport import heat_capacity_ratio
>>> f"{heat_capacity_ratio('Ar', 293.15):.4f}"
'1.6667'
>>> f"{heat_capacity_ratio('N2', 293.15):.3f}"
'1.400'
solprop.physdata.transport.mean_free_path(gas, pressure_bar, temperature)[source]#

Return the mean free path of a gas from its viscosity.

Uses \(\lambda = (\eta / p)\sqrt{\pi k_B T / (2 m)}\) with the molecular mass \(m = M / N_A\) (for a mixture, the mole-weighted mean) and the viscosity of viscosity(): the hard-sphere kinetic-theory form written so that it needs no collision diameter.

Parameters:
gasGas, str, Species or Mapping

One built-in gas, or gases to mole fractions summing to one.

pressure_barfloat

Pressure in bar, > 0.

temperaturefloat

Temperature in K, inside temperature_range() of every gas.

Returns:
float

Mean free path in m.

Raises:
MaterialError

If the pressure is not positive, or as viscosity().

Examples

>>> from solprop.physdata.transport import mean_free_path
>>> f"{mean_free_path('N2', 1.0, 293.15) * 1e9:.1f}"
'64.9'
solprop.physdata.transport.molar_mass(gas)[source]#

Return the molar mass of a gas, or the mole-weighted mean of a mixture.

optmat’s molar mass of each gas; for Gas.Air that of the pseudo-pure dry air its equation of state describes.

Parameters:
gasGas, str, Species or Mapping

One built-in gas, or gases to mole fractions summing to one.

Returns:
float

Molar mass in kg mol^-1.

Raises:
MaterialError

If a gas is unknown or a custom species, or the fractions are invalid.

Examples

>>> from solprop.physdata.transport import molar_mass
>>> f"{molar_mass('N2'):.6f}"
'0.028013'
>>> f"{molar_mass({'He': 0.5, 'Ar': 0.5}):.6f}"
'0.021975'
solprop.physdata.transport.sound_speed(gas, temperature, pressure_bar=None)[source]#

Return the adiabatic speed of sound in a gas or a mixture.

Parameters:
gasGas, str, Species or Mapping

One built-in gas, or gases to mole fractions summing to one.

temperaturefloat

Temperature in K, inside temperature_range() of every gas.

pressure_barfloat or None, optional

None (the default) gives the dilute value sqrt(gamma R T / M) of heat_capacity_ratio() and molar_mass(). A pressure in bar, > 0, gives the real-gas value from the equation of state, for a pure gas only.

Returns:
float

Speed of sound in m s^-1.

Raises:
MaterialError

If a gas is unknown or a custom species, the fractions are invalid, the temperature is outside a gas’s range, the pressure is not positive, or a pressure is given for a mixture.

Examples

>>> from solprop.physdata.transport import sound_speed
>>> f"{sound_speed('N2', 293.15):.1f}"
'349.0'
>>> f"{sound_speed('N2', 293.15, 1.0):.1f}"
'349.1'
solprop.physdata.transport.temperature_range(gas)[source]#

Return the temperatures over which a gas’s transport properties are valid.

Parameters:
gasGas, str or Species

A built-in gas, or a species carrying optmat’s equation of state.

Returns:
tuple of float

The lowest and highest temperature in K, optmat’s.

Raises:
MaterialError

If the gas is unknown or a custom species.

Examples

>>> from solprop.physdata.transport import temperature_range
>>> temperature_range("N2O")
(182.33, 525.0)
solprop.physdata.transport.viscosity(gas, temperature)[source]#

Return the dilute dynamic viscosity of a gas or a mixture.

Parameters:
gasGas, str, Species or Mapping

One built-in gas, or gases to mole fractions summing to one, which take Wilke’s mixing rule.

temperaturefloat

Temperature in K, inside temperature_range() of every gas.

Returns:
float

Dynamic viscosity in Pa s.

Raises:
MaterialError

If a gas is unknown or a custom species, the fractions are invalid, or the temperature is outside a gas’s range.

Examples

>>> from solprop.physdata.transport import viscosity
>>> f"{viscosity('N2', 293.15):.4e}"
'1.7560e-05'
>>> f"{viscosity('Xe', 300.0):.4e}"
'2.3146e-05'