8.2
general documentation
cs_combustion_gas.h
Go to the documentation of this file.
1 #ifndef __CS_COMBUSTION_GAS_H__
2 #define __CS_COMBUSTION_GAS_H__
3 
4 /*============================================================================
5  * Gas combustion model.
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2024 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Standard C library headers
32  *----------------------------------------------------------------------------*/
33 
34 /*----------------------------------------------------------------------------
35  * Local headers
36  *----------------------------------------------------------------------------*/
37 
38 #include "cs_defs.h"
39 #include "cs_field.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
50 #define CS_COMBUSTION_GAS_MAX_GLOBAL_SPECIES 25
51 
53 #define CS_COMBUSTION_GAS_MAX_ATOMIC_SPECIES 5
54 
56 #define CS_COMBUSTION_GAS_MAX_OXYDANTS 3
57 
59 #define CS_COMBUSTION_GAS_MAX_ELEMENTARY_COMPONENTS 20
60 
62 #define CS_COMBUSTION_GAS_MAX_GLOBAL_REACTIONS 1
63 
65 #define CS_COMBUSTION_GAS_MAX_TABULATION_POINTS 50
66 
67 /*============================================================================
68  * Type definitions
69  *============================================================================*/
70 
72 /*------------------------------*/
73 
74 typedef enum {
75 
77 
80 
83 
86 
89 
92 
95 
99 
103 
107 
111 
115 
119 
123 
127 
131 
135 
137 
139 /*--------------------------------------------*/
140 
141 typedef struct {
142 
143  /* Generic members
144  ---------------
145  (keep aligned with gas combustion, so that we can
146  move to an object inheritance model in the future) */
147 
157  double pcigas;
159  double xco2;
160  double xh2o;
164 
167 
170 
173 
176 
179 
180  /* Members specific to the gas combustion model
181  -------------------------------------------- */
182 
185  char *data_file_name; /* Name of thermochemistry data file */
186 
187  bool use_janaf;
190  int iic;
191  int iico2;
192  int iio2;
193  int isoot;
195  double hinfue;
196  double tinfue;
197  double tinoxy;
198  double hinoxy;
200  double xsoot;
201  double rosoot;
205 
210 
215 
218 
223 
224  /* Numerical parameters
225  -------------------- */
226 
227  double srrom;
232  double fmin_lwc;
233  double fmax_lwc;
234  double hmin_lwc;
235  double hmax_lwc;
236 
238 
239 /*============================================================================
240  * Global variables
241  *============================================================================*/
242 
246 
247 /*=============================================================================
248  * Public function prototypes
249  *============================================================================*/
250 
251 /*----------------------------------------------------------------------------*/
252 /*
253  * \brief Activate gas combustion model.
254  *
255  * \return pointer to gas combustion model structure.
256  *
257  * \param[in] type gas combustion model type
258  */
259 /*----------------------------------------------------------------------------*/
260 
263 
264 /*----------------------------------------------------------------------------*/
265 /*
266  * \brief Set the thermochemical data file name.
267  *
268  * \param[in] file_name name of the file.
269  */
270 /*----------------------------------------------------------------------------*/
271 
272 void
274 
275 /*----------------------------------------------------------------------------*/
276 /*
277  * \brief Compute molar and mass fractions of
278  * elementary species Ye, Xe (fuel, O2, CO2, H2O, N2) from
279  * global species Yg (fuel, oxidant, products).
280  *
281  * \param[in] yg global mass fraction
282  * \param[out] ye elementary mass fraction
283  * \param[out] xe elementary molar fraction
284  */
285 /*----------------------------------------------------------------------------*/
286 
287 void
289  cs_real_t ye[],
290  cs_real_t xe[]);
291 
292 /*----------------------------------------------------------------------------*/
293 /*
294  * \brief Print the gas combustion module options to setup.log.
295  */
296 /*----------------------------------------------------------------------------*/
297 
298 void
300 
301 /*----------------------------------------------------------------------------*/
302 
304 
305 #endif /* __CS_COMBUSTION_GAS_H__ */
#define CS_COMBUSTION_GAS_MAX_OXYDANTS
Definition: cs_combustion_gas.h:56
cs_combustion_gas_model_t * cs_combustion_gas_set_model(cs_combustion_gas_model_type_t type)
Activate gas combustion model.
Definition: cs_combustion_gas.c:200
cs_combustion_gas_model_t * cs_glob_combustion_gas_model
Definition: cs_combustion_gas.c:99
void cs_combustion_gas_log_setup(void)
Print the gas combustion module options to setup.log.
Definition: cs_combustion_gas.c:414
#define CS_COMBUSTION_GAS_MAX_ATOMIC_SPECIES
Definition: cs_combustion_gas.h:53
void cs_combustion_gas_yg2xye(const cs_real_t yg[], cs_real_t ye[], cs_real_t xe[])
Compute molar and mass fractions of elementary species Ye, Xe (fuel, O2, CO2, H2O,...
Definition: cs_combustion_gas.c:364
void cs_combustion_gas_set_thermochemical_data_file(const char *file_name)
Set the thermochemical data file name.
Definition: cs_combustion_gas.c:336
cs_combustion_gas_model_type_t
Definition: cs_combustion_gas.h:74
@ CS_COMBUSTION_3PT_ADIABATIC
Definition: cs_combustion_gas.h:79
@ CS_COMBUSTION_EBU_CONSTANT_PERMEATIC
Definition: cs_combustion_gas.h:102
@ CS_COMBUSTION_EBU_CONSTANT_ADIABATIC
Definition: cs_combustion_gas.h:98
@ CS_COMBUSTION_SLFM_STEADY_PERMEATIC
Definition: cs_combustion_gas.h:88
@ CS_COMBUSTION_LW_2PEAK_PERMEATIC
Definition: cs_combustion_gas.h:118
@ CS_COMBUSTION_SLFM_PROGRESS_PERMEATIC
Definition: cs_combustion_gas.h:94
@ CS_COMBUSTION_LW_4PEAK_PERMEATIC
Definition: cs_combustion_gas.h:134
@ CS_COMBUSTION_LW_3PEAK_PERMEATIC
Definition: cs_combustion_gas.h:126
@ CS_COMBUSTION_EBU_VARIABLE_PERMEATIC
Definition: cs_combustion_gas.h:110
@ CS_COMBUSTION_LW_2PEAK_ADIABATIC
Definition: cs_combustion_gas.h:114
@ CS_COMBUSTION_LW_4PEAK_ADIABATIC
Definition: cs_combustion_gas.h:130
@ CS_COMBUSTION_3PT_PERMEATIC
Definition: cs_combustion_gas.h:82
@ CS_COMBUSTION_SLFM_STEADY_ADIABATIC
Definition: cs_combustion_gas.h:85
@ CS_COMBUSTION_LW_3PEAK_ADIABATIC
Definition: cs_combustion_gas.h:122
@ CS_COMBUSTION_GAS_NONE
Definition: cs_combustion_gas.h:76
@ CS_COMBUSTION_SLFM_PROGRESS_ADIABATIC
Definition: cs_combustion_gas.h:91
@ CS_COMBUSTION_EBU_VARIABLE_ADIABATIC
Definition: cs_combustion_gas.h:106
#define CS_COMBUSTION_GAS_MAX_TABULATION_POINTS
Definition: cs_combustion_gas.h:65
#define CS_COMBUSTION_GAS_MAX_ELEMENTARY_COMPONENTS
Definition: cs_combustion_gas.h:59
#define CS_COMBUSTION_GAS_MAX_GLOBAL_SPECIES
Definition: cs_combustion_gas.h:50
#define CS_COMBUSTION_GAS_MAX_GLOBAL_REACTIONS
Definition: cs_combustion_gas.h:62
#define BEGIN_C_DECLS
Definition: cs_defs.h:528
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
#define END_C_DECLS
Definition: cs_defs.h:529
real(c_double), dimension(:), pointer, save wmolg
molar mass of a global species
Definition: ppthch.f90:133
real(c_double), dimension(:,:), pointer, save cpgazg
cpgazg(ij) is the massic calorific capacity (J/kg/K) of the i-th global secies at temperature th(j)
Definition: ppthch.f90:127
real(c_double), dimension(:), pointer, save th
temperature (in K)
Definition: ppthch.f90:119
real(c_double), dimension(:), pointer, save fs
Mixing rate at the stoichiometry.
Definition: ppthch.f90:143
real(c_double), dimension(:), pointer, save wmolat
molar mass of atoms
Definition: ppthch.f90:136
real(c_double), dimension(:), pointer, save wmole
molar mass of an elementary gas component
Definition: ppthch.f90:130
double precision, dimension(:,:), pointer, save compog
Definition: coincl.f90:56
double precision, dimension(:,:), pointer, save coefeg
Definition: coincl.f90:52
real(c_double), dimension(:), pointer, save oxyco2
Definition: ppcpfu.f90:41
real(c_double), dimension(:), pointer, save oxyn2
Definition: ppcpfu.f90:41
real(c_double), dimension(:), pointer, save oxyh2o
Definition: ppcpfu.f90:41
Definition: cs_combustion_gas.h:141
double hinfue
Definition: cs_combustion_gas.h:195
double hmax_lwc
Definition: cs_combustion_gas.h:235
int iio2
Definition: cs_combustion_gas.h:192
cs_combustion_gas_model_type_t type
Definition: cs_combustion_gas.h:183
int n_gas_el_comp
Definition: cs_combustion_gas.h:148
bool use_janaf
Definition: cs_combustion_gas.h:187
int iic
Definition: cs_combustion_gas.h:190
double tinfue
Definition: cs_combustion_gas.h:196
double rosoot
Definition: cs_combustion_gas.h:201
double fmin_lwc
Definition: cs_combustion_gas.h:232
double pcigas
Definition: cs_combustion_gas.h:157
int n_reactions
Definition: cs_combustion_gas.h:152
char * data_file_name
Definition: cs_combustion_gas.h:185
int n_tab_points
Definition: cs_combustion_gas.h:155
int isoot
Definition: cs_combustion_gas.h:193
int n_atomic_species
Definition: cs_combustion_gas.h:150
int n_gas_species
Definition: cs_combustion_gas.h:149
int iico2
Definition: cs_combustion_gas.h:191
double hinoxy
Definition: cs_combustion_gas.h:198
double hmin_lwc
Definition: cs_combustion_gas.h:234
double xco2
Definition: cs_combustion_gas.h:159
double fmax_lwc
Definition: cs_combustion_gas.h:233
double srrom
Definition: cs_combustion_gas.h:227
double xh2o
Definition: cs_combustion_gas.h:160
double tinoxy
Definition: cs_combustion_gas.h:197
double xsoot
Definition: cs_combustion_gas.h:200