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