9.1
general documentation
cs_atmo_chemistry.cpp File Reference
#include "base/cs_defs.h"
#include <assert.h>
#include <errno.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "bft/bft_error.h"
#include "bft/bft_printf.h"
#include "atmo/cs_air_props.h"
#include "base/cs_base.h"
#include "base/cs_boundary_conditions.h"
#include "cdo/cs_domain.h"
#include "base/cs_field.h"
#include "base/cs_field_default.h"
#include "base/cs_field_pointer.h"
#include "base/cs_log.h"
#include "base/cs_math.h"
#include "base/cs_mem.h"
#include "base/cs_scalar_clipping.h"
#include "mesh/cs_mesh.h"
#include "mesh/cs_mesh_location.h"
#include "mesh/cs_mesh_quantities.h"
#include "base/cs_parall.h"
#include "base/cs_parameters.h"
#include "base/cs_parameters_check.h"
#include "base/cs_physical_constants.h"
#include "base/cs_prototypes.h"
#include "base/cs_thermal_model.h"
#include "pprt/cs_physical_model.h"
#include "atmo/cs_atmo.h"
#include "atmo/cs_atmo_aerosol_ssh.h"
#include "atmo/cs_atmo_chemistry.h"
+ Include dependency graph for cs_atmo_chemistry.cpp:

Functions

void cs_atmo_aerosol_initialize (void)
 This function initializes the external aerosol code. More...
 
void cs_atmo_aerosol_finalize (void)
 This function finalizes the external aerosol code. More...
 
void cs_atmo_aerosol_get_gas (cs_real_t *array)
 This function fills the given array with gas concentrations from the external aerosol code. More...
 
void cs_atmo_aerosol_time_advance (void)
 This function computes a time step of gaseous chemistry and aerosols dynamic using the external aerosol code. More...
 
void cs_atmo_aerosol_nuclea (cs_real_t *nc, const cs_real_t *rom, const cs_real_t *qldia, const cs_real_t *pphy, const cs_real_t *refrad)
 Compute aerosol cloud droplets nucleation when using the atmospheric humid model using a microphysical model. More...
 
void cs_atmo_read_aerosol (void)
 Reads initial aerosol concentration and number. More...
 
void cs_atmo_read_chemistry_profile (int mode)
 Reads the chemistry profile data for the atmospheric chemistry. More...
 
void cs_atmo_set_chem_conc_file_name (const char *file_name)
 This function set the file name of the chemistry file. More...
 
void cs_atmo_set_aero_conc_file_name (const char *file_name)
 This function set the file name of the aerosol file. More...
 
void cs_atmo_init_chemistry (void)
 Initialize chemistry array. More...
 
void cs_atmo_chemistry_set_spack_file_name (const char *file_name)
 This function set the file name of the SPACK file. More...
 
void cs_atmo_chemistry_set_aerosol_file_name (const char *file_name)
 This function sets the file name to initialize the aerosol library. More...
 
void cs_atmo_declare_chem_from_spack (void)
 This function declares additional transported variables for atmospheric module for the chemistry defined from SPACK. More...
 
void cs_atmo_chemistry_initialization_deactivate (void)
 Deactivate chemistry initialization procedure. More...
 
int cs_atmo_chemistry_need_initialization (void)
 Check if the chemistry module needs initialization. More...
 
void cs_atmo_chemistry_initialize_reacnum (void)
 Initialize chemistry cell kinetic rates arrays. More...
 
void cs_atmo_chemistry_finalize (void)
 Finalize atmospheric chemistry structures. More...
 
void cs_atmo_chemistry_log_setup (void)
 Print the atmospheric chemistry options to setup.log. More...
 
void cs_atmo_aerosol_log_setup (void)
 Print the atmospheric aerosols options to setup.log. More...
 
void cs_atmo_chem_initialize_dlconc0 (void)
 initialize gaseous and particulate concentrations and aerosol number More...
 
void cs_atmo_chemistry_initialize_conc_profiles (void)
 initialize (allocate) chemistry concentrations profiles More...
 
void cs_atmo_chem_exp_source_terms (int f_id, cs_real_t st_exp[])
 Computes the explicit chemical source term for atmospheric chemistry in case of a semi-coupled resolution. More...
 
void cs_atmo_compute_gaseous_chemistry (void)
 Calls the rosenbrock resolution for atmospheric chemistry. More...
 

Function Documentation

◆ cs_atmo_aerosol_finalize()

void cs_atmo_aerosol_finalize ( void  )

This function finalizes the external aerosol code.

◆ cs_atmo_aerosol_get_gas()

void cs_atmo_aerosol_get_gas ( cs_real_t array)

This function fills the given array with gas concentrations from the external aerosol code.

Parameters
[out]arraygas concentrations

◆ cs_atmo_aerosol_initialize()

void cs_atmo_aerosol_initialize ( void  )

This function initializes the external aerosol code.

◆ cs_atmo_aerosol_log_setup()

void cs_atmo_aerosol_log_setup ( void  )

Print the atmospheric aerosols options to setup.log.

◆ cs_atmo_aerosol_nuclea()

void cs_atmo_aerosol_nuclea ( cs_real_t nc,
const cs_real_t rom,
const cs_real_t qldia,
const cs_real_t pphy,
const cs_real_t refrad 
)

Compute aerosol cloud droplets nucleation when using the atmospheric humid model using a microphysical model.

It is taken into account as an additional step split from advection-diffusion equation, hence the droplet number is first clipped if necessary.

Parameters
[out]ncdroplet number (scalar) in 1/cm**3
[in]romdensity of air in kg/m**3
[in]qldiamass fraction of liquid water in kg/kg
[in]pphytrue pressure in pascals
[in]refradradiative cooling

◆ cs_atmo_aerosol_time_advance()

void cs_atmo_aerosol_time_advance ( void  )

This function computes a time step of gaseous chemistry and aerosols dynamic using the external aerosol code.

◆ cs_atmo_chem_exp_source_terms()

void cs_atmo_chem_exp_source_terms ( int  f_id,
cs_real_t  st_exp[] 
)

Computes the explicit chemical source term for atmospheric chemistry in case of a semi-coupled resolution.

Parameters
[in]f_idfield id
[out]st_expexplicit part of the source term

◆ cs_atmo_chem_initialize_dlconc0()

void cs_atmo_chem_initialize_dlconc0 ( void  )

initialize gaseous and particulate concentrations and aerosol number

◆ cs_atmo_chemistry_finalize()

void cs_atmo_chemistry_finalize ( void  )

Finalize atmospheric chemistry structures.

◆ cs_atmo_chemistry_initialization_deactivate()

void cs_atmo_chemistry_initialization_deactivate ( void  )

Deactivate chemistry initialization procedure.

◆ cs_atmo_chemistry_initialize_conc_profiles()

void cs_atmo_chemistry_initialize_conc_profiles ( void  )

initialize (allocate) chemistry concentrations profiles

◆ cs_atmo_chemistry_initialize_reacnum()

void cs_atmo_chemistry_initialize_reacnum ( void  )

Initialize chemistry cell kinetic rates arrays.

◆ cs_atmo_chemistry_log_setup()

void cs_atmo_chemistry_log_setup ( void  )

Print the atmospheric chemistry options to setup.log.

◆ cs_atmo_chemistry_need_initialization()

int cs_atmo_chemistry_need_initialization ( void  )

Check if the chemistry module needs initialization.

Returns
int value : 1 if needed, 0 if not

◆ cs_atmo_chemistry_set_aerosol_file_name()

void cs_atmo_chemistry_set_aerosol_file_name ( const char *  file_name)

This function sets the file name to initialize the aerosol library.

Parameters
[in]file_namename of the file.

◆ cs_atmo_chemistry_set_spack_file_name()

void cs_atmo_chemistry_set_spack_file_name ( const char *  file_name)

This function set the file name of the SPACK file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_compute_gaseous_chemistry()

void cs_atmo_compute_gaseous_chemistry ( void  )

Calls the rosenbrock resolution for atmospheric chemistry.

◆ cs_atmo_declare_chem_from_spack()

void cs_atmo_declare_chem_from_spack ( void  )

This function declares additional transported variables for atmospheric module for the chemistry defined from SPACK.

◆ cs_atmo_init_chemistry()

void cs_atmo_init_chemistry ( void  )

Initialize chemistry array.

◆ cs_atmo_read_aerosol()

void cs_atmo_read_aerosol ( void  )

Reads initial aerosol concentration and number.

◆ cs_atmo_read_chemistry_profile()

void cs_atmo_read_chemistry_profile ( int  mode)

Reads the chemistry profile data for the atmospheric chemistry.

Parameters
[in]modeif false reading of dimensions only else reading of data

◆ cs_atmo_set_aero_conc_file_name()

void cs_atmo_set_aero_conc_file_name ( const char *  file_name)

This function set the file name of the aerosol file.

This function set the file name of the aerosol concentration file.

Parameters
[in]file_namename of the file.

◆ cs_atmo_set_chem_conc_file_name()

void cs_atmo_set_chem_conc_file_name ( const char *  file_name)

This function set the file name of the chemistry file.

Parameters
[in]file_namename of the file.