CAMP 1.0.0
Chemistry Across Multiple Phases
|
Header file for abstract aerosol representation functions. More...
Go to the source code of this file.
Functions | |
int | aero_rep_get_used_jac_elem (ModelData *model_data, int aero_rep_idx, int aero_phase_idx, bool *jac_struct) |
Flag Jacobian elements used to calculated mass, volume, etc. | |
void | aero_rep_get_dependencies (ModelData *model_data, bool *state_flags) |
Get state array elements used by aerosol representation functions. | |
void | aero_rep_update_env_state (ModelData *model_data) |
Update the aerosol representations for new environmental conditions. | |
void | aero_rep_update_state (ModelData *model_data) |
Update the aerosol representations for a new state. | |
void | aero_rep_get_effective_radius__m (ModelData *model_data, int aero_rep_idx, int aero_phase_idx, double *radius, double *partial_deriv) |
Get the effective particle radius, \(r_{eff}\) (m) | |
void | aero_rep_get_number_conc__n_m3 (ModelData *model_data, int aero_rep_idx, int aero_phase_idx, double *number_conc, double *partial_deriv) |
Get the particle number concentration \(n\) ( \(\mbox{\si{\#\per\cubic\metre}}\)) | |
int | aero_rep_get_aero_conc_type (ModelData *model_data, int aero_rep_idx, int aero_phase_idx) |
Check whether aerosol concentrations are per-particle or total for each phase. | |
void | aero_rep_get_aero_phase_mass__kg_m3 (ModelData *model_data, int aero_rep_idx, int aero_phase_idx, double *aero_phase_mass, double *partial_deriv) |
Get the total mass of an aerosol phase in this representation \(m\) ( \(\mbox{\si{\kilogram\per\cubic\metre}}\)) | |
void | aero_rep_get_aero_phase_avg_MW__kg_mol (ModelData *model_data, int aero_rep_idx, int aero_phase_idx, double *aero_phase_avg_MW, double *partial_deriv) |
Get the average molecular weight of an aerosol phase in this representation \(m\) ( \(\mbox{\si{\micro\gram\per\cubic\metre}}\)) | |
void | aero_rep_print_data (void *solver_data) |
Print the aerosol representation data. | |
void | aero_rep_add_condensed_data (int aero_rep_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 for aerosol representations. | |
void | aero_rep_update_data (int cell_id, int *aero_rep_id, int update_aero_rep_type, void *update_data, void *solver_data) |
Update aerosol representation data. | |
void | aero_rep_free_update_data (void *update_data) |
Free an update data object. | |
Header file for abstract aerosol representation functions.
Definition in file aero_rep_solver.h.
void aero_rep_add_condensed_data | ( | int | aero_rep_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 for aerosol representations.
aero_rep_type | Aerosol representation 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 443 of file aero_rep_solver.c.
void aero_rep_free_update_data | ( | void * | update_data | ) |
Free an update data object.
update_data | Object to free |
Definition at line 589 of file aero_rep_solver.c.
int aero_rep_get_aero_conc_type | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx | ||
) |
Check whether aerosol concentrations are per-particle or total for each phase.
model_data | Pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
Definition at line 292 of file aero_rep_solver.c.
void aero_rep_get_aero_phase_avg_MW__kg_mol | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx, | ||
double * | aero_phase_avg_MW, | ||
double * | partial_deriv | ||
) |
Get the average molecular weight of an aerosol phase in this representation \(m\) ( \(\mbox{\si{\micro\gram\per\cubic\metre}}\))
Calculates total aerosol phase mass, \(m\) ( \(\mbox{\si{\micro\gram\per\cubic\metre}}\)), as well as the set of \(\frac{\partial m}{\partial y}\) where \(y\) are variables on the solver state array.
model_data | Pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
aero_phase_avg_MW | Pointer to hold calculated average MW in the aerosol phase ( \(\mbox{\si{\kilogram\per\mole}}\)) |
partial_deriv | Pointer to the set of partial derivatives to be calculated \(\frac{\partial m}{\partial y}\), or a NULL pointer if no partial derivatives are needed |
Definition at line 398 of file aero_rep_solver.c.
void aero_rep_get_aero_phase_mass__kg_m3 | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx, | ||
double * | aero_phase_mass, | ||
double * | partial_deriv | ||
) |
Get the total mass of an aerosol phase in this representation \(m\) ( \(\mbox{\si{\kilogram\per\cubic\metre}}\))
Calculates total aerosol phase mass, \(m\) ( \(\mbox{\si{\kilogram\per\cubic\metre}}\)), as well as the set of \(\frac{\partial m}{\partial y}\) where \(y\) are variables on the solver state array.
model_data | Pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
aero_phase_mass | Pointer to hold calculated aerosol-phase mass, \(m\) ( \(\mbox{\si{\kilogram\per\cubic\metre}}\)) |
partial_deriv | Pointer to the set of partial derivatives to be calculated \(\frac{\partial m}{\partial y}\), or a NULL pointer if no partial derivatives are needed |
Definition at line 346 of file aero_rep_solver.c.
void aero_rep_get_dependencies | ( | ModelData * | model_data, |
bool * | state_flags | ||
) |
Get state array elements used by aerosol representation functions.
model_data | A pointer to the model data |
state_flags | An array of flags the length of the state array indicating species used |
Definition at line 70 of file aero_rep_solver.c.
void aero_rep_get_effective_radius__m | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx, | ||
double * | radius, | ||
double * | partial_deriv | ||
) |
Get the effective particle radius, \(r_{eff}\) (m)
Calculates effective particle radius \(r_{eff}\) (m), as well as the set of \(\frac{\partial r_{eff}}{\partial y}\) where \(y\) are variables on the solver state array.
model_data | Pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
radius | Pointer to hold effective particle radius (m) |
partial_deriv | Pointer to the set of partial derivatives to be calculated \(\frac{\partial r_{eff}}{\partial y}\), or a NULL pointer if no partial derivatives are needed |
Definition at line 199 of file aero_rep_solver.c.
void aero_rep_get_number_conc__n_m3 | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx, | ||
double * | number_conc, | ||
double * | partial_deriv | ||
) |
Get the particle number concentration \(n\) ( \(\mbox{\si{\#\per\cubic\metre}}\))
Calculates particle number concentration, \(n\) ( \(\mbox{\si{\#\per\cubic\metre}}\)), as well as the set of \(\frac{\partial n}{\partial y}\) where \(y\) are variables on the solver state array.
model_data | Pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
number_conc | Pointer to hold calculated number concentration, \(n\) ( \(\mbox{\si{\#\per\cubic\metre}}\)) |
partial_deriv | Pointer to the set of partial derivatives to be calculated \(\frac{\partial n}{\partial y}\), or a NULL pointer if no partial derivatives are required |
Definition at line 250 of file aero_rep_solver.c.
int aero_rep_get_used_jac_elem | ( | ModelData * | model_data, |
int | aero_rep_idx, | ||
int | aero_phase_idx, | ||
bool * | jac_struct | ||
) |
Flag Jacobian elements used to calculated mass, volume, etc.
Public aerosol representation functions
model_data | A pointer to the model data |
aero_rep_idx | Index of aerosol representation to use for calculation |
aero_phase_idx | Index of the aerosol phase within the aerosol representation |
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 33 of file aero_rep_solver.c.
void aero_rep_print_data | ( | void * | solver_data | ) |
Print the aerosol representation data.
solver_data | Pointer to the solver data |
Definition at line 546 of file aero_rep_solver.c.
void aero_rep_update_data | ( | int | cell_id, |
int * | aero_rep_id, | ||
int | update_aero_rep_type, | ||
void * | update_data, | ||
void * | solver_data | ||
) |
Update aerosol representation data.
cell_id | Id of the grid cell to update |
aero_rep_id | Aerosol representation id (or 0 if unknown) |
update_aero_rep_type | Aerosol representation type to update |
update_data | Pointer to data needed for update |
solver_data | Pointer to solver data |
Definition at line 492 of file aero_rep_solver.c.
void aero_rep_update_env_state | ( | ModelData * | model_data | ) |
Update the aerosol representations for new environmental conditions.
model_data | Pointer to the model data |
Definition at line 106 of file aero_rep_solver.c.
void aero_rep_update_state | ( | ModelData * | model_data | ) |
Update the aerosol representations for a new state.
model_data | Pointer to the model data |
Definition at line 147 of file aero_rep_solver.c.