28 subroutine exact_soln(bin_grid, aero_data, do_coagulation, &
29 coag_kernel_type, do_loss, loss_function_type, aero_dist_init, &
30 scenario, env_state, time, aero_binned)
37 logical,
intent(in) :: do_coagulation
39 integer,
intent(in) :: coag_kernel_type
41 logical,
intent(in) :: do_loss
43 integer,
intent(in) :: loss_function_type
51 real(kind=dp),
intent(in) :: time
55 if (.not. do_coagulation)
then
56 call
die_msg(287486666,
'Exact solutions require coagulation ' &
57 //
'(can set coag_kernel to "zero").')
60 if (coag_kernel_type /= coag_kernel_type_zero .and. do_loss)
then
61 call
die_msg(189372109,
'Exact solution with particle loss ' &
62 //
'requires using the "zero" coag_kernel.')
65 if (coag_kernel_type == coag_kernel_type_additive)
then
67 if (aero_dist_init%n_mode /= 1)
then
68 call
die_msg(285407619,
"Exact solution with additive kernel " &
69 //
"requires exactly 1 initial distribution mode, not: " &
72 if (aero_dist_init%mode(1)%type /= aero_mode_type_exp)
then
73 call
die_msg(373749499,
"Exact solution with additive kernel " &
74 //
"requires exactly 1 initial distribution mode of " &
75 //
"exponential type, not: " &
79 aero_dist_init%mode(1)%num_conc, &
80 aero_dist_init%mode(1)%char_radius, env_state, aero_binned)
81 elseif (coag_kernel_type == coag_kernel_type_constant)
then
83 if (aero_dist_init%n_mode /= 1)
then
84 call
die_msg(827813758,
"Exact solution with constant kernel " &
85 //
"requires exactly 1 initial distribution mode, not: " &
88 if (aero_dist_init%mode(1)%type /= aero_mode_type_exp)
then
89 call
die_msg(574495367,
"Exact solution with constant kernel " &
90 //
"requires exactly 1 initial distribution mode of " &
91 //
"exponential type, not: " &
95 aero_dist_init%mode(1)%num_conc, &
96 aero_dist_init%mode(1)%char_radius, env_state, aero_binned)
97 elseif (coag_kernel_type == coag_kernel_type_zero)
then
100 call
soln_zero(bin_grid, aero_data, time, aero_dist_init, &
101 scenario, env_state, loss_function_type, aero_binned)
103 call
soln_zero(bin_grid, aero_data, time, aero_dist_init, &
104 scenario, env_state, scenario_loss_function_invalid, aero_binned)
107 call
die_msg(932981721,
"No exact solutions with " &
108 //
"coagulation kernel type " &
The scenario_t structure and associated subroutines.
The aero_data_t structure and associated subroutines.
subroutine die_msg(code, error_msg)
Error immediately.
Additive coagulation kernel.
Exact solutions for various simulations.
The aero_dist_t structure and associated subroutines.
The env_state_t structure and associated subroutines.
subroutine soln_zero(bin_grid, aero_data, time, aero_dist_init, scenario, env_state, loss_function_type, aero_binned)
Exact solution with the zero coagulation kernel. Only useful for testing emissions and background dil...
subroutine exact_soln(bin_grid, aero_data, do_coagulation, coag_kernel_type, do_loss, loss_function_type, aero_dist_init, scenario, env_state, time, aero_binned)
subroutine soln_constant_exp(bin_grid, aero_data, time, num_conc, radius_at_mean_vol, env_state, aero_binned)
Exact solution with a constant coagulation kernel and an exponential initial condition.
A complete aerosol distribution, consisting of several modes.
Common utility subroutines.
character(len=coag_kernel_type_len) function coag_kernel_type_to_string(coag_kernel_type)
Return a string representation of a kernel type.
character(len=aero_mode_type_len) function aero_mode_type_to_string(type)
Return a string representation of a kernel type.
Current environment state.
Constant coagulation kernel.
character(len=pmc_util_convert_string_len) function integer_to_string(val)
Convert an integer to a string format.
1D grid, either logarithmic or linear.
subroutine soln_additive_exp(bin_grid, aero_data, time, num_conc, radius_at_mean_vol, env_state, aero_binned)
Exact solution with the additive coagulation kernel and exponential initial condition.
The bin_grid_t structure and associated subroutines.
The aero_binned_t structure and associated subroutines.
Constant kernel equal to zero.
Aerosol material properties and associated data.
Generic coagulation kernel.
Aerosol number and volume distributions stored per bin.