[828] | 1 | MODULE lpm_collision_kernels_mod |
---|
[790] | 2 | |
---|
[1036] | 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 | ! |
---|
[1310] | 17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[790] | 20 | ! Current revisions: |
---|
| 21 | ! ----------------- |
---|
[1347] | 22 | ! |
---|
[1360] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: lpm_collision_kernels.f90 1360 2014-04-11 17:20:32Z boeske $ |
---|
| 27 | ! |
---|
[1360] | 28 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 29 | ! New particle structure integrated. |
---|
| 30 | ! Kind definition added to all floating point numbers. |
---|
| 31 | ! |
---|
[1347] | 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 | ! |
---|
[1323] | 36 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 37 | ! REAL constants defined as wp_kind |
---|
| 38 | ! |
---|
[1321] | 39 | ! 1320 2014-03-20 08:40:49Z |
---|
[1320] | 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 |
---|
[1008] | 46 | ! |
---|
[1093] | 47 | ! 1092 2013-02-02 11:24:22Z raasch |
---|
| 48 | ! unused variables removed |
---|
| 49 | ! |
---|
[1072] | 50 | ! 1071 2012-11-29 16:54:55Z franke |
---|
| 51 | ! Bugfix: collision efficiencies for Hall kernel should not be < 1.0E-20 |
---|
| 52 | ! |
---|
[1037] | 53 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 54 | ! code put under GPL (PALM 3.9) |
---|
| 55 | ! |
---|
[1008] | 56 | ! 1007 2012-09-19 14:30:36Z franke |
---|
[1007] | 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 |
---|
[829] | 61 | ! |
---|
[850] | 62 | ! 849 2012-03-15 10:35:09Z raasch |
---|
| 63 | ! routine collision_efficiency_rogers added (moved from former advec_particles |
---|
| 64 | ! to here) |
---|
| 65 | ! |
---|
[836] | 66 | ! 835 2012-02-22 11:21:19Z raasch $ |
---|
| 67 | ! Bugfix: array diss can be used only in case of Wang kernel |
---|
| 68 | ! |
---|
[829] | 69 | ! 828 2012-02-21 12:00:36Z raasch |
---|
[828] | 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 |
---|
[790] | 74 | ! |
---|
[828] | 75 | ! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4 |
---|
| 76 | ! |
---|
[826] | 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 | ! |
---|
[791] | 81 | ! 790 2011-11-29 03:11:20Z raasch |
---|
| 82 | ! initial revision |
---|
[790] | 83 | ! |
---|
| 84 | ! Description: |
---|
| 85 | ! ------------ |
---|
[828] | 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. |
---|
[790] | 97 | !------------------------------------------------------------------------------! |
---|
| 98 | |
---|
[1320] | 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 | |
---|
[828] | 107 | USE pegrid |
---|
[790] | 108 | |
---|
[828] | 109 | |
---|
[790] | 110 | IMPLICIT NONE |
---|
| 111 | |
---|
| 112 | PRIVATE |
---|
| 113 | |
---|
[849] | 114 | PUBLIC ckernel, collision_efficiency_rogers, init_kernels, & |
---|
[1007] | 115 | rclass_lbound, rclass_ubound, recalculate_kernel |
---|
[790] | 116 | |
---|
[1320] | 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 !: |
---|
[790] | 123 | |
---|
[1320] | 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 !: |
---|
[792] | 135 | |
---|
[828] | 136 | SAVE |
---|
[792] | 137 | |
---|
[790] | 138 | ! |
---|
| 139 | !-- Public interfaces |
---|
[849] | 140 | INTERFACE collision_efficiency_rogers |
---|
| 141 | MODULE PROCEDURE collision_efficiency_rogers |
---|
| 142 | END INTERFACE collision_efficiency_rogers |
---|
| 143 | |
---|
[828] | 144 | INTERFACE init_kernels |
---|
| 145 | MODULE PROCEDURE init_kernels |
---|
| 146 | END INTERFACE init_kernels |
---|
[790] | 147 | |
---|
[828] | 148 | INTERFACE recalculate_kernel |
---|
| 149 | MODULE PROCEDURE recalculate_kernel |
---|
| 150 | END INTERFACE recalculate_kernel |
---|
[790] | 151 | |
---|
| 152 | |
---|
[828] | 153 | CONTAINS |
---|
[790] | 154 | |
---|
[792] | 155 | |
---|
[828] | 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 | !------------------------------------------------------------------------------! |
---|
[792] | 161 | |
---|
[828] | 162 | IMPLICIT NONE |
---|
[792] | 163 | |
---|
[1320] | 164 | INTEGER(iwp) :: i !: |
---|
| 165 | INTEGER(iwp) :: j !: |
---|
| 166 | INTEGER(iwp) :: k !: |
---|
[790] | 167 | |
---|
[828] | 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 |
---|
[1322] | 181 | rclass_lbound = LOG( 1.0E-6_wp ) |
---|
| 182 | rclass_ubound = LOG( 2.0E-4_wp ) |
---|
[1359] | 183 | radclass(1) = 1.0E-6_wp |
---|
[828] | 184 | DO i = 2, radius_classes |
---|
| 185 | radclass(i) = EXP( rclass_lbound + & |
---|
[1359] | 186 | ( rclass_ubound - rclass_lbound ) * & |
---|
| 187 | ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) ) |
---|
[828] | 188 | ENDDO |
---|
| 189 | |
---|
| 190 | ! |
---|
[1007] | 191 | !-- Set the class bounds for dissipation in interval [0.0, 0.1] m**2/s**3 |
---|
[828] | 192 | DO i = 1, dissipation_classes |
---|
[1359] | 193 | epsclass(i) = 0.1_wp * REAL( i, KIND=wp ) / dissipation_classes |
---|
[828] | 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) |
---|
[1359] | 205 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp ) |
---|
[828] | 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' |
---|
[1359] | 240 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, & |
---|
[1007] | 241 | i = 1,radius_classes ) |
---|
[828] | 242 | DO j = 1, radius_classes |
---|
[1007] | 243 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j), & |
---|
| 244 | ( hkernel(i,j), i = 1,radius_classes ) |
---|
[828] | 245 | ENDDO |
---|
| 246 | |
---|
| 247 | DO k = 1, dissipation_classes |
---|
| 248 | DO i = 1, radius_classes |
---|
| 249 | DO j = 1, radius_classes |
---|
[1359] | 250 | IF ( hkernel(i,j) == 0.0_wp ) THEN |
---|
| 251 | hwratio(i,j) = 9999999.9_wp |
---|
[828] | 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) |
---|
[1359] | 259 | WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, & |
---|
[1007] | 260 | i = 1,radius_classes ) |
---|
[828] | 261 | DO j = 1, radius_classes |
---|
[1359] | 262 | WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, & |
---|
[1007] | 263 | ( hwratio(i,j), i = 1,radius_classes ) |
---|
[828] | 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 | |
---|
[790] | 281 | !------------------------------------------------------------------------------! |
---|
[828] | 282 | ! Calculation of collision kernels during each timestep and for each grid box |
---|
[790] | 283 | !------------------------------------------------------------------------------! |
---|
[828] | 284 | SUBROUTINE recalculate_kernel( i1, j1, k1 ) |
---|
[790] | 285 | |
---|
[1320] | 286 | USE arrays_3d, & |
---|
| 287 | ONLY: diss |
---|
[790] | 288 | |
---|
[1320] | 289 | USE particle_attributes, & |
---|
[1359] | 290 | ONLY: prt_count, radius_classes, wang_kernel |
---|
[1320] | 291 | |
---|
[790] | 292 | IMPLICIT NONE |
---|
| 293 | |
---|
[1320] | 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 !: |
---|
[790] | 301 | |
---|
| 302 | |
---|
[1359] | 303 | pstart = 1 |
---|
| 304 | pend = prt_count(k1,j1,i1) |
---|
[828] | 305 | radius_classes = prt_count(k1,j1,i1) |
---|
[792] | 306 | |
---|
[828] | 307 | ALLOCATE( ec(1:radius_classes,1:radius_classes), & |
---|
| 308 | radclass(1:radius_classes), winf(1:radius_classes) ) |
---|
[790] | 309 | |
---|
[828] | 310 | ! |
---|
[1007] | 311 | !-- Store particle radii on the radclass array |
---|
| 312 | radclass(1:radius_classes) = particles(pstart:pend)%radius |
---|
[790] | 313 | |
---|
[835] | 314 | IF ( wang_kernel ) THEN |
---|
[1007] | 315 | epsilon = diss(k1,j1,i1) ! dissipation rate in m**2/s**3 |
---|
[835] | 316 | ELSE |
---|
[1359] | 317 | epsilon = 0.0_wp |
---|
[835] | 318 | ENDIF |
---|
[1359] | 319 | urms = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp ) |
---|
[790] | 320 | |
---|
[1359] | 321 | IF ( wang_kernel .AND. epsilon > 1.0E-7_wp ) THEN |
---|
[828] | 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) ) |
---|
[790] | 326 | |
---|
[828] | 327 | CALL turbsd |
---|
| 328 | CALL turb_enhance_eff |
---|
| 329 | CALL effic |
---|
[790] | 330 | |
---|
[828] | 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) |
---|
[790] | 334 | ENDDO |
---|
[828] | 335 | ENDDO |
---|
[790] | 336 | |
---|
[828] | 337 | DEALLOCATE( gck, ecf ) |
---|
[790] | 338 | |
---|
| 339 | ELSE |
---|
[828] | 340 | ! |
---|
| 341 | !-- Call routines to calculate efficiencies for the Hall kernel |
---|
[790] | 342 | CALL fallg |
---|
| 343 | CALL effic |
---|
| 344 | |
---|
[828] | 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) ) |
---|
[790] | 350 | ENDDO |
---|
| 351 | ENDDO |
---|
| 352 | |
---|
| 353 | ENDIF |
---|
| 354 | |
---|
[828] | 355 | DEALLOCATE( ec, radclass, winf ) |
---|
[790] | 356 | |
---|
[828] | 357 | END SUBROUTINE recalculate_kernel |
---|
[790] | 358 | |
---|
[828] | 359 | |
---|
[790] | 360 | !------------------------------------------------------------------------------! |
---|
[828] | 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 |
---|
[790] | 366 | !------------------------------------------------------------------------------! |
---|
[792] | 367 | SUBROUTINE turbsd |
---|
[799] | 368 | |
---|
[1320] | 369 | USE control_parameters, & |
---|
| 370 | ONLY: g, molecular_viscosity |
---|
| 371 | |
---|
| 372 | USE particle_attributes, & |
---|
| 373 | ONLY: radius_classes |
---|
[790] | 374 | |
---|
| 375 | IMPLICIT NONE |
---|
[1320] | 376 | |
---|
| 377 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
[790] | 378 | |
---|
[1320] | 379 | INTEGER(iwp) :: i !: |
---|
| 380 | INTEGER(iwp) :: j !: |
---|
[790] | 381 | |
---|
[1320] | 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 !: |
---|
[790] | 425 | |
---|
[1320] | 426 | REAL(wp), DIMENSION(1:radius_classes) :: st !: |
---|
| 427 | REAL(wp), DIMENSION(1:radius_classes) :: tau !: |
---|
| 428 | |
---|
[799] | 429 | ! |
---|
[828] | 430 | !-- Initial assignment of constants |
---|
[799] | 431 | IF ( first ) THEN |
---|
[790] | 432 | |
---|
[799] | 433 | first = .FALSE. |
---|
[790] | 434 | |
---|
[1007] | 435 | ENDIF |
---|
[790] | 436 | |
---|
[1322] | 437 | lambda = urms * SQRT( 15.0_wp * molecular_viscosity / epsilon ) ! in m |
---|
| 438 | lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity ) |
---|
[828] | 439 | tl = urms**2 / epsilon ! in s |
---|
[1359] | 440 | lf = 0.5_wp * urms**3 / epsilon ! in m |
---|
[1007] | 441 | tauk = SQRT( molecular_viscosity / epsilon ) ! in s |
---|
[1322] | 442 | eta = ( molecular_viscosity**3 / epsilon )**0.25_wp ! in m |
---|
[1007] | 443 | vk = eta / tauk |
---|
[790] | 444 | |
---|
[1359] | 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 |
---|
[799] | 447 | |
---|
[1007] | 448 | CALL fallg ! gives winf in m/s |
---|
[790] | 449 | |
---|
[828] | 450 | DO i = 1, radius_classes |
---|
[1007] | 451 | tau(i) = winf(i) / g ! in s |
---|
[828] | 452 | st(i) = tau(i) / tauk |
---|
[790] | 453 | ENDDO |
---|
| 454 | |
---|
[828] | 455 | ! |
---|
| 456 | !-- Calculate wr (from Aayala 2008b, page 38f) |
---|
| 457 | z = tt / tl |
---|
[1322] | 458 | be = SQRT( 2.0_wp ) * lambda / lf |
---|
[1359] | 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 |
---|
[790] | 469 | |
---|
[828] | 470 | DO i = 1, radius_classes |
---|
[790] | 471 | |
---|
[1007] | 472 | v1 = winf(i) ! in m/s |
---|
[828] | 473 | t1 = tau(i) ! in s |
---|
[790] | 474 | |
---|
[828] | 475 | DO j = 1, i |
---|
[1007] | 476 | rrp = radclass(i) + radclass(j) |
---|
| 477 | v2 = winf(j) ! in m/s |
---|
[828] | 478 | t2 = tau(j) ! in s |
---|
[790] | 479 | |
---|
[1007] | 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 |
---|
[790] | 484 | |
---|
[1007] | 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 |
---|
[790] | 489 | |
---|
[828] | 490 | IF ( winf(i) >= winf(j) ) THEN |
---|
[799] | 491 | v1 = winf(i) |
---|
[790] | 492 | t1 = tau(i) |
---|
[799] | 493 | v2 = winf(j) |
---|
[790] | 494 | t2 = tau(j) |
---|
| 495 | ELSE |
---|
[799] | 496 | v1 = winf(j) |
---|
[790] | 497 | t1 = tau(j) |
---|
[799] | 498 | v2 = winf(i) |
---|
[790] | 499 | t2 = tau(i) |
---|
| 500 | ENDIF |
---|
| 501 | |
---|
[828] | 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 ) |
---|
[1359] | 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 |
---|
[1322] | 510 | wrgrav2 = pi / 8.0_wp * ( winf(j) - winf(i) )**2 |
---|
| 511 | wrfin = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) ) ! in m/s |
---|
[790] | 512 | |
---|
[828] | 513 | ! |
---|
| 514 | !-- Calculate gr |
---|
| 515 | IF ( st(j) > st(i) ) THEN |
---|
| 516 | sst = st(j) |
---|
[790] | 517 | ELSE |
---|
[828] | 518 | sst = st(i) |
---|
[790] | 519 | ENDIF |
---|
| 520 | |
---|
[1359] | 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 ) |
---|
[790] | 525 | |
---|
[1007] | 526 | c1_gr = xx / ( g / vk * tauk )**yy |
---|
[790] | 527 | |
---|
[1322] | 528 | ao_gr = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2 |
---|
[1359] | 529 | fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re ) |
---|
[828] | 530 | rc = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta ! in cm |
---|
[790] | 531 | |
---|
[1359] | 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 |
---|
[790] | 534 | |
---|
[1359] | 535 | gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin ! in cm**3/s |
---|
[790] | 536 | gck(j,i) = gck(i,j) |
---|
| 537 | |
---|
| 538 | ENDDO |
---|
| 539 | ENDDO |
---|
| 540 | |
---|
[828] | 541 | END SUBROUTINE turbsd |
---|
[790] | 542 | |
---|
[828] | 543 | |
---|
[790] | 544 | !------------------------------------------------------------------------------! |
---|
[1007] | 545 | ! phi_w as a function |
---|
[790] | 546 | !------------------------------------------------------------------------------! |
---|
[1320] | 547 | REAL(wp) FUNCTION phi_w( a, b, vsett, tau0 ) |
---|
[790] | 548 | |
---|
| 549 | IMPLICIT NONE |
---|
| 550 | |
---|
[1320] | 551 | REAL(wp) :: a !: |
---|
| 552 | REAL(wp) :: aa1 !: |
---|
| 553 | REAL(wp) :: b !: |
---|
| 554 | REAL(wp) :: tau0 !: |
---|
| 555 | REAL(wp) :: vsett !: |
---|
[790] | 556 | |
---|
[1359] | 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 |
---|
[790] | 559 | |
---|
[1007] | 560 | END FUNCTION phi_w |
---|
[792] | 561 | |
---|
[790] | 562 | |
---|
| 563 | !------------------------------------------------------------------------------! |
---|
[1007] | 564 | ! zhi as a function |
---|
[790] | 565 | !------------------------------------------------------------------------------! |
---|
[1320] | 566 | REAL(wp) FUNCTION zhi( a, b, vsett1, tau1, vsett2, tau2 ) |
---|
[790] | 567 | |
---|
| 568 | IMPLICIT NONE |
---|
| 569 | |
---|
[1320] | 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 !: |
---|
[790] | 582 | |
---|
[1359] | 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 |
---|
[799] | 594 | |
---|
[828] | 595 | END FUNCTION zhi |
---|
[790] | 596 | |
---|
[828] | 597 | |
---|
[790] | 598 | !------------------------------------------------------------------------------! |
---|
[1007] | 599 | ! Calculation of terminal velocity winf following Equations 10-138 to 10-145 |
---|
| 600 | ! from (Pruppacher and Klett, 1997) |
---|
[790] | 601 | !------------------------------------------------------------------------------! |
---|
[828] | 602 | SUBROUTINE fallg |
---|
[1320] | 603 | |
---|
| 604 | USE cloud_parameters, & |
---|
| 605 | ONLY: rho_l |
---|
| 606 | |
---|
| 607 | USE control_parameters, & |
---|
| 608 | ONLY: g |
---|
[790] | 609 | |
---|
[1320] | 610 | USE particle_attributes, & |
---|
| 611 | ONLY: radius_classes |
---|
[790] | 612 | |
---|
[1320] | 613 | |
---|
[828] | 614 | IMPLICIT NONE |
---|
[790] | 615 | |
---|
[1320] | 616 | INTEGER(iwp) :: i !: |
---|
| 617 | INTEGER(iwp) :: j !: |
---|
[790] | 618 | |
---|
[1320] | 619 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
[790] | 620 | |
---|
[1320] | 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 !: |
---|
[790] | 630 | |
---|
[1320] | 631 | REAL(wp) :: bond !: |
---|
| 632 | REAL(wp) :: x !: |
---|
| 633 | REAL(wp) :: xrey !: |
---|
| 634 | REAL(wp) :: y !: |
---|
[799] | 635 | |
---|
[1320] | 636 | REAL(wp), DIMENSION(1:7), SAVE :: b !: |
---|
| 637 | REAL(wp), DIMENSION(1:6), SAVE :: c !: |
---|
[799] | 638 | |
---|
| 639 | ! |
---|
[828] | 640 | !-- Initial assignment of constants |
---|
| 641 | IF ( first ) THEN |
---|
[799] | 642 | |
---|
[828] | 643 | first = .FALSE. |
---|
[1359] | 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 /) |
---|
[790] | 649 | |
---|
[1007] | 650 | ! |
---|
| 651 | !-- Parameter values for p = 1013,25 hPa and T = 293,15 K |
---|
[1359] | 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) |
---|
[1007] | 659 | phy = sigma**3 * rho_a**2 / ( eta**4 * g * ( rho_l - rho_a ) ) |
---|
[1322] | 660 | py = phy**( 1.0_wp / 6.0_wp ) |
---|
[790] | 661 | |
---|
[828] | 662 | ENDIF |
---|
[790] | 663 | |
---|
[828] | 664 | DO j = 1, radius_classes |
---|
[790] | 665 | |
---|
[1359] | 666 | IF ( radclass(j) <= 1.0E-5_wp ) THEN |
---|
[799] | 667 | |
---|
[1007] | 668 | winf(j) = stok * ( radclass(j)**2 + cunh * radclass(j) ) |
---|
[790] | 669 | |
---|
[1359] | 670 | ELSEIF ( radclass(j) > 1.0E-5_wp .AND. radclass(j) <= 5.35E-4_wp ) THEN |
---|
[790] | 671 | |
---|
[828] | 672 | x = LOG( stb * radclass(j)**3 ) |
---|
[1359] | 673 | y = 0.0_wp |
---|
[790] | 674 | |
---|
[828] | 675 | DO i = 1, 7 |
---|
| 676 | y = y + b(i) * x**(i-1) |
---|
| 677 | ENDDO |
---|
[1007] | 678 | ! |
---|
| 679 | !-- Note: this Eq. is wrong in (Pruppacher and Klett, 1997, p. 418) |
---|
| 680 | !-- for correct version see (Beard, 1976) |
---|
[1359] | 681 | xrey = ( 1.0_wp + cunh / radclass(j) ) * EXP( y ) |
---|
[790] | 682 | |
---|
[1359] | 683 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) |
---|
[790] | 684 | |
---|
[1359] | 685 | ELSEIF ( radclass(j) > 5.35E-4_wp ) THEN |
---|
[790] | 686 | |
---|
[1359] | 687 | IF ( radclass(j) > 0.0035_wp ) THEN |
---|
| 688 | bond = g * ( rho_l - rho_a ) * 0.0035_wp**2 / sigma |
---|
[828] | 689 | ELSE |
---|
[1007] | 690 | bond = g * ( rho_l - rho_a ) * radclass(j)**2 / sigma |
---|
[828] | 691 | ENDIF |
---|
[790] | 692 | |
---|
[1359] | 693 | x = LOG( 16.0_wp * bond * py / 3.0_wp ) |
---|
| 694 | y = 0.0_wp |
---|
[790] | 695 | |
---|
[828] | 696 | DO i = 1, 6 |
---|
| 697 | y = y + c(i) * x**(i-1) |
---|
| 698 | ENDDO |
---|
[790] | 699 | |
---|
[828] | 700 | xrey = py * EXP( y ) |
---|
[790] | 701 | |
---|
[1359] | 702 | IF ( radclass(j) > 0.0035_wp ) THEN |
---|
| 703 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * 0.0035_wp ) |
---|
[828] | 704 | ELSE |
---|
[1359] | 705 | winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) |
---|
[828] | 706 | ENDIF |
---|
[790] | 707 | |
---|
[828] | 708 | ENDIF |
---|
[790] | 709 | |
---|
[828] | 710 | ENDDO |
---|
[790] | 711 | |
---|
[828] | 712 | END SUBROUTINE fallg |
---|
[790] | 713 | |
---|
[828] | 714 | |
---|
[790] | 715 | !------------------------------------------------------------------------------! |
---|
[1071] | 716 | ! Calculation of collision efficiencies for the Hall kernel |
---|
[790] | 717 | !------------------------------------------------------------------------------! |
---|
[828] | 718 | SUBROUTINE effic |
---|
[1320] | 719 | |
---|
| 720 | USE particle_attributes, & |
---|
| 721 | ONLY: radius_classes |
---|
[790] | 722 | |
---|
[828] | 723 | IMPLICIT NONE |
---|
[790] | 724 | |
---|
[1320] | 725 | INTEGER(iwp) :: i !: |
---|
| 726 | INTEGER(iwp) :: iq !: |
---|
| 727 | INTEGER(iwp) :: ir !: |
---|
| 728 | INTEGER(iwp) :: j !: |
---|
| 729 | INTEGER(iwp) :: k !: |
---|
[790] | 730 | |
---|
[1320] | 731 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: |
---|
[790] | 732 | |
---|
[1320] | 733 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
[790] | 734 | |
---|
[1320] | 735 | REAL(wp) :: ek !: |
---|
| 736 | REAL(wp) :: particle_radius !: |
---|
| 737 | REAL(wp) :: pp !: |
---|
| 738 | REAL(wp) :: qq !: |
---|
| 739 | REAL(wp) :: rq !: |
---|
[790] | 740 | |
---|
[1320] | 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 !: |
---|
[790] | 746 | |
---|
[792] | 747 | ! |
---|
[828] | 748 | !-- Initial assignment of constants |
---|
| 749 | IF ( first ) THEN |
---|
[790] | 750 | |
---|
[792] | 751 | first = .FALSE. |
---|
[1359] | 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 /) |
---|
[790] | 755 | |
---|
[1359] | 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 /) |
---|
[828] | 824 | ENDIF |
---|
[790] | 825 | |
---|
[792] | 826 | ! |
---|
[828] | 827 | !-- Calculate the radius class index of particles with respect to array r |
---|
[1007] | 828 | !-- Radius has to be in µm |
---|
[828] | 829 | ALLOCATE( ira(1:radius_classes) ) |
---|
| 830 | DO j = 1, radius_classes |
---|
[1322] | 831 | particle_radius = radclass(j) * 1.0E6_wp |
---|
[828] | 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 |
---|
[790] | 840 | |
---|
[792] | 841 | ! |
---|
[828] | 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 |
---|
[792] | 846 | |
---|
[828] | 847 | ir = ira(j) |
---|
| 848 | rq = radclass(i) / radclass(j) |
---|
| 849 | iq = INT( rq * 20 ) + 1 |
---|
| 850 | iq = MAX( iq , 2) |
---|
[792] | 851 | |
---|
[828] | 852 | IF ( ir < 16 ) THEN |
---|
| 853 | IF ( ir >= 2 ) THEN |
---|
[1322] | 854 | pp = ( ( radclass(j) * 1.0E06_wp ) - r0(ir-1) ) / & |
---|
[828] | 855 | ( r0(ir) - r0(ir-1) ) |
---|
[1359] | 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) & |
---|
[828] | 861 | + pp * qq * ecoll(ir,iq) |
---|
| 862 | ELSE |
---|
| 863 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 864 | ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq) |
---|
[828] | 865 | ENDIF |
---|
| 866 | ELSE |
---|
| 867 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 868 | ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq) |
---|
[1346] | 869 | ec(j,i) = MIN( ek, 1.0_wp ) |
---|
[1071] | 870 | ENDIF |
---|
[792] | 871 | |
---|
[1359] | 872 | IF ( ec(j,i) < 1.0E-20_wp ) ec(j,i) = 0.0_wp |
---|
[1071] | 873 | |
---|
[828] | 874 | ec(i,j) = ec(j,i) |
---|
[792] | 875 | |
---|
[828] | 876 | ENDDO |
---|
| 877 | ENDDO |
---|
[792] | 878 | |
---|
[828] | 879 | DEALLOCATE( ira ) |
---|
[792] | 880 | |
---|
[828] | 881 | END SUBROUTINE effic |
---|
[792] | 882 | |
---|
| 883 | |
---|
[790] | 884 | !------------------------------------------------------------------------------! |
---|
[828] | 885 | ! Calculation of enhancement factor for collision efficencies due to turbulence |
---|
[790] | 886 | !------------------------------------------------------------------------------! |
---|
[828] | 887 | SUBROUTINE turb_enhance_eff |
---|
[790] | 888 | |
---|
[1320] | 889 | USE particle_attributes, & |
---|
| 890 | ONLY: radius_classes |
---|
[790] | 891 | |
---|
[828] | 892 | IMPLICIT NONE |
---|
[790] | 893 | |
---|
[1320] | 894 | INTEGER(iwp) :: i !: |
---|
| 895 | INTEGER(iwp) :: iq !: |
---|
| 896 | INTEGER(iwp) :: ir !: |
---|
| 897 | INTEGER(iwp) :: j !: |
---|
| 898 | INTEGER(iwp) :: k !: |
---|
| 899 | INTEGER(iwp) :: kk !: |
---|
[790] | 900 | |
---|
[1320] | 901 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: |
---|
| 902 | |
---|
| 903 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
[790] | 904 | |
---|
[1320] | 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 !: |
---|
[790] | 912 | |
---|
[1320] | 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 !: |
---|
[799] | 919 | |
---|
| 920 | ! |
---|
[828] | 921 | !-- Initial assignment of constants |
---|
| 922 | IF ( first ) THEN |
---|
[799] | 923 | |
---|
[828] | 924 | first = .FALSE. |
---|
[799] | 925 | |
---|
[1359] | 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 /) |
---|
[828] | 931 | ! |
---|
[1007] | 932 | !-- for 100 cm**2/s**3 |
---|
[1359] | 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 /) |
---|
[828] | 955 | ! |
---|
[1007] | 956 | !-- for 400 cm**2/s**3 |
---|
[1359] | 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 /) |
---|
[799] | 979 | |
---|
[828] | 980 | ENDIF |
---|
[790] | 981 | |
---|
[828] | 982 | ! |
---|
| 983 | !-- Calculate the radius class index of particles with respect to array r0 |
---|
[1007] | 984 | !-- Radius has to be in µm |
---|
[828] | 985 | ALLOCATE( ira(1:radius_classes) ) |
---|
[790] | 986 | |
---|
[828] | 987 | DO j = 1, radius_classes |
---|
[1322] | 988 | particle_radius = radclass(j) * 1.0E6_wp |
---|
[828] | 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 |
---|
[799] | 997 | |
---|
| 998 | ! |
---|
[828] | 999 | !-- Two-dimensional linear interpolation of the collision efficiencies |
---|
[1007] | 1000 | !-- Radius has to be in µm |
---|
[828] | 1001 | DO j = 1, radius_classes |
---|
| 1002 | DO i = 1, j |
---|
[799] | 1003 | |
---|
[828] | 1004 | ir = ira(j) |
---|
| 1005 | rq = radclass(i) / radclass(j) |
---|
[799] | 1006 | |
---|
[828] | 1007 | DO kk = 2, 11 |
---|
| 1008 | IF ( rq <= rat(kk) ) THEN |
---|
| 1009 | iq = kk |
---|
| 1010 | EXIT |
---|
| 1011 | ENDIF |
---|
| 1012 | ENDDO |
---|
[790] | 1013 | |
---|
[1359] | 1014 | y1 = 0.0001_wp ! for 0 m**2/s**3 |
---|
[1007] | 1015 | |
---|
[828] | 1016 | IF ( ir < 8 ) THEN |
---|
| 1017 | IF ( ir >= 2 ) THEN |
---|
[1359] | 1018 | pp = ( radclass(j)*1.0E6_wp - r0(ir-1) ) / ( r0(ir) - r0(ir-1) ) |
---|
[828] | 1019 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 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) |
---|
[828] | 1028 | ELSE |
---|
| 1029 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 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) |
---|
[828] | 1032 | ENDIF |
---|
| 1033 | ELSE |
---|
| 1034 | qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) |
---|
[1359] | 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) |
---|
[828] | 1037 | ENDIF |
---|
| 1038 | ! |
---|
[1007] | 1039 | !-- Linear interpolation of dissipation rate in m**2/s**3 |
---|
[1359] | 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 |
---|
[828] | 1046 | ELSE |
---|
[1359] | 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 |
---|
[828] | 1049 | ENDIF |
---|
[790] | 1050 | |
---|
[1359] | 1051 | IF ( ecf(j,i) < 1.0_wp ) ecf(j,i) = 1.0_wp |
---|
[790] | 1052 | |
---|
[828] | 1053 | ecf(i,j) = ecf(j,i) |
---|
[790] | 1054 | |
---|
[828] | 1055 | ENDDO |
---|
| 1056 | ENDDO |
---|
[790] | 1057 | |
---|
[828] | 1058 | END SUBROUTINE turb_enhance_eff |
---|
[790] | 1059 | |
---|
[849] | 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 | |
---|
[1320] | 1070 | INTEGER(iwp) :: i !: |
---|
| 1071 | INTEGER(iwp) :: j !: |
---|
| 1072 | INTEGER(iwp) :: k !: |
---|
[849] | 1073 | |
---|
[1320] | 1074 | LOGICAL, SAVE :: first = .TRUE. !: |
---|
[849] | 1075 | |
---|
[1320] | 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 | |
---|
[1359] | 1091 | REAL(wp), DIMENSION(1:9), SAVE :: collected_r = 0.0_wp !: |
---|
[1320] | 1092 | |
---|
[1359] | 1093 | REAL(wp), DIMENSION(1:19), SAVE :: collector_r = 0.0_wp !: |
---|
[1320] | 1094 | |
---|
[1359] | 1095 | REAL(wp), DIMENSION(1:9,1:19), SAVE :: ef = 0.0_wp !: |
---|
[849] | 1096 | |
---|
[1322] | 1097 | mean_rm = mean_r * 1.0E06_wp |
---|
| 1098 | rm = r * 1.0E06_wp |
---|
[849] | 1099 | |
---|
| 1100 | IF ( first ) THEN |
---|
| 1101 | |
---|
[1359] | 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 /) |
---|
[849] | 1108 | |
---|
[1359] | 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 /) |
---|
[849] | 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 | |
---|
[1359] | 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 |
---|
[849] | 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) + & |
---|
[1359] | 1189 | (gg-dd)*ef(i+1,j+1) ) / (3.0_wp * gg) |
---|
[849] | 1190 | ENDIF |
---|
| 1191 | |
---|
| 1192 | END SUBROUTINE collision_efficiency_rogers |
---|
| 1193 | |
---|
[825] | 1194 | END MODULE lpm_collision_kernels_mod |
---|