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