flowtube.diffusion_coef ======================= .. py:module:: flowtube.diffusion_coef .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: flowtube.diffusion_coef.sigmas flowtube.diffusion_coef.e_ks Classes ------- .. autoapisummary:: flowtube.diffusion_coef.required_attrs Functions --------- .. autoapisummary:: flowtube.diffusion_coef.non_polar_Lennard_Jones_potential flowtube.diffusion_coef.binary_diffusion_coefficient Module Contents --------------- .. py:class:: required_attrs Bases: :py:obj:`Protocol` Base 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: ... .. py:attribute:: P :type: float .. py:attribute:: T :type: float .. py:attribute:: reactant_gas :type: str .. py:attribute:: carrier_gas :type: str .. py:data:: sigmas :type: dict[str, float] .. py:data:: e_ks :type: dict[str, float] .. py:function:: non_polar_Lennard_Jones_potential(e_k: float, T: float) -> float 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 :param e_k: Lennard-Jones Energy (K). :type e_k: float :param T: Temperature in K. :type T: float :returns: Non-polar Lennard Jones potential. :rtype: float .. py:function:: binary_diffusion_coefficient(obj: required_attrs) -> float 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 :param object: Object with required attributes :type object: required_attrs :param (P in Pa: :param T in K: :param reactant_gas: :param carrier_gas).: :returns: Diffusion coefficient for binary gas mixture (cm2 s-1) :rtype: float