function attachment_coefficient  {Ion-to-particle, ions are singly charged}
{cm3/s}       (Z, {mobility of ion : cm2 V-1 s-1}
               q, {number of charges on particle, attracting -, repelling +}
              dp, {diameter of particle : nm}
               T, {temperature : K}
               p  {pressure : mb} : real) : real;
   {Uses external functions "electrical_mobility_air" & "mass_diameter_air"}
   var d, di, bi, bp, pi2Di, pi2Dp, x, f, y : real;
   begin
      bi := Z / 1.6022;
      di := mass_diameter_air (p, T - 273, 2, 1, Z);
      bp := electrical_mobility_air (p, T - 273.15, 2, abs (q), dp)/1.6022;
      pi2Di := 8.674e-8 * T * bi; {2*pi*D : SI}
      pi2Dp := 8.674e-8 * T * bp; {2*pi*D : SI}
      d := dp + di; {nm}
      x := 2 * q * (1.671e4 / T) / d;
      y := 1 - 1 / (1 + q * (q - 1) / 4 + d / 20);
      if x < -33 then f := -x
      else if abs (x) < 1e-6 then f := 1
      else if x > 33 then f := 0
      else f := x / (exp (x) - 1);
      attachment_coefficient {cm3/s} :=
      1e-3 * y * d * f * sqrt (sqr (pi2Dp) + sqr (pi2Di));
   end;