CAMP 1.0.0
Chemistry Across Multiple Phases
|
Phase Transfer reaction solver functions. More...
Go to the source code of this file.
Macros | |
#define | TEMPERATURE_K_ env_data[0] |
#define | PRESSURE_PA_ env_data[1] |
#define | MIN_WATER_ 1.0e-4 |
#define | JAC_GAS 0 |
#define | JAC_AERO 1 |
#define | DELTA_H_ float_data[0] |
#define | DELTA_S_ float_data[1] |
#define | DIFF_COEFF_ float_data[2] |
#define | PRE_C_AVG_ float_data[3] |
#define | A_ float_data[4] |
#define | C_ float_data[5] |
#define | CONV_ float_data[6] |
#define | MW_ float_data[7] |
#define | NUM_AERO_PHASE_ int_data[0] |
#define | GAS_SPEC_ (int_data[1] - 1) |
#define | MFP_M_ rxn_env_data[0] |
#define | ALPHA_ rxn_env_data[1] |
#define | EQUIL_CONST_ rxn_env_data[2] |
#define | KGM3_TO_PPM_ rxn_env_data[3] |
#define | NUM_INT_PROP_ 2 |
#define | NUM_FLOAT_PROP_ 8 |
#define | NUM_ENV_PARAM_ 4 |
#define | DERIV_ID_(x) int_data[NUM_INT_PROP_ + x] |
#define | JAC_ID_(x) int_data[NUM_INT_PROP_ + 1 + NUM_AERO_PHASE_ + x] |
#define | PHASE_INT_LOC_(x) (int_data[NUM_INT_PROP_ + 2 + 6 * NUM_AERO_PHASE_ + x] - 1) |
#define | PHASE_REAL_LOC_(x) (int_data[NUM_INT_PROP_ + 2 + 7 * NUM_AERO_PHASE_ + x] - 1) |
#define | AERO_SPEC_(x) (int_data[PHASE_INT_LOC_(x)] - 1) |
#define | AERO_WATER_(x) (int_data[PHASE_INT_LOC_(x) + 1] - 1) |
#define | AERO_PHASE_ID_(x) (int_data[PHASE_INT_LOC_(x) + 2] - 1) |
#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] |
#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) float_data[PHASE_REAL_LOC_(x) + 1 + NUM_AERO_PHASE_JAC_ELEM_(x) + e] |
Functions | |
void | rxn_HL_phase_transfer_get_used_jac_elem (ModelData *model_data, int *rxn_int_data, double *rxn_float_data, Jacobian *jac) |
Flag Jacobian elements used by this reaction. | |
void | rxn_HL_phase_transfer_update_ids (ModelData *model_data, int *deriv_ids, Jacobian jac, int *rxn_int_data, double *rxn_float_data) |
Update the time derivative and Jacbobian array indices. | |
void | rxn_HL_phase_transfer_update_env_state (ModelData *model_data, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data) |
Update reaction data for new environmental conditions. | |
void | rxn_HL_phase_transfer_calc_deriv_contrib (ModelData *model_data, TimeDerivative time_deriv, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data, realtype time_step) |
Calculate contributions to the time derivative \(f(t,y)\) from this reaction. | |
void | rxn_HL_phase_transfer_calc_jac_contrib (ModelData *model_data, Jacobian jac, int *rxn_int_data, double *rxn_float_data, double *rxn_env_data, realtype time_step) |
Calculate contributions to the Jacobian from this reaction. | |
void | rxn_HL_phase_transfer_print (int *rxn_int_data, double *rxn_float_data) |
Print the Phase Transfer reaction parameters. | |
Phase Transfer reaction solver functions.
Definition in file rxn_HL_phase_transfer.c.
#define A_ float_data[4] |
Definition at line 34 of file rxn_HL_phase_transfer.c.
#define AERO_PHASE_ID_ | ( | x | ) | (int_data[PHASE_INT_LOC_(x) + 2] - 1) |
Definition at line 55 of file rxn_HL_phase_transfer.c.
#define AERO_REP_ID_ | ( | x | ) | (int_data[PHASE_INT_LOC_(x) + 3] - 1) |
Definition at line 56 of file rxn_HL_phase_transfer.c.
#define AERO_SPEC_ | ( | x | ) | (int_data[PHASE_INT_LOC_(x)] - 1) |
Definition at line 53 of file rxn_HL_phase_transfer.c.
#define AERO_WATER_ | ( | x | ) | (int_data[PHASE_INT_LOC_(x) + 1] - 1) |
Definition at line 54 of file rxn_HL_phase_transfer.c.
#define ALPHA_ rxn_env_data[1] |
Definition at line 41 of file rxn_HL_phase_transfer.c.
#define C_ float_data[5] |
Definition at line 35 of file rxn_HL_phase_transfer.c.
#define CONV_ float_data[6] |
Definition at line 36 of file rxn_HL_phase_transfer.c.
#define DELTA_H_ float_data[0] |
Definition at line 30 of file rxn_HL_phase_transfer.c.
#define DELTA_S_ float_data[1] |
Definition at line 31 of file rxn_HL_phase_transfer.c.
#define DERIV_ID_ | ( | x | ) | int_data[NUM_INT_PROP_ + x] |
Definition at line 47 of file rxn_HL_phase_transfer.c.
#define DIFF_COEFF_ float_data[2] |
Definition at line 32 of file rxn_HL_phase_transfer.c.
#define EFF_RAD_JAC_ELEM_ | ( | x, | |
e | |||
) | float_data[PHASE_REAL_LOC_(x) + 1 + e] |
Definition at line 61 of file rxn_HL_phase_transfer.c.
#define EQUIL_CONST_ rxn_env_data[2] |
Definition at line 42 of file rxn_HL_phase_transfer.c.
#define GAS_SPEC_ (int_data[1] - 1) |
Definition at line 39 of file rxn_HL_phase_transfer.c.
#define JAC_AERO 1 |
Definition at line 28 of file rxn_HL_phase_transfer.c.
#define JAC_GAS 0 |
Definition at line 27 of file rxn_HL_phase_transfer.c.
#define JAC_ID_ | ( | x | ) | int_data[NUM_INT_PROP_ + 1 + NUM_AERO_PHASE_ + x] |
Definition at line 48 of file rxn_HL_phase_transfer.c.
#define KGM3_TO_PPM_ rxn_env_data[3] |
Definition at line 43 of file rxn_HL_phase_transfer.c.
#define MFP_M_ rxn_env_data[0] |
Definition at line 40 of file rxn_HL_phase_transfer.c.
#define MIN_WATER_ 1.0e-4 |
Definition at line 24 of file rxn_HL_phase_transfer.c.
#define MW_ float_data[7] |
Definition at line 37 of file rxn_HL_phase_transfer.c.
#define NUM_AERO_PHASE_ int_data[0] |
Definition at line 38 of file rxn_HL_phase_transfer.c.
#define NUM_AERO_PHASE_JAC_ELEM_ | ( | x | ) | (int_data[PHASE_INT_LOC_(x) + 4]) |
Definition at line 57 of file rxn_HL_phase_transfer.c.
#define NUM_CONC_JAC_ELEM_ | ( | x, | |
e | |||
) | float_data[PHASE_REAL_LOC_(x) + 1 + NUM_AERO_PHASE_JAC_ELEM_(x) + e] |
Definition at line 62 of file rxn_HL_phase_transfer.c.
#define NUM_ENV_PARAM_ 4 |
Definition at line 46 of file rxn_HL_phase_transfer.c.
#define NUM_FLOAT_PROP_ 8 |
Definition at line 45 of file rxn_HL_phase_transfer.c.
#define NUM_INT_PROP_ 2 |
Definition at line 44 of file rxn_HL_phase_transfer.c.
#define PHASE_INT_LOC_ | ( | x | ) | (int_data[NUM_INT_PROP_ + 2 + 6 * NUM_AERO_PHASE_ + x] - 1) |
Definition at line 49 of file rxn_HL_phase_transfer.c.
#define PHASE_JAC_ID_ | ( | x, | |
s, | |||
e | |||
) | int_data[PHASE_INT_LOC_(x) + 5 + (s) * NUM_AERO_PHASE_JAC_ELEM_(x) + e] |
Definition at line 58 of file rxn_HL_phase_transfer.c.
#define PHASE_REAL_LOC_ | ( | x | ) | (int_data[NUM_INT_PROP_ + 2 + 7 * NUM_AERO_PHASE_ + x] - 1) |
Definition at line 51 of file rxn_HL_phase_transfer.c.
#define PRE_C_AVG_ float_data[3] |
Definition at line 33 of file rxn_HL_phase_transfer.c.
#define PRESSURE_PA_ env_data[1] |
Definition at line 20 of file rxn_HL_phase_transfer.c.
#define SMALL_WATER_CONC_ | ( | x | ) | (float_data[PHASE_REAL_LOC_(x)]) |
Definition at line 60 of file rxn_HL_phase_transfer.c.
#define TEMPERATURE_K_ env_data[0] |
Definition at line 19 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_calc_deriv_contrib | ( | ModelData * | model_data, |
TimeDerivative | time_deriv, | ||
int * | rxn_int_data, | ||
double * | rxn_float_data, | ||
double * | rxn_env_data, | ||
realtype | time_step | ||
) |
Calculate contributions to the time derivative \(f(t,y)\) from this reaction.
model_data | Pointer to the model data, including the state array |
time_deriv | TimeDerivative object |
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
rxn_env_data | Pointer to the environment-dependent parameters |
time_step | Current time step being computed (s) |
Definition at line 265 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_calc_jac_contrib | ( | ModelData * | model_data, |
Jacobian | jac, | ||
int * | rxn_int_data, | ||
double * | rxn_float_data, | ||
double * | rxn_env_data, | ||
realtype | time_step | ||
) |
Calculate contributions to the Jacobian from this reaction.
model_data | Pointer to the model data |
jac | Reaction Jacobian |
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
rxn_env_data | Pointer to the environment-dependent parameters |
time_step | Current time step being calculated (s) |
Definition at line 354 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_get_used_jac_elem | ( | ModelData * | model_data, |
int * | rxn_int_data, | ||
double * | rxn_float_data, | ||
Jacobian * | jac | ||
) |
Flag Jacobian elements used by this reaction.
model_data | Pointer to the model data |
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
jac | Jacobian |
Definition at line 72 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_print | ( | int * | rxn_int_data, |
double * | rxn_float_data | ||
) |
Print the Phase Transfer reaction parameters.
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
Definition at line 510 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_update_env_state | ( | ModelData * | model_data, |
int * | rxn_int_data, | ||
double * | rxn_float_data, | ||
double * | rxn_env_data | ||
) |
Update reaction data for new environmental conditions.
For Phase Transfer reaction this only involves recalculating the rate constant.
model_data | Pointer to the model data |
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
rxn_env_data | Pointer to the environment-dependent parameters |
Definition at line 209 of file rxn_HL_phase_transfer.c.
void rxn_HL_phase_transfer_update_ids | ( | ModelData * | model_data, |
int * | deriv_ids, | ||
Jacobian | jac, | ||
int * | rxn_int_data, | ||
double * | rxn_float_data | ||
) |
Update the time derivative and Jacbobian array indices.
model_data | Pointer to the model data |
deriv_ids | Id of each state variable in the derivative array |
jac | Jacobian |
rxn_int_data | Pointer to the reaction integer data |
rxn_float_data | Pointer to the reaction floating-point data |
Definition at line 149 of file rxn_HL_phase_transfer.c.