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