MODULE lpm_collision_kernels_mod !--------------------------------------------------------------------------------! ! This file is part of PALM. ! ! PALM is free software: you can redistribute it and/or modify it under the terms ! of the GNU General Public License as published by the Free Software Foundation, ! either version 3 of the License, or (at your option) any later version. ! ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! PALM. If not, see . ! ! Copyright 1997-2014 Leibniz Universitaet Hannover !--------------------------------------------------------------------------------! ! ! Current revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: lpm_collision_kernels.f90 1360 2014-04-11 17:20:32Z kanani $ ! ! 1359 2014-04-11 17:15:14Z hoffmann ! New particle structure integrated. ! Kind definition added to all floating point numbers. ! ! 1346 2014-03-27 13:18:20Z heinze ! Bugfix: REAL constants provided with KIND-attribute especially in call of ! intrinsic function like MAX, MIN, SIGN ! ! 1322 2014-03-20 16:38:49Z raasch ! REAL constants defined as wp_kind ! ! 1320 2014-03-20 08:40:49Z ! ONLY-attribute added to USE-statements, ! kind-parameters added to all INTEGER and REAL declaration statements, ! kinds are defined in new module kinds, ! revision history before 2012 removed, ! comment fields (!:) to be used for variable explanations added to ! all variable declaration statements ! ! 1092 2013-02-02 11:24:22Z raasch ! unused variables removed ! ! 1071 2012-11-29 16:54:55Z franke ! Bugfix: collision efficiencies for Hall kernel should not be < 1.0E-20 ! ! 1036 2012-10-22 13:43:42Z raasch ! code put under GPL (PALM 3.9) ! ! 1007 2012-09-19 14:30:36Z franke ! converted all units to SI units and replaced some parameters by corresponding ! PALM parameters ! Bugfix: factor in calculation of enhancement factor for collision efficencies ! changed from 10. to 1.0 ! ! 849 2012-03-15 10:35:09Z raasch ! routine collision_efficiency_rogers added (moved from former advec_particles ! to here) ! ! 835 2012-02-22 11:21:19Z raasch $ ! Bugfix: array diss can be used only in case of Wang kernel ! ! 828 2012-02-21 12:00:36Z raasch ! code has been completely reformatted, routine colker renamed ! recalculate_kernel, ! routine init_kernels added, radius is now communicated to the collision ! routines by array radclass ! ! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4 ! ! 825 2012-02-19 03:03:44Z raasch ! routine renamed from wang_kernel to lpm_collision_kernels, ! turbulence_effects on collision replaced by wang_kernel ! ! 790 2011-11-29 03:11:20Z raasch ! initial revision ! ! Description: ! ------------ ! This module calculates collision efficiencies either due to pure gravitational ! effects (Hall kernel, see Hall, 1980: J. Atmos. Sci., 2486-2507) or ! including the effects of (SGS) turbulence (Wang kernel, see Wang and ! Grabowski, 2009: Atmos. Sci. Lett., 10, 1-8). The original code has been ! provided by L.-P. Wang but is substantially reformatted and speed optimized ! here. ! ! ATTENTION: ! Physical quantities (like g, densities, etc.) used in this module still ! have to be adjusted to those values used in the main PALM code. ! Also, quantities in CGS-units should be converted to SI-units eventually. !------------------------------------------------------------------------------! USE constants, & ONLY: pi USE kinds USE particle_attributes, & ONLY: collision_kernel, dissipation_classes, particles, radius_classes USE pegrid IMPLICIT NONE PRIVATE PUBLIC ckernel, collision_efficiency_rogers, init_kernels, & rclass_lbound, rclass_ubound, recalculate_kernel REAL(wp) :: epsilon !: REAL(wp) :: eps2 !: REAL(wp) :: rclass_lbound !: REAL(wp) :: rclass_ubound !: REAL(wp) :: urms !: REAL(wp) :: urms2 !: REAL(wp), DIMENSION(:), ALLOCATABLE :: epsclass !: REAL(wp), DIMENSION(:), ALLOCATABLE :: radclass !: REAL(wp), DIMENSION(:), ALLOCATABLE :: winf !: REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ec !: REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ecf !: REAL(wp), DIMENSION(:,:), ALLOCATABLE :: gck !: REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hkernel !: REAL(wp), DIMENSION(:,:), ALLOCATABLE :: hwratio !: REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ckernel !: SAVE ! !-- Public interfaces INTERFACE collision_efficiency_rogers MODULE PROCEDURE collision_efficiency_rogers END INTERFACE collision_efficiency_rogers INTERFACE init_kernels MODULE PROCEDURE init_kernels END INTERFACE init_kernels INTERFACE recalculate_kernel MODULE PROCEDURE recalculate_kernel END INTERFACE recalculate_kernel CONTAINS SUBROUTINE init_kernels !------------------------------------------------------------------------------! ! Initialization of the collision efficiency matrix with fixed radius and ! dissipation classes, calculated at simulation start only. !------------------------------------------------------------------------------! IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: j !: INTEGER(iwp) :: k !: ! !-- Calculate collision efficiencies for fixed radius- and dissipation !-- classes IF ( collision_kernel(6:9) == 'fast' ) THEN ALLOCATE( ckernel(1:radius_classes,1:radius_classes, & 0:dissipation_classes), epsclass(1:dissipation_classes), & radclass(1:radius_classes) ) ! !-- Calculate the radius class bounds with logarithmic distances !-- in the interval [1.0E-6, 2.0E-4] m rclass_lbound = LOG( 1.0E-6_wp ) rclass_ubound = LOG( 2.0E-4_wp ) radclass(1) = 1.0E-6_wp DO i = 2, radius_classes radclass(i) = EXP( rclass_lbound + & ( rclass_ubound - rclass_lbound ) * & ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) ) ENDDO ! !-- Set the class bounds for dissipation in interval [0.0, 0.1] m**2/s**3 DO i = 1, dissipation_classes epsclass(i) = 0.1_wp * REAL( i, KIND=wp ) / dissipation_classes ENDDO ! !-- Calculate collision efficiencies of the Wang/ayala kernel ALLOCATE( ec(1:radius_classes,1:radius_classes), & ecf(1:radius_classes,1:radius_classes), & gck(1:radius_classes,1:radius_classes), & winf(1:radius_classes) ) DO k = 1, dissipation_classes epsilon = epsclass(k) urms = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp ) CALL turbsd CALL turb_enhance_eff CALL effic DO j = 1, radius_classes DO i = 1, radius_classes ckernel(i,j,k) = ec(i,j) * gck(i,j) * ecf(i,j) ENDDO ENDDO ENDDO ! !-- Calculate collision efficiencies of the Hall kernel ALLOCATE( hkernel(1:radius_classes,1:radius_classes), & hwratio(1:radius_classes,1:radius_classes) ) CALL fallg CALL effic DO j = 1, radius_classes DO i = 1, radius_classes hkernel(i,j) = pi * ( radclass(j) + radclass(i) )**2 & * ec(i,j) * ABS( winf(j) - winf(i) ) ckernel(i,j,0) = hkernel(i,j) ! hall kernel stored on index 0 ENDDO ENDDO ! !-- Test output of efficiencies IF ( j == -1 ) THEN PRINT*, '*** Hall kernel' WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, & i = 1,radius_classes ) DO j = 1, radius_classes WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j), & ( hkernel(i,j), i = 1,radius_classes ) ENDDO DO k = 1, dissipation_classes DO i = 1, radius_classes DO j = 1, radius_classes IF ( hkernel(i,j) == 0.0_wp ) THEN hwratio(i,j) = 9999999.9_wp ELSE hwratio(i,j) = ckernel(i,j,k) / hkernel(i,j) ENDIF ENDDO ENDDO PRINT*, '*** epsilon = ', epsclass(k) WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, & i = 1,radius_classes ) DO j = 1, radius_classes WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, & ( hwratio(i,j), i = 1,radius_classes ) ENDDO ENDDO ENDIF DEALLOCATE( ec, ecf, epsclass, gck, hkernel, winf ) ELSEIF( collision_kernel == 'hall' .OR. collision_kernel == 'wang' ) & THEN ! !-- Initial settings for Hall- and Wang-Kernel !-- To be done: move here parts from turbsd, fallg, ecoll, etc. ENDIF END SUBROUTINE init_kernels !------------------------------------------------------------------------------! ! Calculation of collision kernels during each timestep and for each grid box !------------------------------------------------------------------------------! SUBROUTINE recalculate_kernel( i1, j1, k1 ) USE arrays_3d, & ONLY: diss USE particle_attributes, & ONLY: prt_count, radius_classes, wang_kernel IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: i1 !: INTEGER(iwp) :: j !: INTEGER(iwp) :: j1 !: INTEGER(iwp) :: k1 !: INTEGER(iwp) :: pend !: INTEGER(iwp) :: pstart !: pstart = 1 pend = prt_count(k1,j1,i1) radius_classes = prt_count(k1,j1,i1) ALLOCATE( ec(1:radius_classes,1:radius_classes), & radclass(1:radius_classes), winf(1:radius_classes) ) ! !-- Store particle radii on the radclass array radclass(1:radius_classes) = particles(pstart:pend)%radius IF ( wang_kernel ) THEN epsilon = diss(k1,j1,i1) ! dissipation rate in m**2/s**3 ELSE epsilon = 0.0_wp ENDIF urms = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp ) IF ( wang_kernel .AND. epsilon > 1.0E-7_wp ) THEN ! !-- Call routines to calculate efficiencies for the Wang kernel ALLOCATE( gck(1:radius_classes,1:radius_classes), & ecf(1:radius_classes,1:radius_classes) ) CALL turbsd CALL turb_enhance_eff CALL effic DO j = 1, radius_classes DO i = 1, radius_classes ckernel(pstart+i-1,pstart+j-1,1) = ec(i,j) * gck(i,j) * ecf(i,j) ENDDO ENDDO DEALLOCATE( gck, ecf ) ELSE ! !-- Call routines to calculate efficiencies for the Hall kernel CALL fallg CALL effic DO j = 1, radius_classes DO i = 1, radius_classes ckernel(pstart+i-1,pstart+j-1,1) = pi * & ( radclass(j) + radclass(i) )**2 & * ec(i,j) * ABS( winf(j) - winf(i) ) ENDDO ENDDO ENDIF DEALLOCATE( ec, radclass, winf ) END SUBROUTINE recalculate_kernel !------------------------------------------------------------------------------! ! Calculation of gck ! This is from Aayala 2008b, page 37ff. ! Necessary input parameters: water density, radii of droplets, air density, ! air viscosity, turbulent dissipation rate, taylor microscale reynolds number, ! gravitational acceleration --> to be replaced by PALM parameters !------------------------------------------------------------------------------! SUBROUTINE turbsd USE control_parameters, & ONLY: g, molecular_viscosity USE particle_attributes, & ONLY: radius_classes IMPLICIT NONE LOGICAL, SAVE :: first = .TRUE. !: INTEGER(iwp) :: i !: INTEGER(iwp) :: j !: REAL(wp) :: ao !: REAL(wp) :: ao_gr !: REAL(wp) :: bbb !: REAL(wp) :: be !: REAL(wp) :: b1 !: REAL(wp) :: b2 !: REAL(wp) :: ccc !: REAL(wp) :: c1 !: REAL(wp) :: c1_gr !: REAL(wp) :: c2 !: REAL(wp) :: d1 !: REAL(wp) :: d2 !: REAL(wp) :: eta !: REAL(wp) :: e1 !: REAL(wp) :: e2 !: REAL(wp) :: fao_gr !: REAL(wp) :: fr !: REAL(wp) :: grfin !: REAL(wp) :: lambda !: REAL(wp) :: lambda_re !: REAL(wp) :: lf !: REAL(wp) :: rc !: REAL(wp) :: rrp !: REAL(wp) :: sst !: REAL(wp) :: tauk !: REAL(wp) :: tl !: REAL(wp) :: t2 !: REAL(wp) :: tt !: REAL(wp) :: t1 !: REAL(wp) :: vk !: REAL(wp) :: vrms1xy !: REAL(wp) :: vrms2xy !: REAL(wp) :: v1 !: REAL(wp) :: v1v2xy !: REAL(wp) :: v1xysq !: REAL(wp) :: v2 !: REAL(wp) :: v2xysq !: REAL(wp) :: wrfin !: REAL(wp) :: wrgrav2 !: REAL(wp) :: wrtur2xy !: REAL(wp) :: xx !: REAL(wp) :: yy !: REAL(wp) :: z !: REAL(wp), DIMENSION(1:radius_classes) :: st !: REAL(wp), DIMENSION(1:radius_classes) :: tau !: ! !-- Initial assignment of constants IF ( first ) THEN first = .FALSE. ENDIF lambda = urms * SQRT( 15.0_wp * molecular_viscosity / epsilon ) ! in m lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity ) tl = urms**2 / epsilon ! in s lf = 0.5_wp * urms**3 / epsilon ! in m tauk = SQRT( molecular_viscosity / epsilon ) ! in s eta = ( molecular_viscosity**3 / epsilon )**0.25_wp ! in m vk = eta / tauk ao = ( 11.0_wp + 7.0_wp * lambda_re ) / ( 205.0_wp + lambda_re ) tt = SQRT( 2.0_wp * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk ! in s CALL fallg ! gives winf in m/s DO i = 1, radius_classes tau(i) = winf(i) / g ! in s st(i) = tau(i) / tauk ENDDO ! !-- Calculate wr (from Aayala 2008b, page 38f) z = tt / tl be = SQRT( 2.0_wp ) * lambda / lf bbb = SQRT( 1.0_wp - 2.0_wp * be**2 ) d1 = ( 1.0_wp + bbb ) / ( 2.0_wp * bbb ) e1 = lf * ( 1.0_wp + bbb ) * 0.5_wp ! in m d2 = ( 1.0_wp - bbb ) * 0.5_wp / bbb e2 = lf * ( 1.0_wp - bbb ) * 0.5_wp ! in m ccc = SQRT( 1.0_wp - 2.0_wp * z**2 ) b1 = ( 1.0_wp + ccc ) * 0.5_wp / ccc c1 = tl * ( 1.0_wp + ccc ) * 0.5_wp ! in s b2 = ( 1.0_wp - ccc ) * 0.5_wp / ccc c2 = tl * ( 1.0_wp - ccc ) * 0.5_wp ! in s DO i = 1, radius_classes v1 = winf(i) ! in m/s t1 = tau(i) ! in s DO j = 1, i rrp = radclass(i) + radclass(j) v2 = winf(j) ! in m/s t2 = tau(j) ! in s v1xysq = b1 * d1 * phi_w(c1,e1,v1,t1) - b1 * d2 * phi_w(c1,e2,v1,t1) & - b2 * d1 * phi_w(c2,e1,v1,t1) + b2 * d2 * phi_w(c2,e2,v1,t1) v1xysq = v1xysq * urms**2 / t1 ! in m**2/s**2 vrms1xy = SQRT( v1xysq ) ! in m/s v2xysq = b1 * d1 * phi_w(c1,e1,v2,t2) - b1 * d2 * phi_w(c1,e2,v2,t2) & - b2 * d1 * phi_w(c2,e1,v2,t2) + b2 * d2 * phi_w(c2,e2,v2,t2) v2xysq = v2xysq * urms**2 / t2 ! in m**2/s**2 vrms2xy = SQRT( v2xysq ) ! in m/s IF ( winf(i) >= winf(j) ) THEN v1 = winf(i) t1 = tau(i) v2 = winf(j) t2 = tau(j) ELSE v1 = winf(j) t1 = tau(j) v2 = winf(i) t2 = tau(i) ENDIF v1v2xy = b1 * d1 * zhi(c1,e1,v1,t1,v2,t2) - & b1 * d2 * zhi(c1,e2,v1,t1,v2,t2) - & b2 * d1 * zhi(c2,e1,v1,t1,v2,t2) + & b2 * d2* zhi(c2,e2,v1,t1,v2,t2) fr = d1 * EXP( -rrp / e1 ) - d2 * EXP( -rrp / e2 ) v1v2xy = v1v2xy * fr * urms**2 / tau(i) / tau(j) ! in m**2/s**2 wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0_wp * v1v2xy ! in m**2/s**2 IF ( wrtur2xy < 0.0_wp ) wrtur2xy = 0.0_wp wrgrav2 = pi / 8.0_wp * ( winf(j) - winf(i) )**2 wrfin = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) ) ! in m/s ! !-- Calculate gr IF ( st(j) > st(i) ) THEN sst = st(j) ELSE sst = st(i) ENDIF xx = -0.1988_wp * sst**4 + 1.5275_wp * sst**3 - 4.2942_wp * & sst**2 + 5.3406_wp * sst IF ( xx < 0.0_wp ) xx = 0.0_wp yy = 0.1886_wp * EXP( 20.306_wp / lambda_re ) c1_gr = xx / ( g / vk * tauk )**yy ao_gr = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2 fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re ) rc = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta ! in cm grfin = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5_wp ) IF ( grfin < 1.0_wp ) grfin = 1.0_wp gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin ! in cm**3/s gck(j,i) = gck(i,j) ENDDO ENDDO END SUBROUTINE turbsd !------------------------------------------------------------------------------! ! phi_w as a function !------------------------------------------------------------------------------! REAL(wp) FUNCTION phi_w( a, b, vsett, tau0 ) IMPLICIT NONE REAL(wp) :: a !: REAL(wp) :: aa1 !: REAL(wp) :: b !: REAL(wp) :: tau0 !: REAL(wp) :: vsett !: aa1 = 1.0_wp / tau0 + 1.0_wp / a + vsett / b phi_w = 1.0_wp / aa1 - 0.5_wp * vsett / b / aa1**2 ! in s END FUNCTION phi_w !------------------------------------------------------------------------------! ! zhi as a function !------------------------------------------------------------------------------! REAL(wp) FUNCTION zhi( a, b, vsett1, tau1, vsett2, tau2 ) IMPLICIT NONE REAL(wp) :: a !: REAL(wp) :: aa1 !: REAL(wp) :: aa2 !: REAL(wp) :: aa3 !: REAL(wp) :: aa4 !: REAL(wp) :: aa5 !: REAL(wp) :: aa6 !: REAL(wp) :: b !: REAL(wp) :: tau1 !: REAL(wp) :: tau2 !: REAL(wp) :: vsett1 !: REAL(wp) :: vsett2 !: aa1 = vsett2 / b - 1.0_wp / tau2 - 1.0_wp / a aa2 = vsett1 / b + 1.0_wp / tau1 + 1.0_wp / a aa3 = ( vsett1 - vsett2 ) / b + 1.0_wp / tau1 + 1.0_wp / tau2 aa4 = ( vsett2 / b )**2 - ( 1.0_wp / tau2 + 1.0_wp / a )**2 aa5 = vsett2 / b + 1.0_wp / tau2 + 1.0_wp / a aa6 = 1.0_wp / tau1 - 1.0_wp / a + ( 1.0_wp / tau2 + 1.0_wp / a) * & vsett1 / vsett2 zhi = (1.0_wp / aa1 - 1.0_wp / aa2 ) * ( vsett1 - vsett2 ) * 0.5_wp / & b / aa3**2 + ( 4.0_wp / aa4 - 1.0_wp / aa5**2 - 1.0_wp / aa1**2 ) & * vsett2 * 0.5_wp / b /aa6 + ( 2.0_wp * ( b / aa2 - b / aa1 ) - & vsett1 / aa2**2 + vsett2 / aa1**2 ) * 0.5_wp / b / aa3 ! in s**2 END FUNCTION zhi !------------------------------------------------------------------------------! ! Calculation of terminal velocity winf following Equations 10-138 to 10-145 ! from (Pruppacher and Klett, 1997) !------------------------------------------------------------------------------! SUBROUTINE fallg USE cloud_parameters, & ONLY: rho_l USE control_parameters, & ONLY: g USE particle_attributes, & ONLY: radius_classes IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: j !: LOGICAL, SAVE :: first = .TRUE. !: REAL(wp), SAVE :: cunh !: REAL(wp), SAVE :: eta !: REAL(wp), SAVE :: phy !: REAL(wp), SAVE :: py !: REAL(wp), SAVE :: rho_a !: REAL(wp), SAVE :: sigma !: REAL(wp), SAVE :: stb !: REAL(wp), SAVE :: stok !: REAL(wp), SAVE :: xlamb !: REAL(wp) :: bond !: REAL(wp) :: x !: REAL(wp) :: xrey !: REAL(wp) :: y !: REAL(wp), DIMENSION(1:7), SAVE :: b !: REAL(wp), DIMENSION(1:6), SAVE :: c !: ! !-- Initial assignment of constants IF ( first ) THEN first = .FALSE. b = (/ -0.318657E1_wp, 0.992696E0_wp, -0.153193E-2_wp, & -0.987059E-3_wp, -0.578878E-3_wp, 0.855176E-4_wp, & -0.327815E-5_wp /) c = (/ -0.500015E1_wp, 0.523778E1_wp, -0.204914E1_wp, & 0.475294E0_wp, -0.542819E-1_wp, 0.238449E-2_wp /) ! !-- Parameter values for p = 1013,25 hPa and T = 293,15 K eta = 1.818E-5_wp ! in kg/(m s) xlamb = 6.6E-8_wp ! in m rho_a = 1.204_wp ! in kg/m**3 cunh = 1.26_wp * xlamb ! in m sigma = 0.07363_wp ! in kg/s**2 stok = 2.0_wp * g * ( rho_l - rho_a ) / ( 9.0_wp * eta ) ! in 1/(m s) stb = 32.0_wp * rho_a * ( rho_l - rho_a) * g / (3.0_wp * eta * eta) phy = sigma**3 * rho_a**2 / ( eta**4 * g * ( rho_l - rho_a ) ) py = phy**( 1.0_wp / 6.0_wp ) ENDIF DO j = 1, radius_classes IF ( radclass(j) <= 1.0E-5_wp ) THEN winf(j) = stok * ( radclass(j)**2 + cunh * radclass(j) ) ELSEIF ( radclass(j) > 1.0E-5_wp .AND. radclass(j) <= 5.35E-4_wp ) THEN x = LOG( stb * radclass(j)**3 ) y = 0.0_wp DO i = 1, 7 y = y + b(i) * x**(i-1) ENDDO ! !-- Note: this Eq. is wrong in (Pruppacher and Klett, 1997, p. 418) !-- for correct version see (Beard, 1976) xrey = ( 1.0_wp + cunh / radclass(j) ) * EXP( y ) winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) ELSEIF ( radclass(j) > 5.35E-4_wp ) THEN IF ( radclass(j) > 0.0035_wp ) THEN bond = g * ( rho_l - rho_a ) * 0.0035_wp**2 / sigma ELSE bond = g * ( rho_l - rho_a ) * radclass(j)**2 / sigma ENDIF x = LOG( 16.0_wp * bond * py / 3.0_wp ) y = 0.0_wp DO i = 1, 6 y = y + c(i) * x**(i-1) ENDDO xrey = py * EXP( y ) IF ( radclass(j) > 0.0035_wp ) THEN winf(j) = xrey * eta / ( 2.0_wp * rho_a * 0.0035_wp ) ELSE winf(j) = xrey * eta / ( 2.0_wp * rho_a * radclass(j) ) ENDIF ENDIF ENDDO END SUBROUTINE fallg !------------------------------------------------------------------------------! ! Calculation of collision efficiencies for the Hall kernel !------------------------------------------------------------------------------! SUBROUTINE effic USE particle_attributes, & ONLY: radius_classes IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: iq !: INTEGER(iwp) :: ir !: INTEGER(iwp) :: j !: INTEGER(iwp) :: k !: INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: LOGICAL, SAVE :: first = .TRUE. !: REAL(wp) :: ek !: REAL(wp) :: particle_radius !: REAL(wp) :: pp !: REAL(wp) :: qq !: REAL(wp) :: rq !: REAL(wp), DIMENSION(1:21), SAVE :: rat !: REAL(wp), DIMENSION(1:15), SAVE :: r0 !: REAL(wp), DIMENSION(1:15,1:21), SAVE :: ecoll !: ! !-- Initial assignment of constants IF ( first ) THEN first = .FALSE. r0 = (/ 6.0_wp, 8.0_wp, 10.0_wp, 15.0_wp, 20.0_wp, 25.0_wp, & 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, 70.0_wp, 100.0_wp, & 150.0_wp, 200.0_wp, 300.0_wp /) rat = (/ 0.00_wp, 0.05_wp, 0.10_wp, 0.15_wp, 0.20_wp, 0.25_wp, & 0.30_wp, 0.35_wp, 0.40_wp, 0.45_wp, 0.50_wp, 0.55_wp, & 0.60_wp, 0.65_wp, 0.70_wp, 0.75_wp, 0.80_wp, 0.85_wp, & 0.90_wp, 0.95_wp, 1.00_wp /) ecoll(:,1) = (/ 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, & 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp /) ecoll(:,2) = (/ 0.003_wp, 0.003_wp, 0.003_wp, 0.004_wp, 0.005_wp, & 0.005_wp, 0.005_wp, 0.010_wp, 0.100_wp, 0.050_wp, & 0.200_wp, 0.500_wp, 0.770_wp, 0.870_wp, 0.970_wp /) ecoll(:,3) = (/ 0.007_wp, 0.007_wp, 0.007_wp, 0.008_wp, 0.009_wp, & 0.010_wp, 0.010_wp, 0.070_wp, 0.400_wp, 0.430_wp, & 0.580_wp, 0.790_wp, 0.930_wp, 0.960_wp, 1.000_wp /) ecoll(:,4) = (/ 0.009_wp, 0.009_wp, 0.009_wp, 0.012_wp, 0.015_wp, & 0.010_wp, 0.020_wp, 0.280_wp, 0.600_wp, 0.640_wp, & 0.750_wp, 0.910_wp, 0.970_wp, 0.980_wp, 1.000_wp /) ecoll(:,5) = (/ 0.014_wp, 0.014_wp, 0.014_wp, 0.015_wp, 0.016_wp, & 0.030_wp, 0.060_wp, 0.500_wp, 0.700_wp, 0.770_wp, & 0.840_wp, 0.950_wp, 0.970_wp, 1.000_wp, 1.000_wp /) ecoll(:,6) = (/ 0.017_wp, 0.017_wp, 0.017_wp, 0.020_wp, 0.022_wp, & 0.060_wp, 0.100_wp, 0.620_wp, 0.780_wp, 0.840_wp, & 0.880_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,7) = (/ 0.030_wp, 0.030_wp, 0.024_wp, 0.022_wp, 0.032_wp, & 0.062_wp, 0.200_wp, 0.680_wp, 0.830_wp, 0.870_wp, & 0.900_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,8) = (/ 0.025_wp, 0.025_wp, 0.025_wp, 0.036_wp, 0.043_wp, & 0.130_wp, 0.270_wp, 0.740_wp, 0.860_wp, 0.890_wp, & 0.920_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,9) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.040_wp, 0.052_wp, & 0.200_wp, 0.400_wp, 0.780_wp, 0.880_wp, 0.900_wp, & 0.940_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,10) = (/ 0.030_wp, 0.030_wp, 0.030_wp, 0.047_wp, 0.064_wp, & 0.250_wp, 0.500_wp, 0.800_wp, 0.900_wp, 0.910_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,11) = (/ 0.040_wp, 0.040_wp, 0.033_wp, 0.037_wp, 0.068_wp, & 0.240_wp, 0.550_wp, 0.800_wp, 0.900_wp, 0.910_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,12) = (/ 0.035_wp, 0.035_wp, 0.035_wp, 0.055_wp, 0.079_wp, & 0.290_wp, 0.580_wp, 0.800_wp, 0.900_wp, 0.910_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,13) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.062_wp, 0.082_wp, & 0.290_wp, 0.590_wp, 0.780_wp, 0.900_wp, 0.910_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,14) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.060_wp, 0.080_wp, & 0.290_wp, 0.580_wp, 0.770_wp, 0.890_wp, 0.910_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,15) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.041_wp, 0.075_wp, & 0.250_wp, 0.540_wp, 0.760_wp, 0.880_wp, 0.920_wp, & 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,16) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.052_wp, 0.067_wp, & 0.250_wp, 0.510_wp, 0.770_wp, 0.880_wp, 0.930_wp, & 0.970_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,17) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.047_wp, 0.057_wp, & 0.250_wp, 0.490_wp, 0.770_wp, 0.890_wp, 0.950_wp, & 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /) ecoll(:,18) = (/ 0.036_wp, 0.036_wp, 0.036_wp, 0.042_wp, 0.048_wp, & 0.230_wp, 0.470_wp, 0.780_wp, 0.920_wp, 1.000_wp, & 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp /) ecoll(:,19) = (/ 0.040_wp, 0.040_wp, 0.035_wp, 0.033_wp, 0.040_wp, & 0.112_wp, 0.450_wp, 0.790_wp, 1.010_wp, 1.030_wp, & 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp /) ecoll(:,20) = (/ 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, & 0.119_wp, 0.470_wp, 0.950_wp, 1.300_wp, 1.700_wp, & 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp /) ecoll(:,21) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, & 0.125_wp, 0.520_wp, 1.400_wp, 2.300_wp, 3.000_wp, & 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp /) ENDIF ! !-- Calculate the radius class index of particles with respect to array r !-- Radius has to be in µm ALLOCATE( ira(1:radius_classes) ) DO j = 1, radius_classes particle_radius = radclass(j) * 1.0E6_wp DO k = 1, 15 IF ( particle_radius < r0(k) ) THEN ira(j) = k EXIT ENDIF ENDDO IF ( particle_radius >= r0(15) ) ira(j) = 16 ENDDO ! !-- Two-dimensional linear interpolation of the collision efficiency. !-- Radius has to be in µm DO j = 1, radius_classes DO i = 1, j ir = ira(j) rq = radclass(i) / radclass(j) iq = INT( rq * 20 ) + 1 iq = MAX( iq , 2) IF ( ir < 16 ) THEN IF ( ir >= 2 ) THEN pp = ( ( radclass(j) * 1.0E06_wp ) - r0(ir-1) ) / & ( r0(ir) - r0(ir-1) ) qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) ec(j,i) = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) & * ecoll(ir-1,iq-1) & + pp * ( 1.0_wp - qq ) * ecoll(ir,iq-1) & + qq * ( 1.0_wp - pp ) * ecoll(ir-1,iq) & + pp * qq * ecoll(ir,iq) ELSE qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq) ENDIF ELSE qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq) ec(j,i) = MIN( ek, 1.0_wp ) ENDIF IF ( ec(j,i) < 1.0E-20_wp ) ec(j,i) = 0.0_wp ec(i,j) = ec(j,i) ENDDO ENDDO DEALLOCATE( ira ) END SUBROUTINE effic !------------------------------------------------------------------------------! ! Calculation of enhancement factor for collision efficencies due to turbulence !------------------------------------------------------------------------------! SUBROUTINE turb_enhance_eff USE particle_attributes, & ONLY: radius_classes IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: iq !: INTEGER(iwp) :: ir !: INTEGER(iwp) :: j !: INTEGER(iwp) :: k !: INTEGER(iwp) :: kk !: INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ira !: LOGICAL, SAVE :: first = .TRUE. !: REAL(wp) :: particle_radius !: REAL(wp) :: pp !: REAL(wp) :: qq !: REAL(wp) :: rq !: REAL(wp) :: y1 !: REAL(wp) :: y2 !: REAL(wp) :: y3 !: REAL(wp), DIMENSION(1:11), SAVE :: rat !: REAL(wp), DIMENSION(1:7), SAVE :: r0 !: REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_100 !: REAL(wp), DIMENSION(1:7,1:11), SAVE :: ecoll_400 !: ! !-- Initial assignment of constants IF ( first ) THEN first = .FALSE. r0 = (/ 10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp, & 100.0_wp /) rat = (/ 0.0_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.4_wp, 0.5_wp, 0.6_wp, & 0.7_wp, 0.8_wp, 0.9_wp, 1.0_wp /) ! !-- for 100 cm**2/s**3 ecoll_100(:,1) = (/ 1.74_wp, 1.74_wp, 1.773_wp, 1.49_wp, & 1.207_wp, 1.207_wp, 1.0_wp /) ecoll_100(:,2) = (/ 1.46_wp, 1.46_wp, 1.421_wp, 1.245_wp, & 1.069_wp, 1.069_wp, 1.0_wp /) ecoll_100(:,3) = (/ 1.32_wp, 1.32_wp, 1.245_wp, 1.123_wp, & 1.000_wp, 1.000_wp, 1.0_wp /) ecoll_100(:,4) = (/ 1.250_wp, 1.250_wp, 1.148_wp, 1.087_wp, & 1.025_wp, 1.025_wp, 1.0_wp /) ecoll_100(:,5) = (/ 1.186_wp, 1.186_wp, 1.066_wp, 1.060_wp, & 1.056_wp, 1.056_wp, 1.0_wp /) ecoll_100(:,6) = (/ 1.045_wp, 1.045_wp, 1.000_wp, 1.014_wp, & 1.028_wp, 1.028_wp, 1.0_wp /) ecoll_100(:,7) = (/ 1.070_wp, 1.070_wp, 1.030_wp, 1.038_wp, & 1.046_wp, 1.046_wp, 1.0_wp /) ecoll_100(:,8) = (/ 1.000_wp, 1.000_wp, 1.054_wp, 1.042_wp, & 1.029_wp, 1.029_wp, 1.0_wp /) ecoll_100(:,9) = (/ 1.223_wp, 1.223_wp, 1.117_wp, 1.069_wp, & 1.021_wp, 1.021_wp, 1.0_wp /) ecoll_100(:,10) = (/ 1.570_wp, 1.570_wp, 1.244_wp, 1.166_wp, & 1.088_wp, 1.088_wp, 1.0_wp /) ecoll_100(:,11) = (/ 20.3_wp, 20.3_wp, 14.6_wp, 8.61_wp, & 2.60_wp, 2.60_wp, 1.0_wp /) ! !-- for 400 cm**2/s**3 ecoll_400(:,1) = (/ 4.976_wp, 4.976_wp, 3.593_wp, 2.519_wp, & 1.445_wp, 1.445_wp, 1.0_wp /) ecoll_400(:,2) = (/ 2.984_wp, 2.984_wp, 2.181_wp, 1.691_wp, & 1.201_wp, 1.201_wp, 1.0_wp /) ecoll_400(:,3) = (/ 1.988_wp, 1.988_wp, 1.475_wp, 1.313_wp, & 1.150_wp, 1.150_wp, 1.0_wp /) ecoll_400(:,4) = (/ 1.490_wp, 1.490_wp, 1.187_wp, 1.156_wp, & 1.126_wp, 1.126_wp, 1.0_wp /) ecoll_400(:,5) = (/ 1.249_wp, 1.249_wp, 1.088_wp, 1.090_wp, & 1.092_wp, 1.092_wp, 1.0_wp /) ecoll_400(:,6) = (/ 1.139_wp, 1.139_wp, 1.130_wp, 1.091_wp, & 1.051_wp, 1.051_wp, 1.0_wp /) ecoll_400(:,7) = (/ 1.220_wp, 1.220_wp, 1.190_wp, 1.138_wp, & 1.086_wp, 1.086_wp, 1.0_wp /) ecoll_400(:,8) = (/ 1.325_wp, 1.325_wp, 1.267_wp, 1.165_wp, & 1.063_wp, 1.063_wp, 1.0_wp /) ecoll_400(:,9) = (/ 1.716_wp, 1.716_wp, 1.345_wp, 1.223_wp, & 1.100_wp, 1.100_wp, 1.0_wp /) ecoll_400(:,10) = (/ 3.788_wp, 3.788_wp, 1.501_wp, 1.311_wp, & 1.120_wp, 1.120_wp, 1.0_wp /) ecoll_400(:,11) = (/ 36.52_wp, 36.52_wp, 19.16_wp, 22.80_wp, & 26.0_wp, 26.0_wp, 1.0_wp /) ENDIF ! !-- Calculate the radius class index of particles with respect to array r0 !-- Radius has to be in µm ALLOCATE( ira(1:radius_classes) ) DO j = 1, radius_classes particle_radius = radclass(j) * 1.0E6_wp DO k = 1, 7 IF ( particle_radius < r0(k) ) THEN ira(j) = k EXIT ENDIF ENDDO IF ( particle_radius >= r0(7) ) ira(j) = 8 ENDDO ! !-- Two-dimensional linear interpolation of the collision efficiencies !-- Radius has to be in µm DO j = 1, radius_classes DO i = 1, j ir = ira(j) rq = radclass(i) / radclass(j) DO kk = 2, 11 IF ( rq <= rat(kk) ) THEN iq = kk EXIT ENDIF ENDDO y1 = 0.0001_wp ! for 0 m**2/s**3 IF ( ir < 8 ) THEN IF ( ir >= 2 ) THEN pp = ( radclass(j)*1.0E6_wp - r0(ir-1) ) / ( r0(ir) - r0(ir-1) ) qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) y2 = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) * ecoll_100(ir-1,iq-1) + & pp * ( 1.0_wp - qq ) * ecoll_100(ir,iq-1) + & qq * ( 1.0_wp - pp ) * ecoll_100(ir-1,iq) + & pp * qq * ecoll_100(ir,iq) y3 = ( 1.0-pp ) * ( 1.0_wp - qq ) * ecoll_400(ir-1,iq-1) + & pp * ( 1.0_wp - qq ) * ecoll_400(ir,iq-1) + & qq * ( 1.0_wp - pp ) * ecoll_400(ir-1,iq) + & pp * qq * ecoll_400(ir,iq) ELSE qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) y2 = ( 1.0_wp - qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq) y3 = ( 1.0_wp - qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq) ENDIF ELSE qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) ) y2 = ( 1.0_wp - qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq) y3 = ( 1.0_wp - qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq) ENDIF ! !-- Linear interpolation of dissipation rate in m**2/s**3 IF ( epsilon <= 0.01_wp ) THEN ecf(j,i) = ( epsilon - 0.01_wp ) / ( 0.0_wp - 0.01_wp ) * y1 & + ( epsilon - 0.0_wp ) / ( 0.01_wp - 0.0_wp ) * y2 ELSEIF ( epsilon <= 0.06_wp ) THEN ecf(j,i) = ( epsilon - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & + ( epsilon - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 ELSE ecf(j,i) = ( 0.06_wp - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 & + ( 0.06_wp - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3 ENDIF IF ( ecf(j,i) < 1.0_wp ) ecf(j,i) = 1.0_wp ecf(i,j) = ecf(j,i) ENDDO ENDDO END SUBROUTINE turb_enhance_eff SUBROUTINE collision_efficiency_rogers( mean_r, r, e) !------------------------------------------------------------------------------! ! Collision efficiencies from table 8.2 in Rogers and Yau (1989, 3rd edition). ! Values are calculated from table by bilinear interpolation. !------------------------------------------------------------------------------! IMPLICIT NONE INTEGER(iwp) :: i !: INTEGER(iwp) :: j !: INTEGER(iwp) :: k !: LOGICAL, SAVE :: first = .TRUE. !: REAL(wp) :: aa !: REAL(wp) :: bb !: REAL(wp) :: cc !: REAL(wp) :: dd !: REAL(wp) :: dx !: REAL(wp) :: dy !: REAL(wp) :: e !: REAL(wp) :: gg !: REAL(wp) :: mean_r !: REAL(wp) :: mean_rm !: REAL(wp) :: r !: REAL(wp) :: rm !: REAL(wp) :: x !: REAL(wp) :: y !: REAL(wp), DIMENSION(1:9), SAVE :: collected_r = 0.0_wp !: REAL(wp), DIMENSION(1:19), SAVE :: collector_r = 0.0_wp !: REAL(wp), DIMENSION(1:9,1:19), SAVE :: ef = 0.0_wp !: mean_rm = mean_r * 1.0E06_wp rm = r * 1.0E06_wp IF ( first ) THEN collected_r = (/ 2.0_wp, 3.0_wp, 4.0_wp, 6.0_wp, 8.0_wp, & 10.0_wp, 15.0_wp, 20.0_wp, 25.0_wp /) collector_r = (/ 10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, & 60.0_wp, 80.0_wp, 100.0_wp, 150.0_wp, 200.0_wp, & 300.0_wp, 400.0_wp, 500.0_wp, 600.0_wp, 1000.0_wp, & 1400.0_wp, 1800.0_wp, 2400.0_wp, 3000.0_wp /) ef(:,1) = (/ 0.017_wp, 0.027_wp, 0.037_wp, 0.052_wp, 0.052_wp, & 0.052_wp, 0.052_wp, 0.0_wp, 0.0_wp /) ef(:,2) = (/ 0.001_wp, 0.016_wp, 0.027_wp, 0.060_wp, 0.12_wp, & 0.17_wp, 0.17_wp, 0.17_wp, 0.0_wp /) ef(:,3) = (/ 0.001_wp, 0.001_wp, 0.02_wp, 0.13_wp, 0.28_wp, & 0.37_wp, 0.54_wp, 0.55_wp, 0.47_wp/) ef(:,4) = (/ 0.001_wp, 0.001_wp, 0.02_wp, 0.23_wp, 0.4_wp, & 0.55_wp, 0.7_wp, 0.75_wp, 0.75_wp/) ef(:,5) = (/ 0.01_wp, 0.01_wp, 0.03_wp, 0.3_wp, 0.4_wp, & 0.58_wp, 0.73_wp, 0.75_wp, 0.79_wp/) ef(:,6) = (/ 0.01_wp, 0.01_wp, 0.13_wp, 0.38_wp, 0.57_wp, & 0.68_wp, 0.80_wp, 0.86_wp, 0.91_wp/) ef(:,7) = (/ 0.01_wp, 0.085_wp, 0.23_wp, 0.52_wp, 0.68_wp, & 0.76_wp, 0.86_wp, 0.92_wp, 0.95_wp/) ef(:,8) = (/ 0.01_wp, 0.14_wp, 0.32_wp, 0.60_wp, 0.73_wp, & 0.81_wp, 0.90_wp, 0.94_wp, 0.96_wp/) ef(:,9) = (/ 0.025_wp, 0.25_wp, 0.43_wp, 0.66_wp, 0.78_wp, & 0.83_wp, 0.92_wp, 0.95_wp, 0.96_wp/) ef(:,10) = (/ 0.039_wp, 0.3_wp, 0.46_wp, 0.69_wp, 0.81_wp, & 0.87_wp, 0.93_wp, 0.95_wp, 0.96_wp/) ef(:,11) = (/ 0.095_wp, 0.33_wp, 0.51_wp, 0.72_wp, 0.82_wp, & 0.87_wp, 0.93_wp, 0.96_wp, 0.97_wp/) ef(:,12) = (/ 0.098_wp, 0.36_wp, 0.51_wp, 0.73_wp, 0.83_wp, & 0.88_wp, 0.93_wp, 0.96_wp, 0.97_wp/) ef(:,13) = (/ 0.1_wp, 0.36_wp, 0.52_wp, 0.74_wp, 0.83_wp, & 0.88_wp, 0.93_wp, 0.96_wp, 0.97_wp/) ef(:,14) = (/ 0.17_wp, 0.4_wp, 0.54_wp, 0.72_wp, 0.83_wp, & 0.88_wp, 0.94_wp, 0.98_wp, 1.0_wp /) ef(:,15) = (/ 0.15_wp, 0.37_wp, 0.52_wp, 0.74_wp, 0.82_wp, & 0.88_wp, 0.94_wp, 0.98_wp, 1.0_wp /) ef(:,16) = (/ 0.11_wp, 0.34_wp, 0.49_wp, 0.71_wp, 0.83_wp, & 0.88_wp, 0.94_wp, 0.95_wp, 1.0_wp /) ef(:,17) = (/ 0.08_wp, 0.29_wp, 0.45_wp, 0.68_wp, 0.8_wp, & 0.86_wp, 0.96_wp, 0.94_wp, 1.0_wp /) ef(:,18) = (/ 0.04_wp, 0.22_wp, 0.39_wp, 0.62_wp, 0.75_wp, & 0.83_wp, 0.92_wp, 0.96_wp, 1.0_wp /) ef(:,19) = (/ 0.02_wp, 0.16_wp, 0.33_wp, 0.55_wp, 0.71_wp, & 0.81_wp, 0.90_wp, 0.94_wp, 1.0_wp /) ENDIF DO k = 1, 8 IF ( collected_r(k) <= mean_rm ) i = k ENDDO DO k = 1, 18 IF ( collector_r(k) <= rm ) j = k ENDDO IF ( rm < 10.0_wp ) THEN e = 0.0_wp ELSEIF ( mean_rm < 2.0_wp ) THEN e = 0.001_wp ELSEIF ( mean_rm >= 25.0_wp ) THEN IF( j <= 2 ) e = 0.0_wp IF( j == 3 ) e = 0.47_wp IF( j == 4 ) e = 0.8_wp IF( j == 5 ) e = 0.9_wp IF( j >=6 ) e = 1.0_wp ELSEIF ( rm >= 3000.0_wp ) THEN IF( i == 1 ) e = 0.02_wp IF( i == 2 ) e = 0.16_wp IF( i == 3 ) e = 0.33_wp IF( i == 4 ) e = 0.55_wp IF( i == 5 ) e = 0.71_wp IF( i == 6 ) e = 0.81_wp IF( i == 7 ) e = 0.90_wp IF( i >= 8 ) e = 0.94_wp ELSE x = mean_rm - collected_r(i) y = rm - collector_r(j) dx = collected_r(i+1) - collected_r(i) dy = collector_r(j+1) - collector_r(j) aa = x**2 + y**2 bb = ( dx - x )**2 + y**2 cc = x**2 + ( dy - y )**2 dd = ( dx - x )**2 + ( dy - y )**2 gg = aa + bb + cc + dd e = ( (gg-aa)*ef(i,j) + (gg-bb)*ef(i+1,j) + (gg-cc)*ef(i,j+1) + & (gg-dd)*ef(i+1,j+1) ) / (3.0_wp * gg) ENDIF END SUBROUTINE collision_efficiency_rogers END MODULE lpm_collision_kernels_mod