CAMP 1.0.0
Chemistry Across Multiple Phases
|
Reaction solver functions. More...
Go to the source code of this file.
Macros | |
#define | CAMP_DEBUG_SPEC_ 118 |
#define | RXN_ARRHENIUS 1 |
#define | RXN_TROE 2 |
#define | RXN_CMAQ_H2O2 3 |
#define | RXN_CMAQ_OH_HNO3 4 |
#define | RXN_PHOTOLYSIS 5 |
#define | RXN_HL_PHASE_TRANSFER 6 |
#define | RXN_AQUEOUS_EQUILIBRIUM 7 |
#define | RXN_SIMPOL_PHASE_TRANSFER 10 |
#define | RXN_CONDENSED_PHASE_ARRHENIUS 11 |
#define | RXN_FIRST_ORDER_LOSS 12 |
#define | RXN_EMISSION 13 |
#define | RXN_WET_DEPOSITION 14 |
#define | RXN_TERNARY_CHEMICAL_ACTIVATION 15 |
#define | RXN_WENNBERG_TUNNELING 16 |
#define | RXN_WENNBERG_NO_RO2 17 |
#define | RXN_CONDENSED_PHASE_PHOTOLYSIS 18 |
#define | RXN_SURFACE 19 |
Functions | |
void | rxn_get_used_jac_elem (ModelData *model_data, Jacobian *jac) |
Get the Jacobian elements used by a particular reaction. | |
void | rxn_update_ids (ModelData *model_data, int *deriv_ids, Jacobian jac) |
Update the time derivative and Jacobian array ids. | |
void | rxn_update_env_state (ModelData *model_data) |
Update reaction data for new environmental state. | |
void | rxn_calc_deriv (ModelData *model_data, TimeDerivative time_deriv, realtype time_step) |
Calculate the time derivative \(f(t,y)\). | |
void | rxn_calc_deriv_specific_types (ModelData *model_data, TimeDerivative time_deriv, realtype time_step) |
Calculate the time derivative \(f(t,y)\) for only some specific types. | |
void | rxn_calc_jac (ModelData *model_data, Jacobian jac, realtype time_step) |
Calculate the Jacobian. | |
void | rxn_calc_jac_specific_types (ModelData *model_data, Jacobian jac, realtype time_step) |
Calculate the Jacobian for only some specific types. | |
void | rxn_add_condensed_data (int rxn_type, int n_int_param, int n_float_param, int n_env_param, int *int_param, double *float_param, void *solver_data) |
Add condensed data to the condensed data block of memory. | |
void | rxn_update_data (int cell_id, int *rxn_id, int update_rxn_type, void *update_data, void *solver_data) |
Update reaction data. | |
void | rxn_print_data (void *solver_data) |
Print the reaction data. | |
void | rxn_free_update_data (void *update_data) |
Free an update data object. | |
Reaction solver functions.
Definition in file rxn_solver.c.
#define CAMP_DEBUG_SPEC_ 118 |
Definition at line 11 of file rxn_solver.c.
#define RXN_AQUEOUS_EQUILIBRIUM 7 |
Definition at line 25 of file rxn_solver.c.
#define RXN_ARRHENIUS 1 |
Definition at line 19 of file rxn_solver.c.
#define RXN_CMAQ_H2O2 3 |
Definition at line 21 of file rxn_solver.c.
#define RXN_CMAQ_OH_HNO3 4 |
Definition at line 22 of file rxn_solver.c.
#define RXN_CONDENSED_PHASE_ARRHENIUS 11 |
Definition at line 27 of file rxn_solver.c.
#define RXN_CONDENSED_PHASE_PHOTOLYSIS 18 |
Definition at line 34 of file rxn_solver.c.
#define RXN_EMISSION 13 |
Definition at line 29 of file rxn_solver.c.
#define RXN_FIRST_ORDER_LOSS 12 |
Definition at line 28 of file rxn_solver.c.
#define RXN_HL_PHASE_TRANSFER 6 |
Definition at line 24 of file rxn_solver.c.
#define RXN_PHOTOLYSIS 5 |
Definition at line 23 of file rxn_solver.c.
#define RXN_SIMPOL_PHASE_TRANSFER 10 |
Definition at line 26 of file rxn_solver.c.
#define RXN_SURFACE 19 |
Definition at line 35 of file rxn_solver.c.
#define RXN_TERNARY_CHEMICAL_ACTIVATION 15 |
Definition at line 31 of file rxn_solver.c.
#define RXN_TROE 2 |
Definition at line 20 of file rxn_solver.c.
#define RXN_WENNBERG_NO_RO2 17 |
Definition at line 33 of file rxn_solver.c.
#define RXN_WENNBERG_TUNNELING 16 |
Definition at line 32 of file rxn_solver.c.
#define RXN_WET_DEPOSITION 14 |
Definition at line 30 of file rxn_solver.c.
void rxn_add_condensed_data | ( | int | rxn_type, |
int | n_int_param, | ||
int | n_float_param, | ||
int | n_env_param, | ||
int * | int_param, | ||
double * | float_param, | ||
void * | solver_data | ||
) |
Add condensed data to the condensed data block of memory.
rxn_type | Reaction type |
n_int_param | Number of integer parameters |
n_float_param | Number of floating-point parameters |
n_env_param | Number of environment-dependent parameters |
int_param | Pointer to integer parameter array |
float_param | Pointer to floating-point parameter array |
solver_data | Pointer to solver data |
Definition at line 658 of file rxn_solver.c.
void rxn_calc_deriv | ( | ModelData * | model_data, |
TimeDerivative | time_deriv, | ||
realtype | time_step | ||
) |
Calculate the time derivative \(f(t,y)\).
model_data | Pointer to the model data |
time_deriv | TimeDerivative to use to build derivative array |
time_step | Current model time step (s) |
Definition at line 322 of file rxn_solver.c.
void rxn_calc_deriv_specific_types | ( | ModelData * | model_data, |
TimeDerivative | time_deriv, | ||
realtype | time_step | ||
) |
Calculate the time derivative \(f(t,y)\) for only some specific types.
model_data | Pointer to the model data |
time_deriv | TimeDerivative to use to build derivative array |
time_step | Current model time step (s) |
Definition at line 439 of file rxn_solver.c.
Calculate the Jacobian.
model_data | Pointer to the model data |
jac | The reaction Jacobian (for one grid cell) |
time_step | Current model time step (s) |
Definition at line 482 of file rxn_solver.c.
Calculate the Jacobian for only some specific types.
model_data | Pointer to the model data |
jac | The reaction Jacobian (for one grid cell) |
time_step | Current model time step (s) |
Definition at line 595 of file rxn_solver.c.
void rxn_free_update_data | ( | void * | update_data | ) |
Free an update data object.
update_data | Object to free |
Definition at line 851 of file rxn_solver.c.
Get the Jacobian elements used by a particular reaction.
model_data | A pointer to the model data |
jac | Jacobian |
Definition at line 42 of file rxn_solver.c.
void rxn_print_data | ( | void * | solver_data | ) |
Print the reaction data.
solver_data | Pointer to the solver data |
Definition at line 769 of file rxn_solver.c.
void rxn_update_data | ( | int | cell_id, |
int * | rxn_id, | ||
int | update_rxn_type, | ||
void * | update_data, | ||
void * | solver_data | ||
) |
Update reaction data.
Update data for one or more reactions. Reactions of a certain type are passed a void pointer to updated data that must be in the format specified by the reaction type. This data could be used to find specific reactions of the specified type and, for example, update rate constants.
cell_id | Id of the grid cell to update |
rxn_id | Id of the reaction (or 0 if unknown) |
update_rxn_type | Type of the reaction |
update_data | Pointer to updated data to pass to the reaction |
solver_data | Pointer to solver data |
Definition at line 708 of file rxn_solver.c.
void rxn_update_env_state | ( | ModelData * | model_data | ) |
Update reaction data for new environmental state.
model_data | Pointer to the model data with updated env state |
Definition at line 224 of file rxn_solver.c.
Update the time derivative and Jacobian array ids.
model_data | Pointer to the model data |
deriv_ids | Ids for state variables on the time derivative array |
jac | Jacobian |
Definition at line 131 of file rxn_solver.c.