1 | MODULE lpm_collision_kernels_mod |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: lpm_collision_kernels.f90 1520 2015-01-08 10:27:21Z raasch $ |
---|
27 | ! |
---|
28 | ! 1519 2015-01-08 10:20:42Z hoffmann |
---|
29 | ! Bugfix: Using the new particle structure, particles are not sorted by size. |
---|
30 | ! Hence, computation of collision efficiencies must ensure that the ratio of |
---|
31 | ! two colliding droplets is < 1. |
---|
32 | ! |
---|
33 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
34 | ! New particle structure integrated. |
---|
35 | ! Kind definition added to all floating point numbers. |
---|
36 | ! |
---|
37 | ! 1346 2014-03-27 13:18:20Z heinze |
---|
38 | ! Bugfix: REAL constants provided with KIND-attribute especially in call of |
---|
39 | ! intrinsic function like MAX, MIN, SIGN |
---|
40 | ! |
---|
41 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
42 | ! REAL constants defined as wp_kind |
---|
43 | ! |
---|
44 | ! 1320 2014-03-20 08:40:49Z |
---|
45 | ! ONLY-attribute added to USE-statements, |
---|
46 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
47 | ! kinds are defined in new module kinds, |
---|
48 | ! revision history before 2012 removed, |
---|
49 | ! comment fields (!:) to be used for variable explanations added to |
---|
50 | ! all variable declaration statements |
---|
51 | ! |
---|
52 | ! 1092 2013-02-02 11:24:22Z raasch |
---|
53 | ! unused variables removed |
---|
54 | ! |
---|
55 | ! 1071 2012-11-29 16:54:55Z franke |
---|
56 | ! Bugfix: collision efficiencies for Hall kernel should not be < 1.0E-20 |
---|
57 | ! |
---|
58 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
59 | ! code put under GPL (PALM 3.9) |
---|
60 | ! |
---|
61 | ! 1007 2012-09-19 14:30:36Z franke |
---|
62 | ! converted all units to SI units and replaced some parameters by corresponding |
---|
63 | ! PALM parameters |
---|
64 | ! Bugfix: factor in calculation of enhancement factor for collision efficencies |
---|
65 | ! changed from 10. to 1.0 |
---|
66 | ! |
---|
67 | ! 849 2012-03-15 10:35:09Z raasch |
---|
68 | ! routine collision_efficiency_rogers added (moved from former advec_particles |
---|
69 | ! to here) |
---|
70 | ! |
---|
71 | ! 835 2012-02-22 11:21:19Z raasch $ |
---|
72 | ! Bugfix: array diss can be used only in case of Wang kernel |
---|
73 | ! |
---|
74 | ! 828 2012-02-21 12:00:36Z raasch |
---|
75 | ! code has been completely reformatted, routine colker renamed |
---|
76 | ! recalculate_kernel, |
---|
77 | ! routine init_kernels added, radius is now communicated to the collision |
---|
78 | ! routines by array radclass |
---|
79 | ! |
---|
80 | ! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4 |
---|
81 | ! |
---|
82 | ! 825 2012-02-19 03:03:44Z raasch |
---|
83 | ! routine renamed from wang_kernel to lpm_collision_kernels, |
---|
84 | ! turbulence_effects on collision replaced by wang_kernel |
---|
85 | ! |
---|
86 | ! 790 2011-11-29 03:11:20Z raasch |
---|
87 | ! initial revision |
---|
88 | ! |
---|
89 | ! Description: |
---|
90 | ! ------------ |
---|
91 | ! This module calculates collision efficiencies either due to pure gravitational |
---|
92 | ! effects (Hall kernel, see Hall, 1980: J. Atmos. Sci., 2486-2507) or |
---|
93 | ! including the effects of (SGS) turbulence (Wang kernel, see Wang and |
---|
94 | ! Grabowski, 2009: Atmos. Sci. Lett., 10, 1-8). The original code has been |
---|
95 | ! provided by L.-P. Wang but is substantially reformatted and speed optimized |
---|
96 | ! here. |
---|
97 | ! |
---|
98 | ! ATTENTION: |
---|
99 | ! Physical quantities (like g, densities, etc.) used in this module still |
---|
100 | ! have to be adjusted to those values used in the main PALM code. |
---|
101 | ! Also, quantities in CGS-units should be converted to SI-units eventually. |
---|
102 | !------------------------------------------------------------------------------! |
---|
103 | |
---|
104 | USE constants, & |
---|
105 | ONLY: pi |
---|
106 | |
---|
107 | USE kinds |
---|
108 | |
---|
109 | USE particle_attributes, & |
---|
110 | ONLY: collision_kernel, dissipation_classes, particles, radius_classes |
---|
111 | |
---|
112 | USE pegrid |
---|
113 | |
---|
114 | |
---|
115 | IMPLICIT NONE |
---|
116 | |
---|
117 | PRIVATE |
---|
118 | |
---|
119 | PUBLIC ckernel, collision_efficiency_rogers, init_kernels, & |
---|
120 | rclass_lbound, rclass_ubound, recalculate_kernel |
---|
121 | |
---|
122 | REAL(wp) :: epsilon !: |
---|
123 | REAL(wp) :: eps2 !: |
---|
124 | REAL(wp) :: rclass_lbound !: |
---|
125 | REAL(wp) :: rclass_ubound !: |
---|
126 | REAL(wp) :: urms !: |
---|
127 | REAL(wp) :: urms2 !: |
---|
128 | |
---|
129 | REAL(wp), DIMENSION(:), ALLOCATABLE :: epsclass !: |
---|
130 | REAL(wp), DIMENSION(:), ALLOCATABLE :: radclass !: |
---|
131 | REAL(wp), DIMENSION(:), ALLOCATABLE :: winf !: |
---|
132 | |
---|
133 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ec !: |
---|
134 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ecf !: |
---|
135 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gck !: |
---|
136 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hkernel !: |
---|
137 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hwratio !: |
---|
138 | |
---|
139 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ckernel !: |
---|
140 | |
---|
141 | SAVE |
---|
142 | |
---|
143 | ! |
---|
144 | !-- Public interfaces |
---|
145 | INTERFACE collision_efficiency_rogers |
---|
146 | MODULE PROCEDURE collision_efficiency_rogers |
---|
147 | END INTERFACE collision_efficiency_rogers |
---|
148 | |
---|
149 | INTERFACE init_kernels |
---|
150 | MODULE PROCEDURE init_kernels |
---|
151 | END INTERFACE init_kernels |
---|
152 | |
---|
153 | INTERFACE recalculate_kernel |
---|
154 | MODULE PROCEDURE recalculate_kernel |
---|
155 | END INTERFACE recalculate_kernel |
---|
156 | |
---|
157 | |
---|
158 | CONTAINS |
---|
159 | |
---|
160 | |
---|
161 | SUBROUTINE init_kernels |
---|
162 | !------------------------------------------------------------------------------! |
---|
163 | ! Initialization of the collision efficiency matrix with fixed radius and |
---|
164 | ! dissipation classes, calculated at simulation start only. |
---|
165 | !------------------------------------------------------------------------------! |
---|
166 | |
---|
167 | IMPLICIT NONE |
---|
168 | |
---|
169 | INTEGER(iwp) :: i !: |
---|
170 | INTEGER(iwp) :: j !: |
---|
171 | INTEGER(iwp) :: k !: |
---|
172 | |
---|
173 | |
---|
174 | ! |
---|
175 | !-- Calculate collision efficiencies for fixed radius- and dissipation |
---|
176 | !-- classes |
---|
177 | IF ( collision_kernel(6:9) == 'fast' ) THEN |
---|
178 | |
---|
179 | ALLOCATE( ckernel(1:radius_classes,1:radius_classes, & |
---|
180 | 0:dissipation_classes), epsclass(1:dissipation_classes), & |
---|
181 | radclass(1:radius_classes) ) |
---|
182 | |
---|
183 | ! |
---|
184 | !-- Calculate the radius class bounds with logarithmic distances |
---|
185 | !-- in the interval [1.0E-6, 2.0E-4] m |
---|
186 | rclass_lbound = LOG( 1.0E-6_wp ) |
---|
187 | rclass_ubound = LOG( 2.0E-4_wp ) |
---|
188 | radclass(1) = 1.0E-6_wp |
---|
189 | DO i = 2, radius_classes |
---|
190 | radclass(i) = EXP( rclass_lbound + & |
---|
191 | ( rclass_ubound - rclass_lbound ) * & |
---|
192 | ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) ) |
---|
193 | ENDDO |
---|
194 | |
---|
195 | ! |
---|
196 | !-- Set the class bounds for dissipation in interval [0.0, 0.1] m**2/s**3 |
---|
197 | DO i = 1, dissipation_classes |
---|
198 | epsclass(i) = 0.1_wp * REAL( i, KIND=wp ) / dissipation_classes |
---|
199 | ENDDO |
---|
200 | ! |
---|
201 | !-- Calculate collision efficiencies of the Wang/ayala kernel |
---|
202 | ALLOCATE( ec(1:radius_classes,1:radius_classes), & |
---|
203 | ecf(1:radius_classes,1:radius_classes), & |
---|
204 | gck(1:radius_classes,1:radius_classes), & |
---|
205 | winf(1:radius_classes) ) |
---|
206 | |
---|
207 | DO k = 1, dissipation_classes |
---|
208 | |
---|
209 | epsilon = epsclass(k) |
---|
210 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp ) |
---|
211 | |
---|
212 | CALL turbsd |
---|
213 | CALL turb_enhance_eff |
---|
214 | CALL effic |
---|
215 | |
---|
216 | DO j = 1, radius_classes |
---|
217 | DO i = 1, radius_classes |
---|
218 | ckernel(i,j,k) = ec(i,j) * gck(i,j) * ecf(i,j) |
---|
219 | ENDDO |
---|
220 | ENDDO |
---|
221 | |
---|
222 | ENDDO |
---|
223 | |
---|
224 | ! |
---|
225 | !-- Calculate collision efficiencies of the Hall kernel |
---|
226 | ALLOCATE( hkernel(1:radius_classes,1:radius_classes), & |
---|
227 | hwratio(1:radius_classes,1:radius_classes) ) |
---|
228 | |
---|
229 | CALL fallg |
---|
230 | CALL effic |
---|
231 | |
---|
232 | DO j = 1, radius_classes |
---|
233 | DO i = 1, radius_classes |
---|
234 | hkernel(i,j) = pi * ( radclass(j) + radclass(i) )**2 & |
---|
235 | * ec(i,j) * ABS( winf(j) - winf(i) ) |
---|
236 | ckernel(i,j,0) = hkernel(i,j) ! hall kernel stored on index 0 |
---|
237 | ENDDO |
---|
238 | ENDDO |
---|
239 | |
---|
240 | ! |
---|
241 | !-- Test output of efficiencies |
---|
242 | IF ( j == -1 ) THEN |
---|
243 | |
---|
244 | PRINT*, '*** Hall kernel' |
---|
245 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, & |
---|
246 | i = 1,radius_classes ) |
---|
247 | DO j = 1, radius_classes |
---|
248 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j), & |
---|
249 | ( hkernel(i,j), i = 1,radius_classes ) |
---|
250 | ENDDO |
---|
251 | |
---|
252 | DO k = 1, dissipation_classes |
---|
253 | DO i = 1, radius_classes |
---|
254 | DO j = 1, radius_classes |
---|
255 | IF ( hkernel(i,j) == 0.0_wp ) THEN |
---|
256 | hwratio(i,j) = 9999999.9_wp |
---|
257 | ELSE |
---|
258 | hwratio(i,j) = ckernel(i,j,k) / hkernel(i,j) |
---|
259 | ENDIF |
---|
260 | ENDDO |
---|
261 | ENDDO |
---|
262 | |
---|
263 | PRINT*, '*** epsilon = ', epsclass(k) |
---|
264 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, & |
---|
265 | i = 1,radius_classes ) |
---|
266 | DO j = 1, radius_classes |
---|
267 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, & |
---|
268 | ( hwratio(i,j), i = 1,radius_classes ) |
---|
269 | ENDDO |
---|
270 | ENDDO |
---|
271 | |
---|
272 | ENDIF |
---|
273 | |
---|
274 | DEALLOCATE( ec, ecf, epsclass, gck, hkernel, winf ) |
---|
275 | |
---|
276 | ELSEIF( collision_kernel == 'hall' .OR. collision_kernel == 'wang' ) & |
---|
277 | THEN |
---|
278 | ! |
---|
279 | !-- Initial settings for Hall- and Wang-Kernel |
---|
280 | !-- To be done: move here parts from turbsd, fallg, ecoll, etc. |
---|
281 | ENDIF |
---|
282 | |
---|
283 | END SUBROUTINE init_kernels |
---|
284 | |
---|
285 | |
---|
286 | !------------------------------------------------------------------------------! |
---|
287 | ! Calculation of collision kernels during each timestep and for each grid box |
---|
288 | !------------------------------------------------------------------------------! |
---|
289 | SUBROUTINE recalculate_kernel( i1, j1, k1 ) |
---|
290 | |
---|
291 | USE arrays_3d, & |
---|
292 | ONLY: diss |
---|
293 | |
---|
294 | USE particle_attributes, & |
---|
295 | ONLY: prt_count, radius_classes, wang_kernel |
---|
296 | |
---|
297 | IMPLICIT NONE |
---|
298 | |
---|
299 | INTEGER(iwp) :: i !: |
---|
300 | INTEGER(iwp) :: i1 !: |
---|
301 | INTEGER(iwp) :: j !: |
---|
302 | INTEGER(iwp) :: j1 !: |
---|
303 | INTEGER(iwp) :: k1 !: |
---|
304 | INTEGER(iwp) :: pend !: |
---|
305 | INTEGER(iwp) :: pstart !: |
---|
306 | |
---|
307 | |
---|
308 | pstart = 1 |
---|
309 | pend = prt_count(k1,j1,i1) |
---|
310 | radius_classes = prt_count(k1,j1,i1) |
---|
311 | |
---|
312 | ALLOCATE( ec(1:radius_classes,1:radius_classes), & |
---|
313 | radclass(1:radius_classes), winf(1:radius_classes) ) |
---|
314 | |
---|
315 | ! |
---|
316 | !-- Store particle radii on the radclass array |
---|
317 | radclass(1:radius_classes) = particles(pstart:pend)%radius |
---|
318 | |
---|
319 | IF ( wang_kernel ) THEN |
---|
320 | epsilon = diss(k1,j1,i1) ! dissipation rate in m**2/s**3 |
---|
321 | ELSE |
---|
322 | epsilon = 0.0_wp |
---|
323 | ENDIF |
---|
324 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp ) |
---|
325 | |
---|
326 | IF ( wang_kernel .AND. epsilon > 1.0E-7_wp ) THEN |
---|
327 | ! |
---|
328 | !-- Call routines to calculate efficiencies for the Wang kernel |
---|
329 | ALLOCATE( gck(1:radius_classes,1:radius_classes), & |
---|
330 | ecf(1:radius_classes,1:radius_classes) ) |
---|
331 | |
---|
332 | CALL turbsd |
---|
333 | CALL turb_enhance_eff |
---|
334 | CALL effic |
---|
335 | |
---|
336 | DO j = 1, radius_classes |
---|
337 | DO i = 1, radius_classes |
---|
338 | ckernel(pstart+i-1,pstart+j-1,1) = ec(i,j) * gck(i,j) * ecf(i,j) |
---|
339 | ENDDO |
---|
340 | ENDDO |
---|
341 | |
---|
342 | DEALLOCATE( gck, ecf ) |
---|
343 | |
---|
344 | ELSE |
---|
345 | ! |
---|
346 | !-- Call routines to calculate efficiencies for the Hall kernel |
---|
347 | CALL fallg |
---|
348 | CALL effic |
---|
349 | |
---|
350 | DO j = 1, radius_classes |
---|
351 | DO i = 1, radius_classes |
---|
352 | ckernel(pstart+i-1,pstart+j-1,1) = pi * & |
---|
353 | ( radclass(j) + radclass(i) )**2 & |
---|
354 | * ec(i,j) * ABS( winf(j) - winf(i) ) |
---|
355 | ENDDO |
---|
356 | ENDDO |
---|
357 | |
---|
358 | ENDIF |
---|
359 | |
---|
360 | DEALLOCATE( ec, radclass, winf ) |
---|
361 | |
---|
362 | END SUBROUTINE recalculate_kernel |
---|
363 | |
---|
364 | |
---|
365 | !------------------------------------------------------------------------------! |
---|
366 | ! Calculation of gck |
---|
367 | ! This is from Aayala 2008b, page 37ff. |
---|
368 | ! Necessary input parameters: water density, radii of droplets, air density, |
---|
369 | ! air viscosity, turbulent dissipation rate, taylor microscale reynolds number, |
---|
370 | ! gravitational acceleration --> to be replaced by PALM parameters |
---|
371 | !------------------------------------------------------------------------------! |
---|
372 | SUBROUTINE turbsd |
---|
373 | |
---|
374 | USE control_parameters, & |
---|
375 | ONLY: g, molecular_viscosity |
---|
376 | |
---|
377 | USE particle_attributes, & |
---|
378 | ONLY: radius_classes |
---|
379 | |
---|
380 | IMPLICIT NONE |
---|
381 | |
---|
382 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
383 | |
---|
384 | INTEGER(iwp) :: i !: |
---|
385 | INTEGER(iwp) :: j !: |
---|
386 | |
---|
387 | REAL(wp) :: ao !: |
---|
388 | REAL(wp) :: ao_gr !: |
---|
389 | REAL(wp) :: bbb !: |
---|
390 | REAL(wp) :: be !: |
---|
391 | REAL(wp) :: b1 !: |
---|
392 | REAL(wp) :: b2 !: |
---|
393 | REAL(wp) :: ccc !: |
---|
394 | REAL(wp) :: c1 !: |
---|
395 | REAL(wp) :: c1_gr !: |
---|
396 | REAL(wp) :: c2 !: |
---|
397 | REAL(wp) :: d1 !: |
---|
398 | REAL(wp) :: d2 !: |
---|
399 | REAL(wp) :: eta !: |
---|
400 | REAL(wp) :: e1 !: |
---|
401 | REAL(wp) :: e2 !: |
---|
402 | REAL(wp) :: fao_gr !: |
---|
403 | REAL(wp) :: fr !: |
---|
404 | REAL(wp) :: grfin !: |
---|
405 | REAL(wp) :: lambda !: |
---|
406 | REAL(wp) :: lambda_re !: |
---|
407 | REAL(wp) :: lf !: |
---|
408 | REAL(wp) :: rc !: |
---|
409 | REAL(wp) :: rrp !: |
---|
410 | REAL(wp) :: sst !: |
---|
411 | REAL(wp) :: tauk !: |
---|
412 | REAL(wp) :: tl !: |
---|
413 | REAL(wp) :: t2 !: |
---|
414 | REAL(wp) :: tt !: |
---|
415 | REAL(wp) :: t1 !: |
---|
416 | REAL(wp) :: vk !: |
---|
417 | REAL(wp) :: vrms1xy !: |
---|
418 | REAL(wp) :: vrms2xy !: |
---|
419 | REAL(wp) :: v1 !: |
---|
420 | REAL(wp) :: v1v2xy !: |
---|
421 | REAL(wp) :: v1xysq !: |
---|
422 | REAL(wp) :: v2 !: |
---|
423 | REAL(wp) :: v2xysq !: |
---|
424 | REAL(wp) :: wrfin !: |
---|
425 | REAL(wp) :: wrgrav2 !: |
---|
426 | REAL(wp) :: wrtur2xy !: |
---|
427 | REAL(wp) :: xx !: |
---|
428 | REAL(wp) :: yy !: |
---|
429 | REAL(wp) :: z !: |
---|
430 | |
---|
431 | REAL(wp), DIMENSION(1:radius_classes) :: st !: |
---|
432 | REAL(wp), DIMENSION(1:radius_classes) :: tau !: |
---|
433 | |
---|
434 | ! |
---|
435 | !-- Initial assignment of constants |
---|
436 | IF ( first ) THEN |
---|
437 | |
---|
438 | first = .FALSE. |
---|
439 | |
---|
440 | ENDIF |
---|
441 | |
---|
442 | lambda = urms * SQRT( 15.0_wp * molecular_viscosity / epsilon ) ! in m |
---|
443 | lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity ) |
---|
444 | tl = urms**2 / epsilon ! in s |
---|
445 | lf = 0.5_wp * urms**3 / epsilon ! in m |
---|
446 | tauk = SQRT( molecular_viscosity / epsilon ) ! in s |
---|
447 | eta = ( molecular_viscosity**3 / epsilon )**0.25_wp ! in m |
---|
448 | vk = eta / tauk |
---|
449 | |
---|
450 | ao = ( 11.0_wp + 7.0_wp * lambda_re ) / ( 205.0_wp + lambda_re ) |
---|
451 | tt = SQRT( 2.0_wp * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk ! in s |
---|
452 | |
---|
453 | CALL fallg ! gives winf in m/s |
---|
454 | |
---|
455 | DO i = 1, radius_classes |
---|
456 | tau(i) = winf(i) / g ! in s |
---|
457 | st(i) = tau(i) / tauk |
---|
458 | ENDDO |
---|
459 | |
---|
460 | ! |
---|
461 | !-- Calculate wr (from Aayala 2008b, page 38f) |
---|
462 | z = tt / tl |
---|
463 | be = SQRT( 2.0_wp ) * lambda / lf |
---|
464 | bbb = SQRT( 1.0_wp - 2.0_wp * be**2 ) |
---|
465 | d1 = ( 1.0_wp + bbb ) / ( 2.0_wp * bbb ) |
---|
466 | e1 = lf * ( 1.0_wp + bbb ) * 0.5_wp ! in m |
---|
467 | d2 = ( 1.0_wp - bbb ) * 0.5_wp / bbb |
---|
468 | e2 = lf * ( 1.0_wp - bbb ) * 0.5_wp ! in m |
---|
469 | ccc = SQRT( 1.0_wp - 2.0_wp * z**2 ) |
---|
470 | b1 = ( 1.0_wp + ccc ) * 0.5_wp / ccc |
---|
471 | c1 = tl * ( 1.0_wp + ccc ) * 0.5_wp ! in s |
---|
472 | b2 = ( 1.0_wp - ccc ) * 0.5_wp / ccc |
---|
473 | c2 = tl * ( 1.0_wp - ccc ) * 0.5_wp ! in s |
---|
474 | |
---|
475 | DO i = 1, radius_classes |
---|
476 | |
---|
477 | v1 = winf(i) ! in m/s |
---|
478 | t1 = tau(i) ! in s |
---|
479 | |
---|
480 | DO j = 1, i |
---|
481 | rrp = radclass(i) + radclass(j) |
---|
482 | v2 = winf(j) ! in m/s |
---|
483 | t2 = tau(j) ! in s |
---|
484 | |
---|
485 | v1xysq = b1 * d1 * phi_w(c1,e1,v1,t1) - b1 * d2 * phi_w(c1,e2,v1,t1) & |
---|
486 | - b2 * d1 * phi_w(c2,e1,v1,t1) + b2 * d2 * phi_w(c2,e2,v1,t1) |
---|
487 | v1xysq = v1xysq * urms**2 / t1 ! in m**2/s**2 |
---|
488 | vrms1xy = SQRT( v1xysq ) ! in m/s |
---|
489 | |
---|
490 | v2xysq = b1 * d1 * phi_w(c1,e1,v2,t2) - b1 * d2 * phi_w(c1,e2,v2,t2) & |
---|
491 | - b2 * d1 * phi_w(c2,e1,v2,t2) + b2 * d2 * phi_w(c2,e2,v2,t2) |
---|
492 | v2xysq = v2xysq * urms**2 / t2 ! in m**2/s**2 |
---|
493 | vrms2xy = SQRT( v2xysq ) ! in m/s |
---|
494 | |
---|
495 | IF ( winf(i) >= winf(j) ) THEN |
---|
496 | v1 = winf(i) |
---|
497 | t1 = tau(i) |
---|
498 | v2 = winf(j) |
---|
499 | t2 = tau(j) |
---|
500 | ELSE |
---|
501 | v1 = winf(j) |
---|
502 | t1 = tau(j) |
---|
503 | v2 = winf(i) |
---|
504 | t2 = tau(i) |
---|
505 | ENDIF |
---|
506 | |
---|
507 | v1v2xy = b1 * d1 * zhi(c1,e1,v1,t1,v2,t2) - & |
---|
508 | b1 * d2 * zhi(c1,e2,v1,t1,v2,t2) - & |
---|
509 | b2 * d1 * zhi(c2,e1,v1,t1,v2,t2) + & |
---|
510 | b2 * d2* zhi(c2,e2,v1,t1,v2,t2) |
---|
511 | fr = d1 * EXP( -rrp / e1 ) - d2 * EXP( -rrp / e2 ) |
---|
512 | v1v2xy = v1v2xy * fr * urms**2 / tau(i) / tau(j) ! in m**2/s**2 |
---|
513 | wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0_wp * v1v2xy ! in m**2/s**2 |
---|
514 | IF ( wrtur2xy < 0.0_wp ) wrtur2xy = 0.0_wp |
---|
515 | wrgrav2 = pi / 8.0_wp * ( winf(j) - winf(i) )**2 |
---|
516 | wrfin = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) ) ! in m/s |
---|
517 | |
---|
518 | ! |
---|
519 | !-- Calculate gr |
---|
520 | IF ( st(j) > st(i) ) THEN |
---|
521 | sst = st(j) |
---|
522 | ELSE |
---|
523 | sst = st(i) |
---|
524 | ENDIF |
---|
525 | |
---|
526 | xx = -0.1988_wp * sst**4 + 1.5275_wp * sst**3 - 4.2942_wp * & |
---|
527 | sst**2 + 5.3406_wp * sst |
---|
528 | IF ( xx < 0.0_wp ) xx = 0.0_wp |
---|
529 | yy = 0.1886_wp * EXP( 20.306_wp / lambda_re ) |
---|
530 | |
---|
531 | c1_gr = xx / ( g / vk * tauk )**yy |
---|
532 | |
---|
533 | ao_gr = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2 |
---|
534 | fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re ) |
---|
535 | rc = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta ! in cm |
---|
536 | |
---|
537 | grfin = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5_wp ) |
---|
538 | IF ( grfin < 1.0_wp ) grfin = 1.0_wp |
---|
539 | |
---|
540 | gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin ! in cm**3/s |
---|
541 | gck(j,i) = gck(i,j) |
---|
542 | |
---|
543 | ENDDO |
---|
544 | ENDDO |
---|
545 | |
---|
546 | END SUBROUTINE turbsd |
---|
547 | |
---|
548 | |
---|
549 | !------------------------------------------------------------------------------! |
---|
550 | ! phi_w as a function |
---|
551 | !------------------------------------------------------------------------------! |
---|
552 | REAL(wp) FUNCTION phi_w( a, b, vsett, tau0 ) |
---|
553 | |
---|
554 | IMPLICIT NONE |
---|
555 | |
---|
556 | REAL(wp) :: a !: |
---|
557 | REAL(wp) :: aa1 !: |
---|
558 | REAL(wp) :: b !: |
---|
559 | REAL(wp) :: tau0 !: |
---|
560 | REAL(wp) :: vsett !: |
---|
561 | |
---|
562 | aa1 = 1.0_wp / tau0 + 1.0_wp / a + vsett / b |
---|
563 | phi_w = 1.0_wp / aa1 - 0.5_wp * vsett / b / aa1**2 ! in s |
---|
564 | |
---|
565 | END FUNCTION phi_w |
---|
566 | |
---|
567 | |
---|
568 | !------------------------------------------------------------------------------! |
---|
569 | ! zhi as a function |
---|
570 | !------------------------------------------------------------------------------! |
---|
571 | REAL(wp) FUNCTION zhi( a, b, vsett1, tau1, vsett2, tau2 ) |
---|
572 | |
---|
573 | IMPLICIT NONE |
---|
574 | |
---|
575 | REAL(wp) :: a !: |
---|
576 | REAL(wp) :: aa1 !: |
---|
577 | REAL(wp) :: aa2 !: |
---|
578 | REAL(wp) :: aa3 !: |
---|
579 | REAL(wp) :: aa4 !: |
---|
580 | REAL(wp) :: aa5 !: |
---|
581 | REAL(wp) :: aa6 !: |
---|
582 | REAL(wp) :: b !: |
---|
583 | REAL(wp) :: tau1 !: |
---|
584 | REAL(wp) :: tau2 !: |
---|
585 | REAL(wp) :: vsett1 !: |
---|
586 | REAL(wp) :: vsett2 !: |
---|
587 | |
---|
588 | aa1 = vsett2 / b - 1.0_wp / tau2 - 1.0_wp / a |
---|
589 | aa2 = vsett1 / b + 1.0_wp / tau1 + 1.0_wp / a |
---|
590 | aa3 = ( vsett1 - vsett2 ) / b + 1.0_wp / tau1 + 1.0_wp / tau2 |
---|
591 | aa4 = ( vsett2 / b )**2 - ( 1.0_wp / tau2 + 1.0_wp / a )**2 |
---|
592 | aa5 = vsett2 / b + 1.0_wp / tau2 + 1.0_wp / a |
---|
593 | aa6 = 1.0_wp / tau1 - 1.0_wp / a + ( 1.0_wp / tau2 + 1.0_wp / a) * & |
---|
594 | vsett1 / vsett2 |
---|
595 | zhi = (1.0_wp / aa1 - 1.0_wp / aa2 ) * ( vsett1 - vsett2 ) * 0.5_wp / & |
---|
596 | b / aa3**2 + ( 4.0_wp / aa4 - 1.0_wp / aa5**2 - 1.0_wp / aa1**2 ) & |
---|
597 | * vsett2 * 0.5_wp / b /aa6 + ( 2.0_wp * ( b / aa2 - b / aa1 ) - & |
---|
598 | vsett1 / aa2**2 + vsett2 / aa1**2 ) * 0.5_wp / b / aa3 ! in s**2 |
---|
599 | |
---|
600 | END FUNCTION zhi |
---|
601 | |
---|
602 | |
---|
603 | !------------------------------------------------------------------------------! |
---|
604 | ! Calculation of terminal velocity winf following Equations 10-138 to 10-145 |
---|
605 | ! from (Pruppacher and Klett, 1997) |
---|
606 | !------------------------------------------------------------------------------! |
---|
607 | SUBROUTINE fallg |
---|
608 | |
---|
609 | USE cloud_parameters, & |
---|
610 | ONLY: rho_l |
---|
611 | |
---|
612 | USE control_parameters, & |
---|
613 | ONLY: g |
---|
614 | |
---|
615 | USE particle_attributes, & |
---|
616 | ONLY: radius_classes |
---|
617 | |
---|
618 | |
---|
619 | IMPLICIT NONE |
---|
620 | |
---|
621 | INTEGER(iwp) :: i !: |
---|
622 | INTEGER(iwp) :: j !: |
---|
623 | |
---|
624 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
625 | |
---|
626 | REAL(wp), SAVE :: cunh !: |
---|
627 | REAL(wp), SAVE :: eta !: |
---|
628 | REAL(wp), SAVE :: phy !: |
---|
629 | REAL(wp), SAVE :: py !: |
---|
630 | REAL(wp), SAVE :: rho_a !: |
---|
631 | REAL(wp), SAVE :: sigma !: |
---|
632 | REAL(wp), SAVE :: stb !: |
---|
633 | REAL(wp), SAVE :: stok !: |
---|
634 | REAL(wp), SAVE :: xlamb !: |
---|
635 | |
---|
636 | REAL(wp) :: bond !: |
---|
637 | REAL(wp) :: x !: |
---|
638 | REAL(wp) :: xrey !: |
---|
639 | REAL(wp) :: y !: |
---|
640 | |
---|
641 | REAL(wp), DIMENSION(1:7), SAVE :: b !: |
---|
642 | REAL(wp), DIMENSION(1:6), SAVE :: c !: |
---|
643 | |
---|
644 | ! |
---|
645 | !-- Initial assignment of constants |
---|
646 | IF ( first ) THEN |
---|
647 | |
---|
648 | first = .FALSE. |
---|
649 | b = (/ -0.318657E1_wp, 0.992696E0_wp, -0.153193E-2_wp, & |
---|
650 | -0.987059E-3_wp, -0.578878E-3_wp, 0.855176E-4_wp, & |
---|
651 | -0.327815E-5_wp /) |
---|
652 | c = (/ -0.500015E1_wp, 0.523778E1_wp, -0.204914E1_wp, & |
---|
653 | 0.475294E0_wp, -0.542819E-1_wp, 0.238449E-2_wp /) |
---|
654 | |
---|
655 | ! |
---|
656 | !-- Parameter values for p = 1013,25 hPa and T = 293,15 K |
---|
657 | eta = 1.818E-5_wp ! in kg/(m s) |
---|
658 | xlamb = 6.6E-8_wp ! in m |
---|
659 | rho_a = 1.204_wp ! in kg/m**3 |
---|
660 | cunh = 1.26_wp * xlamb ! in m |
---|
661 | sigma = 0.07363_wp ! in kg/s**2 |
---|
662 | stok = 2.0_wp * g * ( rho_l - rho_a ) / ( 9.0_wp * eta ) ! in 1/(m s) |
---|
663 | stb = 32.0_wp * rho_a * ( rho_l - rho_a) * g / (3.0_wp * eta * eta) |
---|
664 | phy = sigma**3 * rho_a**2 / ( eta**4 * g * ( rho_l - rho_a ) ) |
---|
665 | py = phy**( 1.0_wp / 6.0_wp ) |
---|
666 | |
---|
667 | ENDIF |
---|
668 | |
---|
669 | DO j = 1, radius_classes |
---|
670 | |
---|
671 | IF ( radclass(j) <= 1.0E-5_wp ) THEN |
---|
672 | |
---|
673 | winf(j) = stok * ( radclass(j)**2 + cunh * radclass(j) ) |
---|
674 | |
---|
675 | ELSEIF ( radclass(j) > 1.0E-5_wp .AND. radclass(j) <= 5.35E-4_wp ) THEN |
---|
676 | |
---|
677 | x = LOG( stb * radclass(j)**3 ) |
---|
678 | y = 0.0_wp |
---|
679 | |
---|
680 | DO i = 1, 7 |
---|
681 | y = y + b(i) * x**(i-1) |
---|
682 | ENDDO |
---|
683 | ! |
---|
684 | !-- Note: this Eq. is wrong in (Pruppacher and Klett, 1997, p. 418) |
---|
685 | !-- for correct version see (Beard, 1976) |
---|
686 | xrey = ( 1.0_wp + cunh / radclass(j) ) * EXP( y ) |
---|
687 | |
---|
688 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) |
---|
689 | |
---|
690 | ELSEIF ( radclass(j) > 5.35E-4_wp ) THEN |
---|
691 | |
---|
692 | IF ( radclass(j) > 0.0035_wp ) THEN |
---|
693 | bond = g * ( rho_l - rho_a ) * 0.0035_wp**2 / sigma |
---|
694 | ELSE |
---|
695 | bond = g * ( rho_l - rho_a ) * radclass(j)**2 / sigma |
---|
696 | ENDIF |
---|
697 | |
---|
698 | x = LOG( 16.0_wp * bond * py / 3.0_wp ) |
---|
699 | y = 0.0_wp |
---|
700 | |
---|
701 | DO i = 1, 6 |
---|
702 | y = y + c(i) * x**(i-1) |
---|
703 | ENDDO |
---|
704 | |
---|
705 | xrey = py * EXP( y ) |
---|
706 | |
---|
707 | IF ( radclass(j) > 0.0035_wp ) THEN |
---|
708 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * 0.0035_wp ) |
---|
709 | ELSE |
---|
710 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) |
---|
711 | ENDIF |
---|
712 | |
---|
713 | ENDIF |
---|
714 | |
---|
715 | ENDDO |
---|
716 | |
---|
717 | END SUBROUTINE fallg |
---|
718 | |
---|
719 | |
---|
720 | !------------------------------------------------------------------------------! |
---|
721 | ! Calculation of collision efficiencies for the Hall kernel |
---|
722 | !------------------------------------------------------------------------------! |
---|
723 | SUBROUTINE effic |
---|
724 | |
---|
725 | USE particle_attributes, & |
---|
726 | ONLY: radius_classes |
---|
727 | |
---|
728 | IMPLICIT NONE |
---|
729 | |
---|
730 | INTEGER(iwp) :: i !: |
---|
731 | INTEGER(iwp) :: iq !: |
---|
732 | INTEGER(iwp) :: ir !: |
---|
733 | INTEGER(iwp) :: j !: |
---|
734 | INTEGER(iwp) :: k !: |
---|
735 | |
---|
736 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: |
---|
737 | |
---|
738 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
739 | |
---|
740 | REAL(wp) :: ek !: |
---|
741 | REAL(wp) :: particle_radius !: |
---|
742 | REAL(wp) :: pp !: |
---|
743 | REAL(wp) :: qq !: |
---|
744 | REAL(wp) :: rq !: |
---|
745 | |
---|
746 | REAL(wp), DIMENSION(1:21), SAVE :: rat !: |
---|
747 | |
---|
748 | REAL(wp), DIMENSION(1:15), SAVE :: r0 !: |
---|
749 | |
---|
750 | REAL(wp), DIMENSION(1:15,1:21), SAVE :: ecoll !: |
---|
751 | |
---|
752 | ! |
---|
753 | !-- Initial assignment of constants |
---|
754 | IF ( first ) THEN |
---|
755 | |
---|
756 | first = .FALSE. |
---|
757 | r0 = (/ 6.0_wp, 8.0_wp, 10.0_wp, 15.0_wp, 20.0_wp, 25.0_wp, & |
---|
758 | 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, 70.0_wp, 100.0_wp, & |
---|
759 | 150.0_wp, 200.0_wp, 300.0_wp /) |
---|
760 | |
---|
761 | rat = (/ 0.00_wp, 0.05_wp, 0.10_wp, 0.15_wp, 0.20_wp, 0.25_wp, & |
---|
762 | 0.30_wp, 0.35_wp, 0.40_wp, 0.45_wp, 0.50_wp, 0.55_wp, & |
---|
763 | 0.60_wp, 0.65_wp, 0.70_wp, 0.75_wp, 0.80_wp, 0.85_wp, & |
---|
764 | 0.90_wp, 0.95_wp, 1.00_wp /) |
---|
765 | |
---|
766 | ecoll(:,1) = (/ 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & |
---|
767 | 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & |
---|
768 | 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp /) |
---|
769 | ecoll(:,2) = (/ 0.003_wp, 0.003_wp, 0.003_wp, 0.004_wp, 0.005_wp, & |
---|
770 | 0.005_wp, 0.005_wp, 0.010_wp, 0.100_wp, 0.050_wp, & |
---|
771 | 0.200_wp, 0.500_wp, 0.770_wp, 0.870_wp, 0.970_wp /) |
---|
772 | ecoll(:,3) = (/ 0.007_wp, 0.007_wp, 0.007_wp, 0.008_wp, 0.009_wp, & |
---|
773 | 0.010_wp, 0.010_wp, 0.070_wp, 0.400_wp, 0.430_wp, & |
---|
774 | 0.580_wp, 0.790_wp, 0.930_wp, 0.960_wp, 1.000_wp /) |
---|
775 | ecoll(:,4) = (/ 0.009_wp, 0.009_wp, 0.009_wp, 0.012_wp, 0.015_wp, & |
---|
776 | 0.010_wp, 0.020_wp, 0.280_wp, 0.600_wp, 0.640_wp, & |
---|
777 | 0.750_wp, 0.910_wp, 0.970_wp, 0.980_wp, 1.000_wp /) |
---|
778 | ecoll(:,5) = (/ 0.014_wp, 0.014_wp, 0.014_wp, 0.015_wp, 0.016_wp, & |
---|
779 | 0.030_wp, 0.060_wp, 0.500_wp, 0.700_wp, 0.770_wp, & |
---|
780 | 0.840_wp, 0.950_wp, 0.970_wp, 1.000_wp, 1.000_wp /) |
---|
781 | ecoll(:,6) = (/ 0.017_wp, 0.017_wp, 0.017_wp, 0.020_wp, 0.022_wp, & |
---|
782 | 0.060_wp, 0.100_wp, 0.620_wp, 0.780_wp, 0.840_wp, & |
---|
783 | 0.880_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
784 | ecoll(:,7) = (/ 0.030_wp, 0.030_wp, 0.024_wp, 0.022_wp, 0.032_wp, & |
---|
785 | 0.062_wp, 0.200_wp, 0.680_wp, 0.830_wp, 0.870_wp, & |
---|
786 | 0.900_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
787 | ecoll(:,8) = (/ 0.025_wp, 0.025_wp, 0.025_wp, 0.036_wp, 0.043_wp, & |
---|
788 | 0.130_wp, 0.270_wp, 0.740_wp, 0.860_wp, 0.890_wp, & |
---|
789 | 0.920_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
790 | ecoll(:,9) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.040_wp, 0.052_wp, & |
---|
791 | 0.200_wp, 0.400_wp, 0.780_wp, 0.880_wp, 0.900_wp, & |
---|
792 | 0.940_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
793 | ecoll(:,10) = (/ 0.030_wp, 0.030_wp, 0.030_wp, 0.047_wp, 0.064_wp, & |
---|
794 | 0.250_wp, 0.500_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
795 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
796 | ecoll(:,11) = (/ 0.040_wp, 0.040_wp, 0.033_wp, 0.037_wp, 0.068_wp, & |
---|
797 | 0.240_wp, 0.550_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
798 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
799 | ecoll(:,12) = (/ 0.035_wp, 0.035_wp, 0.035_wp, 0.055_wp, 0.079_wp, & |
---|
800 | 0.290_wp, 0.580_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
801 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
802 | ecoll(:,13) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.062_wp, 0.082_wp, & |
---|
803 | 0.290_wp, 0.590_wp, 0.780_wp, 0.900_wp, 0.910_wp, & |
---|
804 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
805 | ecoll(:,14) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.060_wp, 0.080_wp, & |
---|
806 | 0.290_wp, 0.580_wp, 0.770_wp, 0.890_wp, 0.910_wp, & |
---|
807 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
808 | ecoll(:,15) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.041_wp, 0.075_wp, & |
---|
809 | 0.250_wp, 0.540_wp, 0.760_wp, 0.880_wp, 0.920_wp, & |
---|
810 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
811 | ecoll(:,16) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.052_wp, 0.067_wp, & |
---|
812 | 0.250_wp, 0.510_wp, 0.770_wp, 0.880_wp, 0.930_wp, & |
---|
813 | 0.970_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
814 | ecoll(:,17) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.047_wp, 0.057_wp, & |
---|
815 | 0.250_wp, 0.490_wp, 0.770_wp, 0.890_wp, 0.950_wp, & |
---|
816 | 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
817 | ecoll(:,18) = (/ 0.036_wp, 0.036_wp, 0.036_wp, 0.042_wp, 0.048_wp, & |
---|
818 | 0.230_wp, 0.470_wp, 0.780_wp, 0.920_wp, 1.000_wp, & |
---|
819 | 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp /) |
---|
820 | ecoll(:,19) = (/ 0.040_wp, 0.040_wp, 0.035_wp, 0.033_wp, 0.040_wp, & |
---|
821 | 0.112_wp, 0.450_wp, 0.790_wp, 1.010_wp, 1.030_wp, & |
---|
822 | 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp /) |
---|
823 | ecoll(:,20) = (/ 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, & |
---|
824 | 0.119_wp, 0.470_wp, 0.950_wp, 1.300_wp, 1.700_wp, & |
---|
825 | 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp /) |
---|
826 | ecoll(:,21) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, & |
---|
827 | 0.125_wp, 0.520_wp, 1.400_wp, 2.300_wp, 3.000_wp, & |
---|
828 | 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp /) |
---|
829 | ENDIF |
---|
830 | |
---|
831 | ! |
---|
832 | !-- Calculate the radius class index of particles with respect to array r |
---|
833 | !-- Radius has to be in µm |
---|
834 | ALLOCATE( ira(1:radius_classes) ) |
---|
835 | DO j = 1, radius_classes |
---|
836 | particle_radius = radclass(j) * 1.0E6_wp |
---|
837 | DO k = 1, 15 |
---|
838 | IF ( particle_radius < r0(k) ) THEN |
---|
839 | ira(j) = k |
---|
840 | EXIT |
---|
841 | ENDIF |
---|
842 | ENDDO |
---|
843 | IF ( particle_radius >= r0(15) ) ira(j) = 16 |
---|
844 | ENDDO |
---|
845 | |
---|
846 | ! |
---|
847 | !-- Two-dimensional linear interpolation of the collision efficiency. |
---|
848 | !-- Radius has to be in µm |
---|
849 | DO j = 1, radius_classes |
---|
850 | DO i = 1, j |
---|
851 | |
---|
852 | ir = ira(j) |
---|
853 | rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) ) |
---|
854 | iq = INT( rq * 20 ) + 1 |
---|
855 | iq = MAX( iq , 2) |
---|
856 | |
---|
857 | IF ( ir < 16 ) THEN |
---|
858 | IF ( ir >= 2 ) THEN |
---|
859 | pp = ( ( radclass(j) * 1.0E06_wp ) - r0(ir-1) ) / & |
---|
860 | ( r0(ir) - r0(ir-1) ) |
---|
861 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
862 | ec(j,i) = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) & |
---|
863 | * ecoll(ir-1,iq-1) & |
---|
864 | + pp * ( 1.0_wp - qq ) * ecoll(ir,iq-1) & |
---|
865 | + qq * ( 1.0_wp - pp ) * ecoll(ir-1,iq) & |
---|
866 | + pp * qq * ecoll(ir,iq) |
---|
867 | ELSE |
---|
868 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
869 | ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq) |
---|
870 | ENDIF |
---|
871 | ELSE |
---|
872 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
873 | ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq) |
---|
874 | ec(j,i) = MIN( ek, 1.0_wp ) |
---|
875 | ENDIF |
---|
876 | |
---|
877 | IF ( ec(j,i) < 1.0E-20_wp ) ec(j,i) = 0.0_wp |
---|
878 | |
---|
879 | ec(i,j) = ec(j,i) |
---|
880 | |
---|
881 | ENDDO |
---|
882 | ENDDO |
---|
883 | |
---|
884 | DEALLOCATE( ira ) |
---|
885 | |
---|
886 | END SUBROUTINE effic |
---|
887 | |
---|
888 | |
---|
889 | !------------------------------------------------------------------------------! |
---|
890 | ! Calculation of enhancement factor for collision efficencies due to turbulence |
---|
891 | !------------------------------------------------------------------------------! |
---|
892 | SUBROUTINE turb_enhance_eff |
---|
893 | |
---|
894 | USE particle_attributes, & |
---|
895 | ONLY: radius_classes |
---|
896 | |
---|
897 | IMPLICIT NONE |
---|
898 | |
---|
899 | INTEGER(iwp) :: i !: |
---|
900 | INTEGER(iwp) :: iq !: |
---|
901 | INTEGER(iwp) :: ir !: |
---|
902 | INTEGER(iwp) :: j !: |
---|
903 | INTEGER(iwp) :: k !: |
---|
904 | INTEGER(iwp) :: kk !: |
---|
905 | |
---|
906 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: |
---|
907 | |
---|
908 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
909 | |
---|
910 | REAL(wp) :: particle_radius !: |
---|
911 | REAL(wp) :: pp !: |
---|
912 | REAL(wp) :: qq !: |
---|
913 | REAL(wp) :: rq !: |
---|
914 | REAL(wp) :: y1 !: |
---|
915 | REAL(wp) :: y2 !: |
---|
916 | REAL(wp) :: y3 !: |
---|
917 | |
---|
918 | REAL(wp), DIMENSION(1:11), SAVE :: rat !: |
---|
919 | |
---|
920 | REAL(wp), DIMENSION(1:7), SAVE :: r0 !: |
---|
921 | |
---|
922 | REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_100 !: |
---|
923 | REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_400 !: |
---|
924 | |
---|
925 | ! |
---|
926 | !-- Initial assignment of constants |
---|
927 | IF ( first ) THEN |
---|
928 | |
---|
929 | first = .FALSE. |
---|
930 | |
---|
931 | r0 = (/ 10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, & |
---|
932 | 100.0_wp /) |
---|
933 | |
---|
934 | rat = (/ 0.0_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.4_wp, 0.5_wp, 0.6_wp, & |
---|
935 | 0.7_wp, 0.8_wp, 0.9_wp, 1.0_wp /) |
---|
936 | ! |
---|
937 | !-- for 100 cm**2/s**3 |
---|
938 | ecoll_100(:,1) = (/ 1.74_wp, 1.74_wp, 1.773_wp, 1.49_wp, & |
---|
939 | 1.207_wp, 1.207_wp, 1.0_wp /) |
---|
940 | ecoll_100(:,2) = (/ 1.46_wp, 1.46_wp, 1.421_wp, 1.245_wp, & |
---|
941 | 1.069_wp, 1.069_wp, 1.0_wp /) |
---|
942 | ecoll_100(:,3) = (/ 1.32_wp, 1.32_wp, 1.245_wp, 1.123_wp, & |
---|
943 | 1.000_wp, 1.000_wp, 1.0_wp /) |
---|
944 | ecoll_100(:,4) = (/ 1.250_wp, 1.250_wp, 1.148_wp, 1.087_wp, & |
---|
945 | 1.025_wp, 1.025_wp, 1.0_wp /) |
---|
946 | ecoll_100(:,5) = (/ 1.186_wp, 1.186_wp, 1.066_wp, 1.060_wp, & |
---|
947 | 1.056_wp, 1.056_wp, 1.0_wp /) |
---|
948 | ecoll_100(:,6) = (/ 1.045_wp, 1.045_wp, 1.000_wp, 1.014_wp, & |
---|
949 | 1.028_wp, 1.028_wp, 1.0_wp /) |
---|
950 | ecoll_100(:,7) = (/ 1.070_wp, 1.070_wp, 1.030_wp, 1.038_wp, & |
---|
951 | 1.046_wp, 1.046_wp, 1.0_wp /) |
---|
952 | ecoll_100(:,8) = (/ 1.000_wp, 1.000_wp, 1.054_wp, 1.042_wp, & |
---|
953 | 1.029_wp, 1.029_wp, 1.0_wp /) |
---|
954 | ecoll_100(:,9) = (/ 1.223_wp, 1.223_wp, 1.117_wp, 1.069_wp, & |
---|
955 | 1.021_wp, 1.021_wp, 1.0_wp /) |
---|
956 | ecoll_100(:,10) = (/ 1.570_wp, 1.570_wp, 1.244_wp, 1.166_wp, & |
---|
957 | 1.088_wp, 1.088_wp, 1.0_wp /) |
---|
958 | ecoll_100(:,11) = (/ 20.3_wp, 20.3_wp, 14.6_wp, 8.61_wp, & |
---|
959 | 2.60_wp, 2.60_wp, 1.0_wp /) |
---|
960 | ! |
---|
961 | !-- for 400 cm**2/s**3 |
---|
962 | ecoll_400(:,1) = (/ 4.976_wp, 4.976_wp, 3.593_wp, 2.519_wp, & |
---|
963 | 1.445_wp, 1.445_wp, 1.0_wp /) |
---|
964 | ecoll_400(:,2) = (/ 2.984_wp, 2.984_wp, 2.181_wp, 1.691_wp, & |
---|
965 | 1.201_wp, 1.201_wp, 1.0_wp /) |
---|
966 | ecoll_400(:,3) = (/ 1.988_wp, 1.988_wp, 1.475_wp, 1.313_wp, & |
---|
967 | 1.150_wp, 1.150_wp, 1.0_wp /) |
---|
968 | ecoll_400(:,4) = (/ 1.490_wp, 1.490_wp, 1.187_wp, 1.156_wp, & |
---|
969 | 1.126_wp, 1.126_wp, 1.0_wp /) |
---|
970 | ecoll_400(:,5) = (/ 1.249_wp, 1.249_wp, 1.088_wp, 1.090_wp, & |
---|
971 | 1.092_wp, 1.092_wp, 1.0_wp /) |
---|
972 | ecoll_400(:,6) = (/ 1.139_wp, 1.139_wp, 1.130_wp, 1.091_wp, & |
---|
973 | 1.051_wp, 1.051_wp, 1.0_wp /) |
---|
974 | ecoll_400(:,7) = (/ 1.220_wp, 1.220_wp, 1.190_wp, 1.138_wp, & |
---|
975 | 1.086_wp, 1.086_wp, 1.0_wp /) |
---|
976 | ecoll_400(:,8) = (/ 1.325_wp, 1.325_wp, 1.267_wp, 1.165_wp, & |
---|
977 | 1.063_wp, 1.063_wp, 1.0_wp /) |
---|
978 | ecoll_400(:,9) = (/ 1.716_wp, 1.716_wp, 1.345_wp, 1.223_wp, & |
---|
979 | 1.100_wp, 1.100_wp, 1.0_wp /) |
---|
980 | ecoll_400(:,10) = (/ 3.788_wp, 3.788_wp, 1.501_wp, 1.311_wp, & |
---|
981 | 1.120_wp, 1.120_wp, 1.0_wp /) |
---|
982 | ecoll_400(:,11) = (/ 36.52_wp, 36.52_wp, 19.16_wp, 22.80_wp, & |
---|
983 | 26.0_wp, 26.0_wp, 1.0_wp /) |
---|
984 | |
---|
985 | ENDIF |
---|
986 | |
---|
987 | ! |
---|
988 | !-- Calculate the radius class index of particles with respect to array r0 |
---|
989 | !-- Radius has to be in µm |
---|
990 | ALLOCATE( ira(1:radius_classes) ) |
---|
991 | |
---|
992 | DO j = 1, radius_classes |
---|
993 | particle_radius = radclass(j) * 1.0E6_wp |
---|
994 | DO k = 1, 7 |
---|
995 | IF ( particle_radius < r0(k) ) THEN |
---|
996 | ira(j) = k |
---|
997 | EXIT |
---|
998 | ENDIF |
---|
999 | ENDDO |
---|
1000 | IF ( particle_radius >= r0(7) ) ira(j) = 8 |
---|
1001 | ENDDO |
---|
1002 | |
---|
1003 | ! |
---|
1004 | !-- Two-dimensional linear interpolation of the collision efficiencies |
---|
1005 | !-- Radius has to be in µm |
---|
1006 | DO j = 1, radius_classes |
---|
1007 | DO i = 1, j |
---|
1008 | |
---|
1009 | ir = ira(j) |
---|
1010 | rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) ) |
---|
1011 | |
---|
1012 | DO kk = 2, 11 |
---|
1013 | IF ( rq <= rat(kk) ) THEN |
---|
1014 | iq = kk |
---|
1015 | EXIT |
---|
1016 | ENDIF |
---|
1017 | ENDDO |
---|
1018 | |
---|
1019 | y1 = 0.0001_wp ! for 0 m**2/s**3 |
---|
1020 | |
---|
1021 | IF ( ir < 8 ) THEN |
---|
1022 | IF ( ir >= 2 ) THEN |
---|
1023 | pp = ( radclass(j)*1.0E6_wp - r0(ir-1) ) / ( r0(ir) - r0(ir-1) ) |
---|
1024 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
1025 | y2 = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) * ecoll_100(ir-1,iq-1) + & |
---|
1026 | pp * ( 1.0_wp - qq ) * ecoll_100(ir,iq-1) + & |
---|
1027 | qq * ( 1.0_wp - pp ) * ecoll_100(ir-1,iq) + & |
---|
1028 | pp * qq * ecoll_100(ir,iq) |
---|
1029 | y3 = ( 1.0-pp ) * ( 1.0_wp - qq ) * ecoll_400(ir-1,iq-1) + & |
---|
1030 | pp * ( 1.0_wp - qq ) * ecoll_400(ir,iq-1) + & |
---|
1031 | qq * ( 1.0_wp - pp ) * ecoll_400(ir-1,iq) + & |
---|
1032 | pp * qq * ecoll_400(ir,iq) |
---|
1033 | ELSE |
---|
1034 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
1035 | y2 = ( 1.0_wp - qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq) |
---|
1036 | y3 = ( 1.0_wp - qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq) |
---|
1037 | ENDIF |
---|
1038 | ELSE |
---|
1039 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
1040 | y2 = ( 1.0_wp - qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq) |
---|
1041 | y3 = ( 1.0_wp - qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq) |
---|
1042 | ENDIF |
---|
1043 | ! |
---|
1044 | !-- Linear interpolation of dissipation rate in m**2/s**3 |
---|
1045 | IF ( epsilon <= 0.01_wp ) THEN |
---|
1046 | ecf(j,i) = ( epsilon - 0.01_wp ) / ( 0.0_wp - 0.01_wp ) * y1 & |
---|
1047 | + ( epsilon - 0.0_wp ) / ( 0.01_wp - 0.0_wp ) * y2 |
---|
1048 | ELSEIF ( epsilon <= 0.06_wp ) THEN |
---|
1049 | ecf(j,i) = ( epsilon - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & |
---|
1050 | + ( epsilon - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 |
---|
1051 | ELSE |
---|
1052 | ecf(j,i) = ( 0.06_wp - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & |
---|
1053 | + ( 0.06_wp - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 |
---|
1054 | ENDIF |
---|
1055 | |
---|
1056 | IF ( ecf(j,i) < 1.0_wp ) ecf(j,i) = 1.0_wp |
---|
1057 | |
---|
1058 | ecf(i,j) = ecf(j,i) |
---|
1059 | |
---|
1060 | ENDDO |
---|
1061 | ENDDO |
---|
1062 | |
---|
1063 | END SUBROUTINE turb_enhance_eff |
---|
1064 | |
---|
1065 | |
---|
1066 | |
---|
1067 | SUBROUTINE collision_efficiency_rogers( mean_r, r, e) |
---|
1068 | !------------------------------------------------------------------------------! |
---|
1069 | ! Collision efficiencies from table 8.2 in Rogers and Yau (1989, 3rd edition). |
---|
1070 | ! Values are calculated from table by bilinear interpolation. |
---|
1071 | !------------------------------------------------------------------------------! |
---|
1072 | |
---|
1073 | IMPLICIT NONE |
---|
1074 | |
---|
1075 | INTEGER(iwp) :: i !: |
---|
1076 | INTEGER(iwp) :: j !: |
---|
1077 | INTEGER(iwp) :: k !: |
---|
1078 | |
---|
1079 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
1080 | |
---|
1081 | REAL(wp) :: aa !: |
---|
1082 | REAL(wp) :: bb !: |
---|
1083 | REAL(wp) :: cc !: |
---|
1084 | REAL(wp) :: dd !: |
---|
1085 | REAL(wp) :: dx !: |
---|
1086 | REAL(wp) :: dy !: |
---|
1087 | REAL(wp) :: e !: |
---|
1088 | REAL(wp) :: gg !: |
---|
1089 | REAL(wp) :: mean_r !: |
---|
1090 | REAL(wp) :: mean_rm !: |
---|
1091 | REAL(wp) :: r !: |
---|
1092 | REAL(wp) :: rm !: |
---|
1093 | REAL(wp) :: x !: |
---|
1094 | REAL(wp) :: y !: |
---|
1095 | |
---|
1096 | REAL(wp), DIMENSION(1:9), SAVE :: collected_r = 0.0_wp !: |
---|
1097 | |
---|
1098 | REAL(wp), DIMENSION(1:19), SAVE :: collector_r = 0.0_wp !: |
---|
1099 | |
---|
1100 | REAL(wp), DIMENSION(1:9,1:19), SAVE :: ef = 0.0_wp !: |
---|
1101 | |
---|
1102 | mean_rm = mean_r * 1.0E06_wp |
---|
1103 | rm = r * 1.0E06_wp |
---|
1104 | |
---|
1105 | IF ( first ) THEN |
---|
1106 | |
---|
1107 | collected_r = (/ 2.0_wp, 3.0_wp, 4.0_wp, 6.0_wp, 8.0_wp, & |
---|
1108 | 10.0_wp, 15.0_wp, 20.0_wp, 25.0_wp /) |
---|
1109 | collector_r = (/ 10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, & |
---|
1110 | 60.0_wp, 80.0_wp, 100.0_wp, 150.0_wp, 200.0_wp, & |
---|
1111 | 300.0_wp, 400.0_wp, 500.0_wp, 600.0_wp, 1000.0_wp, & |
---|
1112 | 1400.0_wp, 1800.0_wp, 2400.0_wp, 3000.0_wp /) |
---|
1113 | |
---|
1114 | ef(:,1) = (/ 0.017_wp, 0.027_wp, 0.037_wp, 0.052_wp, 0.052_wp, & |
---|
1115 | 0.052_wp, 0.052_wp, 0.0_wp, 0.0_wp /) |
---|
1116 | ef(:,2) = (/ 0.001_wp, 0.016_wp, 0.027_wp, 0.060_wp, 0.12_wp, & |
---|
1117 | 0.17_wp, 0.17_wp, 0.17_wp, 0.0_wp /) |
---|
1118 | ef(:,3) = (/ 0.001_wp, 0.001_wp, 0.02_wp, 0.13_wp, 0.28_wp, & |
---|
1119 | 0.37_wp, 0.54_wp, 0.55_wp, 0.47_wp/) |
---|
1120 | ef(:,4) = (/ 0.001_wp, 0.001_wp, 0.02_wp, 0.23_wp, 0.4_wp, & |
---|
1121 | 0.55_wp, 0.7_wp, 0.75_wp, 0.75_wp/) |
---|
1122 | ef(:,5) = (/ 0.01_wp, 0.01_wp, 0.03_wp, 0.3_wp, 0.4_wp, & |
---|
1123 | 0.58_wp, 0.73_wp, 0.75_wp, 0.79_wp/) |
---|
1124 | ef(:,6) = (/ 0.01_wp, 0.01_wp, 0.13_wp, 0.38_wp, 0.57_wp, & |
---|
1125 | 0.68_wp, 0.80_wp, 0.86_wp, 0.91_wp/) |
---|
1126 | ef(:,7) = (/ 0.01_wp, 0.085_wp, 0.23_wp, 0.52_wp, 0.68_wp, & |
---|
1127 | 0.76_wp, 0.86_wp, 0.92_wp, 0.95_wp/) |
---|
1128 | ef(:,8) = (/ 0.01_wp, 0.14_wp, 0.32_wp, 0.60_wp, 0.73_wp, & |
---|
1129 | 0.81_wp, 0.90_wp, 0.94_wp, 0.96_wp/) |
---|
1130 | ef(:,9) = (/ 0.025_wp, 0.25_wp, 0.43_wp, 0.66_wp, 0.78_wp, & |
---|
1131 | 0.83_wp, 0.92_wp, 0.95_wp, 0.96_wp/) |
---|
1132 | ef(:,10) = (/ 0.039_wp, 0.3_wp, 0.46_wp, 0.69_wp, 0.81_wp, & |
---|
1133 | 0.87_wp, 0.93_wp, 0.95_wp, 0.96_wp/) |
---|
1134 | ef(:,11) = (/ 0.095_wp, 0.33_wp, 0.51_wp, 0.72_wp, 0.82_wp, & |
---|
1135 | 0.87_wp, 0.93_wp, 0.96_wp, 0.97_wp/) |
---|
1136 | ef(:,12) = (/ 0.098_wp, 0.36_wp, 0.51_wp, 0.73_wp, 0.83_wp, & |
---|
1137 | 0.88_wp, 0.93_wp, 0.96_wp, 0.97_wp/) |
---|
1138 | ef(:,13) = (/ 0.1_wp, 0.36_wp, 0.52_wp, 0.74_wp, 0.83_wp, & |
---|
1139 | 0.88_wp, 0.93_wp, 0.96_wp, 0.97_wp/) |
---|
1140 | ef(:,14) = (/ 0.17_wp, 0.4_wp, 0.54_wp, 0.72_wp, 0.83_wp, & |
---|
1141 | 0.88_wp, 0.94_wp, 0.98_wp, 1.0_wp /) |
---|
1142 | ef(:,15) = (/ 0.15_wp, 0.37_wp, 0.52_wp, 0.74_wp, 0.82_wp, & |
---|
1143 | 0.88_wp, 0.94_wp, 0.98_wp, 1.0_wp /) |
---|
1144 | ef(:,16) = (/ 0.11_wp, 0.34_wp, 0.49_wp, 0.71_wp, 0.83_wp, & |
---|
1145 | 0.88_wp, 0.94_wp, 0.95_wp, 1.0_wp /) |
---|
1146 | ef(:,17) = (/ 0.08_wp, 0.29_wp, 0.45_wp, 0.68_wp, 0.8_wp, & |
---|
1147 | 0.86_wp, 0.96_wp, 0.94_wp, 1.0_wp /) |
---|
1148 | ef(:,18) = (/ 0.04_wp, 0.22_wp, 0.39_wp, 0.62_wp, 0.75_wp, & |
---|
1149 | 0.83_wp, 0.92_wp, 0.96_wp, 1.0_wp /) |
---|
1150 | ef(:,19) = (/ 0.02_wp, 0.16_wp, 0.33_wp, 0.55_wp, 0.71_wp, & |
---|
1151 | 0.81_wp, 0.90_wp, 0.94_wp, 1.0_wp /) |
---|
1152 | |
---|
1153 | ENDIF |
---|
1154 | |
---|
1155 | DO k = 1, 8 |
---|
1156 | IF ( collected_r(k) <= mean_rm ) i = k |
---|
1157 | ENDDO |
---|
1158 | |
---|
1159 | DO k = 1, 18 |
---|
1160 | IF ( collector_r(k) <= rm ) j = k |
---|
1161 | ENDDO |
---|
1162 | |
---|
1163 | IF ( rm < 10.0_wp ) THEN |
---|
1164 | e = 0.0_wp |
---|
1165 | ELSEIF ( mean_rm < 2.0_wp ) THEN |
---|
1166 | e = 0.001_wp |
---|
1167 | ELSEIF ( mean_rm >= 25.0_wp ) THEN |
---|
1168 | IF( j <= 2 ) e = 0.0_wp |
---|
1169 | IF( j == 3 ) e = 0.47_wp |
---|
1170 | IF( j == 4 ) e = 0.8_wp |
---|
1171 | IF( j == 5 ) e = 0.9_wp |
---|
1172 | IF( j >=6 ) e = 1.0_wp |
---|
1173 | ELSEIF ( rm >= 3000.0_wp ) THEN |
---|
1174 | IF( i == 1 ) e = 0.02_wp |
---|
1175 | IF( i == 2 ) e = 0.16_wp |
---|
1176 | IF( i == 3 ) e = 0.33_wp |
---|
1177 | IF( i == 4 ) e = 0.55_wp |
---|
1178 | IF( i == 5 ) e = 0.71_wp |
---|
1179 | IF( i == 6 ) e = 0.81_wp |
---|
1180 | IF( i == 7 ) e = 0.90_wp |
---|
1181 | IF( i >= 8 ) e = 0.94_wp |
---|
1182 | ELSE |
---|
1183 | x = mean_rm - collected_r(i) |
---|
1184 | y = rm - collector_r(j) |
---|
1185 | dx = collected_r(i+1) - collected_r(i) |
---|
1186 | dy = collector_r(j+1) - collector_r(j) |
---|
1187 | aa = x**2 + y**2 |
---|
1188 | bb = ( dx - x )**2 + y**2 |
---|
1189 | cc = x**2 + ( dy - y )**2 |
---|
1190 | dd = ( dx - x )**2 + ( dy - y )**2 |
---|
1191 | gg = aa + bb + cc + dd |
---|
1192 | |
---|
1193 | e = ( (gg-aa)*ef(i,j) + (gg-bb)*ef(i+1,j) + (gg-cc)*ef(i,j+1) + & |
---|
1194 | (gg-dd)*ef(i+1,j+1) ) / (3.0_wp * gg) |
---|
1195 | ENDIF |
---|
1196 | |
---|
1197 | END SUBROUTINE collision_efficiency_rogers |
---|
1198 | |
---|
1199 | END MODULE lpm_collision_kernels_mod |
---|