Skip to content

Develop surface reaction #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ add_test(test_rxn_first_order_loss ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/te
add_test(test_rxn_HL_phase_transfer ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_HL_phase_transfer.sh ${MPI_TEST_FLAG})
add_test(test_rxn_photolysis ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_photolysis.sh ${MPI_TEST_FLAG})
add_test(test_rxn_SIMPOL_phase_transfer ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_SIMPOL_phase_transfer.sh ${MPI_TEST_FLAG})
add_test(test_rxn_surface ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_surface.sh ${MPI_TEST_FLAG})
add_test(test_rxn_ternary_chemical_activation ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_ternary_chemical_activation.sh ${MPI_TEST_FLAG})
add_test(test_rxn_troe ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_troe.sh ${MPI_TEST_FLAG})
add_test(test_rxn_wennberg_no_ro2 ${CMAKE_BINARY_DIR}/test_run/unit_rxn_data/test_wennberg_no_ro2.sh ${MPI_TEST_FLAG})
Expand Down Expand Up @@ -258,6 +259,7 @@ set(REACTIONS_F_SRC
src/rxns/rxn_HL_phase_transfer.F90
src/rxns/rxn_photolysis.F90
src/rxns/rxn_SIMPOL_phase_transfer.F90
src/rxns/rxn_surface.F90
src/rxns/rxn_ternary_chemical_activation.F90
src/rxns/rxn_troe.F90
src/rxns/rxn_wennberg_no_ro2.F90
Expand All @@ -275,6 +277,7 @@ set(REACTIONS_C_SRC
src/rxns/rxn_HL_phase_transfer.c
src/rxns/rxn_photolysis.c
src/rxns/rxn_SIMPOL_phase_transfer.c
src/rxns/rxn_surface.c
src/rxns/rxn_ternary_chemical_activation.c
src/rxns/rxn_troe.c
src/rxns/rxn_wennberg_no_ro2.c
Expand Down Expand Up @@ -535,6 +538,8 @@ add_executable(test_rxn_photolysis test/unit_rxn_data/test_rxn_photolysis.F90)
target_link_libraries(test_rxn_photolysis camplib)
add_executable(test_rxn_SIMPOL_phase_transfer test/unit_rxn_data/test_rxn_SIMPOL_phase_transfer.F90)
target_link_libraries(test_rxn_SIMPOL_phase_transfer camplib)
add_executable(test_rxn_surface test/unit_rxn_data/test_rxn_surface.F90)
target_link_libraries(test_rxn_surface camplib)
add_executable(test_rxn_ternary_chemical_activation test/unit_rxn_data/test_rxn_ternary_chemical_activation.F90)
target_link_libraries(test_rxn_ternary_chemical_activation camplib)
add_executable(test_rxn_troe test/unit_rxn_data/test_rxn_troe.F90)
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN dnf -y update \
lapack-devel \
openblas-devel \
cmake \
valgrind \
&& dnf clean all

# Build the SuiteSparse libraries for sparse matrix support
Expand Down Expand Up @@ -37,8 +38,9 @@ RUN tar -zxvf /camp/cvode-3.4-alpha.tar.gz \
&& cd cvode-3.4-alpha \
&& mkdir build \
&& cd build \
&& cmake -D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS_DEBUG="-g -pg" \
&& cmake -D CMAKE_BUILD_TYPE=debug \
-D CMAKE_C_FLAGS_DEBUG="-pg -Og" \
-D CMAKE_FORTRAN_FLAGS_DEBUG="-pg -Og -fbacktrace" \
-D CMAKE_EXE_LINKER_FLAGS_DEBUG="-pg" \
-D CMAKE_MODULE_LINKER_FLAGS_DEBUG="-pg" \
-D CMAKE_SHARED_LINKER_FLAGS_DEBUG="-pg" \
Expand All @@ -56,9 +58,9 @@ ENV PATH="${PATH}:/usr/local/jsonfortran-gnu-6.1.0/lib"
RUN mkdir build \
&& cd build \
&& export JSON_FORTRAN_HOME="/usr/local/jsonfortran-gnu-6.1.0" \
&& cmake -D CMAKE_BUILD_TYPE=release \
-D CMAKE_C_FLAGS_DEBUG="-pg" \
-D CMAKE_Fortran_FLAGS_DEBUG="-pg" \
&& cmake -D CMAKE_BUILD_TYPE=debug \
-D CMAKE_C_FLAGS="-pg -Og" \
-D CMAKE_Fortran_FLAGS="-pg -Og -fbacktrace" \
-D CMAKE_MODULE_LINKER_FLAGS="-pg" \
-D ENABLE_GSL:BOOL=TRUE \
-D ENABLE_DEBUG:BOOL=TRUE \
Expand Down
14 changes: 14 additions & 0 deletions doc/references.bib
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
@article{Tie2003,
author = {Tie, Xuexi and Emmons, Louisa and Horowitz, Larry and Brasseur, Guy and Ridley, Brian and Atlas, Elliot and Stround, Craig and Hess, Peter and Klonecki, Andrzej and Madronich, Sasha and Talbot, Robert and Dibb, Jack},
title = {Effect of sulfate aerosol on tropospheric NOx and ozone budgets: Model simulations and TOPSE evidence},
journal = {Journal of Geophysical Research: Atmospheres},
volume = {108},
number = {D4},
pages = {},
keywords = {tropospheric aerosol, NOx, ozone},
doi = {https://doi.org/10.1029/2001JD001508},
url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2001JD001508},
eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2001JD001508},
abstract = {The distributions of NOx and O3 are analyzed during TOPSE (Tropospheric Ozone Production about the Spring Equinox). In this study these data are compared with the calculations of a global chemical/transport model (Model for OZone And Related chemical Tracers (MOZART)). Specifically, the effect that hydrolysis of N2O5 on sulfate aerosols has on tropospheric NOx and O3 budgets is studied. The results show that without this heterogeneous reaction, the model significantly overestimates NOx concentrations at high latitudes of the Northern Hemisphere (NH) in winter and spring in comparison to the observations during TOPSE; with this reaction, modeled NOx concentrations are close to the measured values. This comparison provides evidence that the hydrolysis of N2O5 on sulfate aerosol plays an important role in controlling the tropospheric NOx and O3 budgets. The calculated reduction of NOx attributed to this reaction is 80 to 90\% in winter at high latitudes over North America. Because of the reduction of NOx, O3 concentrations are also decreased. The maximum O3 reduction occurs in spring although the maximum NOx reduction occurs in winter when photochemical O3 production is relatively low. The uncertainties related to uptake coefficient and aerosol loading in the model is analyzed. The analysis indicates that the changes in NOx due to these uncertainties are much smaller than the impact of hydrolysis of N2O5 on sulfate aerosol. The effect that hydrolysis of N2O5 on global NOx and O3 budgets are also assessed by the model. The results suggest that in the Northern Hemisphere, the average NOx budget decreases 50\% due to this reaction in winter and 5\% in summer. The average O3 budget is reduced by 8\% in winter and 6\% in summer. In the Southern Hemisphere (SH), the sulfate aerosol loading is significantly smaller than in the Northern Hemisphere. As a result, sulfate aerosol has little impact on NOx and O3 budgets of the Southern Hemisphere.},
year = {2003}
}
@article{Wennberg2018,
author = {Wennberg, Paul O. and Bates, Kelvin H. and Crounse, John D. and Dodson, Leah G. and McVay, Renee C. and Mertens, Laura A. and Nguyen, Tran B. and Praske, Eric and Schwantes, Rebecca H. and Smarte, Matthew D. and St Clair, Jason M. and Teng, Alexander P. and Zhang, Xuan and Seinfeld, John H.},
title = {Gas-Phase Reactions of Isoprene and Its Major Oxidation Products},
Expand Down
1 change: 1 addition & 0 deletions src/rxn_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
!! - \subpage camp_rxn_photolysis "photolysis"
!! - \subpage camp_rxn_SIMPOL_phase_transfer "SIMPOL.1 phase transfer"
!! - \subpage camp_rxn_ternary_chemical_activation "ternary chemical activation"
!! - \subpage camp_rxn_surface "surface (heterogeneous)"
!! - \subpage camp_rxn_troe "Troe (fall-off)"
!! - \subpage camp_rxn_wennberg_no_ro2 "Wennberg NO + RO2"
!! - \subpage camp_rxn_wennberg_tunneling "Wennberg tunneling"
Expand Down
12 changes: 11 additions & 1 deletion src/rxn_factory.F90
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ module camp_rxn_factory
use camp_rxn_HL_phase_transfer
use camp_rxn_photolysis
use camp_rxn_SIMPOL_phase_transfer
use camp_rxn_surface
use camp_rxn_ternary_chemical_activation
use camp_rxn_troe
use camp_rxn_wennberg_no_ro2
Expand Down Expand Up @@ -222,6 +223,7 @@ module camp_rxn_factory
integer(kind=i_kind), parameter, public :: RXN_TERNARY_CHEMICAL_ACTIVATION = 15
integer(kind=i_kind), parameter, public :: RXN_WENNBERG_TUNNELING = 16
integer(kind=i_kind), parameter, public :: RXN_WENNBERG_NO_RO2 = 17
integer(kind=i_kind), parameter, public :: RXN_SURFACE = 19

!> Factory type for chemical reactions
!!
Expand Down Expand Up @@ -293,6 +295,8 @@ function create(this, type_name) result (new_obj)
new_obj => rxn_wennberg_tunneling_t()
case ("WENNBERG_NO_RO2")
new_obj => rxn_wennberg_no_ro2_t()
case ("SURFACE")
new_obj => rxn_surface_t()
case default
call die_msg(367114278, "Unknown chemical reaction type: " &
//type_name)
Expand All @@ -302,7 +306,7 @@ end function create

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!> Load an aerosol represenation from input data
!> Load a reaction from input data
#ifdef CAMP_USE_JSON
function load(this, json, j_obj) result (new_obj)

Expand Down Expand Up @@ -388,6 +392,8 @@ integer(kind=i_kind) function get_type(this, rxn) result (rxn_type)
rxn_type = RXN_WENNBERG_TUNNELING
type is (rxn_wennberg_no_ro2_t)
rxn_type = RXN_WENNBERG_NO_RO2
type is (rxn_surface_t)
rxn_type = RXN_SURFACE
class default
call die_msg(343941184, "Unknown reaction type.")
end select
Expand Down Expand Up @@ -509,6 +515,8 @@ subroutine bin_pack(this, rxn, buffer, pos, comm)
rxn_type = RXN_WENNBERG_TUNNELING
type is (rxn_wennberg_no_ro2_t)
rxn_type = RXN_WENNBERG_NO_RO2
type is (rxn_surface_t)
rxn_type = RXN_SURFACE
class default
call die_msg(343941184, "Trying to pack reaction of unknown type.")
end select
Expand Down Expand Up @@ -572,6 +580,8 @@ function bin_unpack(this, buffer, pos, comm) result (rxn)
rxn => rxn_wennberg_tunneling_t()
case (RXN_WENNBERG_NO_RO2)
rxn => rxn_wennberg_no_ro2_t()
case (RXN_SURFACE)
rxn => rxn_surface_t()
case default
call die_msg(659290342, &
"Trying to unpack reaction of unknown type:"// &
Expand Down
26 changes: 26 additions & 0 deletions src/rxn_solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define RXN_TERNARY_CHEMICAL_ACTIVATION 15
#define RXN_WENNBERG_TUNNELING 16
#define RXN_WENNBERG_NO_RO2 17
#define RXN_SURFACE 19

/** \brief Get the Jacobian elements used by a particular reaction
*
Expand Down Expand Up @@ -90,6 +91,10 @@ void rxn_get_used_jac_elem(ModelData *model_data, Jacobian *jac) {
rxn_SIMPOL_phase_transfer_get_used_jac_elem(model_data, rxn_int_data,
rxn_float_data, jac);
break;
case RXN_SURFACE:
rxn_surface_get_used_jac_elem(model_data, rxn_int_data,
rxn_float_data, jac);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_get_used_jac_elem(rxn_int_data,
rxn_float_data, jac);
Expand Down Expand Up @@ -175,6 +180,10 @@ void rxn_update_ids(ModelData *model_data, int *deriv_ids, Jacobian jac) {
rxn_SIMPOL_phase_transfer_update_ids(model_data, deriv_ids, jac,
rxn_int_data, rxn_float_data);
break;
case RXN_SURFACE:
rxn_surface_update_ids(model_data, deriv_ids, jac,
rxn_int_data, rxn_float_data);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_update_ids(
model_data, deriv_ids, jac, rxn_int_data, rxn_float_data);
Expand Down Expand Up @@ -262,6 +271,10 @@ void rxn_update_env_state(ModelData *model_data) {
rxn_SIMPOL_phase_transfer_update_env_state(
model_data, rxn_int_data, rxn_float_data, rxn_env_data);
break;
case RXN_SURFACE:
rxn_surface_update_env_state(
model_data, rxn_int_data, rxn_float_data, rxn_env_data);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_update_env_state(
model_data, rxn_int_data, rxn_float_data, rxn_env_data);
Expand Down Expand Up @@ -363,6 +376,11 @@ void rxn_calc_deriv(ModelData *model_data, TimeDerivative time_deriv,
model_data, time_deriv, rxn_int_data, rxn_float_data, rxn_env_data,
time_step);
break;
case RXN_SURFACE:
rxn_surface_calc_deriv_contrib(
model_data, time_deriv, rxn_int_data, rxn_float_data, rxn_env_data,
time_step);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_calc_deriv_contrib(
model_data, time_deriv, rxn_int_data, rxn_float_data, rxn_env_data,
Expand Down Expand Up @@ -509,6 +527,11 @@ void rxn_calc_jac(ModelData *model_data, Jacobian jac, realtype time_step) {
rxn_int_data, rxn_float_data,
rxn_env_data, time_step);
break;
case RXN_SURFACE:
rxn_surface_calc_jac_contrib(model_data, jac,
rxn_int_data, rxn_float_data,
rxn_env_data, time_step);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_calc_jac_contrib(
model_data, jac, rxn_int_data, rxn_float_data, rxn_env_data,
Expand Down Expand Up @@ -763,6 +786,9 @@ void rxn_print_data(void *solver_data) {
case RXN_SIMPOL_PHASE_TRANSFER:
rxn_SIMPOL_phase_transfer_print(rxn_int_data, rxn_float_data);
break;
case RXN_SURFACE:
rxn_surface_print(rxn_int_data, rxn_float_data);
break;
case RXN_TERNARY_CHEMICAL_ACTIVATION:
rxn_ternary_chemical_activation_print(rxn_int_data, rxn_float_data);
break;
Expand Down
24 changes: 24 additions & 0 deletions src/rxns.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,30 @@ void rxn_SIMPOL_phase_transfer_calc_jac_contrib(ModelData *model_data,
realtype time_step);
#endif

// surface
void rxn_surface_get_used_jac_elem(ModelData *model_data,
int *rxn_int_data,
double *rxn_float_data,
Jacobian *jac);
void rxn_surface_update_ids(ModelData *model_data, int *deriv_ids,
Jacobian jac, int *rxn_int_data,
double *rxn_float_data);
void rxn_surface_update_env_state(ModelData *model_data,
int *rxn_int_data,
double *rxn_float_data,
double *rxn_env_data);
void rxn_surface_print(int *rxn_int_data, double *rxn_float_data);
#ifdef CAMP_USE_SUNDIALS
void rxn_surface_calc_deriv_contrib(
ModelData *model_data, TimeDerivative time_deriv, int *rxn_int_data,
double *rxn_float_data, double *rxn_env_data, realtype time_step);
void rxn_surface_calc_jac_contrib(ModelData *model_data,
Jacobian jac, int *rxn_int_data,
double *rxn_float_data,
double *rxn_env_data,
realtype time_step);
#endif

// ternary_chemical_activation
void rxn_ternary_chemical_activation_get_used_jac_elem(int *rxn_int_data,
double *rxn_float_data,
Expand Down
14 changes: 7 additions & 7 deletions src/rxns/rxn_HL_phase_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#define AERO_REP_ID_(x) (int_data[PHASE_INT_LOC_(x) + 3] - 1)
#define NUM_AERO_PHASE_JAC_ELEM_(x) (int_data[PHASE_INT_LOC_(x) + 4])
#define PHASE_JAC_ID_(x, s, e) \
int_data[PHASE_INT_LOC_(x) + 5 + s * NUM_AERO_PHASE_JAC_ELEM_(x) + e]
int_data[PHASE_INT_LOC_(x) + 5 + (s) * NUM_AERO_PHASE_JAC_ELEM_(x) + e]
#define SMALL_WATER_CONC_(x) (float_data[PHASE_REAL_LOC_(x)])
#define EFF_RAD_JAC_ELEM_(x, e) float_data[PHASE_REAL_LOC_(x) + 1 + e]
#define NUM_CONC_JAC_ELEM_(x, e) \
Expand Down Expand Up @@ -230,7 +230,7 @@ void rxn_HL_phase_transfer_update_env_state(ModelData *model_data,
#endif

// save the mean free path [m] for calculating condensation rates
MFP_M_ = mean_free_path__m(DIFF_COEFF_, TEMPERATURE_K_, ALPHA_);
MFP_M_ = mean_free_path__m(DIFF_COEFF_, TEMPERATURE_K_, MW_);

// Calculate the Henry's Law equilibrium rate constant in units of
// (kg_x/kg_H2O/ppm) where x is the aerosol-phase species. (A is in
Expand Down Expand Up @@ -311,7 +311,7 @@ void rxn_HL_phase_transfer_calc_deriv_contrib(
// Calculate the rate constant for diffusion limited mass transfer to the
// aerosol phase (1/s)
long double cond_rate =
gas_aerosol_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);
gas_aerosol_transition_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);

// Calculate the evaporation rate constant (1/s)
long double evap_rate = cond_rate / (EQUIL_CONST_);
Expand Down Expand Up @@ -404,7 +404,7 @@ void rxn_HL_phase_transfer_calc_jac_contrib(ModelData *model_data, Jacobian jac,
// Calculate the rate constant for diffusion limited mass transfer to the
// aerosol phase (1/s)
long double cond_rate =
gas_aerosol_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);
gas_aerosol_transition_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);

// Calculate the evaporation rate constant (1/s)
long double evap_rate = cond_rate / (EQUIL_CONST_);
Expand Down Expand Up @@ -451,9 +451,9 @@ void rxn_HL_phase_transfer_calc_jac_contrib(ModelData *model_data, Jacobian jac,
-rate * cond_rate *
(2.0 * radius / (3.0 * DIFF_COEFF_) + 4.0 / (3.0 * MFP_M_));
#endif
long double d_cond_d_radius = d_gas_aerosol_rxn_rate_constant_d_radius(
DIFF_COEFF_, MFP_M_, radius, ALPHA_) *
state[GAS_SPEC_];
long double d_cond_d_radius =
d_gas_aerosol_transition_rxn_rate_constant_d_radius(
DIFF_COEFF_, MFP_M_, radius, ALPHA_) * state[GAS_SPEC_];
long double d_evap_d_radius = d_cond_d_radius / state[GAS_SPEC_] /
(EQUIL_CONST_)*state[AERO_SPEC_(i_phase)] /
state[AERO_WATER_(i_phase)];
Expand Down
10 changes: 5 additions & 5 deletions src/rxns/rxn_SIMPOL_phase_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
(int_data[NUM_INT_PROP_ + 2 + 11 * (NUM_AERO_PHASE_) + x] - 1)
#define NUM_AERO_PHASE_JAC_ELEM_(x) (int_data[PHASE_INT_LOC_(x)])
#define PHASE_JAC_ID_(x, s, e) \
int_data[PHASE_INT_LOC_(x) + 1 + s * NUM_AERO_PHASE_JAC_ELEM_(x) + e]
int_data[PHASE_INT_LOC_(x) + 1 + (s) * NUM_AERO_PHASE_JAC_ELEM_(x) + e]
#define EFF_RAD_JAC_ELEM_(x, e) float_data[PHASE_FLOAT_LOC_(x) + e]
#define NUM_CONC_JAC_ELEM_(x, e) \
float_data[PHASE_FLOAT_LOC_(x) + NUM_AERO_PHASE_JAC_ELEM_(x) + e]
Expand Down Expand Up @@ -241,7 +241,7 @@ void rxn_SIMPOL_phase_transfer_update_env_state(ModelData *model_data,
#endif

/// save the mean free path [m] for calculating condensation rates
MFP_M_ = mean_free_path__m(DIFF_COEFF_, TEMPERATURE_K_, ALPHA_);
MFP_M_ = mean_free_path__m(DIFF_COEFF_, TEMPERATURE_K_, MW_);

// SIMPOL.1 vapor pressure [Pa]
double vp = B1_ / TEMPERATURE_K_ + B2_ + B3_ * TEMPERATURE_K_ +
Expand Down Expand Up @@ -340,7 +340,7 @@ void rxn_SIMPOL_phase_transfer_calc_deriv_contrib(
// Calculate the rate constant for diffusion limited mass transfer to the
// aerosol phase (m3/#/s)
long double cond_rate =
gas_aerosol_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);
gas_aerosol_transition_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);

// Calculate the evaporation rate constant (ppm_x*m^3/kg_x/s)
long double evap_rate =
Expand Down Expand Up @@ -478,7 +478,7 @@ void rxn_SIMPOL_phase_transfer_calc_jac_contrib(ModelData *model_data,
// Calculate the rate constant for diffusion limited mass transfer to the
// aerosol phase (m3/#/s)
long double cond_rate =
gas_aerosol_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);
gas_aerosol_transition_rxn_rate_constant(DIFF_COEFF_, MFP_M_, radius, ALPHA_);

// Calculate the evaporation rate constant (ppm_x*m^3/kg_x/s)
long double evap_rate =
Expand Down Expand Up @@ -579,7 +579,7 @@ void rxn_SIMPOL_phase_transfer_calc_jac_contrib(ModelData *model_data,
-(2.0 * radius / (3.0 * DIFF_COEFF_) + 4.0 / (3.0 * MFP_M_)) *
cond_rate * cond_rate / state[GAS_SPEC_];
#endif
realtype d_cond_d_radius = d_gas_aerosol_rxn_rate_constant_d_radius(
realtype d_cond_d_radius = d_gas_aerosol_transition_rxn_rate_constant_d_radius(
DIFF_COEFF_, MFP_M_, radius, ALPHA_) *
state[GAS_SPEC_];
realtype d_evap_d_radius = d_cond_d_radius / state[GAS_SPEC_] *
Expand Down
Loading