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

Last change on this file since 1007 was 1007, checked in by franke, 12 years ago

Bugfixes


Missing calculation of mean particle weighting factor for output added. (data_output_2d, data_output_3d, data_output_mask, sum_up_3d_data)
Calculation of mean particle radius for output now considers the weighting factor. (data_output_mask)
Calculation of sugrid-scale buoyancy flux for humidity and cloud droplets corrected. (flow_statistics)
Factor in calculation of enhancement factor for collision efficencies corrected. (lpm_collision_kernels)
Calculation of buoyancy production now considers the liquid water mixing ratio in case of cloud droplets. (production_e)

Changes


Calculation of buoyancy flux for humidity in case of WS-scheme is now using turbulent fluxes of WS-scheme. (flow_statistics)
Calculation of the collision kernels now in SI units. (lpm_collision_kernels)

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