[1873] | 1 | !> @file lpm_collision_kernels.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[1036] | 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 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 | ! |
---|
[1818] | 17 | ! Copyright 1997-2016 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[790] | 20 | ! Current revisions: |
---|
| 21 | ! ----------------- |
---|
[1347] | 22 | ! |
---|
[2001] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: lpm_collision_kernels.f90 2001 2016-08-20 18:41:22Z kanani $ |
---|
| 27 | ! |
---|
[2001] | 28 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 29 | ! Forced header and separation lines into 80 columns |
---|
| 30 | ! |
---|
[1881] | 31 | ! 1880 2016-04-20 09:36:50Z hoffmann |
---|
| 32 | ! Bugfix: The index of the larger particle has to be chosen for interpolation. |
---|
| 33 | ! |
---|
[1874] | 34 | ! 1873 2016-04-18 14:50:06Z maronga |
---|
| 35 | ! Module renamed (removed _mod) |
---|
| 36 | ! |
---|
[1859] | 37 | ! 1858 2016-04-13 13:12:11Z hoffmann |
---|
| 38 | ! Interpolation of collision kernels adjusted to more reasonable values. |
---|
| 39 | ! Reformatting of the code. |
---|
| 40 | ! |
---|
[1851] | 41 | ! 1850 2016-04-08 13:29:27Z maronga |
---|
| 42 | ! Module renamed |
---|
| 43 | ! |
---|
[1823] | 44 | ! 1822 2016-04-07 07:49:42Z hoffmann |
---|
| 45 | ! PALM kernel has been deleted. |
---|
| 46 | ! Bugfix in the calculation of the turbulent enhancement factor of the |
---|
| 47 | ! collection efficiency. |
---|
| 48 | ! |
---|
| 49 | ! Unused variables removed. |
---|
| 50 | ! |
---|
[1777] | 51 | ! 1776 2016-03-02 17:54:58Z hoffmann |
---|
| 52 | ! Bugfix: Collection efficiencies must be calculated for the larger droplet. |
---|
| 53 | ! |
---|
[1683] | 54 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 55 | ! Code annotations made doxygen readable |
---|
| 56 | ! |
---|
[1520] | 57 | ! 1519 2015-01-08 10:20:42Z hoffmann |
---|
| 58 | ! Bugfix: Using the new particle structure, particles are not sorted by size. |
---|
| 59 | ! Hence, computation of collision efficiencies must ensure that the ratio of |
---|
| 60 | ! two colliding droplets is < 1. |
---|
| 61 | ! |
---|
[1360] | 62 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 63 | ! New particle structure integrated. |
---|
| 64 | ! Kind definition added to all floating point numbers. |
---|
| 65 | ! |
---|
[1347] | 66 | ! 1346 2014-03-27 13:18:20Z heinze |
---|
| 67 | ! Bugfix: REAL constants provided with KIND-attribute especially in call of |
---|
| 68 | ! intrinsic function like MAX, MIN, SIGN |
---|
| 69 | ! |
---|
[1323] | 70 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 71 | ! REAL constants defined as wp_kind |
---|
| 72 | ! |
---|
[1321] | 73 | ! 1320 2014-03-20 08:40:49Z |
---|
[1320] | 74 | ! ONLY-attribute added to USE-statements, |
---|
| 75 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 76 | ! kinds are defined in new module kinds, |
---|
| 77 | ! revision history before 2012 removed, |
---|
| 78 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 79 | ! all variable declaration statements |
---|
[1008] | 80 | ! |
---|
[1093] | 81 | ! 1092 2013-02-02 11:24:22Z raasch |
---|
| 82 | ! unused variables removed |
---|
| 83 | ! |
---|
[1072] | 84 | ! 1071 2012-11-29 16:54:55Z franke |
---|
| 85 | ! Bugfix: collision efficiencies for Hall kernel should not be < 1.0E-20 |
---|
| 86 | ! |
---|
[1037] | 87 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 88 | ! code put under GPL (PALM 3.9) |
---|
| 89 | ! |
---|
[1008] | 90 | ! 1007 2012-09-19 14:30:36Z franke |
---|
[1007] | 91 | ! converted all units to SI units and replaced some parameters by corresponding |
---|
| 92 | ! PALM parameters |
---|
| 93 | ! Bugfix: factor in calculation of enhancement factor for collision efficencies |
---|
| 94 | ! changed from 10. to 1.0 |
---|
[829] | 95 | ! |
---|
[850] | 96 | ! 849 2012-03-15 10:35:09Z raasch |
---|
| 97 | ! routine collision_efficiency_rogers added (moved from former advec_particles |
---|
| 98 | ! to here) |
---|
| 99 | ! |
---|
[836] | 100 | ! 835 2012-02-22 11:21:19Z raasch $ |
---|
| 101 | ! Bugfix: array diss can be used only in case of Wang kernel |
---|
| 102 | ! |
---|
[829] | 103 | ! 828 2012-02-21 12:00:36Z raasch |
---|
[828] | 104 | ! code has been completely reformatted, routine colker renamed |
---|
| 105 | ! recalculate_kernel, |
---|
| 106 | ! routine init_kernels added, radius is now communicated to the collision |
---|
| 107 | ! routines by array radclass |
---|
[790] | 108 | ! |
---|
[828] | 109 | ! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4 |
---|
| 110 | ! |
---|
[826] | 111 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 112 | ! routine renamed from wang_kernel to lpm_collision_kernels, |
---|
| 113 | ! turbulence_effects on collision replaced by wang_kernel |
---|
| 114 | ! |
---|
[791] | 115 | ! 790 2011-11-29 03:11:20Z raasch |
---|
| 116 | ! initial revision |
---|
[790] | 117 | ! |
---|
| 118 | ! Description: |
---|
| 119 | ! ------------ |
---|
[1682] | 120 | !> This module calculates collision efficiencies either due to pure gravitational |
---|
| 121 | !> effects (Hall kernel, see Hall, 1980: J. Atmos. Sci., 2486-2507) or |
---|
[1822] | 122 | !> including the effects of turbulence (Wang kernel, see Wang and |
---|
| 123 | !> Grabowski, 2009: Atmos. Sci. Lett., 10, 1-8, and Ayala et al., 2008: |
---|
| 124 | !> New J. Phys., 10, 075016). The original code has been |
---|
[1682] | 125 | !> provided by L.-P. Wang but is substantially reformatted and speed optimized |
---|
| 126 | !> here. |
---|
[790] | 127 | !------------------------------------------------------------------------------! |
---|
[1682] | 128 | MODULE lpm_collision_kernels_mod |
---|
| 129 | |
---|
[790] | 130 | |
---|
[1320] | 131 | USE constants, & |
---|
| 132 | ONLY: pi |
---|
| 133 | |
---|
| 134 | USE kinds |
---|
| 135 | |
---|
| 136 | USE particle_attributes, & |
---|
[1822] | 137 | ONLY: collision_kernel, dissipation_classes, particles, & |
---|
| 138 | radius_classes |
---|
[1320] | 139 | |
---|
[828] | 140 | USE pegrid |
---|
[790] | 141 | |
---|
[828] | 142 | |
---|
[790] | 143 | IMPLICIT NONE |
---|
| 144 | |
---|
| 145 | PRIVATE |
---|
| 146 | |
---|
[1822] | 147 | PUBLIC ckernel, init_kernels, rclass_lbound, rclass_ubound, & |
---|
| 148 | recalculate_kernel |
---|
[790] | 149 | |
---|
[1682] | 150 | REAL(wp) :: epsilon !< |
---|
| 151 | REAL(wp) :: rclass_lbound !< |
---|
| 152 | REAL(wp) :: rclass_ubound !< |
---|
| 153 | REAL(wp) :: urms !< |
---|
[790] | 154 | |
---|
[1822] | 155 | REAL(wp), DIMENSION(:), ALLOCATABLE :: epsclass !< dissipation rate class |
---|
| 156 | REAL(wp), DIMENSION(:), ALLOCATABLE :: radclass !< radius class |
---|
| 157 | REAL(wp), DIMENSION(:), ALLOCATABLE :: winf !< |
---|
[1320] | 158 | |
---|
[1822] | 159 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ec !< |
---|
| 160 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ecf !< |
---|
| 161 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gck !< |
---|
| 162 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hkernel !< |
---|
| 163 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hwratio !< |
---|
[1320] | 164 | |
---|
[1822] | 165 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ckernel !< |
---|
[792] | 166 | |
---|
[828] | 167 | SAVE |
---|
[792] | 168 | |
---|
[790] | 169 | ! |
---|
| 170 | !-- Public interfaces |
---|
[828] | 171 | INTERFACE init_kernels |
---|
| 172 | MODULE PROCEDURE init_kernels |
---|
| 173 | END INTERFACE init_kernels |
---|
[790] | 174 | |
---|
[828] | 175 | INTERFACE recalculate_kernel |
---|
| 176 | MODULE PROCEDURE recalculate_kernel |
---|
| 177 | END INTERFACE recalculate_kernel |
---|
[790] | 178 | |
---|
| 179 | |
---|
[828] | 180 | CONTAINS |
---|
[790] | 181 | |
---|
[792] | 182 | |
---|
[828] | 183 | !------------------------------------------------------------------------------! |
---|
[1682] | 184 | ! Description: |
---|
| 185 | ! ------------ |
---|
| 186 | !> Initialization of the collision efficiency matrix with fixed radius and |
---|
| 187 | !> dissipation classes, calculated at simulation start only. |
---|
[828] | 188 | !------------------------------------------------------------------------------! |
---|
[1682] | 189 | |
---|
| 190 | SUBROUTINE init_kernels |
---|
[792] | 191 | |
---|
[828] | 192 | IMPLICIT NONE |
---|
[792] | 193 | |
---|
[1682] | 194 | INTEGER(iwp) :: i !< |
---|
| 195 | INTEGER(iwp) :: j !< |
---|
| 196 | INTEGER(iwp) :: k !< |
---|
[790] | 197 | |
---|
[828] | 198 | |
---|
| 199 | ! |
---|
| 200 | !-- Calculate collision efficiencies for fixed radius- and dissipation |
---|
| 201 | !-- classes |
---|
| 202 | IF ( collision_kernel(6:9) == 'fast' ) THEN |
---|
| 203 | |
---|
[1822] | 204 | ALLOCATE( ckernel(1:radius_classes,1:radius_classes, & |
---|
| 205 | 0:dissipation_classes), epsclass(1:dissipation_classes), & |
---|
[828] | 206 | radclass(1:radius_classes) ) |
---|
| 207 | |
---|
| 208 | ! |
---|
| 209 | !-- Calculate the radius class bounds with logarithmic distances |
---|
[1858] | 210 | !-- in the interval [1.0E-6, 1000.0E-6] m |
---|
[1322] | 211 | rclass_lbound = LOG( 1.0E-6_wp ) |
---|
[1858] | 212 | rclass_ubound = LOG( 1000.0E-6_wp ) |
---|
[1822] | 213 | radclass(1) = EXP( rclass_lbound ) |
---|
[828] | 214 | DO i = 2, radius_classes |
---|
| 215 | radclass(i) = EXP( rclass_lbound + & |
---|
[1359] | 216 | ( rclass_ubound - rclass_lbound ) * & |
---|
| 217 | ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) ) |
---|
[828] | 218 | ENDDO |
---|
| 219 | |
---|
| 220 | ! |
---|
[1858] | 221 | !-- Set the class bounds for dissipation in interval [0.0, 600.0] cm**2/s**3 |
---|
[828] | 222 | DO i = 1, dissipation_classes |
---|
[1858] | 223 | epsclass(i) = 0.06_wp * REAL( i, KIND=wp ) / dissipation_classes |
---|
[828] | 224 | ENDDO |
---|
| 225 | ! |
---|
| 226 | !-- Calculate collision efficiencies of the Wang/ayala kernel |
---|
| 227 | ALLOCATE( ec(1:radius_classes,1:radius_classes), & |
---|
| 228 | ecf(1:radius_classes,1:radius_classes), & |
---|
| 229 | gck(1:radius_classes,1:radius_classes), & |
---|
| 230 | winf(1:radius_classes) ) |
---|
| 231 | |
---|
| 232 | DO k = 1, dissipation_classes |
---|
| 233 | |
---|
| 234 | epsilon = epsclass(k) |
---|
[1359] | 235 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp ) |
---|
[828] | 236 | |
---|
| 237 | CALL turbsd |
---|
| 238 | CALL turb_enhance_eff |
---|
| 239 | CALL effic |
---|
| 240 | |
---|
| 241 | DO j = 1, radius_classes |
---|
| 242 | DO i = 1, radius_classes |
---|
| 243 | ckernel(i,j,k) = ec(i,j) * gck(i,j) * ecf(i,j) |
---|
| 244 | ENDDO |
---|
| 245 | ENDDO |
---|
| 246 | |
---|
| 247 | ENDDO |
---|
| 248 | |
---|
| 249 | ! |
---|
| 250 | !-- Calculate collision efficiencies of the Hall kernel |
---|
| 251 | ALLOCATE( hkernel(1:radius_classes,1:radius_classes), & |
---|
| 252 | hwratio(1:radius_classes,1:radius_classes) ) |
---|
| 253 | |
---|
| 254 | CALL fallg |
---|
| 255 | CALL effic |
---|
| 256 | |
---|
| 257 | DO j = 1, radius_classes |
---|
| 258 | DO i = 1, radius_classes |
---|
| 259 | hkernel(i,j) = pi * ( radclass(j) + radclass(i) )**2 & |
---|
| 260 | * ec(i,j) * ABS( winf(j) - winf(i) ) |
---|
| 261 | ckernel(i,j,0) = hkernel(i,j) ! hall kernel stored on index 0 |
---|
| 262 | ENDDO |
---|
| 263 | ENDDO |
---|
| 264 | |
---|
| 265 | ! |
---|
| 266 | !-- Test output of efficiencies |
---|
| 267 | IF ( j == -1 ) THEN |
---|
| 268 | |
---|
| 269 | PRINT*, '*** Hall kernel' |
---|
[1359] | 270 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, & |
---|
[1007] | 271 | i = 1,radius_classes ) |
---|
[828] | 272 | DO j = 1, radius_classes |
---|
[1007] | 273 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j), & |
---|
| 274 | ( hkernel(i,j), i = 1,radius_classes ) |
---|
[828] | 275 | ENDDO |
---|
| 276 | |
---|
| 277 | DO k = 1, dissipation_classes |
---|
| 278 | DO i = 1, radius_classes |
---|
| 279 | DO j = 1, radius_classes |
---|
[1359] | 280 | IF ( hkernel(i,j) == 0.0_wp ) THEN |
---|
| 281 | hwratio(i,j) = 9999999.9_wp |
---|
[828] | 282 | ELSE |
---|
| 283 | hwratio(i,j) = ckernel(i,j,k) / hkernel(i,j) |
---|
| 284 | ENDIF |
---|
| 285 | ENDDO |
---|
| 286 | ENDDO |
---|
| 287 | |
---|
| 288 | PRINT*, '*** epsilon = ', epsclass(k) |
---|
[1359] | 289 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, & |
---|
[1007] | 290 | i = 1,radius_classes ) |
---|
[828] | 291 | DO j = 1, radius_classes |
---|
[1359] | 292 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, & |
---|
[1007] | 293 | ( hwratio(i,j), i = 1,radius_classes ) |
---|
[828] | 294 | ENDDO |
---|
| 295 | ENDDO |
---|
| 296 | |
---|
| 297 | ENDIF |
---|
| 298 | |
---|
| 299 | DEALLOCATE( ec, ecf, epsclass, gck, hkernel, winf ) |
---|
| 300 | |
---|
| 301 | ENDIF |
---|
| 302 | |
---|
| 303 | END SUBROUTINE init_kernels |
---|
| 304 | |
---|
| 305 | |
---|
[790] | 306 | !------------------------------------------------------------------------------! |
---|
[1682] | 307 | ! Description: |
---|
| 308 | ! ------------ |
---|
| 309 | !> Calculation of collision kernels during each timestep and for each grid box |
---|
[790] | 310 | !------------------------------------------------------------------------------! |
---|
[828] | 311 | SUBROUTINE recalculate_kernel( i1, j1, k1 ) |
---|
[790] | 312 | |
---|
[1320] | 313 | USE arrays_3d, & |
---|
| 314 | ONLY: diss |
---|
[790] | 315 | |
---|
[1320] | 316 | USE particle_attributes, & |
---|
[1858] | 317 | ONLY: number_of_particles, prt_count, radius_classes, wang_kernel |
---|
[1320] | 318 | |
---|
[790] | 319 | IMPLICIT NONE |
---|
| 320 | |
---|
[1682] | 321 | INTEGER(iwp) :: i !< |
---|
| 322 | INTEGER(iwp) :: i1 !< |
---|
| 323 | INTEGER(iwp) :: j !< |
---|
| 324 | INTEGER(iwp) :: j1 !< |
---|
| 325 | INTEGER(iwp) :: k1 !< |
---|
[790] | 326 | |
---|
| 327 | |
---|
[1858] | 328 | number_of_particles = prt_count(k1,j1,i1) |
---|
| 329 | radius_classes = number_of_particles ! necessary to use the same |
---|
| 330 | ! subroutines as for |
---|
| 331 | ! precalculated kernels |
---|
[792] | 332 | |
---|
[1858] | 333 | ALLOCATE( ec(1:number_of_particles,1:number_of_particles), & |
---|
| 334 | radclass(1:number_of_particles), winf(1:number_of_particles) ) |
---|
[790] | 335 | |
---|
[828] | 336 | ! |
---|
[1007] | 337 | !-- Store particle radii on the radclass array |
---|
[1858] | 338 | radclass(1:number_of_particles) = particles(1:number_of_particles)%radius |
---|
[790] | 339 | |
---|
[835] | 340 | IF ( wang_kernel ) THEN |
---|
[1007] | 341 | epsilon = diss(k1,j1,i1) ! dissipation rate in m**2/s**3 |
---|
[835] | 342 | ELSE |
---|
[1359] | 343 | epsilon = 0.0_wp |
---|
[835] | 344 | ENDIF |
---|
[1359] | 345 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp ) |
---|
[790] | 346 | |
---|
[1359] | 347 | IF ( wang_kernel .AND. epsilon > 1.0E-7_wp ) THEN |
---|
[828] | 348 | ! |
---|
| 349 | !-- Call routines to calculate efficiencies for the Wang kernel |
---|
[1858] | 350 | ALLOCATE( gck(1:number_of_particles,1:number_of_particles), & |
---|
| 351 | ecf(1:number_of_particles,1:number_of_particles) ) |
---|
[790] | 352 | |
---|
[828] | 353 | CALL turbsd |
---|
| 354 | CALL turb_enhance_eff |
---|
| 355 | CALL effic |
---|
[790] | 356 | |
---|
[1858] | 357 | DO j = 1, number_of_particles |
---|
| 358 | DO i = 1, number_of_particles |
---|
| 359 | ckernel(1+i-1,1+j-1,1) = ec(i,j) * gck(i,j) * ecf(i,j) |
---|
[790] | 360 | ENDDO |
---|
[828] | 361 | ENDDO |
---|
[790] | 362 | |
---|
[828] | 363 | DEALLOCATE( gck, ecf ) |
---|
[790] | 364 | |
---|
| 365 | ELSE |
---|
[828] | 366 | ! |
---|
| 367 | !-- Call routines to calculate efficiencies for the Hall kernel |
---|
[790] | 368 | CALL fallg |
---|
| 369 | CALL effic |
---|
| 370 | |
---|
[1858] | 371 | DO j = 1, number_of_particles |
---|
| 372 | DO i = 1, number_of_particles |
---|
| 373 | ckernel(i,j,1) = pi * ( radclass(j) + radclass(i) )**2 & |
---|
| 374 | * ec(i,j) * ABS( winf(j) - winf(i) ) |
---|
[790] | 375 | ENDDO |
---|
| 376 | ENDDO |
---|
| 377 | |
---|
| 378 | ENDIF |
---|
| 379 | |
---|
[828] | 380 | DEALLOCATE( ec, radclass, winf ) |
---|
[790] | 381 | |
---|
[828] | 382 | END SUBROUTINE recalculate_kernel |
---|
[790] | 383 | |
---|
[828] | 384 | |
---|
[790] | 385 | !------------------------------------------------------------------------------! |
---|
[1682] | 386 | ! Description: |
---|
| 387 | ! ------------ |
---|
[1822] | 388 | !> Calculation of effects of turbulence on the geometric collision kernel |
---|
| 389 | !> (by including the droplets' average radial relative velocities and their |
---|
| 390 | !> radial distribution function) following the analytic model by Aayala et al. |
---|
| 391 | !> (2008, New J. Phys.). For details check the second part 2 of the publication, |
---|
| 392 | !> page 37ff. |
---|
| 393 | !> |
---|
| 394 | !> Input parameters, which need to be replaced by PALM parameters: |
---|
| 395 | !> water density, air density |
---|
[790] | 396 | !------------------------------------------------------------------------------! |
---|
[792] | 397 | SUBROUTINE turbsd |
---|
[799] | 398 | |
---|
[1320] | 399 | USE control_parameters, & |
---|
| 400 | ONLY: g, molecular_viscosity |
---|
| 401 | |
---|
| 402 | USE particle_attributes, & |
---|
| 403 | ONLY: radius_classes |
---|
[790] | 404 | |
---|
| 405 | IMPLICIT NONE |
---|
| 406 | |
---|
[1682] | 407 | INTEGER(iwp) :: i !< |
---|
| 408 | INTEGER(iwp) :: j !< |
---|
[790] | 409 | |
---|
[1682] | 410 | REAL(wp) :: ao !< |
---|
| 411 | REAL(wp) :: ao_gr !< |
---|
| 412 | REAL(wp) :: bbb !< |
---|
| 413 | REAL(wp) :: be !< |
---|
| 414 | REAL(wp) :: b1 !< |
---|
| 415 | REAL(wp) :: b2 !< |
---|
| 416 | REAL(wp) :: ccc !< |
---|
| 417 | REAL(wp) :: c1 !< |
---|
| 418 | REAL(wp) :: c1_gr !< |
---|
| 419 | REAL(wp) :: c2 !< |
---|
| 420 | REAL(wp) :: d1 !< |
---|
| 421 | REAL(wp) :: d2 !< |
---|
| 422 | REAL(wp) :: eta !< |
---|
| 423 | REAL(wp) :: e1 !< |
---|
| 424 | REAL(wp) :: e2 !< |
---|
| 425 | REAL(wp) :: fao_gr !< |
---|
| 426 | REAL(wp) :: fr !< |
---|
| 427 | REAL(wp) :: grfin !< |
---|
| 428 | REAL(wp) :: lambda !< |
---|
| 429 | REAL(wp) :: lambda_re !< |
---|
| 430 | REAL(wp) :: lf !< |
---|
| 431 | REAL(wp) :: rc !< |
---|
| 432 | REAL(wp) :: rrp !< |
---|
| 433 | REAL(wp) :: sst !< |
---|
| 434 | REAL(wp) :: tauk !< |
---|
| 435 | REAL(wp) :: tl !< |
---|
| 436 | REAL(wp) :: t2 !< |
---|
| 437 | REAL(wp) :: tt !< |
---|
| 438 | REAL(wp) :: t1 !< |
---|
| 439 | REAL(wp) :: vk !< |
---|
| 440 | REAL(wp) :: vrms1xy !< |
---|
| 441 | REAL(wp) :: vrms2xy !< |
---|
| 442 | REAL(wp) :: v1 !< |
---|
| 443 | REAL(wp) :: v1v2xy !< |
---|
| 444 | REAL(wp) :: v1xysq !< |
---|
| 445 | REAL(wp) :: v2 !< |
---|
| 446 | REAL(wp) :: v2xysq !< |
---|
| 447 | REAL(wp) :: wrfin !< |
---|
| 448 | REAL(wp) :: wrgrav2 !< |
---|
| 449 | REAL(wp) :: wrtur2xy !< |
---|
| 450 | REAL(wp) :: xx !< |
---|
| 451 | REAL(wp) :: yy !< |
---|
| 452 | REAL(wp) :: z !< |
---|
[790] | 453 | |
---|
[1822] | 454 | REAL(wp), DIMENSION(1:radius_classes) :: st !< Stokes number |
---|
| 455 | REAL(wp), DIMENSION(1:radius_classes) :: tau !< inertial time scale |
---|
[790] | 456 | |
---|
[1822] | 457 | lambda = urms * SQRT( 15.0_wp * molecular_viscosity / epsilon ) |
---|
[1322] | 458 | lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity ) |
---|
[1822] | 459 | tl = urms**2 / epsilon |
---|
| 460 | lf = 0.5_wp * urms**3 / epsilon |
---|
| 461 | tauk = SQRT( molecular_viscosity / epsilon ) |
---|
| 462 | eta = ( molecular_viscosity**3 / epsilon )**0.25_wp |
---|
[1007] | 463 | vk = eta / tauk |
---|
[790] | 464 | |
---|
[1359] | 465 | ao = ( 11.0_wp + 7.0_wp * lambda_re ) / ( 205.0_wp + lambda_re ) |
---|
[1822] | 466 | tt = SQRT( 2.0_wp * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk |
---|
[799] | 467 | |
---|
[1822] | 468 | ! |
---|
| 469 | !-- Get terminal velocity of droplets |
---|
| 470 | CALL fallg |
---|
[790] | 471 | |
---|
[828] | 472 | DO i = 1, radius_classes |
---|
[1822] | 473 | tau(i) = winf(i) / g ! inertial time scale |
---|
| 474 | st(i) = tau(i) / tauk ! Stokes number |
---|
[790] | 475 | ENDDO |
---|
| 476 | |
---|
[828] | 477 | ! |
---|
[1822] | 478 | !-- Calculate average radial relative velocity at contact (wrfin) |
---|
[828] | 479 | z = tt / tl |
---|
[1322] | 480 | be = SQRT( 2.0_wp ) * lambda / lf |
---|
[1359] | 481 | bbb = SQRT( 1.0_wp - 2.0_wp * be**2 ) |
---|
| 482 | d1 = ( 1.0_wp + bbb ) / ( 2.0_wp * bbb ) |
---|
[1822] | 483 | e1 = lf * ( 1.0_wp + bbb ) * 0.5_wp |
---|
[1359] | 484 | d2 = ( 1.0_wp - bbb ) * 0.5_wp / bbb |
---|
[1822] | 485 | e2 = lf * ( 1.0_wp - bbb ) * 0.5_wp |
---|
[1359] | 486 | ccc = SQRT( 1.0_wp - 2.0_wp * z**2 ) |
---|
| 487 | b1 = ( 1.0_wp + ccc ) * 0.5_wp / ccc |
---|
[1822] | 488 | c1 = tl * ( 1.0_wp + ccc ) * 0.5_wp |
---|
[1359] | 489 | b2 = ( 1.0_wp - ccc ) * 0.5_wp / ccc |
---|
[1822] | 490 | c2 = tl * ( 1.0_wp - ccc ) * 0.5_wp |
---|
[790] | 491 | |
---|
[828] | 492 | DO i = 1, radius_classes |
---|
[790] | 493 | |
---|
[1822] | 494 | v1 = winf(i) |
---|
| 495 | t1 = tau(i) |
---|
[790] | 496 | |
---|
[828] | 497 | DO j = 1, i |
---|
[1007] | 498 | rrp = radclass(i) + radclass(j) |
---|
[1822] | 499 | v2 = winf(j) |
---|
| 500 | t2 = tau(j) |
---|
[790] | 501 | |
---|
[1007] | 502 | v1xysq = b1 * d1 * phi_w(c1,e1,v1,t1) - b1 * d2 * phi_w(c1,e2,v1,t1) & |
---|
| 503 | - b2 * d1 * phi_w(c2,e1,v1,t1) + b2 * d2 * phi_w(c2,e2,v1,t1) |
---|
[1822] | 504 | v1xysq = v1xysq * urms**2 / t1 |
---|
| 505 | vrms1xy = SQRT( v1xysq ) |
---|
[790] | 506 | |
---|
[1007] | 507 | v2xysq = b1 * d1 * phi_w(c1,e1,v2,t2) - b1 * d2 * phi_w(c1,e2,v2,t2) & |
---|
| 508 | - b2 * d1 * phi_w(c2,e1,v2,t2) + b2 * d2 * phi_w(c2,e2,v2,t2) |
---|
[1822] | 509 | v2xysq = v2xysq * urms**2 / t2 |
---|
| 510 | vrms2xy = SQRT( v2xysq ) |
---|
[790] | 511 | |
---|
[828] | 512 | IF ( winf(i) >= winf(j) ) THEN |
---|
[799] | 513 | v1 = winf(i) |
---|
[790] | 514 | t1 = tau(i) |
---|
[799] | 515 | v2 = winf(j) |
---|
[790] | 516 | t2 = tau(j) |
---|
| 517 | ELSE |
---|
[799] | 518 | v1 = winf(j) |
---|
[790] | 519 | t1 = tau(j) |
---|
[799] | 520 | v2 = winf(i) |
---|
[790] | 521 | t2 = tau(i) |
---|
| 522 | ENDIF |
---|
| 523 | |
---|
[828] | 524 | v1v2xy = b1 * d1 * zhi(c1,e1,v1,t1,v2,t2) - & |
---|
| 525 | b1 * d2 * zhi(c1,e2,v1,t1,v2,t2) - & |
---|
| 526 | b2 * d1 * zhi(c2,e1,v1,t1,v2,t2) + & |
---|
| 527 | b2 * d2* zhi(c2,e2,v1,t1,v2,t2) |
---|
| 528 | fr = d1 * EXP( -rrp / e1 ) - d2 * EXP( -rrp / e2 ) |
---|
[1822] | 529 | v1v2xy = v1v2xy * fr * urms**2 / tau(i) / tau(j) |
---|
| 530 | wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0_wp * v1v2xy |
---|
[1359] | 531 | IF ( wrtur2xy < 0.0_wp ) wrtur2xy = 0.0_wp |
---|
[1322] | 532 | wrgrav2 = pi / 8.0_wp * ( winf(j) - winf(i) )**2 |
---|
[1822] | 533 | wrfin = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) ) |
---|
[790] | 534 | |
---|
[828] | 535 | ! |
---|
[1822] | 536 | !-- Calculate radial distribution function (grfin) |
---|
[828] | 537 | IF ( st(j) > st(i) ) THEN |
---|
| 538 | sst = st(j) |
---|
[790] | 539 | ELSE |
---|
[828] | 540 | sst = st(i) |
---|
[790] | 541 | ENDIF |
---|
| 542 | |
---|
[1359] | 543 | xx = -0.1988_wp * sst**4 + 1.5275_wp * sst**3 - 4.2942_wp * & |
---|
| 544 | sst**2 + 5.3406_wp * sst |
---|
| 545 | IF ( xx < 0.0_wp ) xx = 0.0_wp |
---|
| 546 | yy = 0.1886_wp * EXP( 20.306_wp / lambda_re ) |
---|
[790] | 547 | |
---|
[1007] | 548 | c1_gr = xx / ( g / vk * tauk )**yy |
---|
[790] | 549 | |
---|
[1322] | 550 | ao_gr = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2 |
---|
[1359] | 551 | fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re ) |
---|
[1822] | 552 | rc = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta |
---|
[790] | 553 | |
---|
[1359] | 554 | grfin = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5_wp ) |
---|
| 555 | IF ( grfin < 1.0_wp ) grfin = 1.0_wp |
---|
[790] | 556 | |
---|
[1822] | 557 | ! |
---|
| 558 | !-- Calculate general collection kernel (without the consideration of |
---|
| 559 | !-- collection efficiencies) |
---|
| 560 | gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin |
---|
[790] | 561 | gck(j,i) = gck(i,j) |
---|
| 562 | |
---|
| 563 | ENDDO |
---|
| 564 | ENDDO |
---|
| 565 | |
---|
[828] | 566 | END SUBROUTINE turbsd |
---|
[790] | 567 | |
---|
[1320] | 568 | REAL(wp) FUNCTION phi_w( a, b, vsett, tau0 ) |
---|
[1822] | 569 | ! |
---|
| 570 | !-- Function used in the Ayala et al. (2008) analytical model for turbulent |
---|
| 571 | !-- effects on the collision kernel |
---|
[790] | 572 | IMPLICIT NONE |
---|
| 573 | |
---|
[1682] | 574 | REAL(wp) :: a !< |
---|
| 575 | REAL(wp) :: aa1 !< |
---|
| 576 | REAL(wp) :: b !< |
---|
| 577 | REAL(wp) :: tau0 !< |
---|
| 578 | REAL(wp) :: vsett !< |
---|
[790] | 579 | |
---|
[1359] | 580 | aa1 = 1.0_wp / tau0 + 1.0_wp / a + vsett / b |
---|
[1822] | 581 | phi_w = 1.0_wp / aa1 - 0.5_wp * vsett / b / aa1**2 |
---|
[790] | 582 | |
---|
[1007] | 583 | END FUNCTION phi_w |
---|
[792] | 584 | |
---|
[1320] | 585 | REAL(wp) FUNCTION zhi( a, b, vsett1, tau1, vsett2, tau2 ) |
---|
[1822] | 586 | ! |
---|
| 587 | !-- Function used in the Ayala et al. (2008) analytical model for turbulent |
---|
| 588 | !-- effects on the collision kernel |
---|
[790] | 589 | IMPLICIT NONE |
---|
| 590 | |
---|
[1682] | 591 | REAL(wp) :: a !< |
---|
| 592 | REAL(wp) :: aa1 !< |
---|
| 593 | REAL(wp) :: aa2 !< |
---|
| 594 | REAL(wp) :: aa3 !< |
---|
| 595 | REAL(wp) :: aa4 !< |
---|
| 596 | REAL(wp) :: aa5 !< |
---|
| 597 | REAL(wp) :: aa6 !< |
---|
| 598 | REAL(wp) :: b !< |
---|
| 599 | REAL(wp) :: tau1 !< |
---|
| 600 | REAL(wp) :: tau2 !< |
---|
| 601 | REAL(wp) :: vsett1 !< |
---|
| 602 | REAL(wp) :: vsett2 !< |
---|
[790] | 603 | |
---|
[1359] | 604 | aa1 = vsett2 / b - 1.0_wp / tau2 - 1.0_wp / a |
---|
| 605 | aa2 = vsett1 / b + 1.0_wp / tau1 + 1.0_wp / a |
---|
| 606 | aa3 = ( vsett1 - vsett2 ) / b + 1.0_wp / tau1 + 1.0_wp / tau2 |
---|
| 607 | aa4 = ( vsett2 / b )**2 - ( 1.0_wp / tau2 + 1.0_wp / a )**2 |
---|
| 608 | aa5 = vsett2 / b + 1.0_wp / tau2 + 1.0_wp / a |
---|
| 609 | aa6 = 1.0_wp / tau1 - 1.0_wp / a + ( 1.0_wp / tau2 + 1.0_wp / a) * & |
---|
| 610 | vsett1 / vsett2 |
---|
| 611 | zhi = (1.0_wp / aa1 - 1.0_wp / aa2 ) * ( vsett1 - vsett2 ) * 0.5_wp / & |
---|
| 612 | b / aa3**2 + ( 4.0_wp / aa4 - 1.0_wp / aa5**2 - 1.0_wp / aa1**2 ) & |
---|
| 613 | * vsett2 * 0.5_wp / b /aa6 + ( 2.0_wp * ( b / aa2 - b / aa1 ) - & |
---|
[1822] | 614 | vsett1 / aa2**2 + vsett2 / aa1**2 ) * 0.5_wp / b / aa3 |
---|
[799] | 615 | |
---|
[828] | 616 | END FUNCTION zhi |
---|
[790] | 617 | |
---|
[828] | 618 | |
---|
[790] | 619 | !------------------------------------------------------------------------------! |
---|
[1682] | 620 | ! Description: |
---|
| 621 | ! ------------ |
---|
[1822] | 622 | !> Parameterization of terminal velocity following Rogers et al. (1993, J. Appl. |
---|
| 623 | !> Meteorol.) |
---|
[790] | 624 | !------------------------------------------------------------------------------! |
---|
[828] | 625 | SUBROUTINE fallg |
---|
[790] | 626 | |
---|
[1320] | 627 | USE particle_attributes, & |
---|
| 628 | ONLY: radius_classes |
---|
[790] | 629 | |
---|
[828] | 630 | IMPLICIT NONE |
---|
[790] | 631 | |
---|
[1822] | 632 | INTEGER(iwp) :: j !< |
---|
[790] | 633 | |
---|
[1822] | 634 | REAL(wp), PARAMETER :: k_cap_rog = 4.0_wp !< parameter |
---|
| 635 | REAL(wp), PARAMETER :: k_low_rog = 12.0_wp !< parameter |
---|
| 636 | REAL(wp), PARAMETER :: a_rog = 9.65_wp !< parameter |
---|
| 637 | REAL(wp), PARAMETER :: b_rog = 10.43_wp !< parameter |
---|
| 638 | REAL(wp), PARAMETER :: c_rog = 0.6_wp !< parameter |
---|
| 639 | REAL(wp), PARAMETER :: d0_rog = 0.745_wp !< seperation diameter |
---|
[790] | 640 | |
---|
[1822] | 641 | REAL(wp) :: diameter !< droplet diameter in mm |
---|
[790] | 642 | |
---|
[799] | 643 | |
---|
[828] | 644 | DO j = 1, radius_classes |
---|
[790] | 645 | |
---|
[1822] | 646 | diameter = radclass(j) * 2000.0_wp |
---|
[799] | 647 | |
---|
[1822] | 648 | IF ( diameter <= d0_rog ) THEN |
---|
| 649 | winf(j) = k_cap_rog * diameter * ( 1.0_wp - & |
---|
| 650 | EXP( -k_low_rog * diameter ) ) |
---|
| 651 | ELSE |
---|
| 652 | winf(j) = a_rog - b_rog * EXP( -c_rog * diameter ) |
---|
[828] | 653 | ENDIF |
---|
[790] | 654 | |
---|
[828] | 655 | ENDDO |
---|
[790] | 656 | |
---|
[828] | 657 | END SUBROUTINE fallg |
---|
[790] | 658 | |
---|
[828] | 659 | |
---|
[790] | 660 | !------------------------------------------------------------------------------! |
---|
[1682] | 661 | ! Description: |
---|
| 662 | ! ------------ |
---|
[1822] | 663 | !> Interpolation of collision efficiencies (Hall, 1980, J. Atmos. Sci.) |
---|
[790] | 664 | !------------------------------------------------------------------------------! |
---|
[828] | 665 | SUBROUTINE effic |
---|
[1320] | 666 | |
---|
| 667 | USE particle_attributes, & |
---|
| 668 | ONLY: radius_classes |
---|
[790] | 669 | |
---|
[828] | 670 | IMPLICIT NONE |
---|
[790] | 671 | |
---|
[1682] | 672 | INTEGER(iwp) :: i !< |
---|
| 673 | INTEGER(iwp) :: iq !< |
---|
| 674 | INTEGER(iwp) :: ir !< |
---|
| 675 | INTEGER(iwp) :: j !< |
---|
| 676 | INTEGER(iwp) :: k !< |
---|
[790] | 677 | |
---|
[1682] | 678 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !< |
---|
[790] | 679 | |
---|
[1682] | 680 | LOGICAL, SAVE :: first = .TRUE. !< |
---|
[790] | 681 | |
---|
[1682] | 682 | REAL(wp) :: ek !< |
---|
| 683 | REAL(wp) :: particle_radius !< |
---|
| 684 | REAL(wp) :: pp !< |
---|
| 685 | REAL(wp) :: qq !< |
---|
| 686 | REAL(wp) :: rq !< |
---|
[790] | 687 | |
---|
[1682] | 688 | REAL(wp), DIMENSION(1:21), SAVE :: rat !< |
---|
[1320] | 689 | |
---|
[1682] | 690 | REAL(wp), DIMENSION(1:15), SAVE :: r0 !< |
---|
[1320] | 691 | |
---|
[1682] | 692 | REAL(wp), DIMENSION(1:15,1:21), SAVE :: ecoll !< |
---|
[790] | 693 | |
---|
[792] | 694 | ! |
---|
[828] | 695 | !-- Initial assignment of constants |
---|
| 696 | IF ( first ) THEN |
---|
[790] | 697 | |
---|
[792] | 698 | first = .FALSE. |
---|
[1822] | 699 | r0 = (/ 6.0_wp, 8.0_wp, 10.0_wp, 15.0_wp, 20.0_wp, 25.0_wp, & |
---|
| 700 | 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, 70.0_wp, 100.0_wp, & |
---|
[1359] | 701 | 150.0_wp, 200.0_wp, 300.0_wp /) |
---|
[790] | 702 | |
---|
[1822] | 703 | rat = (/ 0.00_wp, 0.05_wp, 0.10_wp, 0.15_wp, 0.20_wp, 0.25_wp, & |
---|
| 704 | 0.30_wp, 0.35_wp, 0.40_wp, 0.45_wp, 0.50_wp, 0.55_wp, & |
---|
| 705 | 0.60_wp, 0.65_wp, 0.70_wp, 0.75_wp, 0.80_wp, 0.85_wp, & |
---|
[1359] | 706 | 0.90_wp, 0.95_wp, 1.00_wp /) |
---|
| 707 | |
---|
[1822] | 708 | ecoll(:,1) = (/ 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & |
---|
| 709 | 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & |
---|
[1359] | 710 | 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp /) |
---|
[1822] | 711 | ecoll(:,2) = (/ 0.003_wp, 0.003_wp, 0.003_wp, 0.004_wp, 0.005_wp, & |
---|
| 712 | 0.005_wp, 0.005_wp, 0.010_wp, 0.100_wp, 0.050_wp, & |
---|
[1359] | 713 | 0.200_wp, 0.500_wp, 0.770_wp, 0.870_wp, 0.970_wp /) |
---|
[1822] | 714 | ecoll(:,3) = (/ 0.007_wp, 0.007_wp, 0.007_wp, 0.008_wp, 0.009_wp, & |
---|
| 715 | 0.010_wp, 0.010_wp, 0.070_wp, 0.400_wp, 0.430_wp, & |
---|
[1359] | 716 | 0.580_wp, 0.790_wp, 0.930_wp, 0.960_wp, 1.000_wp /) |
---|
[1822] | 717 | ecoll(:,4) = (/ 0.009_wp, 0.009_wp, 0.009_wp, 0.012_wp, 0.015_wp, & |
---|
| 718 | 0.010_wp, 0.020_wp, 0.280_wp, 0.600_wp, 0.640_wp, & |
---|
[1359] | 719 | 0.750_wp, 0.910_wp, 0.970_wp, 0.980_wp, 1.000_wp /) |
---|
[1822] | 720 | ecoll(:,5) = (/ 0.014_wp, 0.014_wp, 0.014_wp, 0.015_wp, 0.016_wp, & |
---|
| 721 | 0.030_wp, 0.060_wp, 0.500_wp, 0.700_wp, 0.770_wp, & |
---|
[1359] | 722 | 0.840_wp, 0.950_wp, 0.970_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 723 | ecoll(:,6) = (/ 0.017_wp, 0.017_wp, 0.017_wp, 0.020_wp, 0.022_wp, & |
---|
| 724 | 0.060_wp, 0.100_wp, 0.620_wp, 0.780_wp, 0.840_wp, & |
---|
[1359] | 725 | 0.880_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 726 | ecoll(:,7) = (/ 0.030_wp, 0.030_wp, 0.024_wp, 0.022_wp, 0.032_wp, & |
---|
| 727 | 0.062_wp, 0.200_wp, 0.680_wp, 0.830_wp, 0.870_wp, & |
---|
[1359] | 728 | 0.900_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 729 | ecoll(:,8) = (/ 0.025_wp, 0.025_wp, 0.025_wp, 0.036_wp, 0.043_wp, & |
---|
| 730 | 0.130_wp, 0.270_wp, 0.740_wp, 0.860_wp, 0.890_wp, & |
---|
[1359] | 731 | 0.920_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 732 | ecoll(:,9) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.040_wp, 0.052_wp, & |
---|
| 733 | 0.200_wp, 0.400_wp, 0.780_wp, 0.880_wp, 0.900_wp, & |
---|
[1359] | 734 | 0.940_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 735 | ecoll(:,10) = (/ 0.030_wp, 0.030_wp, 0.030_wp, 0.047_wp, 0.064_wp, & |
---|
| 736 | 0.250_wp, 0.500_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
[1359] | 737 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 738 | ecoll(:,11) = (/ 0.040_wp, 0.040_wp, 0.033_wp, 0.037_wp, 0.068_wp, & |
---|
| 739 | 0.240_wp, 0.550_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
[1359] | 740 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 741 | ecoll(:,12) = (/ 0.035_wp, 0.035_wp, 0.035_wp, 0.055_wp, 0.079_wp, & |
---|
| 742 | 0.290_wp, 0.580_wp, 0.800_wp, 0.900_wp, 0.910_wp, & |
---|
[1359] | 743 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 744 | ecoll(:,13) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.062_wp, 0.082_wp, & |
---|
| 745 | 0.290_wp, 0.590_wp, 0.780_wp, 0.900_wp, 0.910_wp, & |
---|
[1359] | 746 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 747 | ecoll(:,14) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.060_wp, 0.080_wp, & |
---|
| 748 | 0.290_wp, 0.580_wp, 0.770_wp, 0.890_wp, 0.910_wp, & |
---|
[1359] | 749 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 750 | ecoll(:,15) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.041_wp, 0.075_wp, & |
---|
| 751 | 0.250_wp, 0.540_wp, 0.760_wp, 0.880_wp, 0.920_wp, & |
---|
[1359] | 752 | 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 753 | ecoll(:,16) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.052_wp, 0.067_wp, & |
---|
| 754 | 0.250_wp, 0.510_wp, 0.770_wp, 0.880_wp, 0.930_wp, & |
---|
[1359] | 755 | 0.970_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 756 | ecoll(:,17) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.047_wp, 0.057_wp, & |
---|
| 757 | 0.250_wp, 0.490_wp, 0.770_wp, 0.890_wp, 0.950_wp, & |
---|
[1359] | 758 | 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) |
---|
[1822] | 759 | ecoll(:,18) = (/ 0.036_wp, 0.036_wp, 0.036_wp, 0.042_wp, 0.048_wp, & |
---|
| 760 | 0.230_wp, 0.470_wp, 0.780_wp, 0.920_wp, 1.000_wp, & |
---|
[1359] | 761 | 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp /) |
---|
[1822] | 762 | ecoll(:,19) = (/ 0.040_wp, 0.040_wp, 0.035_wp, 0.033_wp, 0.040_wp, & |
---|
| 763 | 0.112_wp, 0.450_wp, 0.790_wp, 1.010_wp, 1.030_wp, & |
---|
[1359] | 764 | 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp /) |
---|
[1822] | 765 | ecoll(:,20) = (/ 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, & |
---|
| 766 | 0.119_wp, 0.470_wp, 0.950_wp, 1.300_wp, 1.700_wp, & |
---|
[1359] | 767 | 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp /) |
---|
[1822] | 768 | ecoll(:,21) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, & |
---|
| 769 | 0.125_wp, 0.520_wp, 1.400_wp, 2.300_wp, 3.000_wp, & |
---|
[1359] | 770 | 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp /) |
---|
[828] | 771 | ENDIF |
---|
[790] | 772 | |
---|
[792] | 773 | ! |
---|
[828] | 774 | !-- Calculate the radius class index of particles with respect to array r |
---|
[1822] | 775 | !-- Radius has to be in microns |
---|
[828] | 776 | ALLOCATE( ira(1:radius_classes) ) |
---|
| 777 | DO j = 1, radius_classes |
---|
[1322] | 778 | particle_radius = radclass(j) * 1.0E6_wp |
---|
[828] | 779 | DO k = 1, 15 |
---|
| 780 | IF ( particle_radius < r0(k) ) THEN |
---|
| 781 | ira(j) = k |
---|
| 782 | EXIT |
---|
| 783 | ENDIF |
---|
| 784 | ENDDO |
---|
| 785 | IF ( particle_radius >= r0(15) ) ira(j) = 16 |
---|
| 786 | ENDDO |
---|
[790] | 787 | |
---|
[792] | 788 | ! |
---|
[828] | 789 | !-- Two-dimensional linear interpolation of the collision efficiency. |
---|
[1822] | 790 | !-- Radius has to be in microns |
---|
[828] | 791 | DO j = 1, radius_classes |
---|
| 792 | DO i = 1, j |
---|
[792] | 793 | |
---|
[1880] | 794 | ir = MAX( ira(i), ira(j) ) |
---|
[1519] | 795 | rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) ) |
---|
[828] | 796 | iq = INT( rq * 20 ) + 1 |
---|
| 797 | iq = MAX( iq , 2) |
---|
[792] | 798 | |
---|
[828] | 799 | IF ( ir < 16 ) THEN |
---|
| 800 | IF ( ir >= 2 ) THEN |
---|
[1822] | 801 | pp = ( ( MAX( radclass(j), radclass(i) ) * 1.0E6_wp ) - & |
---|
| 802 | r0(ir-1) ) / ( r0(ir) - r0(ir-1) ) |
---|
[1359] | 803 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
| 804 | ec(j,i) = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) & |
---|
| 805 | * ecoll(ir-1,iq-1) & |
---|
| 806 | + pp * ( 1.0_wp - qq ) * ecoll(ir,iq-1) & |
---|
| 807 | + qq * ( 1.0_wp - pp ) * ecoll(ir-1,iq) & |
---|
[828] | 808 | + pp * qq * ecoll(ir,iq) |
---|
| 809 | ELSE |
---|
| 810 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 811 | ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq) |
---|
[828] | 812 | ENDIF |
---|
| 813 | ELSE |
---|
| 814 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 815 | ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq) |
---|
[1346] | 816 | ec(j,i) = MIN( ek, 1.0_wp ) |
---|
[1071] | 817 | ENDIF |
---|
[792] | 818 | |
---|
[1359] | 819 | IF ( ec(j,i) < 1.0E-20_wp ) ec(j,i) = 0.0_wp |
---|
[1071] | 820 | |
---|
[828] | 821 | ec(i,j) = ec(j,i) |
---|
[792] | 822 | |
---|
[828] | 823 | ENDDO |
---|
| 824 | ENDDO |
---|
[792] | 825 | |
---|
[828] | 826 | DEALLOCATE( ira ) |
---|
[792] | 827 | |
---|
[828] | 828 | END SUBROUTINE effic |
---|
[792] | 829 | |
---|
| 830 | |
---|
[790] | 831 | !------------------------------------------------------------------------------! |
---|
[1682] | 832 | ! Description: |
---|
| 833 | ! ------------ |
---|
[1822] | 834 | !> Interpolation of turbulent enhancement factor for collision efficencies |
---|
| 835 | !> following Wang and Grabowski (2009, Atmos. Sci. Let.) |
---|
[790] | 836 | !------------------------------------------------------------------------------! |
---|
[828] | 837 | SUBROUTINE turb_enhance_eff |
---|
[790] | 838 | |
---|
[1320] | 839 | USE particle_attributes, & |
---|
| 840 | ONLY: radius_classes |
---|
[790] | 841 | |
---|
[828] | 842 | IMPLICIT NONE |
---|
[790] | 843 | |
---|
[1682] | 844 | INTEGER(iwp) :: i !< |
---|
| 845 | INTEGER(iwp) :: iq !< |
---|
| 846 | INTEGER(iwp) :: ir !< |
---|
| 847 | INTEGER(iwp) :: j !< |
---|
| 848 | INTEGER(iwp) :: k !< |
---|
| 849 | INTEGER(iwp) :: kk !< |
---|
[790] | 850 | |
---|
[1682] | 851 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !< |
---|
[1320] | 852 | |
---|
[1682] | 853 | LOGICAL, SAVE :: first = .TRUE. !< |
---|
[790] | 854 | |
---|
[1682] | 855 | REAL(wp) :: particle_radius !< |
---|
| 856 | REAL(wp) :: pp !< |
---|
| 857 | REAL(wp) :: qq !< |
---|
| 858 | REAL(wp) :: rq !< |
---|
| 859 | REAL(wp) :: y1 !< |
---|
| 860 | REAL(wp) :: y2 !< |
---|
| 861 | REAL(wp) :: y3 !< |
---|
[790] | 862 | |
---|
[1682] | 863 | REAL(wp), DIMENSION(1:11), SAVE :: rat !< |
---|
| 864 | REAL(wp), DIMENSION(1:7), SAVE :: r0 !< |
---|
[1320] | 865 | |
---|
[1682] | 866 | REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_100 !< |
---|
| 867 | REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_400 !< |
---|
[799] | 868 | |
---|
| 869 | ! |
---|
[828] | 870 | !-- Initial assignment of constants |
---|
| 871 | IF ( first ) THEN |
---|
[799] | 872 | |
---|
[828] | 873 | first = .FALSE. |
---|
[799] | 874 | |
---|
[1359] | 875 | r0 = (/ 10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, & |
---|
| 876 | 100.0_wp /) |
---|
| 877 | |
---|
| 878 | rat = (/ 0.0_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.4_wp, 0.5_wp, 0.6_wp, & |
---|
| 879 | 0.7_wp, 0.8_wp, 0.9_wp, 1.0_wp /) |
---|
[828] | 880 | ! |
---|
[1822] | 881 | !-- Tabulated turbulent enhancement factor at 100 cm**2/s**3 |
---|
[1359] | 882 | ecoll_100(:,1) = (/ 1.74_wp, 1.74_wp, 1.773_wp, 1.49_wp, & |
---|
| 883 | 1.207_wp, 1.207_wp, 1.0_wp /) |
---|
| 884 | ecoll_100(:,2) = (/ 1.46_wp, 1.46_wp, 1.421_wp, 1.245_wp, & |
---|
| 885 | 1.069_wp, 1.069_wp, 1.0_wp /) |
---|
| 886 | ecoll_100(:,3) = (/ 1.32_wp, 1.32_wp, 1.245_wp, 1.123_wp, & |
---|
| 887 | 1.000_wp, 1.000_wp, 1.0_wp /) |
---|
| 888 | ecoll_100(:,4) = (/ 1.250_wp, 1.250_wp, 1.148_wp, 1.087_wp, & |
---|
| 889 | 1.025_wp, 1.025_wp, 1.0_wp /) |
---|
| 890 | ecoll_100(:,5) = (/ 1.186_wp, 1.186_wp, 1.066_wp, 1.060_wp, & |
---|
| 891 | 1.056_wp, 1.056_wp, 1.0_wp /) |
---|
| 892 | ecoll_100(:,6) = (/ 1.045_wp, 1.045_wp, 1.000_wp, 1.014_wp, & |
---|
| 893 | 1.028_wp, 1.028_wp, 1.0_wp /) |
---|
| 894 | ecoll_100(:,7) = (/ 1.070_wp, 1.070_wp, 1.030_wp, 1.038_wp, & |
---|
| 895 | 1.046_wp, 1.046_wp, 1.0_wp /) |
---|
| 896 | ecoll_100(:,8) = (/ 1.000_wp, 1.000_wp, 1.054_wp, 1.042_wp, & |
---|
| 897 | 1.029_wp, 1.029_wp, 1.0_wp /) |
---|
| 898 | ecoll_100(:,9) = (/ 1.223_wp, 1.223_wp, 1.117_wp, 1.069_wp, & |
---|
| 899 | 1.021_wp, 1.021_wp, 1.0_wp /) |
---|
| 900 | ecoll_100(:,10) = (/ 1.570_wp, 1.570_wp, 1.244_wp, 1.166_wp, & |
---|
| 901 | 1.088_wp, 1.088_wp, 1.0_wp /) |
---|
[1822] | 902 | ecoll_100(:,11) = (/ 20.3_wp, 20.3_wp, 14.6_wp, 8.61_wp, & |
---|
[1359] | 903 | 2.60_wp, 2.60_wp, 1.0_wp /) |
---|
[828] | 904 | ! |
---|
[1822] | 905 | !-- Tabulated turbulent enhancement factor at 400 cm**2/s**3 |
---|
[1359] | 906 | ecoll_400(:,1) = (/ 4.976_wp, 4.976_wp, 3.593_wp, 2.519_wp, & |
---|
| 907 | 1.445_wp, 1.445_wp, 1.0_wp /) |
---|
| 908 | ecoll_400(:,2) = (/ 2.984_wp, 2.984_wp, 2.181_wp, 1.691_wp, & |
---|
| 909 | 1.201_wp, 1.201_wp, 1.0_wp /) |
---|
| 910 | ecoll_400(:,3) = (/ 1.988_wp, 1.988_wp, 1.475_wp, 1.313_wp, & |
---|
| 911 | 1.150_wp, 1.150_wp, 1.0_wp /) |
---|
| 912 | ecoll_400(:,4) = (/ 1.490_wp, 1.490_wp, 1.187_wp, 1.156_wp, & |
---|
| 913 | 1.126_wp, 1.126_wp, 1.0_wp /) |
---|
| 914 | ecoll_400(:,5) = (/ 1.249_wp, 1.249_wp, 1.088_wp, 1.090_wp, & |
---|
| 915 | 1.092_wp, 1.092_wp, 1.0_wp /) |
---|
| 916 | ecoll_400(:,6) = (/ 1.139_wp, 1.139_wp, 1.130_wp, 1.091_wp, & |
---|
| 917 | 1.051_wp, 1.051_wp, 1.0_wp /) |
---|
| 918 | ecoll_400(:,7) = (/ 1.220_wp, 1.220_wp, 1.190_wp, 1.138_wp, & |
---|
| 919 | 1.086_wp, 1.086_wp, 1.0_wp /) |
---|
| 920 | ecoll_400(:,8) = (/ 1.325_wp, 1.325_wp, 1.267_wp, 1.165_wp, & |
---|
| 921 | 1.063_wp, 1.063_wp, 1.0_wp /) |
---|
| 922 | ecoll_400(:,9) = (/ 1.716_wp, 1.716_wp, 1.345_wp, 1.223_wp, & |
---|
| 923 | 1.100_wp, 1.100_wp, 1.0_wp /) |
---|
| 924 | ecoll_400(:,10) = (/ 3.788_wp, 3.788_wp, 1.501_wp, 1.311_wp, & |
---|
| 925 | 1.120_wp, 1.120_wp, 1.0_wp /) |
---|
| 926 | ecoll_400(:,11) = (/ 36.52_wp, 36.52_wp, 19.16_wp, 22.80_wp, & |
---|
| 927 | 26.0_wp, 26.0_wp, 1.0_wp /) |
---|
[799] | 928 | |
---|
[828] | 929 | ENDIF |
---|
[790] | 930 | |
---|
[828] | 931 | ! |
---|
| 932 | !-- Calculate the radius class index of particles with respect to array r0 |
---|
[1822] | 933 | !-- The droplet radius has to be given in microns. |
---|
[828] | 934 | ALLOCATE( ira(1:radius_classes) ) |
---|
[790] | 935 | |
---|
[828] | 936 | DO j = 1, radius_classes |
---|
[1322] | 937 | particle_radius = radclass(j) * 1.0E6_wp |
---|
[828] | 938 | DO k = 1, 7 |
---|
| 939 | IF ( particle_radius < r0(k) ) THEN |
---|
| 940 | ira(j) = k |
---|
| 941 | EXIT |
---|
| 942 | ENDIF |
---|
| 943 | ENDDO |
---|
| 944 | IF ( particle_radius >= r0(7) ) ira(j) = 8 |
---|
| 945 | ENDDO |
---|
[799] | 946 | |
---|
| 947 | ! |
---|
[1822] | 948 | !-- Two-dimensional linear interpolation of the turbulent enhancement factor. |
---|
| 949 | !-- The droplet radius has to be given in microns. |
---|
[828] | 950 | DO j = 1, radius_classes |
---|
| 951 | DO i = 1, j |
---|
[799] | 952 | |
---|
[1880] | 953 | ir = MAX( ira(i), ira(j) ) |
---|
[1519] | 954 | rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) ) |
---|
[799] | 955 | |
---|
[828] | 956 | DO kk = 2, 11 |
---|
| 957 | IF ( rq <= rat(kk) ) THEN |
---|
| 958 | iq = kk |
---|
| 959 | EXIT |
---|
| 960 | ENDIF |
---|
| 961 | ENDDO |
---|
[790] | 962 | |
---|
[1822] | 963 | y1 = 1.0_wp ! turbulent enhancement factor at 0 m**2/s**3 |
---|
[1007] | 964 | |
---|
[828] | 965 | IF ( ir < 8 ) THEN |
---|
| 966 | IF ( ir >= 2 ) THEN |
---|
[1822] | 967 | pp = ( MAX( radclass(j), radclass(i) ) * 1.0E6_wp - & |
---|
| 968 | r0(ir-1) ) / ( r0(ir) - r0(ir-1) ) |
---|
[828] | 969 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 970 | y2 = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) * ecoll_100(ir-1,iq-1) + & |
---|
| 971 | pp * ( 1.0_wp - qq ) * ecoll_100(ir,iq-1) + & |
---|
| 972 | qq * ( 1.0_wp - pp ) * ecoll_100(ir-1,iq) + & |
---|
| 973 | pp * qq * ecoll_100(ir,iq) |
---|
| 974 | y3 = ( 1.0-pp ) * ( 1.0_wp - qq ) * ecoll_400(ir-1,iq-1) + & |
---|
| 975 | pp * ( 1.0_wp - qq ) * ecoll_400(ir,iq-1) + & |
---|
| 976 | qq * ( 1.0_wp - pp ) * ecoll_400(ir-1,iq) + & |
---|
| 977 | pp * qq * ecoll_400(ir,iq) |
---|
[828] | 978 | ELSE |
---|
| 979 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 980 | y2 = ( 1.0_wp - qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq) |
---|
| 981 | y3 = ( 1.0_wp - qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq) |
---|
[828] | 982 | ENDIF |
---|
| 983 | ELSE |
---|
| 984 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 985 | y2 = ( 1.0_wp - qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq) |
---|
| 986 | y3 = ( 1.0_wp - qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq) |
---|
[828] | 987 | ENDIF |
---|
| 988 | ! |
---|
[1822] | 989 | !-- Linear interpolation of turbulent enhancement factor |
---|
[1359] | 990 | IF ( epsilon <= 0.01_wp ) THEN |
---|
| 991 | ecf(j,i) = ( epsilon - 0.01_wp ) / ( 0.0_wp - 0.01_wp ) * y1 & |
---|
| 992 | + ( epsilon - 0.0_wp ) / ( 0.01_wp - 0.0_wp ) * y2 |
---|
| 993 | ELSEIF ( epsilon <= 0.06_wp ) THEN |
---|
| 994 | ecf(j,i) = ( epsilon - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & |
---|
| 995 | + ( epsilon - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 |
---|
[828] | 996 | ELSE |
---|
[1359] | 997 | ecf(j,i) = ( 0.06_wp - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & |
---|
| 998 | + ( 0.06_wp - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 |
---|
[828] | 999 | ENDIF |
---|
[790] | 1000 | |
---|
[1359] | 1001 | IF ( ecf(j,i) < 1.0_wp ) ecf(j,i) = 1.0_wp |
---|
[790] | 1002 | |
---|
[828] | 1003 | ecf(i,j) = ecf(j,i) |
---|
[790] | 1004 | |
---|
[828] | 1005 | ENDDO |
---|
| 1006 | ENDDO |
---|
[790] | 1007 | |
---|
[828] | 1008 | END SUBROUTINE turb_enhance_eff |
---|
[790] | 1009 | |
---|
[825] | 1010 | END MODULE lpm_collision_kernels_mod |
---|