CAMP 1.0.0
Chemistry Across Multiple Phases
Macros | Functions
rxn_condensed_phase_diffusion.c File Reference

Condensed phase diffusion reaction solver functions. More...

Include dependency graph for rxn_condensed_phase_diffusion.c:

Go to the source code of this file.

Macros

#define NUM_ADJACENT_PAIRS_   int_data[0]
 
#define NUM_INT_PROP_   1
 
#define NUM_FLOAT_PROP_   0
 
#define NUM_ENV_PARAM_   0
 
#define DIFF_COEFF_INNER_(x)   (float_data[(NUM_FLOAT_PROP_) + (x)])
 
#define DIFF_COEFF_OUTER_(x)   (float_data[(NUM_FLOAT_PROP_) + (NUM_ADJACENT_PAIRS_) + (x)])
 
#define PHASE_ID_INNER_(x)   (int_data[(NUM_INT_PROP_) + (x)]-1)
 
#define PHASE_ID_OUTER_(x)   (int_data[(NUM_INT_PROP_) + (NUM_ADJACENT_PAIRS_) + (x)]-1)
 
#define AERO_SPEC_INNER_(x)   (int_data[(NUM_INT_PROP_) + (2*NUM_ADJACENT_PAIRS_) + (x)]-1)
 
#define AERO_SPEC_OUTER_(x)   (int_data[(NUM_INT_PROP_) + (3*NUM_ADJACENT_PAIRS_) + (x)]-1)
 
#define AERO_REP_ID_(x)   (int_data[(NUM_INT_PROP_) + (4*NUM_ADJACENT_PAIRS_) + (x)]-1)
 
#define DERIV_ID_INNER_(x)   (int_data[(NUM_INT_PROP_) + (5*NUM_ADJACENT_PAIRS_) + (x)])
 
#define DERIV_ID_OUTER_(x)   (int_data[(NUM_INT_PROP_) + (6*NUM_ADJACENT_PAIRS_) + (x)])
 

Functions

void rxn_condensed_phase_diffusion_get_used_jac_elem (ModelData *model_data, int *rxn_int_data, double *rxn_float_data, Jacobian *jac)
 Flag Jacobian elements used by this reaction. More...
 
void rxn_condensed_phase_diffusion_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. More...
 
void rxn_condensed_phase_diffusion_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. More...
 
void rxn_condensed_phase_diffusion_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. More...
 
void rxn_condensed_phase_diffusion_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. More...
 
void rxn_condensed_phase_diffusion_print (int *rxn_int_data, double *rxn_float_data)
 Print the Phase Transfer reaction parameters. More...
 

Detailed Description

Condensed phase diffusion reaction solver functions.

Definition in file rxn_condensed_phase_diffusion.c.

Macro Definition Documentation

◆ AERO_REP_ID_

#define AERO_REP_ID_ (   x)    (int_data[(NUM_INT_PROP_) + (4*NUM_ADJACENT_PAIRS_) + (x)]-1)

Definition at line 36 of file rxn_condensed_phase_diffusion.c.

◆ AERO_SPEC_INNER_

#define AERO_SPEC_INNER_ (   x)    (int_data[(NUM_INT_PROP_) + (2*NUM_ADJACENT_PAIRS_) + (x)]-1)

Definition at line 34 of file rxn_condensed_phase_diffusion.c.

◆ AERO_SPEC_OUTER_

#define AERO_SPEC_OUTER_ (   x)    (int_data[(NUM_INT_PROP_) + (3*NUM_ADJACENT_PAIRS_) + (x)]-1)

Definition at line 35 of file rxn_condensed_phase_diffusion.c.

◆ DERIV_ID_INNER_

#define DERIV_ID_INNER_ (   x)    (int_data[(NUM_INT_PROP_) + (5*NUM_ADJACENT_PAIRS_) + (x)])

Definition at line 38 of file rxn_condensed_phase_diffusion.c.

◆ DERIV_ID_OUTER_

#define DERIV_ID_OUTER_ (   x)    (int_data[(NUM_INT_PROP_) + (6*NUM_ADJACENT_PAIRS_) + (x)])

Definition at line 39 of file rxn_condensed_phase_diffusion.c.

◆ DIFF_COEFF_INNER_

#define DIFF_COEFF_INNER_ (   x)    (float_data[(NUM_FLOAT_PROP_) + (x)])

Definition at line 30 of file rxn_condensed_phase_diffusion.c.

◆ DIFF_COEFF_OUTER_

#define DIFF_COEFF_OUTER_ (   x)    (float_data[(NUM_FLOAT_PROP_) + (NUM_ADJACENT_PAIRS_) + (x)])

Definition at line 31 of file rxn_condensed_phase_diffusion.c.

◆ NUM_ADJACENT_PAIRS_

#define NUM_ADJACENT_PAIRS_   int_data[0]

Definition at line 24 of file rxn_condensed_phase_diffusion.c.

◆ NUM_ENV_PARAM_

#define NUM_ENV_PARAM_   0

Definition at line 28 of file rxn_condensed_phase_diffusion.c.

◆ NUM_FLOAT_PROP_

#define NUM_FLOAT_PROP_   0

Definition at line 27 of file rxn_condensed_phase_diffusion.c.

◆ NUM_INT_PROP_

#define NUM_INT_PROP_   1

Definition at line 26 of file rxn_condensed_phase_diffusion.c.

◆ PHASE_ID_INNER_

#define PHASE_ID_INNER_ (   x)    (int_data[(NUM_INT_PROP_) + (x)]-1)

Definition at line 32 of file rxn_condensed_phase_diffusion.c.

◆ PHASE_ID_OUTER_

#define PHASE_ID_OUTER_ (   x)    (int_data[(NUM_INT_PROP_) + (NUM_ADJACENT_PAIRS_) + (x)]-1)

Definition at line 33 of file rxn_condensed_phase_diffusion.c.

Function Documentation

◆ rxn_condensed_phase_diffusion_calc_deriv_contrib()

void rxn_condensed_phase_diffusion_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.

Parameters
model_dataPointer to the model data, including the state array
time_derivTimeDerivative object
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data
rxn_env_dataPointer to the environment-dependent parameters
time_stepCurrent time step being computed (s)

Definition at line 136 of file rxn_condensed_phase_diffusion.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rxn_condensed_phase_diffusion_calc_jac_contrib()

void rxn_condensed_phase_diffusion_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.

Parameters
model_dataPointer to the model data
jacReaction Jacobian
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data
rxn_env_dataPointer to the environment-dependent parameters
time_stepCurrent time step being calculated (s)

Definition at line 221 of file rxn_condensed_phase_diffusion.c.

Here is the caller graph for this function:

◆ rxn_condensed_phase_diffusion_get_used_jac_elem()

void rxn_condensed_phase_diffusion_get_used_jac_elem ( ModelData *  model_data,
int *  rxn_int_data,
double *  rxn_float_data,
Jacobian *  jac 
)

Flag Jacobian elements used by this reaction.

Parameters
model_dataPointer to the model data
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data
jacJacobian

Definition at line 56 of file rxn_condensed_phase_diffusion.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rxn_condensed_phase_diffusion_print()

void rxn_condensed_phase_diffusion_print ( int *  rxn_int_data,
double *  rxn_float_data 
)

Print the Phase Transfer reaction parameters.

Parameters
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data

Definition at line 238 of file rxn_condensed_phase_diffusion.c.

Here is the caller graph for this function:

◆ rxn_condensed_phase_diffusion_update_env_state()

void rxn_condensed_phase_diffusion_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.

Parameters
model_dataPointer to the model data
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data
rxn_env_dataPointer to the environment-dependent parameters

Definition at line 114 of file rxn_condensed_phase_diffusion.c.

Here is the caller graph for this function:

◆ rxn_condensed_phase_diffusion_update_ids()

void rxn_condensed_phase_diffusion_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.

Parameters
model_dataPointer to the model data for finding sub model ids
deriv_idsId of each state variable in the derivative array
jacJacobian
rxn_int_dataPointer to the reaction integer data
rxn_float_dataPointer to the reaction floating-point data

Definition at line 94 of file rxn_condensed_phase_diffusion.c.

Here is the caller graph for this function: