9.2
general documentation
cs_coal.h
Go to the documentation of this file.
1#ifndef CS_COAL_H
2#define CS_COAL_H
3
4/*============================================================================
5 * Coal combustion model.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 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 "base/cs_defs.h"
39#include "base/cs_field.h"
40
41/*============================================================================
42 * Macro definitions
43 *============================================================================*/
44
46#define CS_COMBUSTION_MAX_COALS 5
47
49#define CS_COMBUSTION_COAL_MAX_OXYDANTS 3
50
52#define CS_COMBUSTION_COAL_MAX_GLOBAL_SPECIES 25
53
55#define CS_COMBUSTION_COAL_MAX_ATOMIC_SPECIES 5
56
58#define CS_COMBUSTION_MAX_CLASSES_PER_COAL 20
59
61#define CS_COMBUSTION_COAL_MAX_CLASSES CS_COMBUSTION_MAX_COALS \
62 * CS_COMBUSTION_MAX_CLASSES_PER_COAL
63
65#define CS_COMBUSTION_COAL_MAX_ELEMENTARY_COMPONENTS 20
66
68#define CS_COMBUSTION_COAL_MAX_TABULATION_POINTS 8
69
71#define CS_COMBUSTION_COAL_MAX_SOLIDS CS_COMBUSTION_MAX_COALS * 4
72
73/*============================================================================
74 * Type definitions
75 *============================================================================*/
76
78/*------------------------------*/
79
80typedef enum {
81
83
86
88
90/*---------------------------------------------*/
91
92typedef struct {
93
94 /* Generic members
95 ---------------
96 (keep aligned with gas combustion, so that we can
97 move to an object inheritance model in the future) */
98
108 double pcigas;
110 double xco2;
111 double xh2o;
115
118
121
124
127
130
133
134 /* Members specific to the coal combustion model
135 --------------------------------------------- */
136
140 int nclacp;
142 int nsolid;
145 int noxyd;
147 int idrift;
149 int ieqco2;
155 int ihtco2;
157 int ieqnox;
159 int imdnox;
175 int irb;
180 double ckabs0;
183 int n_classes_per_coal[CS_COMBUSTION_MAX_COALS];
184
189
190 /* Properties of dry coal
191 ---------------------- */
192
195
198
201
204
207
210
213
216
219
222
225
228
231
234
237
240
243
246
248 double crepn1[CS_COMBUSTION_MAX_COALS][2];
249
251 double crepn2[CS_COMBUSTION_MAX_COALS][2];
252
255
257 double xashsec[CS_COMBUSTION_MAX_COALS];
258
261
264
265 /* Kinetic parameters for devolatilization (Kobayashi's model)
266 ----------------------------------------------------------- */
267
270
273
277
281
285
288
291
294
297
300
303
304 /* Kinetics of heterogeneous coke combustion (shrinking sphere model)
305 ------------------------------------------------------------------ */
306
309
312
315
318
321
324
325 /* Enthalpy of reactive coal, coke, and ash
326 ---------------------------------------- */
327
330
333
336
339
343
346
349
350 /* By class (deduced properties)
351 ----------------------------- */
352
355
358
361
364
367
370
373
374 /* Data relative to combustion of gaseous species
375 ---------------------------------------------- */
376
377 int ico;
378 int io2;
379 int ih2o;
380 int in2;
381 int ico2;
385
388
390 int ichx1;
391
393 int ichx2;
394
397
400
402
416
418
427
429
435
438
439 int ihy;
440 int ih2s;
441 int iso2;
442 int ihcn;
443 int inh3;
445 /* Complement table
446 ---------------- */
447
450
452 int npoc;
453
454 /* Combustion of coke by H2O
455 ------------------------- */
456
459
468
469 /* NOx model
470 --------- */
471
474
477
480
483
486
489
492
495
498
501
504
507
510
512 double wmchx1;
513
515 double wmchx2;
516
517 /* Ids of coal combustion fields
518 ----------------------------- */
519
529 int ihgas;
531 int iyco2;
532 int iyhcn;
533 int iynh3;
534 int iyno;
536 int ihox;
541
544
545 int if4m;
546 int if5m;
547 int if6m;
548 int if7m;
550 int if8m;
552 int if9m;
555 int ifvp2m;
567
570
573
576
579
600
601 int irom1;
602 int immel;
604 int igrb;
616
619
622
625
628
631
634
637
640
643
646
649
662 int ighcn1;
663 int ighcn2;
664 int ignoth;
665 int ignh31;
666 int ignh32;
668 int ifhcnd;
669 int ifhcnc;
670 int ifnh3d;
671 int ifnh3c;
672 int ifnohc;
673 int ifnonh;
674 int ifnoch;
675 int ifnoth;
676 int ifhcnr;
677 int icnohc;
678 int icnonh;
679 int icnorb;
683 /* Numerical parameters
684 -------------------- */
685
686 double srrom;
691
692/*=============================================================================
693 * Global variables
694 *============================================================================*/
695
699
700/* molar volume under normal pressure and temperature conditions
701 (1 atmosphere, 0 degres C) in m-3 */
702
703extern const double cs_coal_trefth;
704extern const double cs_coal_prefth;
705extern const double cs_coal_volmol;
706
707/* ids for atom types in wmolat */
708extern const int cs_coal_atom_id_c;
709extern const int cs_coal_atom_id_h;
710extern const int cs_coal_atom_id_o;
711extern const int cs_coal_atom_id_n;
712extern const int cs_coal_atom_id_s;
713
714/* precision for tests */
715extern const double cs_coal_epsilon;
716
717/*============================================================================
718 * Public function prototypes
719 *============================================================================*/
720
721/*----------------------------------------------------------------------------*/
722/*
723 * \brief Return coal combustion model type.
724 *
725 * \return type of active coal combustion model
726 * (CS_COMBUSTION_COAL_NONE if model not active)
727 */
728/*----------------------------------------------------------------------------*/
729
732
733/*----------------------------------------------------------------------------*/
734/*
735 * \brief Activate coal combustion model.
736 *
737 * \return pointer to coal combustion model structure.
738 *
739 * \param[in] type coal combustion model type
740 */
741/*----------------------------------------------------------------------------*/
742
745
746/*----------------------------------------------------------------------------*/
747/*
748 * \brief Specific setup operations for pulverized coal combustion model.
749 */
750/*----------------------------------------------------------------------------*/
751
752void
753cs_coal_setup(void);
754
755/*----------------------------------------------------------------------------*/
759/*----------------------------------------------------------------------------*/
760
761void
763
764/*----------------------------------------------------------------------------*/
765/*
766 * \brief Add variable fields for pulverized coal combustion model.
767 */
768/*----------------------------------------------------------------------------*/
769
770void
772
773/*----------------------------------------------------------------------------*/
777/*----------------------------------------------------------------------------*/
778
779void
781
782/*----------------------------------------------------------------------------*/
783/*
784 * \brief Compute mass transfer terms between the continous and dispersed phase.
785 */
786/*----------------------------------------------------------------------------*/
787
788void
790
791/*----------------------------------------------------------------------------*/
792/*
793 * \brief Take in account the radiative source terms in the particle equation
794 * of a given class for pulverized coal flame.
795 *
796 * \param[in] f pointer to scalar field
797 * \param[in, out] smbrs right and side (explicit ST contribution)
798 * \param[in, out] rovsdt system diagonal (implicit ST contribution)
799 */
800/*----------------------------------------------------------------------------*/
801
802void
804 cs_real_t *smbrs,
805 cs_real_t *rovsdt);
806
807/*----------------------------------------------------------------------------*/
808
809#endif /* CS_COAL__ */
Field descriptor.
Definition: cs_field.h:275
const double cs_coal_prefth
Definition: cs_coal.cpp:104
const double cs_coal_trefth
Definition: cs_coal.cpp:101
#define CS_COMBUSTION_COAL_MAX_SOLIDS
Definition: cs_coal.h:71
void cs_coal_mass_transfer(void)
Compute mass transfer terms between the continous and dispersed phase.
Definition: cs_coal_mass_transfer.cpp:96
void cs_combustion_coal_log_setup(void)
Print pulverized combustion module options to setup.log.
Definition: cs_coal.cpp:522
cs_coal_model_type_t
Definition: cs_coal.h:80
@ CS_COMBUSTION_COAL_NONE
Definition: cs_coal.h:82
@ CS_COMBUSTION_COAL_STANDARD
Definition: cs_coal.h:84
@ CS_COMBUSTION_COAL_WITH_DRYING
Definition: cs_coal.h:85
cs_coal_model_type_t cs_coal_model_get_type(void)
Return coal combustion model type.
Definition: cs_coal.cpp:267
const int cs_coal_atom_id_s
Definition: cs_coal.cpp:115
void cs_coal_add_variable_fields(void)
Add variable fields for pulverized coal combustion model.
Definition: cs_coal.cpp:548
const double cs_coal_volmol
Definition: cs_coal.cpp:108
void cs_coal_add_property_fields(void)
Add property fields for pulverized coal combustion model.
Definition: cs_coal.cpp:859
void cs_coal_setup(void)
Specific setup operations for pulverized coal combustion model.
Definition: cs_coal.cpp:411
#define CS_COMBUSTION_COAL_MAX_CLASSES
Definition: cs_coal.h:61
const int cs_coal_atom_id_h
Definition: cs_coal.cpp:112
#define CS_COMBUSTION_COAL_MAX_ATOMIC_SPECIES
Definition: cs_coal.h:55
#define CS_COMBUSTION_COAL_MAX_TABULATION_POINTS
Definition: cs_coal.h:68
cs_coal_model_t * cs_glob_coal_model
Definition: cs_coal.cpp:95
#define CS_COMBUSTION_COAL_MAX_OXYDANTS
Definition: cs_coal.h:49
const int cs_coal_atom_id_o
Definition: cs_coal.cpp:113
void cs_coal_rad_transfer_st(const cs_field_t *f, cs_real_t *smbrs, cs_real_t *rovsdt)
Take in account the radiative source terms in the particle equation of a given class for pulverized c...
Definition: cs_coal.cpp:1069
const int cs_coal_atom_id_c
Definition: cs_coal.cpp:111
#define CS_COMBUSTION_MAX_COALS
Definition: cs_coal.h:46
const int cs_coal_atom_id_n
Definition: cs_coal.cpp:114
cs_coal_model_t * cs_coal_model_set_model(cs_coal_model_type_t type)
Activate coal combustion model.
Definition: cs_coal.cpp:286
#define CS_COMBUSTION_COAL_MAX_GLOBAL_SPECIES
Definition: cs_coal.h:52
#define CS_COMBUSTION_COAL_MAX_ELEMENTARY_COMPONENTS
Definition: cs_coal.h:65
const double cs_coal_epsilon
Definition: cs_coal.cpp:118
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int icnorb
Definition: cs_coal.h:679
int ifnh3d
Definition: cs_coal.h:670
int ifnoth
Definition: cs_coal.h:675
int icnonh
Definition: cs_coal.h:678
int ifnh3c
Definition: cs_coal.h:671
int ifhcnr
Definition: cs_coal.h:676
int ighcn2
Definition: cs_coal.h:663
int ignh32
Definition: cs_coal.h:666
int ignh31
Definition: cs_coal.h:665
int ifhcnd
Definition: cs_coal.h:668
int ifhcnc
Definition: cs_coal.h:669
int ifnohc
Definition: cs_coal.h:672
int ignoth
Definition: cs_coal.h:664
int ifnoch
Definition: cs_coal.h:674
int ifnonh
Definition: cs_coal.h:673
int ighcn1
Definition: cs_coal.h:662
int icnohc
Definition: cs_coal.h:677
int immel
Definition: cs_coal.h:602
int igrb
Definition: cs_coal.h:604
int irom1
Definition: cs_coal.h:601
int ibcarbone
Definition: cs_coal.h:650
int iboxygen
Definition: cs_coal.h:651
int ibhydrogen
Definition: cs_coal.h:652
int if8m
Definition: cs_coal.h:550
int if5m
Definition: cs_coal.h:546
int iynh3
Definition: cs_coal.h:533
int iyhcn
Definition: cs_coal.h:532
int ihox
Definition: cs_coal.h:536
int if6m
Definition: cs_coal.h:547
int iyco2
Definition: cs_coal.h:531
int if7m
Definition: cs_coal.h:548
int if4m
Definition: cs_coal.h:545
int ihgas
Definition: cs_coal.h:529
int if9m
Definition: cs_coal.h:552
int iyno
Definition: cs_coal.h:534
int ifvp2m
Definition: cs_coal.h:555
Definition: cs_coal.h:92
int imdnox
Definition: cs_coal.h:159
int n_gas_el_comp
Definition: cs_coal.h:99
int ico2
Definition: cs_coal.h:381
int ichx1
Definition: cs_coal.h:390
int iso2
Definition: cs_coal.h:441
int in2
Definition: cs_coal.h:380
int ih2o
Definition: cs_coal.h:379
int ichx2
Definition: cs_coal.h:393
int ih2s
Definition: cs_coal.h:440
int nsolid
Definition: cs_coal.h:142
int ihcn
Definition: cs_coal.h:442
double wmchx2
Definition: cs_coal.h:515
double pcigas
Definition: cs_coal.h:108
int n_reactions
Definition: cs_coal.h:103
double ckabs0
Definition: cs_coal.h:180
int n_tab_points
Definition: cs_coal.h:106
int ieqco2
Definition: cs_coal.h:149
int inh3
Definition: cs_coal.h:443
int nclacp
Definition: cs_coal.h:140
int ihtco2
Definition: cs_coal.h:155
int ihy
Definition: cs_coal.h:439
int ieqnox
Definition: cs_coal.h:157
int n_atomic_species
Definition: cs_coal.h:101
cs_coal_model_type_t type
Definition: cs_coal.h:137
int idrift
Definition: cs_coal.h:147
int n_gas_species
Definition: cs_coal.h:100
int n_coals
Definition: cs_coal.h:139
int io2
Definition: cs_coal.h:378
int irb
Definition: cs_coal.h:175
double wmchx1
Definition: cs_coal.h:512
double xco2
Definition: cs_coal.h:110
double srrom
Definition: cs_coal.h:686
int npoc
Definition: cs_coal.h:452
double xh2o
Definition: cs_coal.h:111
int ihth2o
Definition: cs_coal.h:458
int noxyd
Definition: cs_coal.h:145
int ico
Definition: cs_coal.h:377