source: palm/trunk/SOURCE/lpm_collision_kernels.f90 @ 1092

Last change on this file since 1092 was 1092, checked in by raasch, 11 years ago

unused variables remove from several routines

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