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