lib.adimensional module

This module implements physics adimensional groups

lib.adimensional.Archimedes(L, rho_p, rho, mu=None, nu=None, g=9.80665)[source]
Calculates Archimedes number Ar for two phases densities, a

geometric length L or any viscosity definition.

\[Ar=\frac{gL^3\delta\rho}{\rho v^2}\]

Inputs either of any of the following sets:

  • L, density of both phases (rho_p, rho) and kinematic viscosity nu

  • L, density of both phases (rho_p, rho) and dynamic viscosity mu

Parameters:
Lfloat

Characteristic length [m]

rho_pfloat

Density of particle phase [kg/m³]

rhofloat

Density of bulk phase [kg/m³]

mufloat, optional

Dynamic viscosity, [Pa*s]

nufloat, optional

Kinematic viscosity, [m²/s]

gfloat, optional

Acceleration due to gravity, [m/s²]

Returns:
Arfloat

Archimedes number, [-]

Notes

It may be seen as a ratio of weight minus bouyancy and the inertial forces It is often used in equations describing the motion of particles (solid particles, drop, bubbles) in other fluid phase.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.0f" % Archimedes(5e-4, 2610, 0.6072, nu=48.09e-6))
2278
lib.adimensional.Bi(h, L, k)[source]
Calculates Biot number Bi for heat transfer coefficient h,

geometric length L, and thermal conductivity k.

\[Bi=\frac{hL}{k}\]
Parameters:
hfloat

Heat transfer coefficient, [W/m^2/K]

Lfloat

Characteristic length, no typical definition [m]

kfloat

Thermal conductivity, within the object [W/m/K]

Returns:
Bifloat

Biot number, [-]

Notes

It may be seen as a ratio of two heat transfer resistences in series.

\[Bi = \frac{\text{Surface thermal resistance}} {\text{Internal thermal resistance}}\]

It is useful in calculations of transient heating or cooling processes of solid bodies in liquid or gas flows.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> Bi(60, 0.02, 0.15)
8.0
lib.adimensional.Bo(rhol, rhog, sigma, L)[source]

Calculates Bond number, Bo also known as Eotvos number.

\[Bo = \frac{g(\rho_l-\rho_g)L^2}{\sigma}\]
Parameters:
rholfloat

Density of liquid, [kg/m³]

rhogfloat

Density of gas, [kg/m³]

sigmafloat

Surface tension, [N/m]

Lfloat

Characteristic length, [m]

Returns:
Bofloat

Bond number, [-]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Eu(dP, rho, V)[source]
Calculates Euler number or Eu for a fluid of velocity V and

density rho experiencing a pressure drop dP.

\[Eu = \frac{\Delta P}{\rho V^2}\]
Parameters:
dPfloat

Pressure drop experience by the fluid, [Pa]

rhofloat

Density of the fluid, [kg/m³]

Vfloat

Velocity of fluid, [m/s]

Returns:
Eufloat

Euler number, [-]

Notes

Used in pressure drop calculations.

\[Eu = \frac{\text{Pressure drop}}{2\cdot \text{velocity head}}\]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Fo(k, L, t)[source]

Calculates Fourier number Fo.

\[Fo = \frac{kt}{l^2}\]
Parameters:
kfloat

Thermal diffusivity [m²/s]

Lfloat

Characteristic length [m]

tfloat

Time of cooling or heating [s]

Returns:
Fofloat

Fourier number, [-]

Notes

Can be seen as a adimensional time. It is commonly used in transient conduction problems.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.1f" % Fo(7e-6, 0.01, 60))
4.2
lib.adimensional.Fr(V, L, g=9.80665)[source]
Calculates Froude number Fr for velocity V and geometric length

L. If desired, gravity can be specified as well. Normally the function returns the result of the equation below.

\[Fr = \frac{V}{\sqrt{gL}}\]
Parameters:
Vfloat

Velocity of the particle or fluid, [m/s]

Lfloat

Characteristic length, no typical definition [m]

gfloat, optional

Acceleration due to gravity, [m/s^2]

Returns:
Frfloat

Froude number, [-]

Notes

Can be seen as a ratio of inertial force and gravity.

\[Fr = \frac{\text{Inertial Force}}{\text{Gravity Force}}\]

Appears in problems of forced motion when gravity has same influence, example in free liquid surfaces or multiphase flow.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.0f" % Fr(5, L=0.025))
102
lib.adimensional.Ga(L, rho=None, mu=None, nu=None, g=9.80665)[source]

Calculates Galilei number Ga.

\[Ar=\frac{gL^3}{v^2}\]

Inputs either of any of the following sets:

  • L and kinematic viscosity nu

  • L, density rho and dynamic viscosity mu

Parameters:
Lfloat

Characteristic length [m]

rhofloat, optional

Density of bulk phase [kg/m³]

mufloat, optional

Dynamic viscosity, [Pa*s]

nufloat, optional

Kinematic viscosity, [m^2/s]

gfloat, optional

Acceleration due to gravity, [m/s^2]

Returns:
Gafloat

Galilei number, [-]

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.3f" % Ga(5e-4, nu=48.09e-6))
0.530
lib.adimensional.Gr(L, beta, T1, T2=0, rho=None, mu=None, nu=None, g=9.80665)[source]
Calculates Grashof number or Gr for a fluid with the given

properties, temperature difference, and characteristic length.

\[Gr = = \frac{g\beta (T_s-T_\infty)L^3}{\nu^2} = \frac{g\beta (T_s-T_\infty)L^3\rho^2}{\mu^2}\]

Inputs either of any of the following sets:

  • L, beta, T1 and T2, and density rho and dynamic viscosity mu

  • L, beta, T1 and T2, and kinematic viscosity nu

Parameters:
Lfloat

Characteristic length [m]

betafloat

Volumetric thermal expansion coefficient [1/K]

T1float

Temperature 1, usually a film temperature [K]

T2float, optional

Temperature 2, usually a bulk temperature (or 0 if only a difference is provided to the function) [K]

rhofloat, optional

Density, [kg/m^3]

mufloat, optional

Dynamic viscosity, [Pa*s]

nufloat, optional

Kinematic viscosity, [m^2/s]

gfloat, optional

Acceleration due to gravity, [m/s^2]

Returns:
Grfloat

Grashof number, [-]

Notes

\[Gr = \frac{\text{Buoyancy forces}}{\text{Viscous forces}}\]

An error is raised if none of the required input sets are provided. It is a relative difference of densities within one phase only (liquid or gaseous), which occurs because of a spatial temperature diference. Important to describe heat transfer in natural convection flow problems.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.2e" % Gr(L=0.6, beta=0.0031, T1=60, T2=20, nu=1.692e-5))
9.17e+08
lib.adimensional.Gz(k, D, t=None, L=None, V=None)[source]

Calculates Graetz number Gz.

\[Gz = \frac{D^2}{kt}\]
Parameters:
kfloat

Thermal diffusivity [m²/s]

Dfloat

Characteristic length [m]

tfloat, optional

Time of cooling or heating [s]

Lfloat, optional

Second characteristic length, optional time definition [m]

Vfloat, optional

Mean flow velocity [m/s]

Returns:
Gzfloat

Graetz number, [-]

Notes

It is the reciprocal of Fourier number. It is mainly used in calculations for steady flow, in which the time (the residence time of the fluid in a heated or cooled portion of a channel) can be expressed via the length L and the mean flow velocity V

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.0f" % Gz(1.48e-7, 0.018, V=1.5, L=3))
1095
lib.adimensional.Kn(path, L)[source]

Calculates Knudsen number or Kn.

\[Kn = \frac{\lambda}{L}\]
Parameters:
pathfloat

Mean free path between molecular collisions, [m]

Lfloat

Characteristic length, [m]

Returns:
Knfloat

Knudsen number, [-]

Notes

Used in mass transfer calculations.

\[Kn = \frac{\text{Mean free path length}}{\text{Characteristic length}}\]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Le(D=None, alpha=None, Cp=None, k=None, rho=None)[source]

Calculates Lewis number or Le.

\[Le = \frac{k}{\rho C_p D} = \frac{\alpha}{D}\]

Inputs can be either of the following sets:

  • Diffusivity and Thermal diffusivity

  • Diffusivity, heat capacity, thermal conductivity, and density

Parameters:
Dfloat

Diffusivity of a species, [m²/s]

alphafloat, optional

Thermal diffusivity, [m²/s]

Cpfloat, optional

Heat capacity, [J/kg/K]

kfloat, optional

Thermal conductivity, [W/m/K]

rhofloat, optional

Density, [kg/m³]

Returns:
Lefloat

Lewis number, [-]

Notes

\[Le=\frac{\text{Thermal diffusivity}}{\text{Mass diffusivity}} = \frac{Sc}{Pr}\]

An error is raised if none of the required input sets are provided.

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Ma(V, c)[source]

Calculates Mach number or Ma for a fluid.

\[Ma = \frac{V}{c}\]
Parameters:
Vfloat

Velocity of fluid, [m/s]

cfloat

Speed of sound in fluid, [m/s]

Returns:
Mafloat

Mach number, [-]

Notes

Used in compressible flow calculations.

\[Ma = \frac{\text{fluid velocity}}{\text{sonic velocity}}\]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Nu(h, L, k)[source]

Calculates Nusselt number or Nu.

\[Nu = \frac{h L}{k}\]

Nusselt is the ratio of the convective heat transfer coefficient to the heat transfer coefficient for conduction.

Parameters:
kfloat

Thermal conductivity, [W/m/K]

Lfloat

Characteristic length, [m]

hfloat

Heat transfer coefficient, [W/m²/K]

Returns:
Nufloat

Nusselt number, [-]

Notes

Nusselt number is a dimensionless heat transfer coeffcient. Be careful with the characteristic lenght definition, it deppend of system configuration (internal diameter in a flow channel).

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.1f" % Nu(102.3, 0.03927, 0.03181))
126.3
lib.adimensional.Pe(V, L, rho=None, Cp=None, k=None, alpha=None)[source]

Calculates heat transfer Peclet number or Pe

\[Pe = \frac{VL\rho C_p}{k} = \frac{LV}{\alpha}\]

Inputs either of any of the following sets:

  • V, L, density rho, heat capcity Cp, and thermal conductivity k

  • V, L, and thermal diffusivity alpha

Parameters:
Vfloat

Velocity [m/s]

Lfloat

Characteristic length [m]

rhofloat, optional

Density, [kg/m³]

Cpfloat, optional

Heat capacity, [J/kg/K]

kfloat, optional

Thermal conductivity, [W/m/K]

alphafloat, optional

Thermal diffusivity, [m²/s]

Returns:
Pefloat

Peclet number, [-]

Notes

\[Pe = \frac{\text{Bulk heat transfer}}{\text{Conduction heat transfer}}\]

An error is raised if none of the required input sets are provided.

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Pr(cp=None, k=None, mu=None, nu=None, rho=None, alpha=None)[source]
Calculates Prandtl number or Pr for a fluid with the given

parameters.

Prandtl number is the ratio of momentum diffusion to energy diffusion and relates the velocity profile to the temperature profile.

\[Pr = \frac{C_p \mu}{k} = \frac{\nu}{\alpha} = \frac{C_p \rho \nu}{k}\]

Inputs can be any of the following sets:

  • Heat capacity, dynamic viscosity, and thermal conductivity

  • Thermal diffusivity and kinematic viscosity

  • Heat capacity, kinematic viscosity, thermal conductivity, and density

Parameters:
Cpfloat

Heat capacity, [J/kg/K]

kfloat

Thermal conductivity, [W/m/K]

mufloat, optional

Dynamic viscosity, [Pa*s]

nufloat, optional

Kinematic viscosity, [m^2/s]

rhofloat

Density, [kg/m^3]

alphafloat

Thermal diffusivity, [m^2/s]

Returns:
Prfloat

Prandtl number, [-]

Notes

\[Pr=\frac{\text{kinematic viscosity}}{\text{thermal diffusivity}} = \ \frac{\text{momendum diffusivity}}{\text{thermal diffusivity}}\]

An error is raised if none of the required input sets are provided.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.2f" % Pr(cp=1821., k=0.134, mu=43.61e-5))
5.93
lib.adimensional.Ra(Pr, Gr)[source]
Calculates Rayleigh number or Ra using Prandtl number Pr and

Grashof number Gr for a fluid with the given properties, temperature difference, and characteristic length used to calculate Gr and Pr.

\[Ra = PrGr\]
Parameters:
Prfloat

Prandtl number, [-]

Grfloat

Grashof number, [-]

Returns:
Rafloat

Rayleigh number, [-]

Notes

Used in free convection problems only.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

lib.adimensional.Re(D, V, rho=None, mu=None, nu=None)[source]
Calculates Reynolds number or Re for a fluid with the given

properties for the specified velocity and diameter.

Inputs either of any of the following sets:

  • V, D, density rho and kinematic viscosity mu

  • V, D, and dynamic viscosity nu

\[Re = {D \cdot V}{\nu} = \frac{\rho V D}{\mu}\]

Reynolds is the ratio of inertial forces to viscous forces, used to determine the type of single-phase flow.

  • Re ≤ 2000: Laminar flow, fluid particles move parallel to the tube axis

  • 2000 ≤ Re ≤ 10000: Transition from laminar to turbulent flow

  • Re ≥ 10000: Turbulent flow, fluid particles move chaotically

Parameters:
Dfloat

Diameter [m]

Vfloat

Velocity [m/s]

rhofloat, optional

Density, [kg/m^3]

mufloat, optional

Dynamic viscosity, [Pa*s]

Returns:
Refloat

Reynolds number, [-]

Notes

\[Re = \frac{\text{Momentum}}{\text{Viscosity}}\]

Can be seen as a ratio of inertial forces to frictional forces. It’s the crucial criterium to define the flow mode: laminar, turbulent.

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> Re(0.052, 1.05, rho=999.8, nu=1.3e-6)
42000.0
lib.adimensional.Sh(K, L, D)[source]

Calculates Sherwood number or Sh.

\[Sh = \frac{KL}{D}\]
Parameters:
Kfloat

Mass transfer coefficient, [m/s]

Lfloat

Characteristic length, no typical definition [m]

Dfloat

Diffusivity of a species [m/s²]

Returns:
Shfloat

Sherwood number, [-]

Notes

\[Sh = \frac{\text{Mass transfer by convection}} {\text{Mass transfer by diffusion}} = \frac{K}{D/L}\]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.Sc(D, mu=None, nu=None, rho=None)[source]

Calculates Schmidt number or Sc.

\[Sc = \frac{\mu}{D\rho} = \frac{\nu}{D}\]

Inputs can be any of the following sets:

  • Diffusivity, dynamic viscosity, and density

  • Diffusivity and kinematic viscosity

Parameters:
Dfloat

Diffusivity of a species, [m²/s]

mufloat, optional

Dynamic viscosity, [Pa·s]

nufloat, optional

Kinematic viscosity, [m²/s]

rhofloat, optional

Density, [kg/m³]

Returns:
Scfloat

Schmidt number, [-]

Notes

\[Sc =\frac{\text{kinematic viscosity}}{\text{molecular diffusivity}} = \frac{\text{viscous diffusivity}}{\text{species diffusivity}}\]

An error is raised if none of the required input sets are provided.

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.St(Nu=None, Pe=None, Re=None, Pr=None, alfa=None, rho=None, cp=None, V=None)[source]

Calculate Stanton number St

\[St = \frac{Nu}{Pe} = \frac{Nu}{Re Pr} = \frac{\alpha}{\rho c_pV}\]

Inputs either of any of the following sets:

  • Péclet and Nusselt number

  • Nusselt, Reynolds and Prandt number

  • V, density rho, heat specific cp and heat transfer coefficient alfa

Parameters:
Nufloat, optional

Nusselt number [-]

Pefloat, optional

Péclet number [-]

Vfloat, optional

Velocity of fluid [m/s]

alfafloat, optional

Heat transfer coefficient [W/m²/K]

rhofloat, optional

Density [kg/m³]

cpfloat, optional

Constant pressure specific heat [J/kg/K]

Returns:
Stfloat

Stanton number, [-]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

lib.adimensional.We(V, L, rho, sigma)[source]
Calculates Weber number, We, for a fluid with the given density,

surface tension, velocity, and geometric parameter (usually diameter of bubble).

\[We = \frac{V^2 L\rho}{\sigma}\]
Parameters:
Vfloat

Velocity of fluid, [m/s]

Lfloat

Characteristic length, typically bubble diameter [m]

rhofloat

Density of fluid, [kg/m^3]

sigmafloat

Surface tension, [N/m]

Returns:
Wefloat

Weber number, [-]

Notes

Used in bubble calculations.

\[We = \frac{\text{inertial force}}{\text{surface tension force}}\]

References

[1] VDI-Gesellschaft; VDI Heat Atlas 2nd Edition. Berlin, New York. Springer 2010.

Examples

>>> print("%0.2f" % We(V=11, L=0.005, rho=1.188, sigma=0.07278))
9.88
lib.adimensional.Dean(Re, di, Dc)[source]
Calculates Dean number, De, for a fluid with the Reynolds number Re,

tube diameter di, and helical coil diameter Dc.

\[\text{De} = Re \sqrt{\frac{d_i}{D_c}}\]

Used in flow in curved geometry like helical coil.

Cited in [2], Eq 6-101

Parameters:
Refloat

Reynolds number, []

difloat

Inner tube diameter, [m]

Dcfloat

Diameter of helical coil, [m]

Returns:
Defloat

Dean number [-]

References

[2] ; Perry’s Chemical Engineers’ Handbook 9th Edition. McGraw-Hill (2019)

References