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