CAMP 1.0.0
Chemistry Across Multiple Phases
|
Aerosol phase functions. More...
Go to the source code of this file.
Macros | |
#define | MINIMUM_MASS_ 1.0e-25L |
Minimum aerosol-phase mass concentration [kg m-3]. | |
#define | MINIMUM_MW_ 0.1L |
Minimum mass assumed molecular weight [kg mol-1]. | |
#define | MINIMUM_DENSITY_ 1800.0L |
Minimum mass assumed density [kg m-3]. | |
#define | CHEM_SPEC_UNKNOWN_TYPE 0 |
#define | CHEM_SPEC_VARIABLE 1 |
#define | CHEM_SPEC_CONSTANT 2 |
#define | CHEM_SPEC_PSSA 3 |
#define | CHEM_SPEC_ACTIVITY_COEFF 4 |
#define | NUM_STATE_VAR_ (int_data[0]) |
#define | NUM_INT_PROP_ 1 |
#define | NUM_FLOAT_PROP_ 0 |
#define | SPEC_TYPE_(x) (int_data[NUM_INT_PROP_ + x]) |
#define | MW_(x) (float_data[NUM_FLOAT_PROP_ + x]) |
#define | DENSITY_(x) (float_data[NUM_FLOAT_PROP_ + NUM_STATE_VAR_ + x]) |
Functions | |
int | aero_phase_get_used_jac_elem (ModelData *model_data, int aero_phase_idx, int state_var_id, bool *jac_struct) |
Flag Jacobian elements used in calculations of mass and volume. | |
void | aero_phase_get_mass__kg_m3 (ModelData *model_data, int aero_phase_idx, double *state_var, double *mass, double *MW, double *jac_elem_mass, double *jac_elem_MW) |
Get the mass and average MW in an aerosol phase. | |
void | aero_phase_get_volume__m3_m3 (ModelData *model_data, int aero_phase_idx, double *state_var, double *volume, double *jac_elem) |
Get the volume of an aerosol phase. | |
void | aero_phase_add_condensed_data (int n_int_param, int n_float_param, int *int_param, double *float_param, void *solver_data) |
Add condensed data to the condensed data block for aerosol phases. | |
void | aero_phase_print_data (void *solver_data) |
Print the aerosol phase data. | |
Aerosol phase functions.
Definition in file aero_phase_solver.c.
#define CHEM_SPEC_ACTIVITY_COEFF 4 |
Definition at line 27 of file aero_phase_solver.c.
#define CHEM_SPEC_CONSTANT 2 |
Definition at line 25 of file aero_phase_solver.c.
#define CHEM_SPEC_PSSA 3 |
Definition at line 26 of file aero_phase_solver.c.
#define CHEM_SPEC_UNKNOWN_TYPE 0 |
Definition at line 23 of file aero_phase_solver.c.
#define CHEM_SPEC_VARIABLE 1 |
Definition at line 24 of file aero_phase_solver.c.
#define DENSITY_ | ( | x | ) | (float_data[NUM_FLOAT_PROP_ + NUM_STATE_VAR_ + x]) |
Definition at line 34 of file aero_phase_solver.c.
#define MINIMUM_DENSITY_ 1800.0L |
Minimum mass assumed density [kg m-3].
Definition at line 20 of file aero_phase_solver.c.
#define MINIMUM_MASS_ 1.0e-25L |
Minimum aerosol-phase mass concentration [kg m-3].
Definition at line 16 of file aero_phase_solver.c.
#define MINIMUM_MW_ 0.1L |
Minimum mass assumed molecular weight [kg mol-1].
Definition at line 18 of file aero_phase_solver.c.
#define MW_ | ( | x | ) | (float_data[NUM_FLOAT_PROP_ + x]) |
Definition at line 33 of file aero_phase_solver.c.
#define NUM_FLOAT_PROP_ 0 |
Definition at line 31 of file aero_phase_solver.c.
#define NUM_INT_PROP_ 1 |
Definition at line 30 of file aero_phase_solver.c.
#define NUM_STATE_VAR_ (int_data[0]) |
Definition at line 29 of file aero_phase_solver.c.
#define SPEC_TYPE_ | ( | x | ) | (int_data[NUM_INT_PROP_ + x]) |
Definition at line 32 of file aero_phase_solver.c.
void aero_phase_add_condensed_data | ( | int | n_int_param, |
int | n_float_param, | ||
int * | int_param, | ||
double * | float_param, | ||
void * | solver_data | ||
) |
Add condensed data to the condensed data block for aerosol phases.
n_int_param | Number of integer parameters |
n_float_param | Number of floating-point parameters |
int_param | Pointer to the integer parameter array |
float_param | Pointer to the floating-point parameter array |
solver_data | Pointer to the solver data |
Definition at line 175 of file aero_phase_solver.c.
void aero_phase_get_mass__kg_m3 | ( | ModelData * | model_data, |
int | aero_phase_idx, | ||
double * | state_var, | ||
double * | mass, | ||
double * | MW, | ||
double * | jac_elem_mass, | ||
double * | jac_elem_MW | ||
) |
Get the mass and average MW in an aerosol phase.
model_data | Pointer to the model data (state, env, aero_phase) |
aero_phase_idx | Index of the aerosol phase to use in the calculation |
state_var | Pointer the aerosol phase on the state variable array |
mass | Pointer to hold total aerosol phase mass ( \(\mbox{\si{\kilogram\per\cubic\metre}}\) or \(\mbox{\si{\kilogram\per particle}}\)) |
MW | Pointer to hold average MW of the aerosol phase ( \(\mbox{\si{\kilogram\per\mol}}\)) |
jac_elem_mass | When not NULL, a pointer to an array whose length is the number of Jacobian elements used in calculations of mass and volume of this aerosol phase returned by aero_phase_get_used_jac_elem and whose contents will be set to the partial derivatives of mass by concentration \(\frac{dm}{dy_i}\) of each component species \(y_i\). |
jac_elem_MW | When not NULL, a pointer to an array whose length is the number of Jacobian elements used in calculations of mass and volume of this aerosol phase returned by aero_phase_get_used_jac_elem and whose contents will be set to the partial derivatives of total molecular weight by concentration \(\frac{dMW}{dy_i}\) of each component species \(y_i\). |
Definition at line 93 of file aero_phase_solver.c.
int aero_phase_get_used_jac_elem | ( | ModelData * | model_data, |
int | aero_phase_idx, | ||
int | state_var_id, | ||
bool * | jac_struct | ||
) |
Flag Jacobian elements used in calculations of mass and volume.
model_data | Pointer to the model data(state, env, aero_phase) |
aero_phase_idx | Index of the aerosol phase to find elements for |
state_var_id | Index in the state array for this aerosol phase |
jac_struct | 1D array of flags indicating potentially non-zero Jacobian elements. (The dependent variable should have been chosen by the calling function.) |
Definition at line 46 of file aero_phase_solver.c.
void aero_phase_get_volume__m3_m3 | ( | ModelData * | model_data, |
int | aero_phase_idx, | ||
double * | state_var, | ||
double * | volume, | ||
double * | jac_elem | ||
) |
Get the volume of an aerosol phase.
model_data | Pointer to the model data (state, env, aero_phase) |
aero_phase_idx | Index of the aerosol phase to use in the calculation |
state_var | Pointer to the aerosol phase on the state variable array |
volume | Pointer to hold the aerosol phase volume ( \(\mbox{\si{\cubic\metre\per\cubic\metre}}\) or \(\mbox{\si{\cubic\metre\per particle}}\)) |
jac_elem | When not NULL, a pointer to an array whose length is the number of Jacobian elements used in calculations of mass and volume of this aerosol phase returned by aero_phase_get_used_jac_elem and whose contents will be set to the partial derivatives of total phase volume by concentration \(\frac{dv}{dy_i}\) of each component species \(y_i\). |
Definition at line 144 of file aero_phase_solver.c.
void aero_phase_print_data | ( | void * | solver_data | ) |
Print the aerosol phase data.
solver_data | Pointer to the solver data |
Definition at line 210 of file aero_phase_solver.c.