function mechanical_diameter {nm} { air nitrogen } (GasMass {amu}, { 28.96 28.02 } Polarizability {nm3}, { 0.00171 0.00174 } VisCon1 {nm}, { 0.3036 0.2996 } {JAS26, 1995} VisCon2 {K}, { 44 40 } {pp. 459-475} VisCon3, { 0.8 0.7 } {corrected 2011} Pressure {mb}, Temperature {K}, ParticleDensity {g cm-3, for cluster ions typically 2.08}, ParticleCharge {e, for cluster ions 1}, Mechmobility {(m/s) / fN} : real) : real; {Uses external function "mechanical_mobility" If failed then result = 0} var c, d, test : real; n : integer; begin c := 300; n := 0; repeat n := n + 1; d := (0.6 + sqrt (0.36 + 200 * c * MechMobility)) / (c * MechMobility) - 0.3; test := mechanical_mobility (GasMass, Polarizability, VisCon1, VisCon2, VisCon3, Pressure, Temperature, ParticleDensity, ParticleCharge, d); c := (1.2 / (d + 0.3) + 200 / sqr (d + 0.3)) / test; until (abs (test / MechMobility - 1) < 0.0001) or (n = 99); if n < 99 then mechanical_diameter := d else mechanical_diameter := 0; end;