PartMC 2.1.3
Functions/Subroutines
pmc_coagulation Module Reference

Aerosol particle coagulation. More...

Functions/Subroutines

subroutine mc_coag (coag_kernel_type, bin_grid, env_state, aero_data, aero_weight, aero_state, del_t, k_max, tot_n_samp, tot_n_coag)
 Do coagulation for time del_t.
subroutine compute_n_samp (ni, nj, same_bin, k_max, comp_vol, del_t, n_samp, accept_factor)
 Compute the number of samples required for the pair of bins.
subroutine maybe_coag_pair (bin_grid, env_state, aero_data, aero_weight, aero_state, b1, b2, coag_kernel_type, accept_factor, did_coag)
 Choose a random pair for potential coagulation and test its probability of coagulation. If it happens, do the coagulation and update all structures.
subroutine find_rand_pair (aero_state, b1, b2, s1, s2)
 Given bins b1 and b2, find a random pair of particles (b1, s1) and (b2, s2) that are not the same particle particle as each other.
subroutine coagulate_weighting (particle_1, particle_2, particle_new, aero_data, aero_weight, remove_1, remove_2, create_new, id_1_lost, id_2_lost, aero_info_1, aero_info_2)
 Actually coagulate particle_1 and particle_2 to form particle_new and compute weighting effects, including which particles should be lost and which gained.
subroutine coagulate (bin_grid, aero_data, aero_weight, aero_state, b1, s1, b2, s2)
 Join together particles (b1, s1) and (b2, s2), updating all particle and bin structures to reflect the change.

Detailed Description

Aerosol particle coagulation.


Function/Subroutine Documentation

subroutine pmc_coagulation::coagulate ( type(bin_grid_t),intent(in)  bin_grid,
type(aero_data_t),intent(in)  aero_data,
type(aero_weight_t),intent(in)  aero_weight,
type(aero_state_t),intent(inout)  aero_state,
integer,intent(in)  b1,
integer,intent(in)  s1,
integer,intent(in)  b2,
integer,intent(in)  s2 
)

Join together particles (b1, s1) and (b2, s2), updating all particle and bin structures to reflect the change.

Parameters:
bin_gridBin grid.
aero_dataAerosol data.
aero_weightAerosol weight.
aero_stateAerosol state.
b1First particle (bin number).
s1First particle (number in bin).
b2Second particle (bin number).
s2Second particle (number in bin).

Definition at line 362 of file coagulation.F90.

subroutine pmc_coagulation::coagulate_weighting ( type(aero_particle_t),intent(in)  particle_1,
type(aero_particle_t),intent(in)  particle_2,
type(aero_particle_t),intent(inout)  particle_new,
type(aero_data_t),intent(in)  aero_data,
type(aero_weight_t),intent(in)  aero_weight,
logical,intent(out)  remove_1,
logical,intent(out)  remove_2,
logical,intent(out)  create_new,
logical,intent(out)  id_1_lost,
logical,intent(out)  id_2_lost,
type(aero_info_t),intent(inout)  aero_info_1,
type(aero_info_t),intent(inout)  aero_info_2 
)

Actually coagulate particle_1 and particle_2 to form particle_new and compute weighting effects, including which particles should be lost and which gained.

Parameters:
particle_1First coagulating aerosol particle.
particle_2Second coagulating aerosol particle.
particle_newCombined aerosol particle resulting from coagulation of particle_1 and particle_2.
aero_dataAerosol data.
aero_weightAerosol weight.
remove_1Whether to remove particle_1.
remove_2Whether to remove particle_2.
create_newWhether to create particle_new.
id_1_lostWhether the ID of particle_1 will be lost due to coagulation.
id_2_lostWhether the ID of particle_2 will be lost due to coagulation.
aero_info_1The removal information associated with particle_1.
aero_info_2The removal information associated with particle_2.

Definition at line 240 of file coagulation.F90.

subroutine pmc_coagulation::compute_n_samp ( integer,intent(in)  ni,
integer,intent(in)  nj,
logical,intent(in)  same_bin,
real(kind=dp),intent(in)  k_max,
real(kind=dp),intent(in)  comp_vol,
real(kind=dp),intent(in)  del_t,
integer,intent(out)  n_samp,
real(kind=dp),intent(out)  accept_factor 
)

Compute the number of samples required for the pair of bins.

Parameters:
niNumber particles in first bin.
njNumber particles in second bin.
same_binWhether first bin is second bin.
k_maxMaximum kernel value (s^{-1}).
comp_volComputational volume (m^3).
del_tTimestep (s).
n_sampNumber of samples per timestep.
accept_factorScale factor for accept probability (1).

Definition at line 84 of file coagulation.F90.

subroutine pmc_coagulation::find_rand_pair ( type(aero_state_t),intent(in)  aero_state,
integer,intent(in)  b1,
integer,intent(in)  b2,
integer,intent(out)  s1,
integer,intent(out)  s2 
)

Given bins b1 and b2, find a random pair of particles (b1, s1) and (b2, s2) that are not the same particle particle as each other.

Parameters:
aero_stateAerosol state.
b1Bin number of first particle.
b2Bin number of second particle.
s1First rand particle.
s2Second rand particle.

Definition at line 203 of file coagulation.F90.

subroutine pmc_coagulation::maybe_coag_pair ( type(bin_grid_t),intent(in)  bin_grid,
type(env_state_t),intent(in)  env_state,
type(aero_data_t),intent(in)  aero_data,
type(aero_weight_t),intent(in)  aero_weight,
type(aero_state_t),intent(inout)  aero_state,
integer,intent(in)  b1,
integer,intent(in)  b2,
integer,intent(in)  coag_kernel_type,
real(kind=dp),intent(in)  accept_factor,
logical,intent(out)  did_coag 
)

Choose a random pair for potential coagulation and test its probability of coagulation. If it happens, do the coagulation and update all structures.

The probability of a coagulation will be taken as (kernel / k_max).

Parameters:
bin_gridBin grid.
env_stateEnvironment state.
aero_dataAerosol data.
aero_weightAerosol weight.
aero_stateAerosol state.
b1Bin of first particle.
b2Bin of second particle.
coag_kernel_typeCoagulation kernel type.
accept_factorScale factor for accept probability (1).
did_coagWhether a coagulation occured.

Definition at line 149 of file coagulation.F90.

subroutine pmc_coagulation::mc_coag ( integer,intent(in)  coag_kernel_type,
type(bin_grid_t),intent(in)  bin_grid,
type(env_state_t),intent(in)  env_state,
type(aero_data_t),intent(in)  aero_data,
type(aero_weight_t),intent(in)  aero_weight,
type(aero_state_t),intent(inout)  aero_state,
real(kind=dp)  del_t,
real(kind=dp),dimension(bin_grid%n_bin,bin_grid%n_bin),intent(in)  k_max,
integer,intent(out)  tot_n_samp,
integer,intent(out)  tot_n_coag 
)

Do coagulation for time del_t.

Parameters:
coag_kernel_typeCoagulation kernel type.
bin_gridBin grid.
env_stateEnvironment state.
aero_dataAerosol data.
aero_weightAerosol weight.
aero_stateAerosol state.
del_tTimestep for coagulation.
k_maxMaximum kernel.
tot_n_sampTotal number of samples tested.
tot_n_coagNumber of coagulation events.

Definition at line 28 of file coagulation.F90.