PartMC 2.1.3
|
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. |
Aerosol particle coagulation.
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.
bin_grid | Bin grid. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
b1 | First particle (bin number). |
s1 | First particle (number in bin). |
b2 | Second particle (bin number). |
s2 | Second 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.
particle_1 | First coagulating aerosol particle. |
particle_2 | Second coagulating aerosol particle. |
particle_new | Combined aerosol particle resulting from coagulation of particle_1 and particle_2. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
remove_1 | Whether to remove particle_1. |
remove_2 | Whether to remove particle_2. |
create_new | Whether to create particle_new. |
id_1_lost | Whether the ID of particle_1 will be lost due to coagulation. |
id_2_lost | Whether the ID of particle_2 will be lost due to coagulation. |
aero_info_1 | The removal information associated with particle_1. |
aero_info_2 | The 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.
ni | Number particles in first bin. |
nj | Number particles in second bin. |
same_bin | Whether first bin is second bin. |
k_max | Maximum kernel value (s^{-1}). |
comp_vol | Computational volume (m^3). |
del_t | Timestep (s). |
n_samp | Number of samples per timestep. |
accept_factor | Scale 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.
aero_state | Aerosol state. |
b1 | Bin number of first particle. |
b2 | Bin number of second particle. |
s1 | First rand particle. |
s2 | Second 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)
.
bin_grid | Bin grid. |
env_state | Environment state. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
b1 | Bin of first particle. |
b2 | Bin of second particle. |
coag_kernel_type | Coagulation kernel type. |
accept_factor | Scale factor for accept probability (1). |
did_coag | Whether 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.
coag_kernel_type | Coagulation kernel type. |
bin_grid | Bin grid. |
env_state | Environment state. |
aero_data | Aerosol data. |
aero_weight | Aerosol weight. |
aero_state | Aerosol state. |
del_t | Timestep for coagulation. |
k_max | Maximum kernel. |
tot_n_samp | Total number of samples tested. |
tot_n_coag | Number of coagulation events. |
Definition at line 28 of file coagulation.F90.