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