PartMC  2.6.1
coag_kernel_brown.F90
Go to the documentation of this file.
1 ! Copyright (C) 2005-2011 Nicole Riemer and Matthew West
2 ! Copyright (C) 2007 Richard Easter
3 ! Licensed under the GNU General Public License version 2 or (at your
4 ! option) any later version. See the file COPYING for details.
5 
6 !> \file
7 !> The pmc_coag_kernel_brown module.
8 
9 !> Brownian coagulation kernel.
11 
12  use pmc_env_state
13  use pmc_constants
14  use pmc_util
16  use pmc_aero_data
17 
18 contains
19 
20 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21 
22  !> Compute the Brownian coagulation kernel.
23  !!
24  !! Uses equation (15.33) of M. Z. Jacobson, Fundamentals of Atmospheric
25  !! Modeling Second Edition, Cambridge University Press, 2005.
26  subroutine kernel_brown(aero_particle_1, aero_particle_2, &
27  aero_data, env_state, k)
28 
29  !> First particle.
30  type(aero_particle_t), intent(in) :: aero_particle_1
31  !> Second particle.
32  type(aero_particle_t), intent(in) :: aero_particle_2
33  !> Aerosol data.
34  type(aero_data_t), intent(in) :: aero_data
35  !> Environment state.
36  type(env_state_t), intent(in) :: env_state
37  !> Kernel k(a,b) (m^3/s).
38  real(kind=dp), intent(out) :: k
39 
40  real(kind=dp) :: v1, v2, d1, d2
41 
42  v1 = aero_particle_volume(aero_particle_1)
43  v2 = aero_particle_volume(aero_particle_2)
44  d1 = aero_particle_density(aero_particle_1, aero_data)
45  d2 = aero_particle_density(aero_particle_2, aero_data)
46 
47  call kernel_brown_helper(v1, d1, v2, d2, aero_data, env_state%temp, &
48  env_state%pressure, k)
49 
50  end subroutine kernel_brown
51 
52 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53 
54  !> Compute the minimum and maximum Brownian coagulation kernel.
55  !!
56  !! Finds the minimum and maximum kernel values between particles of
57  !! volumes v1 and v2, by sampling over possible densities.
58  subroutine kernel_brown_minmax(v1, v2, aero_data, env_state, k_min, k_max)
59 
60  !> Volume of first particle (m^3).
61  real(kind=dp), intent(in) :: v1
62  !> Volume of second particle (m^3).
63  real(kind=dp), intent(in) :: v2
64  !> Aerosol data.
65  type(aero_data_t), intent(in) :: aero_data
66  !> Environment state.
67  type(env_state_t), intent(in) :: env_state
68  !> Minimum kernel value (m^3/s).
69  real(kind=dp), intent(out) :: k_min
70  !> Maximum kernel value (m^3/s).
71  real(kind=dp), intent(out) :: k_max
72 
73  !> Number of density sample points.
74  integer, parameter :: n_sample = 3
75 
76  real(kind=dp) :: d1, d2, d_min, d_max, k
77  integer :: i, j
78  logical :: first
79 
80  d_min = minval(aero_data%density)
81  d_max = maxval(aero_data%density)
82 
83  first = .true.
84  do i = 1,n_sample
85  do j = 1,n_sample
86  d1 = interp_linear_disc(d_min, d_max, n_sample, i)
87  d2 = interp_linear_disc(d_min, d_max, n_sample, j)
88  call kernel_brown_helper(v1, d1, v2, d2, aero_data, &
89  env_state%temp, env_state%pressure, k)
90  if (first) then
91  first = .false.
92  k_min = k
93  k_max = k
94  else
95  k_min = min(k_min, k)
96  k_max = max(k_max, k)
97  end if
98  end do
99  end do
100 
101  end subroutine kernel_brown_minmax
102 
103 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
104 
105  !> Helper function that does the actual Brownian kernel computation.
106  !!
107  !! Helper function. Do not call directly. Instead use kernel_brown().
108  !!
109  !! Uses equation (15.33) of M. Z. Jacobson, Fundamentals of Atmospheric
110  !! Modeling Second Edition, Cambridge University Press, 2005.
111  subroutine kernel_brown_helper(vol_i, den_i, vol_j, den_j, aero_data, &
112  temp, pressure, bckernel)
113 
114  !> Volume of first particle (m^3).
115  real(kind=dp), intent(in) :: vol_i
116  !> Density of first particle (kg/m^3).
117  real(kind=dp), intent(in) :: den_i
118  !> Volume of second particle (m^3).
119  real(kind=dp), intent(in) :: vol_j
120  !> Density of second particle (kg/m^3).
121  real(kind=dp), intent(in) :: den_j
122  !> Aerosol data.
123  type(aero_data_t), intent(in) :: aero_data
124  !> Temperature (K).
125  real(kind=dp), intent(in) :: temp
126  !> Pressure (Pa).
127  real(kind=dp), intent(in) :: pressure
128  !> Kernel k(a,b) (m^3/s).
129  real(kind=dp), intent(out) :: bckernel
130 
131  real(kind=dp) :: cunning, deltasq_i, &
132  deltasq_j, diffus_i, diffus_j, diffus_sum, &
133  freepath, gasfreepath, gasspeed, knud, rad_i, rad_j, &
134  rad_sum, rhoair, speedsq_i, speedsq_j, tmp1, tmp2, &
135  viscosd, viscosk, rme_i, rme_j
136 
137  ! rhoair = air density (kg/m^3)
138  ! viscosd = air dynamic viscosity (kg/m/s)
139  ! viscosk = air kinematic viscosity (m^2/s)
140  ! gasspeed = air molecule mean thermal velocity (m/s)
141  ! gasfreepath = air molecule mean free path (m)
142 
143  rhoair = (pressure * const%air_molec_weight) / &
144  (const%univ_gas_const * temp)
145 
146  viscosd = 1.8325d-05 * (416.16d0 / (temp + 120d0)) * &
147  (temp / 296.16d0)**1.5d0
148  viscosk = viscosd / rhoair
149  gasspeed = sqrt((8.0d0 * const%boltzmann * temp * const%avagadro) / &
150  (const%pi * const%air_molec_weight))
151  gasfreepath = 2d0 * viscosk / gasspeed
152 
153  ! coagulation kernel from eqn 15.33 of Jacobson (2005) text
154  !
155  ! diffus_i/j = particle brownian diffusion coefficient (m^2/s)
156  ! speedsq_i/j = square of particle mean thermal velocity (m/s)
157  ! freepath = particle mean free path (m)
158  ! cunning = cunningham slip-flow correction factor
159  ! deltasq_i/j = square of "delta_i" in eqn 15.34
160  !
161  ! bckernel = brownian coagulation kernel (m3/s)
162 
163  rad_i = aero_data_vol2rad(aero_data, vol_i)
164  rme_i = aero_data_vol_to_mobility_rad(aero_data, vol_i, &
165  temp, pressure)
166 
167  knud = gasfreepath/rme_i
168  cunning = 1d0 + knud*(1.249d0 + 0.42d0*exp(-0.87d0/knud))
169  diffus_i = (const%boltzmann * temp * cunning) / &
170  (6.0d0 * const%pi * rme_i * viscosd)
171  speedsq_i = 8d0 * const%boltzmann * temp / (const%pi * den_i * vol_i)
172  freepath = 8d0*diffus_i/(const%pi*sqrt(speedsq_i))
173  tmp1 = (2d0*rme_i + freepath)**3
174  tmp2 = (4d0*rme_i*rme_i + freepath*freepath)**1.5d0
175  deltasq_i = ( (tmp1-tmp2)/(6d0*rme_i*freepath) - 2d0*rme_i )**2
176 
177  rad_j = aero_data_vol2rad(aero_data, vol_j)
178  rme_j = aero_data_vol_to_mobility_rad(aero_data, vol_j, &
179  temp, pressure)
180 
181  knud = gasfreepath/rme_j
182  cunning = 1d0 + knud*(1.249d0 + 0.42d0*exp(-0.87d0/knud))
183  diffus_j = (const%boltzmann * temp * cunning) / &
184  (6.0d0 * const%pi * rme_j * viscosd)
185  speedsq_j = 8d0 * const%boltzmann * temp / (const%pi * den_j * vol_j)
186  freepath = 8d0*diffus_j/(const%pi*sqrt(speedsq_j))
187  tmp1 = (2d0*rme_j + freepath)**3
188  tmp2 = (4d0*rme_j*rme_j + freepath*freepath)**1.5d0
189  deltasq_j = ( (tmp1-tmp2)/(6d0*rme_j*freepath) - 2d0*rme_j )**2
190 
191  rad_sum = rad_i + rad_j
192  diffus_sum = diffus_i + diffus_j
193  tmp1 = rad_sum/(rad_sum + sqrt(deltasq_i + deltasq_j))
194  tmp2 = 4d0*diffus_sum/(rad_sum*sqrt(speedsq_i + speedsq_j))
195  bckernel = 4d0*const%pi*rad_sum*diffus_sum/(tmp1 + tmp2)
196 
197  end subroutine kernel_brown_helper
198 
199 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
200 
201 end module pmc_coag_kernel_brown
pmc_aero_particle::aero_particle_t
Single aerosol particle data structure.
Definition: aero_particle.F90:26
pmc_aero_data::aero_data_vol_to_mobility_rad
real(kind=dp) function aero_data_vol_to_mobility_rad(aero_data, v, temp, pressure)
Convert mass-equivalent volume (m^3) to mobility equivalent radius (m).
Definition: aero_data.F90:174
pmc_aero_particle
The aero_particle_t structure and associated subroutines.
Definition: aero_particle.F90:9
pmc_coag_kernel_brown::kernel_brown_minmax
subroutine kernel_brown_minmax(v1, v2, aero_data, env_state, k_min, k_max)
Compute the minimum and maximum Brownian coagulation kernel.
Definition: coag_kernel_brown.F90:59
pmc_coag_kernel_brown::kernel_brown_helper
subroutine kernel_brown_helper(vol_i, den_i, vol_j, den_j, aero_data, temp, pressure, bckernel)
Helper function that does the actual Brownian kernel computation.
Definition: coag_kernel_brown.F90:113
pmc_constants::dp
integer, parameter dp
Kind of a double precision real number.
Definition: constants.F90:12
pmc_env_state::env_state_t
Current environment state.
Definition: env_state.F90:29
pmc_aero_particle::aero_particle_density
real(kind=dp) function aero_particle_density(aero_particle, aero_data)
Average density of the particle (kg/m^3).
Definition: aero_particle.F90:424
pmc_util::interp_linear_disc
real(kind=dp) function interp_linear_disc(x_1, x_n, n, i)
Linear interpolation over discrete indices.
Definition: util.F90:663
pmc_constants::const
type(const_t), save const
Fixed variable for accessing the constant's values.
Definition: constants.F90:73
pmc_coag_kernel_brown
Brownian coagulation kernel.
Definition: coag_kernel_brown.F90:10
pmc_env_state
The env_state_t structure and associated subroutines.
Definition: env_state.F90:9
pmc_aero_data::aero_data_vol2rad
real(kind=dp) elemental function aero_data_vol2rad(aero_data, v)
Convert mass-equivalent volume (m^3) to geometric radius (m).
Definition: aero_data.F90:92
pmc_aero_data::aero_data_t
Aerosol material properties and associated data.
Definition: aero_data.F90:49
pmc_constants
Physical constants.
Definition: constants.F90:9
pmc_util
Common utility subroutines.
Definition: util.F90:9
pmc_coag_kernel_brown::kernel_brown
subroutine kernel_brown(aero_particle_1, aero_particle_2, aero_data, env_state, k)
Compute the Brownian coagulation kernel.
Definition: coag_kernel_brown.F90:28
pmc_aero_data
The aero_data_t structure and associated subroutines.
Definition: aero_data.F90:9
pmc_aero_particle::aero_particle_volume
elemental real(kind=dp) function aero_particle_volume(aero_particle)
Total volume of the particle (m^3).
Definition: aero_particle.F90:266