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