CAMP 1.0.0
Chemistry Across Multiple Phases
aero_rep_solver.h
Go to the documentation of this file.
1/* Copyright (C) 2021 Barcelona Supercomputing Center and University of
2 * Illinois at Urbana-Champaign
3 * SPDX-License-Identifier: MIT
4 *
5 * Header file for aero_rep_solver.c
6 *
7 */
8/** \file
9 * \brief Header file for abstract aerosol representation functions
10 */
11#ifndef AERO_REP_SOLVER_H
12#define AERO_REP_SOLVER_H
13#include "camp_common.h"
14
15/** Public aerosol representation functions **/
16
17/* Solver functions */
18int aero_rep_get_used_jac_elem(ModelData *model_data, int aero_rep_idx,
19 int aero_phase_idx, bool *jac_struct);
20void aero_rep_get_dependencies(ModelData *model_data, bool *state_flags);
21void aero_rep_update_env_state(ModelData *model_data);
22void aero_rep_update_state(ModelData *model_data);
23void aero_rep_get_effective_radius__m(ModelData *model_data, int aero_rep_idx,
24 int aero_phase_idx, double *radius,
25 double *partial_deriv);
26void aero_rep_get_number_conc__n_m3(ModelData *model_data, int aero_rep_idx,
27 int aero_phase_idx, double *number_conc,
28 double *partial_deriv);
29int aero_rep_get_aero_conc_type(ModelData *model_data, int aero_rep_idx,
30 int aero_phase_idx);
32 int aero_rep_idx, int aero_phase_idx,
33 double *aero_phase_mass,
34 double *partial_deriv);
36 int aero_rep_idx,
37 int aero_phase_idx,
38 double *aero_phase_avg_MW,
39 double *partial_deriv);
40void aero_rep_print_data(void *solver_data);
41
42/* Setup functions */
43void aero_rep_add_condensed_data(int aero_rep_type, int n_int_param,
44 int n_float_param, int n_env_param,
45 int *int_param, double *float_param,
46 void *solver_data);
47
48/* Update data functions */
49void aero_rep_update_data(int cell_id, int *aero_rep_id,
50 int update_aero_rep_type, void *update_data,
51 void *solver_data);
52void aero_rep_free_update_data(void *update_data);
53
54#endif
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.
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_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_free_update_data(void *update_data)
Free an update data object.
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 ( )
void aero_rep_update_env_state(ModelData *model_data)
Update the aerosol representations for new environmental conditions.
void aero_rep_print_data(void *solver_data)
Print the aerosol representation data.
void aero_rep_update_state(ModelData *model_data)
Update the aerosol representations for a new state.
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 ( )
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_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 ( )
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, (m)
void aero_rep_get_dependencies(ModelData *model_data, bool *state_flags)
Get state array elements used by aerosol representation functions.
Header file for common constants and structures.