CAMP 1.0.0
Chemistry Across Multiple Phases
Functions
aero_rep_solver.h File Reference

Header file for abstract aerosol representation functions. More...

Include dependency graph for aero_rep_solver.h:
This graph shows which files directly or indirectly include this file:

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.
 

Detailed Description

Header file for abstract aerosol representation functions.

Definition in file aero_rep_solver.h.

Function Documentation

◆ aero_rep_add_condensed_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.

Parameters
aero_rep_typeAerosol representation type
n_int_paramNumber of integer parameters
n_float_paramNumber of floating-point parameters
n_env_paramNumber of environment-dependent parameters
int_paramPointer to integer parameter array
float_paramPointer to floating-point parameter array
solver_dataPointer to solver data

Definition at line 443 of file aero_rep_solver.c.

◆ aero_rep_free_update_data()

void aero_rep_free_update_data ( void *  update_data)

Free an update data object.

Parameters
update_dataObject to free

Definition at line 589 of file aero_rep_solver.c.

◆ aero_rep_get_aero_conc_type()

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.

Parameters
model_dataPointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
Returns
0 for per-particle; 1 for total for each phase

Definition at line 292 of file aero_rep_solver.c.

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

◆ aero_rep_get_aero_phase_avg_MW__kg_mol()

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.

Parameters
model_dataPointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
aero_phase_avg_MWPointer to hold calculated average MW in the aerosol phase ( \(\mbox{\si{\kilogram\per\mole}}\))
partial_derivPointer 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.

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

◆ aero_rep_get_aero_phase_mass__kg_m3()

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.

Parameters
model_dataPointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
aero_phase_massPointer to hold calculated aerosol-phase mass, \(m\) ( \(\mbox{\si{\kilogram\per\cubic\metre}}\))
partial_derivPointer 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.

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

◆ aero_rep_get_dependencies()

void aero_rep_get_dependencies ( ModelData model_data,
bool *  state_flags 
)

Get state array elements used by aerosol representation functions.

Parameters
model_dataA pointer to the model data
state_flagsAn array of flags the length of the state array indicating species used

Definition at line 70 of file aero_rep_solver.c.

Here is the call graph for this function:

◆ aero_rep_get_effective_radius__m()

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.

Parameters
model_dataPointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
radiusPointer to hold effective particle radius (m)
partial_derivPointer 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.

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

◆ aero_rep_get_number_conc__n_m3()

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.

Parameters
model_dataPointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
number_concPointer to hold calculated number concentration, \(n\) ( \(\mbox{\si{\#\per\cubic\metre}}\))
partial_derivPointer 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.

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

◆ aero_rep_get_used_jac_elem()

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

Parameters
model_dataA pointer to the model data
aero_rep_idxIndex of aerosol representation to use for calculation
aero_phase_idxIndex of the aerosol phase within the aerosol representation
jac_struct1D array of flags indicating potentially non-zero Jacobian elements. (The dependent variable should have been chosen by the calling function.)
Returns
Number of Jacobian elements flagged

Definition at line 33 of file aero_rep_solver.c.

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

◆ aero_rep_print_data()

void aero_rep_print_data ( void *  solver_data)

Print the aerosol representation data.

Parameters
solver_dataPointer to the solver data

Definition at line 546 of file aero_rep_solver.c.

Here is the call graph for this function:

◆ aero_rep_update_data()

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.

Parameters
cell_idId of the grid cell to update
aero_rep_idAerosol representation id (or 0 if unknown)
update_aero_rep_typeAerosol representation type to update
update_dataPointer to data needed for update
solver_dataPointer to solver data

Definition at line 492 of file aero_rep_solver.c.

Here is the call graph for this function:

◆ aero_rep_update_env_state()

void aero_rep_update_env_state ( ModelData model_data)

Update the aerosol representations for new environmental conditions.

Parameters
model_dataPointer to the model data

Definition at line 106 of file aero_rep_solver.c.

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

◆ aero_rep_update_state()

void aero_rep_update_state ( ModelData model_data)

Update the aerosol representations for a new state.

Parameters
model_dataPointer to the model data

Definition at line 147 of file aero_rep_solver.c.

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