PartMC  2.6.1
coag_kernel_brown_cont.F90
Go to the documentation of this file.
1 ! Copyright (C) 2012 Jian Tian
2 ! Copyright (C) 2005-2011 Nicole Riemer and Matthew West
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_cont module.
8 !!
9 !! The coagulation kernel is based on Eq. 6 in
10 !! S. Vemury and S. E. Pratsinis, Self-preserving size distributions
11 !! of agglomerates, Journal of Aerosol Science, Vol. 26, No. 2,
12 !! pp. 175-185, 1995.
13 
14 !> Brownian coagulation kernel in continuum regime based on
15 !> Vemury and Pratsinis [1995].
17 
18  use pmc_env_state
19  use pmc_constants
20  use pmc_util
22  use pmc_aero_data
23 
24 contains
25 
26 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 
28  !> Compute the Brownian coagulation kernel in continuum regime.
29  !!
30  !! Use Eq. 6 of Vemury and Pratsinis [1995].
31  subroutine kernel_brown_cont(aero_particle_1, aero_particle_2, &
32  aero_data, env_state, k)
33 
34  !> First particle.
35  type(aero_particle_t), intent(in) :: aero_particle_1
36  !> Second particle.
37  type(aero_particle_t), intent(in) :: aero_particle_2
38  !> Aerosol data.
39  type(aero_data_t), intent(in) :: aero_data
40  !> Environment state.
41  type(env_state_t), intent(in) :: env_state
42  !> Kernel k(a,b) (m^3/s).
43  real(kind=dp), intent(out) :: k
44 
45  real(kind=dp) :: v1, v2, d1, d2
46 
47  v1 = aero_particle_volume(aero_particle_1)
48  v2 = aero_particle_volume(aero_particle_2)
49  d1 = aero_particle_density(aero_particle_1, aero_data)
50  d2 = aero_particle_density(aero_particle_2, aero_data)
51 
52  call kernel_brown_cont_helper(v1, d1, v2, d2, aero_data, &
53  env_state%temp, k)
54 
55  end subroutine kernel_brown_cont
56 
57 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
58 
59  !> Compute the minimum and maximum Brownian coagulation kernel in continuum
60  !> regime based on Vemury and Pratsinis [1995].
61  !!
62  !! Finds the minimum and maximum kernel values between particles of
63  !! volumes v1 and v2, by sampling over possible densities.
64  subroutine kernel_brown_cont_minmax(v1, v2, aero_data, env_state, &
65  k_min, k_max)
66 
67  !> Volume of first particle (m^3).
68  real(kind=dp), intent(in) :: v1
69  !> Volume of second particle (m^3).
70  real(kind=dp), intent(in) :: v2
71  !> Aerosol data.
72  type(aero_data_t), intent(in) :: aero_data
73  !> Environment state.
74  type(env_state_t), intent(in) :: env_state
75  !> Minimum kernel value (m^3/s).
76  real(kind=dp), intent(out) :: k_min
77  !> Maximum kernel value (m^3/s).
78  real(kind=dp), intent(out) :: k_max
79 
80  !> Number of density sample points.
81  integer, parameter :: n_sample = 3
82 
83  real(kind=dp) :: d1, d2, d_min, d_max, k
84  integer :: i, j
85  logical :: first
86 
87  d_min = minval(aero_data%density)
88  d_max = maxval(aero_data%density)
89 
90  first = .true.
91  do i = 1,n_sample
92  do j = 1,n_sample
93  d1 = interp_linear_disc(d_min, d_max, n_sample, i)
94  d2 = interp_linear_disc(d_min, d_max, n_sample, j)
95  call kernel_brown_cont_helper(v1, d1, v2, d2, aero_data, &
96  env_state%temp, k)
97  if (first) then
98  first = .false.
99  k_min = k
100  k_max = k
101  else
102  k_min = min(k_min, k)
103  k_max = max(k_max, k)
104  end if
105  end do
106  end do
107 
108  end subroutine kernel_brown_cont_minmax
109 
110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
111 
112  !> Helper function that does the actual coagulation kernel computation.
113  !!
114  !! Helper function. Do not call directly. Instead use kernel_brown_cont().
115  !!
116  !! Use Eq. 6 of Vemury and Pratsinis [1995].
117  subroutine kernel_brown_cont_helper(v1, d1, v2, d2, aero_data, &
118  temp, bckernel)
119 
120  !> Volume of first particle (m^3).
121  real(kind=dp), intent(in) :: v1
122  !> Density of first particle (kg/m^3).
123  real(kind=dp), intent(in) :: d1
124  !> Volume of second particle (m^3).
125  real(kind=dp), intent(in) :: v2
126  !> Density of second particle (kg/m^3).
127  real(kind=dp), intent(in) :: d2
128  !> Aerosol data.
129  type(aero_data_t), intent(in) :: aero_data
130  !> Temperature (K).
131  real(kind=dp), intent(in) :: temp
132  !> Kernel k(a,b) (m^3/s).
133  real(kind=dp), intent(out) :: bckernel
134 
135  real(kind=dp) :: n_i, n_j, n_i_inv_df, n_j_inv_df
136 
137  n_i = aero_data_vol_to_num_of_monomers(aero_data, v1)
138  n_j = aero_data_vol_to_num_of_monomers(aero_data, v2)
139  n_i_inv_df = n_i**(1d0 / aero_data%fractal%frac_dim)
140  n_j_inv_df = n_j**(1d0 / aero_data%fractal%frac_dim)
141  bckernel = 2d0 * const%boltzmann * temp / 3d0 / const%air_dyn_visc &
142  * (1d0 / n_i_inv_df + 1d0 / n_j_inv_df) * (n_i_inv_df + n_j_inv_df)
143 
144  end subroutine kernel_brown_cont_helper
145 
146 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
147 
pmc_aero_particle::aero_particle_t
Single aerosol particle data structure.
Definition: aero_particle.F90:26
pmc_aero_data::aero_data_vol_to_num_of_monomers
real(kind=dp) elemental function aero_data_vol_to_num_of_monomers(aero_data, v)
Convert mass-equivalent volume (m^3) to number of monomers in a fractal particle cluster.
Definition: aero_data.F90:155
pmc_aero_particle
The aero_particle_t structure and associated subroutines.
Definition: aero_particle.F90:9
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_cont::kernel_brown_cont_minmax
subroutine kernel_brown_cont_minmax(v1, v2, aero_data, env_state, k_min, k_max)
Compute the minimum and maximum Brownian coagulation kernel in continuum regime based on Vemury and P...
Definition: coag_kernel_brown_cont.F90:66
pmc_env_state
The env_state_t structure and associated subroutines.
Definition: env_state.F90:9
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_cont
Brownian coagulation kernel in continuum regime based on Vemury and Pratsinis [1995].
Definition: coag_kernel_brown_cont.F90:16
pmc_aero_data
The aero_data_t structure and associated subroutines.
Definition: aero_data.F90:9
pmc_coag_kernel_brown_cont::kernel_brown_cont_helper
subroutine kernel_brown_cont_helper(v1, d1, v2, d2, aero_data, temp, bckernel)
Helper function that does the actual coagulation kernel computation.
Definition: coag_kernel_brown_cont.F90:119
pmc_coag_kernel_brown_cont::kernel_brown_cont
subroutine kernel_brown_cont(aero_particle_1, aero_particle_2, aero_data, env_state, k)
Compute the Brownian coagulation kernel in continuum regime.
Definition: coag_kernel_brown_cont.F90:33
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