29 {
30
31
32 if (argc < 5)
33 ERRMSG(
"Give parameters: <p> <T> <r_p> <rho_p>");
34
35
36 double p = atof(argv[1]);
37 double T = atof(argv[2]);
38 double r_p = atof(argv[3]);
39 double rho_p = atof(argv[4]);
40
41
42 double vs =
sedi(p, T, r_p, rho_p);
43
44
45 double rho = 100. * p / (
RA * T);
46
47
48 double eta = 1.8325e-5 * (416.16 / (T + 120.)) * pow(T / 296.16, 1.5);
49
50
51 double Re = 2e-6 * r_p * vs * rho / eta;
52
53
54 printf(" p= %g hPa\n", p);
55 printf(" T= %g K\n", T);
56 printf(" r_p= %g microns\n", r_p);
57 printf("rho_p= %g kg/m^3\n", rho_p);
58 printf(
"rho_a= %g kg/m^3\n",
RHO(p, T));
59 printf(" v_s= %g m/s\n", vs);
60 printf(" Re= %g\n", Re);
61
62 return EXIT_SUCCESS;
63}
double sedi(const double p, const double T, const double rp, const double rhop)
Calculates the sedimentation velocity of a particle in air.
#define RA
Specific gas constant of dry air [J/(kg K)].
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
#define RHO(p, t)
Compute density of air.