lib.physics module¶
Module for implement physics correlation:
Constants don’t available in scipy.constants
Particle solid distributions
- Other
root3poly
Cunninghan factor
Collision_Neufeld()
: Neufeld Collision integral
- lib.physics.cubicCardano(a, b, c, d)[source]¶
Implementation of Cardano formula to find all roots in a cubic equation faster than with scipy.roots
\[ax^3 + bx^2 + cx + d = 0\]Algorithms referenced at http://www.1728.org/cubic2.htm
- Parameters:
- afloat
Third grade coefficient, [-]
- bfloat
Second grade coefficient, [-]
- cfloat
First grade coefficient, [-]
- dfloat
Zero grade coefficient, [-]
- Returns:
- rootlist
Solution list, [-]
Examples
# (x+2)^3
>>> "%i %i %i" % (cubicCardano(1, 6, 12, 8)) '2 2 2'
# (x-2)^3
>>> "%i %i %i" % (cubicCardano(1, -6, 12, -8)) '-2 -2 -2'
>>> "%.1f %.1f %.1f" % (cubicCardano(2, -4, -22, 24)) '-3.0 1.0 4.0'
>>> "{:.4f} {:.4f} {:.4f}".format(*cubicCardano(3, -10, 14, 27)) '-1.0000 2.1667+2.0750j 2.1667-2.0750j'
- lib.physics.Cunningham(l, Kn, method=0)[source]¶
Cunningham slip correction factor for air l: Mean free path kn: Knudsen dimensionless number method: reference procedure
0 - Jennings (1987) 1 - Allen & Raabe (1982) 2 - Fuchs (1964) 3 - Davies (1945)
- lib.physics.Collision_Neufeld(T, l=2, s=2, simple=False)[source]¶
Calculate the collision integral using the Neufeld correlation
\[\varOmega^{(l,s)}=A/T^{B}+C/\exp\left(DT\right)+E/\exp\left(FT\right)+ G/\exp\left(HT\right)+RT^{B}\sin\left(ST^{w}-P\right)\]A,B,C,D,E,F,G,H,R,S,W,P are constants for each collison order
- Parameters:
- Tfloat
Reduced temperature, [-]
- l: int, optional
Collision integral first term order, default 2
- sint, optional
Collision integral second term order, default 2
- simpleboolean, optional
Calculate a short formulation without the last sin term
- Returns:
- omegafloat
Transport collision integral, [-]
References
[1] Neufeld, P.D., Janzen, A.R., Aziz, R.A.; Empirical Equations to Calculate 16 of the Transport Collision Integrals Ω for the Lennard-Jones Potential. J. Chem. Phys. 57(3) (1972) 1100-1102