flowtube.flow_calc

Conversion functions for flow rates and concentrations in flowtube package.

Functions

Kn(mean_free_path, char_length)

Calculate Knudsen number - eq.

MR_to_molec(obj, conc)

Convert mixing ratio in ppb to molecules cm-3.

N_eff_Shw(obj, length, FR)

Calculate the effective Sherwood number - eq.

buoyancy_parameters(obj, delta_T, distance, Re)

Calculate buoyancy parameters.

ccm_to_sccm(obj, FR)

Convert cm3 per min to sccm

conductance(obj, diameter, length)

Calculate conductance through cylinder - eq.

length_to_laminar(diameter, Re)

Entrance length (cm) - length to achieve laminar profile - Bird et al., 2002, page 52.

mixing_time(obj, diameter)

Calculate mixing time (s) - Hanson and Lovejoy, Geophys.

molec_velocity(obj, molar_mass)

Calculate thermal molecular velocity.

pressure_gradient(obj, conductance, FR)

Calculate pressure gradient - eqs.

reynolds_number(obj, FR, diameter)

Calculate Reynolds number for a gas flowing through a cylinder.

reynolds_number_irregular(obj, ...)

Calculate Reynolds number for a gas flowing through a cylinder.

sccm_to_ccm(obj, FR)

Convert sccm to cm3 per min.

sccm_to_velocity(obj, FR, diameter)

Calculate flow velocity.

Classes

basic_attrs(*args, **kwargs)

carrier_attrs(*args, **kwargs)

full_attrs(*args, **kwargs)

class flowtube.flow_calc.basic_attrs(*args, **kwargs)[source]
P: float
T: float
__init__(*args, **kwargs)
class flowtube.flow_calc.carrier_attrs(*args, **kwargs)[source]
carrier_dynamic_viscosity: float
carrier_density: float
class flowtube.flow_calc.full_attrs(*args, **kwargs)[source]
reactant_diffusion_rate: float
reactant_molec_velocity: float
flowtube.flow_calc.sccm_to_ccm(obj, FR)[source]

Convert sccm to cm3 per min.

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • FR (float) – Flow rate in sccm.

Returns:

Flow rate in cm3 min-1

Return type:

float

flowtube.flow_calc.ccm_to_sccm(obj, FR)[source]

Convert cm3 per min to sccm

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • FR (float) – Flow rate in cm3 min-1.

Returns:

Flow rate to sccm.

Return type:

float

flowtube.flow_calc.sccm_to_velocity(obj, FR, diameter)[source]

Calculate flow velocity.

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • FR (float) – Flow rate in sccm.

  • diameter (float) – Diameter in cm.

Returns:

Flow velocity in cm s-1.

Return type:

float

flowtube.flow_calc.MR_to_molec(obj, conc)[source]

Convert mixing ratio in ppb to molecules cm-3.

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • conc (float) – Mixing ratio (ppb - mol mol-1).

Returns:

Concentration in molec. cm-3.

Return type:

float

flowtube.flow_calc.molec_velocity(obj, molar_mass)[source]

Calculate thermal molecular velocity. Formula matched to values from Knopf et al., Anal. Chem., 2015

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • molar_mass (float) – Molar mass of the gas (g mol-1).

Returns:

Thermal molecular velocity in cm s-1.

Return type:

float

flowtube.flow_calc.reynolds_number(obj, FR, diameter)[source]

Calculate Reynolds number for a gas flowing through a cylinder.

Parameters:
  • obj (carrier_attrs) – Object with full attributes (P in Pa, T in K, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • FR (float) – Total flow rate in sccm.

  • diameter (float) – Diameter of the cylinder (cm).

Returns:

Reynolds number.

Return type:

float

flowtube.flow_calc.reynolds_number_irregular(obj, cross_sectional_area, wetted_perimeter, FR)[source]

Calculate Reynolds number for a gas flowing through a cylinder. Formula 6-14 from Holman and Bhattacharyya 2011.

Parameters:
  • obj (carrier_attrs) – Object with full attributes (P in Pa, T in K, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • cross_sectional_area (float) – Cross sectional area of the flow passage (cm2).

  • wetted_perimeter (float) – Wetted perimeter of the flow passage (cm).

  • FR (float) – Total flow rate in sccm.

Returns:

Reynolds number.

Return type:

float

flowtube.flow_calc.conductance(obj, diameter, length)[source]

Calculate conductance through cylinder - eq. 3.17 from Moore et al., 2009.

Parameters:
  • obj (carrier_attrs) – Object with full attributes (P in Pa, T in K, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • diameter (float) – Inner diameter (cm).

  • length (float) – Length (cm).

Returns:

Conductance in L s-1.

Return type:

float

flowtube.flow_calc.pressure_gradient(obj, conductance, FR)[source]

Calculate pressure gradient - eqs. 3.9 & 3.10 from Moore et al., 2009.

Parameters:
  • obj (basic_attrs) – Object with basic attributes (P in Pa, T in K).

  • conductance (float) – Conductance in L s-1.

  • flow_rate (float) – Flow rate in sccm.

  • FR (float)

Returns:

Pressure gradient ratio.

Return type:

float

flowtube.flow_calc.buoyancy_parameters(obj, delta_T, distance, Re)[source]

Calculate buoyancy parameters.

Parameters:
  • obj (carrier_attrs) – Object with full attributes (P in Pa, T in K, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • delta_T (float) – Temperature difference (K).

  • distance (float) – Distance over which the temperature difference is measured (cm) (typically axial or radial).

  • Re (float) – Reynolds number of the flow tube.

Returns:

Buoyancy parameter (>1 indicates the flow being driven by

buoyancy).

Return type:

float

flowtube.flow_calc.length_to_laminar(diameter, Re)[source]

Entrance length (cm) - length to achieve laminar profile - Bird et al., 2002, page 52. Note that the scalar term can vary depending on the source. Keyser, 1994 gives a value of 0.0565 for 99% attainment of parabolic profile while Hanson and Kosciuch, 2003 provide a value of 0.05 for 95% attainment. Using an exponential fit of the values, it seems that the 0.035 figure that Bird et al., 2002 gives is for a 85% attainment. Choose whichever value is most appropriate for your purposes.

Parameters:
  • diameter (float) – Diameter of the cylinder (cm).

  • Re (float) – Reynolds number of the flow tube.

Returns:

Length to laminar profile (cm).

Return type:

float

flowtube.flow_calc.mixing_time(obj, diameter)[source]

Calculate mixing time (s) - Hanson and Lovejoy, Geophys. Res. Lett., 1994.

Parameters:
  • obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • diameter (float) – Diameter of the cylinder (cm).

Returns:

Mixing time in seconds.

Return type:

float

flowtube.flow_calc.N_eff_Shw(obj, length, FR)[source]

Calculate the effective Sherwood number - eq. 11 from Knopf et al., 2015.

Parameters:
  • obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).

  • length (float) – Length of the flow tube (cm).

  • FR (float) – Total flow rate in cm3 min-1.

Returns:

Effective Sherwood number.

Return type:

float

flowtube.flow_calc.Kn(mean_free_path, char_length)[source]

Calculate Knudsen number - eq. 8 from Knopf et al., 2015.

Parameters:
  • mean_free_path (float) – Mean free path of the reactant (cm).

  • char_length (float) – Characteristic length: diameter of cylinder for a coated wall reactor (cm).

Returns:

Knudsen number.

Return type:

float