9.0
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-2025 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
44
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
50#define CS_COMBUSTION_MAX_COALS 5
51
53#define CS_COMBUSTION_COAL_MAX_OXYDANTS 3
54
56#define CS_COMBUSTION_COAL_MAX_GLOBAL_SPECIES 25
57
59#define CS_COMBUSTION_COAL_MAX_ATOMIC_SPECIES 5
60
62#define CS_COMBUSTION_MAX_CLASSES_PER_COAL 20
63
65#define CS_COMBUSTION_COAL_MAX_CLASSES CS_COMBUSTION_MAX_COALS \
66 * CS_COMBUSTION_MAX_CLASSES_PER_COAL
67
69#define CS_COMBUSTION_COAL_MAX_ELEMENTARY_COMPONENTS 20
70
72#define CS_COMBUSTION_COAL_MAX_TABULATION_POINTS 8
73
75#define CS_COMBUSTION_COAL_MAX_SOLIDS CS_COMBUSTION_MAX_COALS * 4
76
77/*============================================================================
78 * Type definitions
79 *============================================================================*/
80
82/*------------------------------*/
83
84typedef enum {
85
87
90
92
94/*---------------------------------------------*/
95
96typedef struct {
97
98 /* Generic members
99 ---------------
100 (keep aligned with gas combustion, so that we can
101 move to an object inheritance model in the future) */
102
112 double pcigas;
114 double xco2;
115 double xh2o;
119
122
125
128
131
134
137
138 /* Members specific to the coal combustion model
139 --------------------------------------------- */
140
144 int nclacp;
146 int nsolid;
149 int noxyd;
151 int idrift;
153 int ieqco2;
159 int ihtco2;
161 int ieqnox;
163 int imdnox;
179 int irb;
184 double ckabs0;
187 int n_classes_per_coal[CS_COMBUSTION_MAX_COALS];
188
193
194 /* Properties of dry coal
195 ---------------------- */
196
199
202
205
208
211
214
217
220
223
226
229
232
235
238
241
244
247
250
252 double crepn1[CS_COMBUSTION_MAX_COALS][2];
253
255 double crepn2[CS_COMBUSTION_MAX_COALS][2];
256
259
261 double xashsec[CS_COMBUSTION_MAX_COALS];
262
265
268
269 /* Kinetic parameters for devolatilization (Kobayashi's model)
270 ----------------------------------------------------------- */
271
274
277
281
285
289
292
295
298
301
304
307
308 /* Kinetics of heterogeneous coke combustion (shrinking sphere model)
309 ------------------------------------------------------------------ */
310
313
316
319
322
325
328
329 /* Enthalpy of reactive coal, coke, and ash
330 ---------------------------------------- */
331
334
337
340
343
347
350
353
354 /* By class (deduced properties)
355 ----------------------------- */
356
359
362
365
368
371
374
377
378 /* Data relative to combustion of gaseous species
379 ---------------------------------------------- */
380
381 int ico;
382 int io2;
383 int ih2o;
384 int in2;
385 int ico2;
389
392
394 int ichx1;
395
397 int ichx2;
398
401
404
406
420
422
431
433
439
442
443 int ihy;
444 int ih2s;
445 int iso2;
446 int ihcn;
447 int inh3;
449 /* Complement table
450 ---------------- */
451
454
456 int npoc;
457
458 /* Combustion of coke by H2O
459 ------------------------- */
460
463
472
473 /* NOx model
474 --------- */
475
478
481
484
487
490
493
496
499
502
505
508
511
514
516 double wmchx1;
517
519 double wmchx2;
520
521 /* Ids of coal combustion fields
522 ----------------------------- */
523
533 int ihgas;
535 int iyco2;
536 int iyhcn;
537 int iynh3;
538 int iyno;
540 int ihox;
545
548
549 int if4m;
550 int if5m;
551 int if6m;
552 int if7m;
554 int if8m;
556 int if9m;
559 int ifvp2m;
571
574
577
580
583
604
605 int irom1;
606 int immel;
608 int igrb;
620
623
626
629
632
635
638
641
644
647
650
653
666 int ighcn1;
667 int ighcn2;
668 int ignoth;
669 int ignh31;
670 int ignh32;
672 int ifhcnd;
673 int ifhcnc;
674 int ifnh3d;
675 int ifnh3c;
676 int ifnohc;
677 int ifnonh;
678 int ifnoch;
679 int ifnoth;
680 int ifhcnr;
681 int icnohc;
682 int icnonh;
683 int icnorb;
687 /* Numerical parameters
688 -------------------- */
689
690 double srrom;
695
696/*=============================================================================
697 * Global variables
698 *============================================================================*/
699
703
704/* molar volume under normal pressure and temperature conditions
705 (1 atmosphere, 0 degres C) in m-3 */
706
707extern const double cs_coal_trefth;
708extern const double cs_coal_prefth;
709extern const double cs_coal_volmol;
710
711/* ids for atom types in wmolat */
712extern const int cs_coal_atom_id_c;
713extern const int cs_coal_atom_id_h;
714extern const int cs_coal_atom_id_o;
715extern const int cs_coal_atom_id_n;
716extern const int cs_coal_atom_id_s;
717
718/* precision for tests */
719extern const double cs_coal_epsilon;
720
721/*============================================================================
722 * Public function prototypes
723 *============================================================================*/
724
725/*----------------------------------------------------------------------------*/
726/*
727 * \brief Return coal combustion model type.
728 *
729 * \return type of active coal combustion model
730 * (CS_COMBUSTION_COAL_NONE if model not active)
731 */
732/*----------------------------------------------------------------------------*/
733
736
737/*----------------------------------------------------------------------------*/
738/*
739 * \brief Activate coal combustion model.
740 *
741 * \return pointer to coal combustion model structure.
742 *
743 * \param[in] type coal combustion model type
744 */
745/*----------------------------------------------------------------------------*/
746
749
750/*----------------------------------------------------------------------------*/
751/*
752 * \brief Specific setup operations for pulverized coal combustion model.
753 */
754/*----------------------------------------------------------------------------*/
755
756void
757cs_coal_setup(void);
758
759/*----------------------------------------------------------------------------*/
763/*----------------------------------------------------------------------------*/
764
765void
767
768/*----------------------------------------------------------------------------*/
769/*
770 * \brief Add variable fields for pulverized coal combustion model.
771 */
772/*----------------------------------------------------------------------------*/
773
774void
776
777/*----------------------------------------------------------------------------*/
781/*----------------------------------------------------------------------------*/
782
783void
785
786/*----------------------------------------------------------------------------*/
787/*
788 * \brief Compute mass transfer terms between the continous and dispersed phase.
789 */
790/*----------------------------------------------------------------------------*/
791
792void
794
795/*----------------------------------------------------------------------------*/
796/*
797 * \brief Take in account the radiative source terms in the particle equation
798 * of a given class for pulverized coal flame.
799 *
800 * \param[in] f pointer to scalar field
801 * \param[in, out] smbrs right and side (explicit ST contribution)
802 * \param[in, out] rovsdt system diagonal (implicit ST contribution)
803 */
804/*----------------------------------------------------------------------------*/
805
806void
808 cs_real_t *smbrs,
809 cs_real_t *rovsdt);
810
811/*----------------------------------------------------------------------------*/
812
814
815#endif /* __CS_COAL__ */
const double cs_coal_prefth
Definition: cs_coal.cpp:108
const double cs_coal_trefth
Definition: cs_coal.cpp:105
#define CS_COMBUSTION_COAL_MAX_SOLIDS
Definition: cs_coal.h:75
void cs_coal_mass_transfer(void)
Compute mass transfer terms between the continous and dispersed phase.
Definition: cs_coal_mass_transfer.cpp:101
void cs_combustion_coal_log_setup(void)
Print pulverized combustion module options to setup.log.
Definition: cs_coal.cpp:558
cs_coal_model_type_t
Definition: cs_coal.h:84
@ CS_COMBUSTION_COAL_NONE
Definition: cs_coal.h:86
@ CS_COMBUSTION_COAL_STANDARD
Definition: cs_coal.h:88
@ CS_COMBUSTION_COAL_WITH_DRYING
Definition: cs_coal.h:89
cs_coal_model_type_t cs_coal_model_get_type(void)
Return coal combustion model type.
Definition: cs_coal.cpp:296
const int cs_coal_atom_id_s
Definition: cs_coal.cpp:119
void cs_coal_add_variable_fields(void)
Add variable fields for pulverized coal combustion model.
Definition: cs_coal.cpp:584
const double cs_coal_volmol
Definition: cs_coal.cpp:112
void cs_coal_add_property_fields(void)
Add property fields for pulverized coal combustion model.
Definition: cs_coal.cpp:892
void cs_coal_setup(void)
Specific setup operations for pulverized coal combustion model.
Definition: cs_coal.cpp:447
#define CS_COMBUSTION_COAL_MAX_CLASSES
Definition: cs_coal.h:65
const int cs_coal_atom_id_h
Definition: cs_coal.cpp:116
#define CS_COMBUSTION_COAL_MAX_ATOMIC_SPECIES
Definition: cs_coal.h:59
#define CS_COMBUSTION_COAL_MAX_TABULATION_POINTS
Definition: cs_coal.h:72
cs_coal_model_t * cs_glob_coal_model
Definition: cs_coal.cpp:99
#define CS_COMBUSTION_COAL_MAX_OXYDANTS
Definition: cs_coal.h:53
const int cs_coal_atom_id_o
Definition: cs_coal.cpp:117
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:1102
const int cs_coal_atom_id_c
Definition: cs_coal.cpp:115
#define CS_COMBUSTION_MAX_COALS
Definition: cs_coal.h:50
const int cs_coal_atom_id_n
Definition: cs_coal.cpp:118
cs_coal_model_t * cs_coal_model_set_model(cs_coal_model_type_t type)
Activate coal combustion model.
Definition: cs_coal.cpp:315
#define CS_COMBUSTION_COAL_MAX_GLOBAL_SPECIES
Definition: cs_coal.h:56
#define CS_COMBUSTION_COAL_MAX_ELEMENTARY_COMPONENTS
Definition: cs_coal.h:69
const double cs_coal_epsilon
Definition: cs_coal.cpp:122
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int icnorb
Definition: cs_coal.h:683
int ifnh3d
Definition: cs_coal.h:674
int ifnoth
Definition: cs_coal.h:679
int icnonh
Definition: cs_coal.h:682
int ifnh3c
Definition: cs_coal.h:675
int ifhcnr
Definition: cs_coal.h:680
int ighcn2
Definition: cs_coal.h:667
int ignh32
Definition: cs_coal.h:670
int ignh31
Definition: cs_coal.h:669
int ifhcnd
Definition: cs_coal.h:672
int ifhcnc
Definition: cs_coal.h:673
int ifnohc
Definition: cs_coal.h:676
int ignoth
Definition: cs_coal.h:668
int ifnoch
Definition: cs_coal.h:678
int ifnonh
Definition: cs_coal.h:677
int ighcn1
Definition: cs_coal.h:666
int icnohc
Definition: cs_coal.h:681
int immel
Definition: cs_coal.h:606
int igrb
Definition: cs_coal.h:608
int irom1
Definition: cs_coal.h:605
int ibcarbone
Definition: cs_coal.h:654
int iboxygen
Definition: cs_coal.h:655
int ibhydrogen
Definition: cs_coal.h:656
int if8m
Definition: cs_coal.h:554
int if5m
Definition: cs_coal.h:550
int iynh3
Definition: cs_coal.h:537
int iyhcn
Definition: cs_coal.h:536
int ihox
Definition: cs_coal.h:540
int if6m
Definition: cs_coal.h:551
int iyco2
Definition: cs_coal.h:535
int if7m
Definition: cs_coal.h:552
int if4m
Definition: cs_coal.h:549
int ihgas
Definition: cs_coal.h:533
int if9m
Definition: cs_coal.h:556
int iyno
Definition: cs_coal.h:538
int ifvp2m
Definition: cs_coal.h:559
real(c_double), dimension(:), pointer, save wmolat
molar mass of atoms
Definition: ppthch.f90:89
real(c_double), dimension(:), pointer, save wmole
molar mass of an elementary gas component
Definition: ppthch.f90:83
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 oxyo2
Definition: ppcpfu.f90:41
real(c_double), dimension(:), pointer, save oxyh2o
Definition: ppcpfu.f90:41
Definition: cs_coal.h:96
int imdnox
Definition: cs_coal.h:163
int n_gas_el_comp
Definition: cs_coal.h:103
int ico2
Definition: cs_coal.h:385
int ichx1
Definition: cs_coal.h:394
int iso2
Definition: cs_coal.h:445
int in2
Definition: cs_coal.h:384
int ih2o
Definition: cs_coal.h:383
int ichx2
Definition: cs_coal.h:397
int ih2s
Definition: cs_coal.h:444
int nsolid
Definition: cs_coal.h:146
int ihcn
Definition: cs_coal.h:446
double wmchx2
Definition: cs_coal.h:519
double pcigas
Definition: cs_coal.h:112
int n_reactions
Definition: cs_coal.h:107
double ckabs0
Definition: cs_coal.h:184
int n_tab_points
Definition: cs_coal.h:110
int ieqco2
Definition: cs_coal.h:153
int inh3
Definition: cs_coal.h:447
int nclacp
Definition: cs_coal.h:144
int ihtco2
Definition: cs_coal.h:159
int ihy
Definition: cs_coal.h:443
int ieqnox
Definition: cs_coal.h:161
int n_atomic_species
Definition: cs_coal.h:105
cs_coal_model_type_t type
Definition: cs_coal.h:141
int idrift
Definition: cs_coal.h:151
int n_gas_species
Definition: cs_coal.h:104
int n_coals
Definition: cs_coal.h:143
int io2
Definition: cs_coal.h:382
int irb
Definition: cs_coal.h:179
double wmchx1
Definition: cs_coal.h:516
double xco2
Definition: cs_coal.h:114
double srrom
Definition: cs_coal.h:690
int npoc
Definition: cs_coal.h:456
double xh2o
Definition: cs_coal.h:115
int ihth2o
Definition: cs_coal.h:462
int noxyd
Definition: cs_coal.h:149
int ico
Definition: cs_coal.h:381
Field descriptor.
Definition: cs_field.h:158