function Wiedensohler_probability {of charge qe on a particle of diameter dp} (q {number of elementary charges}: integer; d {particle diameter : nm}: real) : real; {According to Wiedensohler et al. (2010) AMTD 3, 5521-5587, valid for q in [-2..2]} const Wiedensohler : array [0..5, -2..2] of real = ((-26.3328, -2.3197, -0.0003, -2.3484, -44.4756), (35.9044, 0.6175, -0.1014, 0.6044, 79.3772), (-21.4608, 0.6201, 0.3073, 0.4800, -62.8900), (7.0867, -0.1105, -0.3372, 0.0013, 26.4492), (-1.3088, -0.1260, 0.1023, -0.1553, -5.7480), (0.1051, 0.0297, -0.0105, 0.0320, 0.5049)); var i : integer; logd, sum : real; begin if (q < -2) or (q > 2) then begin writeln ('Illegal arguments in charge_probability_W, press ENTER!'); readln; halt; end; logd := log10 (d); sum := Wiedensohler [0, q]; for i := 1 to 5 do sum := sum + Wiedensohler [i, q] * power (logd, i); Wiedensohler_probability := power (10, sum); end;