flowtube.diffusion_coef
Handles the calculation of the diffusion coefficient of a binary gas mixture.
- Citations
Reid, R.C., Prausnitz, J.M., Poling, B.E., 1987. The Properties of Gases and Liquids, 4th ed. McGraw-Hill, New York.
Attributes
Classes
Base class for protocol classes. |
Functions
|
Calculation of non-polar Lennard-Jones Potential for a binary gas |
|
Calculation of non-polar diffusion coefficient for a low pressure |
Module Contents
- class flowtube.diffusion_coef.required_attrs[source]
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto[T](Protocol): def meth(self) -> T: ...
- flowtube.diffusion_coef.non_polar_Lennard_Jones_potential(e_k: float, T: float) float[source]
Calculation of non-polar Lennard-Jones Potential for a binary gas mixture. Formulas 11-3.4 to 11-3.6 in Reid et al., 1987
- Parameters:
e_k (float) – Lennard-Jones Energy (K).
T (float) – Temperature in K.
- Returns:
Non-polar Lennard Jones potential.
- Return type:
float
- flowtube.diffusion_coef.binary_diffusion_coefficient(obj: required_attrs) float[source]
Calculation of non-polar diffusion coefficient for a low pressure binary gas mixture. Supported gases: Ar, He, Air, Br2, Cl2, HBr, HCl, HI, H2O, I2, NO, N2, and O2. Formulas 11-3.1 to 11-3.2 in Reid et al., 1987
- Parameters:
object (required_attrs) – Object with required attributes
Pa ((P in)
K (T in)
reactant_gas
carrier_gas).
- Returns:
Diffusion coefficient for binary gas mixture (cm2 s-1)
- Return type:
float